summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp
diff options
context:
space:
mode:
authorDexuan Cui <dexuan.cui@intel.com>2011-06-29 20:32:32 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-29 15:04:59 +0100
commit776da950e880fbbc490b0c810565dbcbc9e539cf (patch)
tree93993ea7dfb5827da358b09416522c8ecf0a1c8b /meta/recipes-bsp
parent0c1f2d7a1948bd1533474625ce056bd7f0117f12 (diff)
downloadpoky-776da950e880fbbc490b0c810565dbcbc9e539cf.tar.gz
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>
Diffstat (limited to 'meta/recipes-bsp')
-rw-r--r--meta/recipes-bsp/grub/grub-0.97/no-reorder-functions.patch31
-rw-r--r--meta/recipes-bsp/grub/grub_0.97.bb5
2 files changed, 34 insertions, 2 deletions
diff --git a/meta/recipes-bsp/grub/grub-0.97/no-reorder-functions.patch b/meta/recipes-bsp/grub/grub-0.97/no-reorder-functions.patch
new file mode 100644
index 0000000000..70037e47c7
--- /dev/null
+++ b/meta/recipes-bsp/grub/grub-0.97/no-reorder-functions.patch
@@ -0,0 +1,31 @@
1Upstream-Status: Inappropriate [disable feature]
2
3After the commit "tcmode-default: switch to gcc 4.6.0 for x86, x86-64 & arm",
4we got bug 1099 (http://bugzilla.yoctoproject.org/show_bug.cgi?id=1099):
5
6Running "install --stage2=/ssd/boot/grub/stage2 /boot/grub/stage1(hd0)
7 /boot/grub/stage2 p /boot/grub/menu list" failed
8Error 6: Mismatched or corrupt version of stage1/stage2
9
10This turned out to be a gcc's bug. See
11https://bugs.gentoo.org/show_bug.cgi?id=360513
12http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39333
13
14Upstream gcc seems uninterested in the bug, so at present we can disable the
15option as a workaround. Thanks Ryan Hill for the investigation and the
16workaround patch.
17
18Dexuan Cui <dexuan.cui@intel.com>
19Wed Jun 29 20:21:39 CST 2011
20
21--- grub-0.97/stage2/Makefile.am.orig
22+++ grub-0.97/stage2/Makefile.am
23@@ -79,7 +79,7 @@
24 HERCULES_FLAGS =
25 endif
26
27-STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
28+STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-reorder-functions -fno-builtin -nostdinc \
29 $(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS)
30
31 STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000
diff --git a/meta/recipes-bsp/grub/grub_0.97.bb b/meta/recipes-bsp/grub/grub_0.97.bb
index 131d942cc7..82b065a7b8 100644
--- a/meta/recipes-bsp/grub/grub_0.97.bb
+++ b/meta/recipes-bsp/grub/grub_0.97.bb
@@ -11,10 +11,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b \
11 file://grub/main.c;beginline=3;endline=9;md5=22a5f28d2130fff9f2a17ed54be90ed6" 11 file://grub/main.c;beginline=3;endline=9;md5=22a5f28d2130fff9f2a17ed54be90ed6"
12 12
13RDEPENDS_${PN} = "diffutils" 13RDEPENDS_${PN} = "diffutils"
14PR = "r3" 14PR = "r4"
15 15
16SRC_URI = "ftp://alpha.gnu.org/gnu/grub/grub-${PV}.tar.gz; \ 16SRC_URI = "ftp://alpha.gnu.org/gnu/grub/grub-${PV}.tar.gz; \
17 file://autohell.patch;apply=yes " 17 file://no-reorder-functions.patch \
18 file://autohell.patch "
18 19
19SRC_URI[md5sum] = "cd3f3eb54446be6003156158d51f4884" 20SRC_URI[md5sum] = "cd3f3eb54446be6003156158d51f4884"
20SRC_URI[sha256sum] = "4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b" 21SRC_URI[sha256sum] = "4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b"