qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [PATCH] configure: don't apply -O2 if extra-cflags se


From: Paolo Bonzini
Subject: Re: [Qemu-trivial] [PATCH] configure: don't apply -O2 if extra-cflags sets -O
Date: Fri, 29 May 2015 13:12:21 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0


On 29/05/2015 12:56, Alex Bennée wrote:
> If your trying to debug and want to force -O0 then don't allow the
> configure script to try and set -O2. You can use --enable-debug but that
> enables a lot more stuff by default.
> 
> Signed-off-by: Alex Bennée <address@hidden>
> ---
>  configure | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index b707429..be1f354 100755
> --- a/configure
> +++ b/configure
> @@ -4240,7 +4240,10 @@ if test "$gcov" = "yes" ; then
>    CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
>    LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
>  elif test "$debug" = "no" ; then
> -  CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"
> +    if test "${EXTRA_CFLAGS#*-O}" = "$EXTRA_CFLAGS"; then
> +        CFLAGS="-O2 $CFLAGS"
> +    fi
> +    CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"
>  fi
>  
>  ##########################################
> 

Why aren't EXTRA_CFLAGS applied _after_ CFLAGS instead of before?

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]