AW: Hardened LFS - GCC4

mclinden at informed.net mclinden at informed.net
Thu Aug 18 17:33:48 PDT 2005


While I would certainly like to see a move of LFS (and HLFS) toward GCC4 
and would welcome the appropriate patches to make this happen, I would 
urge a little caution in adopting GCC 4 (before GCC 4.1 is released) as 
part of the mainstream for at least a couple of reasons.

First, "hardened" is typically inconsistent with bleeding edge insofar as 
technology is concerned. I have identified at least a couple of problems 
with GCC 4.0 (some of which have been fixed in the CVS) in compiling the 
kernel and other code which cause me to be concerned that it is not, yet, 
ready for production use insofar as hardened systems are concerned.

Second, the operating system is rarely the end point. Many existing 
applications do not compile, correctly, with GCC 4 and while I expect that 
to change as GCC 4 matures, if you are actually looking to run something 
on a GCC 4 compiled system it would be good to know that it actually 
compiles. I know a couple of distros (like Debian) are shipping with GCC 4 
and I've seen various reports of compile issues with MySQL and other apps 
to scare me just a little. Also, certain kernel drivers (including some 
core kernel drivers) did not compile with GCC 4 (again, some have been 
fixed in CVS).

Third, as Linus Torvalds has pointed out, (http://kerneltrap.org/node/4126
), the early releases of new GCC versions tend to be, in his words, 
"slower, generate worse code, buggier". I am not suggesting that GCC 4.X 
will not, eventually, be a far better compiler than the GCC 3 series, but 
I'm not sure.


I've built a production HLFS system running Oracle 10g using GCC 4.0 for 
everything BUT the kernel. But I am reluctant to see GCC 4.0 adopted for 
HLFS until sufficient regression testing has been performed to know that 
common variations of Linux 2.6.x and related apps/utilities compiled 
cleanly with a 4.x compiler.

Sean 







More information about the hlfs-dev mailing list