From: Andrew Morton Date: Tue, 22 May 2007 21:50:21 +0000 (+0200) Subject: gcc-4.1.0 is bust X-Git-Tag: v2.6.16.52-rc1~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4eedb20374aadf2e4c8781a47a349b8897a43074;p=thirdparty%2Fkernel%2Fstable.git gcc-4.1.0 is bust Keith says Compiling 2.6.19-rc6 with gcc version 4.1.0 (SUSE Linux), wait_hpet_tick is optimized away to a never ending loop and the kernel hangs on boot in timer setup. 0000001a : 1a: 55 push %ebp 1b: 89 e5 mov %esp,%ebp 1d: eb fe jmp 1d This is not a problem with gcc 3.3.5. Adding barrier() calls to wait_hpet_tick does not help, making the variables volatile does. And the consensus is that gcc-4.1.0 is busted. Adrian Bunk: Changed from a #warning to an #error for 2.6.16. Signed-off-by: Andrew Morton Signed-off-by: Adrian Bunk --- diff --git a/init/main.c b/init/main.c index 5edd3013d8108..847397be23a6b 100644 --- a/init/main.c +++ b/init/main.c @@ -71,6 +71,10 @@ #error Sorry, your GCC is too old. It builds incorrect kernels. #endif +#if __GNUC__ == 4 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 0 +#error gcc-4.1.0 is known to miscompile the kernel. A different compiler version is recommended. +#endif + static int init(void *); extern void init_IRQ(void);