I can't get a kernel to compile under RH7. (Specifically, kernel 2.2.16). This machine was upgraded from RH6.0. I can compile the same kernel fine under 6.2. Under 7, towards the end of the compile, an error is given about a badly formed #define in checksum.S. I tried doing a clean install of 7 on another machine and couldn't compile it on that one either. I ended up having to compile the kernel on a 6.2 machine and copy it on to the one with 7. Modules seem to compile correctly.
sounds like you didn't use kgcc (see bugs 18012 and 18060)
Use kgcc. The kernel doesnt do everything as nicely as it should so gets caught out with the new compiler.