DEFAULT CFLAGS SETTING

Christian Walther cptsalek at gmail.com
Fri Mar 9 20:04:34 UTC 2007


On 09/03/07, RW <fbsd06 at mlists.homeunix.com> wrote:
> On Thu, 08 Mar 2007 21:04:50 -0800
> Garrett Cooper <youshi10 at u.washington.edu> wrote:
>
> > Christian Walther wrote:
> > > On 08/03/07, White Hat <pigskin_referee at yahoo.com> wrote:
[...]
> > > CFLAGS can be defined in /etc/make.conf
> > > My CFLAGS is set to -O2 -pipe.
>
> Note that by explicitly defining CFLAGS, you override the
> -fno-strict-aliasing that's set by default.
>
> FreeBSD provides sensible defaults for all of these things, based on
> CPUTYPE.

Thanks for pointing this out. I did read
/usr/share/examples/etc/make.conf to get some sensible settings, which
is why I've chosen it to set CFLAGS like I did.
Since -fno-strict-aliasing is that important, it should probably be
mentioned in /usr/share/examples/etc/make.conf

Just my 2 cents
Christian


More information about the freebsd-questions mailing list