OSDN Git Service
Do not complain about gcc 4.2 for user-space
Some user-space include compiler.h, so do not disable gcc 4.2
if __KERNEL__ is not defined.
Problem reported and fix confirmed by Gabor Z. Papp :
"
gcc -Wp,-MT,syslinux.o,-MMD,.syslinux.o.d -W -Wall -D_FILE_OFFSET_BITS=64 -g -Os -I. -I.. -I../libinstaller -c -o syslinux.o syslinux.c
In file included from /usr/include/asm/byteorder.h:5,
from /usr/include/linux/msdos_fs.h:11,
from syslinux.c:51:
/usr/include/linux/compiler.h:45:2: error: #error "GCC >= 4.2 miscompiles kernel 2.4, do not use it!"
/usr/include/linux/compiler.h:46:2: error: #error "While the resulting kernel may boot, you will encounter random bugs"
/usr/include/linux/compiler.h:47:2: error: #error "at runtime. Only versions 2.95.3 to 4.1 are known to work reliably."
/usr/include/linux/compiler.h:48:2: error: #error "To build with another version, for instance 3.3, please do"
/usr/include/linux/compiler.h:49:2: error: #error " make bzImage CC=gcc-3.3 "
make[1]: *** [syslinux.o] Error 1
After patching compiler.h, compile was fine.
"
Signed-off-by: Willy Tarreau <w@1wt.eu>