[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/9] Fix checking for compiler flag support
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 2/9] Fix checking for compiler flag support |
Date: |
Mon, 2 Apr 2012 13:29:37 +0100 |
On 2 April 2012 11:50, Daniel P. Berrange <address@hidden> wrote:
> 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"
The compile_prog function honours QEMU_CFLAGS, so
adding each flag to QEMU_CFLAGS as we confirm it to work
should have the same effect, surely?
-- PMM
- [Qemu-devel] Fix enablement of some compiler warning flags & add some more, Daniel P. Berrange, 2012/04/02
- [Qemu-devel] [PATCH 1/9] Move all compiler warning/optimization flags to the same place, Daniel P. Berrange, 2012/04/02
- [Qemu-devel] [PATCH 2/9] Fix checking for compiler flag support, Daniel P. Berrange, 2012/04/02
- [Qemu-devel] [PATCH 5/9] Add in a large number of extra GCC warnings, Daniel P. Berrange, 2012/04/02
- [Qemu-devel] [PATCH 9/9] Add note about some other options potentially worth enabling, Daniel P. Berrange, 2012/04/02
- [Qemu-devel] [PATCH 3/9] Print out progress when checking compiler flags, Daniel P. Berrange, 2012/04/02
- [Qemu-devel] [PATCH 8/9] Add more format string warning flags, Daniel P. Berrange, 2012/04/02