loader breaks with -O2 optimizations

Jeremy Chadwick koitsu at FreeBSD.org
Wed Oct 31 07:38:36 PDT 2007


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 |



More information about the freebsd-current mailing list