From patchwork Wed Sep 11 13:41:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel Kerneis X-Patchwork-Id: 274285 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CC3792C00AB for ; Wed, 11 Sep 2013 23:42:50 +1000 (EST) Received: from localhost ([::1]:36012 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJkgx-0000k2-Ow for incoming@patchwork.ozlabs.org; Wed, 11 Sep 2013 09:42:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJkgd-0000jd-Q8 for qemu-devel@nongnu.org; Wed, 11 Sep 2013 09:42:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJkgX-0003bg-Qf for qemu-devel@nongnu.org; Wed, 11 Sep 2013 09:42:27 -0400 Received: from wanbli.kerneis.info ([2001:41d0:8:38ad::1]:42007) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJkgX-0003YY-Hb for qemu-devel@nongnu.org; Wed, 11 Sep 2013 09:42:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kerneis.info; s=wanbli-rsa1; h=Message-Id:Date:Subject:Cc:To:From; bh=U/KCZKo6ejkLWCssoa4bBP1VcxiHz04xWu0NPHZnOSY=; b=SjP2AlAcWrZ6EAWrfSPVoLtpds34XY6nU2LqKKOB8Ngp1lnUMoKAdrh4QTfSiqQBU4PMPflS1XVLvZTxYoqtrD0IHyCXFDH19XNME8bALb89fNw/IOsa4uocI6+dx0hrUCa+YPdFq95ZVLiUYALoaQMm+7bNiZKJ6cnYVBN1HSs=; Received: from wowasieco.sm.cl.cam.ac.uk ([128.232.60.22] helo=localhost) by wanbli.kerneis.info with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1VJkgQ-0007s2-Fb; Wed, 11 Sep 2013 13:42:14 +0000 From: Gabriel Kerneis To: qemu-devel@nongnu.org Date: Wed, 11 Sep 2013 14:41:52 +0100 Message-Id: <1378906912-14015-1-git-send-email-gabriel@kerneis.info> X-Mailer: git-send-email 1.7.10.4 X-SA-Exim-Connect-IP: 128.232.60.22 X-SA-Exim-Mail-From: gabriel@kerneis.info X-SA-Exim-Scanned: No (on wanbli.kerneis.info); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:41d0:8:38ad::1 Cc: qemu-trivial@nongnu.org, Peter Maydell , Gabriel Kerneis Subject: [Qemu-devel] [PATCH] Quote extra_cflags in config-host.mak X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The variable extra_cflags needs to be quoted in config-host.mak, in particular because it might contain parentheses that would otherwise be interpreted by the shell when reloading the file. For instance, if one wants to define some attribute with configure: ./configure --extra-cflags="-Dcoroutine_fn='__attribute__((coroutine_fn))'" A more robust approach would be to escape every variable properly, but there is no portable equivalent to bash's "printf %q" solution. The current patch, while not bullet-proof, works well in the common case. Signed-off-by: Gabriel Kerneis --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index e989609..23114de 100755 --- a/configure +++ b/configure @@ -3681,7 +3681,7 @@ if test "$mingw32" = "no" ; then echo "qemu_localstatedir=$local_statedir" >> $config_host_mak fi echo "qemu_helperdir=$libexecdir" >> $config_host_mak -echo "extra_cflags=$EXTRA_CFLAGS" >> $config_host_mak +echo "extra_cflags=\"$EXTRA_CFLAGS\"" >> $config_host_mak echo "extra_ldflags=$EXTRA_LDFLAGS" >> $config_host_mak echo "qemu_localedir=$qemu_localedir" >> $config_host_mak echo "libs_softmmu=$libs_softmmu" >> $config_host_mak