]> git.proxmox.com Git - mirror_qemu.git/commitdiff
configure: Modify detection of supported warning options
authorStefan Weil <sw@weilnetz.de>
Wed, 4 Jan 2012 21:47:16 +0000 (22:47 +0100)
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Fri, 13 Jan 2012 10:36:59 +0000 (10:36 +0000)
Reversing the order of the warning options and -Werror is important
when clang is used instead of gcc. It changes nothing for gcc.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
configure

index eb9a01d657c3898d3b1ccb168af60cb04a70f93f..467e87bf098b2ac3f6224801a1a2fbbf41f26f29 100755 (executable)
--- a/configure
+++ b/configure
@@ -1105,7 +1105,7 @@ cat > $TMPC << EOF
 int main(void) { return 0; }
 EOF
 for flag in $gcc_flags; do
-    if compile_prog "$flag -Werror" "" ; then
+    if compile_prog "-Werror $flag" "" ; then
        QEMU_CFLAGS="$QEMU_CFLAGS $flag"
     fi
 done