[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH 1/4] configure: move EXTRA_CFLAGS append to the
From: |
Alex Bennée |
Subject: |
[Qemu-devel] [RFC PATCH 1/4] configure: move EXTRA_CFLAGS append to the end |
Date: |
Mon, 25 Jan 2016 16:49:15 +0000 |
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 <address@hidden>
---
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