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:
parent
bee5a5fb11
commit
bd947d30b6
2
configure
vendored
2
configure
vendored
@ -1105,7 +1105,7 @@ cat > $TMPC << EOF
|
|||||||
int main(void) { return 0; }
|
int main(void) { return 0; }
|
||||||
EOF
|
EOF
|
||||||
for flag in $gcc_flags; do
|
for flag in $gcc_flags; do
|
||||||
if compile_prog "$flag -Werror" "" ; then
|
if compile_prog "-Werror $flag" "" ; then
|
||||||
QEMU_CFLAGS="$QEMU_CFLAGS $flag"
|
QEMU_CFLAGS="$QEMU_CFLAGS $flag"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user