As an example, Checksum.S and components containing bits of ASM code seem not to compile with EGCS/GCC 2.96 experimental. I don't know if this problem is with my system or not (I've installed only RH7.0 components and all that are necessary; I'm definitely using the GLIBC and the STD libs from the RH7 package). I have found though, that using an older, say 1.1.2, version of EGCS seems to work to compile things like Checksum.S in the arch library of the linux kernel, but it causes more errors in the long run.
The kernel needs to be built with 'kgcc'. The kernel right now contains stuff that isnt clean enough to build with the newer compiler. Edit the top kernel makefile and change the definition of CC
*** Bug 18000 has been marked as a duplicate of this bug. ***
*** Bug 17999 has been marked as a duplicate of this bug. ***
Changng the CC def does not work. It just spawns the compile with a different set of errors.
Depends on what you have done. Either set CC =$(CROSS_COMPILE)kgcc -D__KERNEL__ -I$(HPATH) in the toplevel Makefile, or compile with make CC='kgcc -D__KERNEL__ -I$(HPATH)' or 2.2.18pre will do it for you. Or you can apply http://www.lucon.org/linux/linux-2.2.14-gcc.patch http://www.lucon.org/linux/linux-2.2.17-library.patch and gcc 2.96 should build 2.2 kernel (but if you want to be safe, do one of the former things).