Is it possible to propagate the CFLAGS settings from make.conf (at least march and mcpu, to hint alignment and instruction scheduling!) into the Makefiles of the kernel tree during emerge? Kernel compiles still generate code optimized for the PPro (march=i686).
the cpu optimization is handled through the .config file or the kernel ... in other words, its something you change by using `make menuconfig` and setting up the kernel yourself i believe the default cpu is PPro
Tried it with menuconfig - does not have the desired effect (at least in the Gentoo crypto-2.4.19-r7 kernel): menuconfig offers "Pentium4", but even when "Pentium4" is selected, the kernel is built with "-march=i686" (i.e. PPro), not with "-march=pentium4" as expected. I believe the kernel config mechanism has to limit its flags to the oldest gcc allowed for kernel compiles (2.72?) and hence will not use any flags introduced with gcc 3.[012].
this is true, the kernel cant start using flags that are available in gcc3 cause that would piss off a lot people (and leave a lot more people in the dark wondering why the damned thing wont compile) or at least right now they cant :) maybe once ggc3 goes stable they'll consider it as an option with newer kernels, but i highly doubt they'll ever support them in older ones
That's why I asked if the Gentoo linux ebuild could either patch the i386 arch Makefile or propagate the CFLAGS from make.conf into it dynamically, as described in /usr/src/linux/Documentation/kbuild/makefiles.txt
lolo-sources and mjc-sources use my gcc 3.1 optimization patch, which uses -march=pentium3/4/athlon/etc.