summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNitin A Kamble <nitin.a.kamble@intel.com>2012-04-14 01:59:06 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-14 13:26:01 +0100
commit53d629496f344d07e7ab261d789918cd80308b45 (patch)
treee73b3c864dee63c468ca5699692210eac5fd6a77
parent7503db67134cf5007d080eed6771cf88bebbe9bd (diff)
downloadpoky-53d629496f344d07e7ab261d789918cd80308b45.tar.gz
grub-1.99: use gcc-cross for building the target binaries
It was using distro gcc to build binaries for target. This got detected on fedora 17 alpha, on which it hit an gcc-4.7 issue. This Fixes Bug: [Yocto #2291] More information in the patch header Thanks to Saul Wold for suggesting to remove the --target parameter from EXTRA_OECONF var. (From OE-Core rev: 26ae0e53411c1ea3afbb2e0c6d9dc2f1b0690751) Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-bsp/grub/files/grub-1.99-fpmath-sse-387-fix.patch37
-rw-r--r--meta/recipes-bsp/grub/grub-efi-native_1.99.bb5
-rw-r--r--meta/recipes-bsp/grub/grub_1.99.bb5
3 files changed, 43 insertions, 4 deletions
diff --git a/meta/recipes-bsp/grub/files/grub-1.99-fpmath-sse-387-fix.patch b/meta/recipes-bsp/grub/files/grub-1.99-fpmath-sse-387-fix.patch
new file mode 100644
index 0000000000..bea594406f
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/grub-1.99-fpmath-sse-387-fix.patch
@@ -0,0 +1,37 @@
1Upstream-Status: pending
2
3This patch fixes this configure issue for grub when -mfpmath=sse is in the gcc parameters.
4
5configure:20574: i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/usr/local/dev/yocto/grubtest2/build/tmp/sysroots/emenlow -o conftest -O2 -pipe -g -feliminate-unused-debug-types -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef -Wstrict-prototypes -g -falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -fno-dwarf2-cfi-asm -m32 -fno-stack-protector -mno-stack-arg-probe -Werror -nostdlib -Wl,--defsym,___main=0x8100 -Wall -W -I$(top_srcdir)/include -I$(top_builddir)/include -DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed conftest.c >&5
6conftest.c:1:0: error: SSE instruction set disabled, using 387 arithmetics [-Werror]
7cc1: all warnings being treated as errors
8
9Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
102012/04/13
11
12Index: grub-1.99/configure.ac
13===================================================================
14--- grub-1.99.orig/configure.ac
15+++ grub-1.99/configure.ac
16@@ -378,7 +378,7 @@ if test "x$target_cpu" = xi386; then
17
18 # Some toolchains enable these features by default, but they need
19 # registers that aren't set up properly in GRUB.
20- TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow"
21+ TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -mfpmath=387"
22 fi
23
24 # By default, GCC 4.4 generates .eh_frame sections containing unwind
25Index: grub-1.99/configure
26===================================================================
27--- grub-1.99.orig/configure
28+++ grub-1.99/configure
29@@ -19991,7 +19991,7 @@ $as_echo "$grub_cv_cc_falign_loop" >&6;
30
31 # Some toolchains enable these features by default, but they need
32 # registers that aren't set up properly in GRUB.
33- TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow"
34+ TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -mfpmath=387"
35 fi
36
37 # By default, GCC 4.4 generates .eh_frame sections containing unwind
diff --git a/meta/recipes-bsp/grub/grub-efi-native_1.99.bb b/meta/recipes-bsp/grub/grub-efi-native_1.99.bb
index 93e9290848..4f8a4bcc5d 100644
--- a/meta/recipes-bsp/grub/grub-efi-native_1.99.bb
+++ b/meta/recipes-bsp/grub/grub-efi-native_1.99.bb
@@ -16,14 +16,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
16# FIXME: We should be able to optionally drop freetype as a dependency 16# FIXME: We should be able to optionally drop freetype as a dependency
17DEPENDS = "help2man-native autogen-native" 17DEPENDS = "help2man-native autogen-native"
18RDEPENDS_${PN} = "diffutils freetype" 18RDEPENDS_${PN} = "diffutils freetype"
19PR = "r6" 19PR = "r7"
20 20
21# Native packages do not normally rebuild when the target changes. 21# Native packages do not normally rebuild when the target changes.
22# Ensure this is built once per HOST-TARGET pair. 22# Ensure this is built once per HOST-TARGET pair.
23PN := "grub-efi-${TRANSLATED_TARGET_ARCH}-native" 23PN := "grub-efi-${TRANSLATED_TARGET_ARCH}-native"
24 24
25SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \ 25SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
26 file://grub-1.99_fix_for_automake_1.11.2.patch" 26 file://grub-1.99_fix_for_automake_1.11.2.patch \
27 file://grub-1.99-fpmath-sse-387-fix.patch"
27 28
28SRC_URI[md5sum] = "ca9f2a2d571b57fc5c53212d1d22e2b5" 29SRC_URI[md5sum] = "ca9f2a2d571b57fc5c53212d1d22e2b5"
29SRC_URI[sha256sum] = "b91f420f2c51f6155e088e34ff99bea09cc1fb89585cf7c0179644e57abd28ff" 30SRC_URI[sha256sum] = "b91f420f2c51f6155e088e34ff99bea09cc1fb89585cf7c0179644e57abd28ff"
diff --git a/meta/recipes-bsp/grub/grub_1.99.bb b/meta/recipes-bsp/grub/grub_1.99.bb
index ac66e830bf..e61147f26e 100644
--- a/meta/recipes-bsp/grub/grub_1.99.bb
+++ b/meta/recipes-bsp/grub/grub_1.99.bb
@@ -12,10 +12,11 @@ LICENSE = "GPLv3"
12LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" 12LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
13 13
14RDEPENDS_${PN} = "diffutils freetype" 14RDEPENDS_${PN} = "diffutils freetype"
15PR = "r3" 15PR = "r5"
16 16
17SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \ 17SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
18 file://grub-install.in.patch \ 18 file://grub-install.in.patch \
19 file://grub-1.99-fpmath-sse-387-fix.patch \
19 file://40_custom" 20 file://40_custom"
20 21
21SRC_URI[md5sum] = "ca9f2a2d571b57fc5c53212d1d22e2b5" 22SRC_URI[md5sum] = "ca9f2a2d571b57fc5c53212d1d22e2b5"
@@ -26,7 +27,7 @@ COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)'
26inherit autotools 27inherit autotools
27inherit gettext 28inherit gettext
28 29
29EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --target=${TARGET_ARCH} --program-prefix=""" 30EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --program-prefix="""
30 31
31do_configure() { 32do_configure() {
32 oe_runconf 33 oe_runconf