gcc 4.1.0 and 4.1.1 are known to miscompile the kernel: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27781 Usage of weak functions has become a common pattern in the kernel, and usages get added in each kernel version increasing the probability of bugs with each kernel release. This miscompilation of weak functions can result in subtle runtime errors. #error for gcc 4.1.0 and 4.1.1 to prevent users from running into this bug. Note: We already printed a #warning for gcc 4.1.0 due to a different bug. Signed-off-by: Adrian Bunk <bunk@kernel.org> --- If anyone has a better patch please step forward - otherwise I'm proposing this patch. This patch has been sent on: - 26 Jun 2008 ee78871a1d85fe60958748c208389adb4031fefe diff --git a/init/main.c b/init/main.c index f7fb200..bede344 100644 --- a/init/main.c +++ b/init/main.c @@ -76,8 +76,9 @@ * trouble. */ -#if __GNUC__ == 4 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 0 -#warning gcc-4.1.0 is known to miscompile the kernel. A different compiler version is recommended. +/* due to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27781 */ +#if __GNUC__ == 4 && __GNUC_MINOR__ == 1 && (__GNUC_PATCHLEVEL__ == 0 || __GNUC_PATCHLEVEL__ == 1) +#error gcc 4.1.0 and 4.1.1 are known to miscompile the kernel. #endif static int kernel_init(void *); --
| Jon Smirl | 463 kernel developers missing! |
| Nigel Cunningham | Re: [PATCH] Remove process freezer from suspend to RAM pathway |
| Greg KH | Re: [malware-list] [RFC 0/5] [TALPA] Intro to a linux interface for on access scan... |
| Jeff Garzik | Re: Linux 2.6.23-rc9 and a heads-up for the 2.6.24 series.. |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Linus Torvalds | Re: [GIT]: Networking |
| Evgeniy Polyakov | Re: [BUG] New Kernel Bugs |
