From: Greg Kroah-Hartman Date: Fri, 17 Jul 2009 20:00:31 +0000 (-0700) Subject: .27 patch X-Git-Tag: v2.6.30.2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=056945a6fca2d78d11592d1f412bffdab068f4b4;p=thirdparty%2Fkernel%2Fstable-queue.git .27 patch --- diff --git a/queue-2.6.27/don-t-use-fwrapv-compiler-option-it-s-buggy-in-gcc-4.1.x.patch b/queue-2.6.27/don-t-use-fwrapv-compiler-option-it-s-buggy-in-gcc-4.1.x.patch new file mode 100644 index 00000000000..dd880fbd6b5 --- /dev/null +++ b/queue-2.6.27/don-t-use-fwrapv-compiler-option-it-s-buggy-in-gcc-4.1.x.patch @@ -0,0 +1,45 @@ +From a137802ee839ace40079bebde24cfb416f73208a Mon Sep 17 00:00:00 2001 +From: Linus Torvalds +Date: Sun, 12 Jul 2009 11:25:04 -0700 +Subject: Don't use '-fwrapv' compiler option: it's buggy in gcc-4.1.x + +From: Linus Torvalds + +commit a137802ee839ace40079bebde24cfb416f73208a upstream. + +This causes kernel images that don't run init to completion with certain +broken gcc versions. + +This fixes kernel bugzilla entry: + http://bugzilla.kernel.org/show_bug.cgi?id=13012 + +I suspect the gcc problem is this: + http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28230 + +Fix the problem by using the -fno-strict-overflow flag instead, which +not only does not exist in the known-to-be-broken versions of gcc (it +was introduced later than fwrapv), but seems to be much less disturbing +to gcc too: the difference in the generated code by -fno-strict-overflow +are smaller (compared to using neither flag) than when using -fwrapv. + +Reported-by: Barry K. Nathan +Pushed-by: Frans Pop +Cc: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/Makefile ++++ b/Makefile +@@ -557,7 +557,7 @@ KBUILD_CFLAGS += $(call cc-option,-Wdecl + KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) + + # disable invalid "can't wrap" optimzations for signed / pointers +-KBUILD_CFLAGS += $(call cc-option,-fwrapv) ++KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow) + + # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments + # But warn user when we do so diff --git a/queue-2.6.27/series b/queue-2.6.27/series index 3a9c2335721..0b8d7c86958 100644 --- a/queue-2.6.27/series +++ b/queue-2.6.27/series @@ -5,3 +5,4 @@ fix-iommu-address-space-allocation.patch floppy-fix-lock-imbalance.patch kernel-resource.c-fix-sign-extension-in-reserve_setup.patch tulip-fix-for-mtu-problems-with-802.1q-tagged-frames.patch +don-t-use-fwrapv-compiler-option-it-s-buggy-in-gcc-4.1.x.patch