Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Dec 2002 05:11:30 -0800
From:      David Schultz <dschultz@uclink.Berkeley.EDU>
To:        Evren Yurtesen <eyurtese@turkuamk.fi>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: -O3 optimization?
Message-ID:  <20021205131130.GB11161@HAL9000.homeunix.com>
In-Reply-To: <Pine.A41.4.10.10212051227480.117918-100000@bessel.tekniikka.turkuamk.fi>
References:  <Pine.A41.4.10.10212051227480.117918-100000@bessel.tekniikka.turkuamk.fi>

next in thread | previous in thread | raw e-mail | index | archive | help
Thus spake Evren Yurtesen <eyurtese@turkuamk.fi>:
> I wonder if a source is compiled with -O3 without any problems, might
> there be any problems in binaries which might create crashes?

You're welcome to try it out, but it isn't supported.  GCC has a
few obscure misfeatures at -O3.  Some applications break at -O3,
usually because they violate C's aliasing rules or contain broken
inline assembly.  At one point, the kernel's TCP checksum code had
some difficult-to-solve problems with -O3, and I'm not sure
whether that has been fixed.

Despite all of that, I built world and kernel with -O2 a while ago
and noticed no problems whatsoever.  Just note that you've been
warned, and you probably won't see a significant performance
improvement anyway.

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




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