Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Oct 2005 10:00:52 +0200
From:      Claus Guttesen <kometen@gmail.com>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        freebsd-amd64@freebsd.org, Kris Kennaway <kris@obsecurity.org>
Subject:   Re: /etc/make.conf flags for Intel
Message-ID:  <b41c75520510110100v128eabe4m@mail.gmail.com>
In-Reply-To: <20051011090639.K69382@delplex.bde.org>
References:  <BF6ED99E.2166%webmaster@machowto.com> <b41c75520510091438p11ac250am@mail.gmail.com> <20051010072456.GA52280@xor.obsecurity.org> <b41c75520510100046t17d1bd10m@mail.gmail.com> <20051010174358.GA34176@xor.obsecurity.org> <20051011090639.K69382@delplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> >> /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 "?=3D" 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 "?=3D" doesn't work there, so "=3D" 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=3Dpentium4 -DIN_GCC
-DHAVE_CONFIG_H -DPREFIX=3D\"/usr\"
-I/usr/obj/usr/src/gnu/usr.bin/cc/cc_int/../cc_tools
-I/usr/src/gnu/usr.bin/cc/cc_int/../cc_tools
-I/usr/src/gnu/usr.bin/cc/cc_int/../../../../contrib/gcc
-I/usr/src/gnu/usr.bin/cc/cc_int/../../../../contrib/gcc/config
-DHAVE_CONFIG_H -DTARGET_NAME=3D\"i386-undermydesk-freebsd\" -DIN_GCC=20
-c /usr/src/gnu/usr.bin/cc/cc_int/../../../../contrib/gcc/stor-layout.c

I have added CPUTYPE=3Dp4 in make.conf.

regards
Clauis



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b41c75520510110100v128eabe4m>