When I try to compile linux kernel 2.2.17 under redhat 7.0, I get the following error message when I run 'make bzImage' in /usr/src/linux: make[1]: Entering directory `/usr/src/linux-2.2.17/arch/i386/lib' make all_targets make[2]: Entering directory `/usr/src/linux-2.2.17/arch/i386/lib' cc -D__KERNEL__ -I/usr/src/linux/include -D__ASSEMBLY__ -D__SMP__ -traditional -c checksum.S -o checksum.o checksum.S:231: badly punctuated parameter list in #define checksum.S:237: badly punctuated parameter list in #define make[2]: *** [checksum.o] Error 1 make[2]: Leaving directory `/usr/src/linux-2.2.17/arch/i386/lib' make[1]: *** [first_rule] Error 2 make[1]: Leaving directory `/usr/src/linux-2.2.17/arch/i386/lib' make: *** [_dir_arch/i386/lib] Error 2 If I cd to /usr/src/linux/arch/i386/lib, and type cc -v -D__KERNEL__ -I/usr/src/linux/include -D__ASSEMBLY__ -D__SMP__ -traditional -c checksum.S -o checksum.o I get: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 20000731 (Red Hat Linux 7.0) /usr/lib/gcc-lib/i386-redhat-linux/2.96/tradcpp0 -lang-asm -v -I/usr/src/linux/include -D__GNUC__=2 -D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -D__tune_i386__ -D__KERNEL__ -D__ASSEMBLY__ -D__SMP__ checksum.S /tmp/ccr5NJiN.s GNU traditional CPP version 2.96 20000731 (Red Hat Linux 7.0) checksum.S:231: badly punctuated parameter list in #define checksum.S:237: badly punctuated parameter list in #define So it looks like the current version of cpp has a problem with this file. I have been able to get this kernel version to compile under 6.2, so I am assuming that there is a problem with 7.0.
I've tried to compile linux kernel 2.2.16 under redhat 7.0, and I ge the exact same errors!
Use kgcc to compile the 2.2 kernel. It's a problem withthe kernel sources, IIRC.
I'm a little confused. How is it a problem with kernel sources when I can compile 2.2.17 under RedHat 6.0, 6.1, 6.2? Is there documentation someplace that states that one should kgcc as opposed to gcc? If not, then I think that there should at least be an errata or addendum of some kind. (It may be there, and I just don't know where it is.) But the fact remains that if I can compile the kernel sources using the method outlined there (ie, using gcc) under RedHat 6.0-6.2, but not under 7.0, and if I need to use something else under 7.0, then I think that this is at least a documentation bug if it is not stated anywhere. Don't get me wrong, I do appreciate the work-around. But something needs to mentioned somewhere, even if the problem does lie with the kernel source.
It was a problem with the kernel sources fixed in 2.2.18 - note that having it work with one specific compiler does not mean it's done right.