need help on CFLAGS in /etc/make.conf please

Kris Kennaway kris at obsecurity.org
Thu Feb 12 17:13:29 PST 2004


On Thu, Feb 12, 2004 at 06:17:03PM -0600, Paul Seniura wrote:
> 
> Hi y'all,
> 
> I'm trying to find a way to do a CFLAGS+='-O' if and only if such a
> parm was not already provided before 'make' actually runs.
> 
> I had this coded with the single = sign, i.e. without ?= or +=, but
> the process still acts as if += was coded anyway, thus tacking on
> my -O *after* the port's own CFLAGS.
> 
> GCC33 docs say the _last_ -O# is the one that will be used.
> 
> I've seen other discussion on using -O2 but the point seems to be the
> ports that set -O2 explicitly are likely to work correctly.

That's not a good assumption; many ports simply add -O2 (or -O3, or
-O999) because the authors "want their code to run fast".  The set of
ports for which the authors have run full regression suites for all
supported versions of gcc and all supported OS and architecture
combinations is probably the null set.

Kris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20040212/a2d3714c/attachment.bin


More information about the freebsd-hackers mailing list