optimization levels for 6-STABLE build{kernel,world}

Freddie Cash fcash at ocis.net
Tue Sep 12 13:23:31 PDT 2006


On Tue, September 12, 2006 12:22 pm, Marc G. Fournier wrote:
> What are ppl currently using for CFLAGS/COPTFLAGS in /etc/make.conf
> for building kernel/world?  I know awhile back it wasn't recommended
> to go above -O2, for instance, but suspect that has changed ... ?

The defaults are "-O2 -pipe -fno-strict-aliasing".  I stopped manually
setting CFLAGS/COPTFLAGS around the time of 5.1 and haven't really
noticed any changes in performance.  Prior to that, I used "-Os
-pipe".

There are reported problems with not using -fno-strict-aliasing with
parts of the base and/or kernel.

And, the first thing anyone will tell you if you run into any
compile/runtime errors is to put CFLAGS/COPTFLAGS back to the
defaults.  :)

----
Freddie Cash
fcash at ocis.net



More information about the freebsd-stable mailing list