[flac-dev] [PATCH] configure.ac: don't try to unset -g from CFLAGS
Jan Stary
hans at stare.cz
Sun Nov 30 10:30:29 PST 2014
On Nov 30 10:04:18, mle+la at mega-nerd.com wrote:
> 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.
Yes, that's for DEBUG.
But why does it strip -O2 and add -O3 with NDEBUG?
More information about the flac-dev
mailing list