OSDN Git Service

Do not complain about gcc 4.2 for user-space
authorWilly Tarreau <w@1wt.eu>
Sun, 13 Jan 2008 11:14:07 +0000 (12:14 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 3 Feb 2008 15:35:55 +0000 (16:35 +0100)
commitba8bc43468f467ef129f757fba4d122f0bf8fbc1
tree7b5c6dc706eb305a913bc23831876c46fd77b382
parent89daf14f822d33ecb1ea5681fd968bd6a46cfc8c
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>
include/linux/compiler.h