qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/9] Fix checking for compiler flag support


From: Daniel P. Berrange
Subject: [Qemu-devel] [PATCH 2/9] Fix checking for compiler flag support
Date: Mon, 2 Apr 2012 11:50:09 +0100

From: "Daniel P. Berrange" <address@hidden>

Some warning flags have dependancies, eg -Wformat-security cannot
be enabled if -Wformat is not already enabled. The compiler
flag checking code was checking each flag in isolation so several
were not getting enabled. The fix is to supply all previously
confirmed flags when checking a flag

Signed-off-by: Daniel P. Berrange <address@hidden>
---
 configure |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index cd40d17..64ab4dc 100755
--- a/configure
+++ b/configure
@@ -1168,11 +1168,13 @@ gcc_flags="$gcc_flags -Wendif-labels"
 cat > $TMPC << EOF
 int main(void) { return 0; }
 EOF
+warning_flags=
 for flag in $gcc_flags; do
-    if compile_prog "-Werror $flag" "" ; then
-       QEMU_CFLAGS="$QEMU_CFLAGS $flag"
+    if compile_prog "-Werror $warning_flags $flag" "" ; then
+       warning_flags="$warning_flags $flag"
     fi
 done
+QEMU_CFLAGS="$QEMU_CFLAGS $warning_flags"
 
 if test "$static" = "yes" ; then
   if test "$pie" = "yes" ; then
-- 
1.7.7.6




reply via email to

[Prev in Thread] Current Thread [Next in Thread]