Received: from eggs.gnu.org ([2001:4830:134:3::10]:34216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNkKj-0007VJ-Jf for qemu-devel@nongnu.org; Mon, 25 Jan 2016 11:49:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNkKf-0005eQ-Ob for qemu-devel@nongnu.org; Mon, 25 Jan 2016 11:49:41 -0500 Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]:34801) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNkKf-0005eB-FA for qemu-devel@nongnu.org; Mon, 25 Jan 2016 11:49:37 -0500 Received: by mail-wm0-x230.google.com with SMTP id u188so73696664wmu.1 for ; Mon, 25 Jan 2016 08:49:37 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Mon, 25 Jan 2016 16:49:15 +0000 Message-Id: <1453740558-16303-2-git-send-email-alex.bennee@linaro.org> In-Reply-To: <1453740558-16303-1-git-send-email-alex.bennee@linaro.org> References: <1453740558-16303-1-git-send-email-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [RFC PATCH 1/4] configure: move EXTRA_CFLAGS append to the end List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mttcg@listserver.greensocs.com, peter.maydell@linaro.org, mark.burton@greensocs.com, a.rigo@virtualopensystems.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , fred.konrad@greensocs.com When using --extra-cflags to override defaults the flags need to be set at the end lest they be reset by later options. This affects optimisation as well where "-O0 .. -O3" will just takes the most recent option. We also set CFLAGS so the options are passed to other built binaries. Signed-off-by: Alex Bennée --- configure | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 44ac9ab..7d23c6c 100755 --- a/configure +++ b/configure @@ -360,8 +360,7 @@ for opt do ;; --cpu=*) cpu="$optarg" ;; - --extra-cflags=*) QEMU_CFLAGS="$QEMU_CFLAGS $optarg" - EXTRA_CFLAGS="$optarg" + --extra-cflags=*) EXTRA_CFLAGS="$optarg" ;; --extra-ldflags=*) LDFLAGS="$LDFLAGS $optarg" EXTRA_LDFLAGS="$optarg" @@ -4715,6 +4714,10 @@ fi QEMU_CFLAGS="$pixman_cflags $fdt_cflags $QEMU_CFLAGS" libs_softmmu="$pixman_libs $libs_softmmu" +# Now it the time to append extra-cflags +CFLAGS="$CFLAGS $EXTRA_CFLAGS" +QEMU_CFLAGS="$QEMU_CFLAGS $EXTRA_CFLAGS" + echo "Install prefix $prefix" echo "BIOS directory `eval echo $qemu_datadir`" echo "binary directory `eval echo $bindir`" -- 2.7.0