]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
another .30 patch
authorGreg Kroah-Hartman <gregkh@suse.de>
Fri, 17 Jul 2009 19:59:17 +0000 (12:59 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 17 Jul 2009 19:59:17 +0000 (12:59 -0700)
queue-2.6.30/don-t-use-fwrapv-compiler-option-it-s-buggy-in-gcc-4.1.x.patch [new file with mode: 0644]
queue-2.6.30/series

diff --git a/queue-2.6.30/don-t-use-fwrapv-compiler-option-it-s-buggy-in-gcc-4.1.x.patch b/queue-2.6.30/don-t-use-fwrapv-compiler-option-it-s-buggy-in-gcc-4.1.x.patch
new file mode 100644 (file)
index 0000000..b05aded
--- /dev/null
@@ -0,0 +1,45 @@
+From a137802ee839ace40079bebde24cfb416f73208a Mon Sep 17 00:00:00 2001
+From: Linus Torvalds <torvalds@linux-foundation.org>
+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 <torvalds@linux-foundation.org>
+
+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 <barryn@pobox.com>
+Pushed-by: Frans Pop <elendil@planet.nl>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ Makefile |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/Makefile
++++ b/Makefile
+@@ -574,7 +574,7 @@ KBUILD_CFLAGS += $(call cc-option,-Wdecl
+ KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,)
+ # disable invalid "can't wrap" optimizations for signed / pointers
+-KBUILD_CFLAGS += $(call cc-option,-fwrapv)
++KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow)
+ # revert to pre-gcc-4.4 behaviour of .eh_frame
+ KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)
index 68c8669900d7eaf6382b5a9f89542a6b36d9f130..1b1a1fab0618fcc753ba568541a5d27ae6f6a9f9 100644 (file)
@@ -21,3 +21,4 @@ fix-pci_unmap_addr-et-al-on-i386.patch
 fix-iommu-address-space-allocation.patch
 fuse-fix-bad-return-value-in-fuse_file_poll.patch
 fuse-fix-return-value-of-fuse_dev_write.patch
+don-t-use-fwrapv-compiler-option-it-s-buggy-in-gcc-4.1.x.patch