About the GCC 4.2 update

Marcel Moolenaar xcllnt at mac.com
Tue Jun 5 18:08:49 UTC 2007


All,

GCC 4.2 was just recently imported into the source tree and it's causing
some problems. For one: there's *NO* single optimization level known to
me at this time that produces correct code in all cases. This is a  
biggy!
The best results are to be had with -O -g. Do not compile at -O2 as that
breaks the GNU linker and prevents you from building anything. With -O,
GCC still produces bad code and in particular it breaks the kernel, but
it only breaks the kernel if you don't compile with INVARIANTS and
INVARIANT_SUPPORT. With those options the compiler has a much bigger
chance optimizing the code and thus getting it wrong. With the options
GCC 4.2 is being restricted and the nice side-effect is that it doesn't
have a chance to really get it wrong.

So, if you track -CURRENT and want to upgrade to beyond the GCC 4.2
import, make sure you keep backups or you'll be sorry...

FYI,

-- 
Marcel Moolenaar
xcllnt at mac.com




More information about the freebsd-ia64 mailing list