grub: add -fno-reorder-functions into STAGE2_COMPILE
This is used to work around a gcc-4.6's bug about the option. [YOCTO #1099] (From OE-Core rev: 909c8ff0f27064fd01853ef92977488e6a097dfe) Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
0c1f2d7a19
commit
776da950e8
|
@ -0,0 +1,31 @@
|
|||
Upstream-Status: Inappropriate [disable feature]
|
||||
|
||||
After the commit "tcmode-default: switch to gcc 4.6.0 for x86, x86-64 & arm",
|
||||
we got bug 1099 (http://bugzilla.yoctoproject.org/show_bug.cgi?id=1099):
|
||||
|
||||
Running "install --stage2=/ssd/boot/grub/stage2 /boot/grub/stage1(hd0)
|
||||
/boot/grub/stage2 p /boot/grub/menu list" failed
|
||||
Error 6: Mismatched or corrupt version of stage1/stage2
|
||||
|
||||
This turned out to be a gcc's bug. See
|
||||
https://bugs.gentoo.org/show_bug.cgi?id=360513
|
||||
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39333
|
||||
|
||||
Upstream gcc seems uninterested in the bug, so at present we can disable the
|
||||
option as a workaround. Thanks Ryan Hill for the investigation and the
|
||||
workaround patch.
|
||||
|
||||
Dexuan Cui <dexuan.cui@intel.com>
|
||||
Wed Jun 29 20:21:39 CST 2011
|
||||
|
||||
--- grub-0.97/stage2/Makefile.am.orig
|
||||
+++ grub-0.97/stage2/Makefile.am
|
||||
@@ -79,7 +79,7 @@
|
||||
HERCULES_FLAGS =
|
||||
endif
|
||||
|
||||
-STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
|
||||
+STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-reorder-functions -fno-builtin -nostdinc \
|
||||
$(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS)
|
||||
|
||||
STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000
|
|
@ -11,10 +11,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b \
|
|||
file://grub/main.c;beginline=3;endline=9;md5=22a5f28d2130fff9f2a17ed54be90ed6"
|
||||
|
||||
RDEPENDS_${PN} = "diffutils"
|
||||
PR = "r3"
|
||||
PR = "r4"
|
||||
|
||||
SRC_URI = "ftp://alpha.gnu.org/gnu/grub/grub-${PV}.tar.gz; \
|
||||
file://autohell.patch;apply=yes "
|
||||
file://no-reorder-functions.patch \
|
||||
file://autohell.patch "
|
||||
|
||||
SRC_URI[md5sum] = "cd3f3eb54446be6003156158d51f4884"
|
||||
SRC_URI[sha256sum] = "4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b"
|
||||
|
|
Loading…
Reference in New Issue