Re: loader breaks with -O2 optimizations

From: Jeremy Chadwick <koitsu_at_FreeBSD.org>
Date: Wed, 31 Oct 2007 07:30:10 -0700
On Wed, Oct 31, 2007 at 02:35:19PM +0100, Dag-Erling Smørgrav wrote:
> Jeremy Chadwick <koitsu_at_FreeBSD.org> writes:
> > Stephan F. Yaraghchi <stephan_at_yaraghchi.org> writes:
> > > I found out that the following line in my make.conf causes
> > > the problem:
> > > 
> > > CFLAGS= -O2 -funroll-loops -pipe
> > You shouldn't have this in your make.conf.  Remove it.  This is very
> > likely breaking a lot more than just loader.
> 
> Uh, no.  Please stop spreading FUD.

Every time it's been discussed, the conclusion reached has been "stop
setting CFLAGS, you're overwriting any previous definition used, which
may be causing problems for you.  Use += or COPTFLAGS."  Even the
Handbook explains the dangers of using CFLAGS= when one should be
CFLAGS+=.

http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/dads-cflags.html

http://lists.freebsd.org/pipermail/freebsd-current/2004-August/034763.html
http://lists.freebsd.org/pipermail/freebsd-questions/2004-February/036214.html
http://www.nabble.com/buildworld-failure-(boot2.ld-too-big-when-CFLAGS-set-in-make.conf)-t4674137.html

-- 
| Jeremy Chadwick                                    jdc at parodius.com |
| Parodius Networking                           http://www.parodius.com/ |
| UNIX Systems Administrator                      Mountain View, CA, USA |
| Making life hard for others since 1977.                  PGP: 4BD6C0CB |
Received on Wed Oct 31 2007 - 13:38:36 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:20 UTC