/etc/make.conf flags for Intel

Claus Guttesen kometen at gmail.com
Tue Oct 11 01:00:53 PDT 2005

> >> /usr/share/examples/etc/make.conf is set to -O.
> >
> > The setting in <sys.mk> trumps this documentation file, but you're
> > right, this should be updated there.  Could you please send a PR?
> The example is correct.  It shows how to change the default of "-O2
> -fstrict-aliasing -pipe" to "-O -pipe".  It would be less than useful
> to repeat the default in the examples or in /etc/make.conf.  In the
> example, it would be less than useful because it gives a confusing
> example that should never be copied.  In /etc/make.conf, it would be
> less than useful because any setting of CFLAGS there breaks overriding
> the setting of CFLAGS on the command line or in the environment, so
> setting of CFLAGS there should be avoided, especially almost-null ones
> which have no effect except to break the command line and environment
> settings.  (The breakage is due to having to work around the bug that
> /etc/make.conf is included in sys.mk too late.  CFLAGS should be set
> using "?=" like sys.mk does, but since /etc/make.conf is included after
> CFLAGS is set by that in sys.mk if not earlier, CFLAGS is surely set in
> /etc/make.conf so "?=" doesn't work there, so "=" must be used.)

So what your saying is that one should not override these values in
make.conf but leave them commented out? Doing a buildworld without
CFLAGS does indeed compile using -O2:

cc -O2 -fno-strict-aliasing -pipe -march=pentium4 -DIN_GCC
-DHAVE_CONFIG_H -DTARGET_NAME=\"i386-undermydesk-freebsd\" -DIN_GCC 
-c /usr/src/gnu/usr.bin/cc/cc_int/../../../../contrib/gcc/stor-layout.c

I have added CPUTYPE=p4 in make.conf.


More information about the freebsd-amd64 mailing list