[flac-dev] [PATCH] Clean up CFLAGS detecting code and add AX macro for _FORTIFY_SOURCE

David Seifert soap at gentoo.org
Sun Feb 5 10:04:30 UTC 2017


On Sun, 2017-02-05 at 20:47 +1100, Erik de Castro Lopo wrote:
> David Seifert wrote:
> 
> > -	AC_PROG_SED
> > -	CFLAGS=$(echo "$CFLAGS" | $SED 's/-O2//')
> > -	CFLAGS="-O3 -funroll-loops $CFLAGS"
> > +	CFLAGS="-O3 -funroll-loops"
> 
> Doesn't this mean that `-O2` and `-O3` will end up in CFLAGS? 
> 
> Erik

No, because the block happens only if ${enable_flags_setting} == yes,
and that can only occur if all CFLAGS/CXXFLAGS/CPPFLAGS/LDFLAGS are
unset. If I do ./configure CFLAGS="-O2", the whole block won't be
triggered (as intended). That block only exists to set defaults for
users running ./configure without any of the aforementioned flags set,
not for users overriding them.

Regards
David


More information about the flac-dev mailing list