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

Erik de Castro Lopo mle+la at mega-nerd.com
Sun Nov 30 10:04:18 PST 2014


Jan Stary wrote:

> >  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.

Thats what I did.
 
> >  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?

Because -O0 makes it easier to follow the logic when actually running it
in a debugger.

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the flac-dev mailing list