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

Richard Coleman richardcoleman at mindspring.com
Fri Feb 13 19:09:42 PST 2004


Paul Seniura wrote:
> Chapter 2 of "FreeBSD Developers' Handbook":
> 
> | 2.4 Compiling with cc
> |
> | -O
> |    Create an optimized version of the executable.  The compiler
> |    performs various clever tricks to try and produce an executable 
> |    that runs faster than normal.  You can add a number after the -O
> |    to specify a higher level of optimization, but this often exposes
> |    bugs in the compiler's optimizer.  For instance, the version of cc
> |    that comes with the 2.1.0 release of FreeBSD is known to produce
> |    bad code with the -O2 option in some circumstances.
> |
> |    Optimization is usually only turned on when compiling a release
> |    version.
> |[...]
> 
> HUH?!?  "the version of cc that comes with 2.1.0" has those -O bugs????
> Good grief, we're running 5.x (-Current, actually)!
> I can't find any mention of any such bugs with GCC 3.x on i386.

Unless there is evidence of more recent gcc bugs, that part of the 
handbook should really be removed.

I can easily imagine the reaction on this list if the reverse were true, 
and the gcc handbook was knocking FreeBSD for a bug in release 3.0 (or 
whatever).

Richard Coleman
richardcoleman at mindspring.com



More information about the freebsd-questions mailing list