Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Mar 2001 15:40:21 -0500
From:      Donn Miller <dmmiller@cvzoom.net>
To:        Roman Shterenzon <roman@harmonic.co.il>
Cc:        Matt Dillon <dillon@earth.backplane.com>, "freebsd-stable@FreeBSD.ORG" <freebsd-stable@FreeBSD.ORG>
Subject:   Re: ARCH flag in new make.conf
Message-ID:  <3AABE2B5.D808C4E0@cvzoom.net>
References:  <Pine.LNX.4.10.10103111145220.18158-100000@shark.harmonic.co.il>

next in thread | previous in thread | raw e-mail | index | archive | help
Roman Shterenzon wrote:
> 
> Just wanted to say that for RELENG_3 with gcc 2.7.2.3 or whatever it was,
> -O2 worked just fine for me (both kernel and userland, I stopped building
> userland with -O2 since 3.3 because it took much more time to build world).
> Also, linux that used the same gcc always built kernel with -O2.
> So, I believe that 2.95.2 is the one that having the problems.

I think that in the case of the FreeBSD kernel or userland, anything
about -O will not help much at all.  The userland code is pretty much
optimized and streamlined as much as possible, i.e., register variables
are spec'd whenever possible.  -O2 helps significantly whenever you have
a lot of very large loops, and I'm not so sure the world+kernel source
code has lots of very large and numerous for and while loops.  Plus, it
prolongs the buildworld time.  -O3 just inlines functions wheverever
possible, bloating things.  Also, I've noticed subtle problems with gcc
and tools when I've built world with anything higher than -O.  For
example, when gcc is built with -O2 or -Os, I've noticed that it starts
acting a little quirky, e.g., eating up large amounts of memory. 
Building world with -O fixes this.

XFree86 4-current has problems with pthreads whenever you build the code
with -O3, i.e., I get "undefined reference to [some pthread function]".
Dropping back to -O2 fixes this.  BTW, XFree86 4-current supports
threading on FreeBSD now by default, right "out of the box".  It's about
time!  Thank you, thank you, whomever committed those changes.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




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