diff options
author | Juan Quintela <quintela@redhat.com> | 2009-09-30 01:10:55 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-05 09:32:44 -0500 |
commit | a316e3788df2781fda119e801e9b3d753f89b752 (patch) | |
tree | dce777f12de5252228dc4e9d52ef498ddf39c88a /configure | |
parent | b6e31c123958f2a7c63c22b09216025ad7b88a77 (diff) | |
download | qemu-a316e3788df2781fda119e801e9b3d753f89b752.tar.gz qemu-a316e3788df2781fda119e801e9b3d753f89b752.tar.bz2 qemu-a316e3788df2781fda119e801e9b3d753f89b752.zip |
Add -Wold-style-* flags
This time, I add them in configure only if target compiler supports it
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1686,6 +1686,16 @@ QEMU_CFLAGS="-U_FORTIFY_SOURCE $QEMU_CFLAGS" QEMU_CFLAGS="-I. -I\$(SRC_PATH) -MMD -MP -MT \$@ $QEMU_CFLAGS" LDFLAGS="-g $LDFLAGS" +gcc_flags="-Wold-style-declaration -Wold-style-definition" +cat > $TMPC << EOF +int main(void) { } +EOF +for flag in $gcc_flags; do + if compile_prog "$QEMU_CFLAGS" "$flag" ; then + QEMU_CFLAGS="$flag $QEMU_CFLAGS" + fi +done + # Consult white-list to determine whether to enable werror # by default. Only enable by default for git builds if test -z "$werror" ; then |