configure: Modify detection of supported warning options

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>
This commit is contained in:
Stefan Weil 2012-01-04 22:47:16 +01:00 committed by Stefan Hajnoczi
parent bee5a5fb11
commit bd947d30b6

2
configure vendored
View File

@ -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