[flac-dev] [PATCH] configure.ac: don't try to unset -g from CFLAGS

Jan Stary hans at stare.cz
Sun Nov 30 04:57:08 PST 2014


On Nov 27 20:41:44, gustavo at zacarias.com.ar wrote:
> The sed expression is wrong, any flags with '-g' in any position gets
> zapped, for example:
> 
> -mfloat-gprs=double (for powerpc e500) -> -mfloatprs=double.
> 
> Which gives build errors and is perfectly valid in real use scenarios to
> switch from e500v1 (single precision) code to e500v2 (double precision) code.
> 
> Signed-off-by: Gustavo Zacarias <gustavo at zacarias.com.ar>
> ---
>  configure.ac | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 3d647ed..94d7c9e 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -348,11 +348,10 @@ fi
>  
>  if test "x$debug" = xtrue; then
>  	CPPFLAGS="-DDEBUG $CPPFLAGS"
> -	CFLAGS=$(echo "$CFLAGS" | sed 's/-g//')
> -	CFLAGS="-g $CFLAGS"
> +	CFLAGS=$(echo "-g $CFLAGS")

Just zap the sed line, and leave

	CFLAGS="-g $CFLAGS"

there; no need to echo anything.

>  else
>  	CPPFLAGS="-DNDEBUG $CPPFLAGS"
> -	CFLAGS=$(echo "$CFLAGS" | sed 's/-O2//;s/-g//')
> +	CFLAGS=$(echo "$CFLAGS" | sed 's/-O2//')
>  	CFLAGS="-O3 -funroll-loops $CFLAGS"

Why is a $debug setting messing with optimization flags at all?



More information about the flac-dev mailing list