From 8e335f1da265cdb0ea2d5f95b3dfe8c856213c96 Mon Sep 17 00:00:00 2001 From: Radu Moisan Date: Tue, 21 Aug 2012 14:48:38 +0300 Subject: grub-efi-native: Update to version 2.00 Added -Wno-unused-result because of a read() with no result, and causing error due to -Werror Updated grub recipe because of a patch name change Removed unnecessary patches (merged upstream). (From OE-Core rev: 88cd5d99918a896f515e8bb59b7238f3ad50adff) Signed-off-by: Radu Moisan Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- .../grub/files/grub-1.99-disable-help2man.patch | 231 --------------------- .../grub-1.99-fix-enable_execute_stack-check.patch | 27 --- .../grub/files/grub-1.99-fpmath-sse-387-fix.patch | 37 ---- .../grub/files/grub-2.00-disable-help2man.patch | 148 +++++++++++++ .../grub-2.00-fix-enable_execute_stack-check.patch | 27 +++ .../grub/files/grub-2.00-fpmath-sse-387-fix.patch | 37 ++++ .../grub/files/grub-no-unused-result.patch | 18 ++ meta/recipes-bsp/grub/grub-efi-native_1.99.bb | 81 -------- meta/recipes-bsp/grub/grub-efi-native_2.00.bb | 77 +++++++ meta/recipes-bsp/grub/grub_2.00.bb | 2 +- 10 files changed, 308 insertions(+), 377 deletions(-) delete mode 100644 meta/recipes-bsp/grub/files/grub-1.99-disable-help2man.patch delete mode 100644 meta/recipes-bsp/grub/files/grub-1.99-fix-enable_execute_stack-check.patch delete mode 100644 meta/recipes-bsp/grub/files/grub-1.99-fpmath-sse-387-fix.patch create mode 100644 meta/recipes-bsp/grub/files/grub-2.00-disable-help2man.patch create mode 100644 meta/recipes-bsp/grub/files/grub-2.00-fix-enable_execute_stack-check.patch create mode 100644 meta/recipes-bsp/grub/files/grub-2.00-fpmath-sse-387-fix.patch create mode 100644 meta/recipes-bsp/grub/files/grub-no-unused-result.patch delete mode 100644 meta/recipes-bsp/grub/grub-efi-native_1.99.bb create mode 100644 meta/recipes-bsp/grub/grub-efi-native_2.00.bb diff --git a/meta/recipes-bsp/grub/files/grub-1.99-disable-help2man.patch b/meta/recipes-bsp/grub/files/grub-1.99-disable-help2man.patch deleted file mode 100644 index 3ffefdcf35..0000000000 --- a/meta/recipes-bsp/grub/files/grub-1.99-disable-help2man.patch +++ /dev/null @@ -1,231 +0,0 @@ -Upstream-Status: Inappropriate (Bitbake build environment) - -We do not need the man pages when building just the EFI payload for the target, -all the tools are built for the host. This does not trigger GRUB's built-in -cross-compilation check, so force it. After the change to configure.ac, -autogen.sh was run in devshell and the resulting configure was used to generate -the configure diff. The configure diff was included to avoid having to add -autogen.sh to a do_configure_prepend() routine which would slow down the build -unnecessarily. - -Signed-off-by: Darren Hart - -Index: grub-1.99/configure.ac -=================================================================== ---- grub-1.99.orig/configure.ac -+++ grub-1.99/configure.ac -@@ -275,11 +275,12 @@ if test x$grub_cv_apple_cc = xyes ; then - HOST_CFLAGS="$HOST_CFLAGS -fnested-functions" - fi - --if test "x$cross_compiling" = xyes; then -- AC_MSG_WARN([cannot generate manual pages while cross compiling]) --else -- AC_PATH_PROG(HELP2MAN, help2man) --fi -+# Force behaving as though we are cross-compiling with respect to HELP2MAN -+#if test "x$cross_compiling" = xyes; then -+AC_MSG_WARN([cannot generate manual pages while cross compiling]) -+#else -+# AC_PATH_PROG(HELP2MAN, help2man) -+#fi - - # Check for functions and headers. - AC_CHECK_FUNCS(posix_memalign memalign asprintf vasprintf getextmntent) -Index: grub-1.99/configure -=================================================================== ---- grub-1.99.orig/configure -+++ grub-1.99/configure -@@ -1172,7 +1172,6 @@ GL_COND_LIBTOOL_FALSE - GL_COND_LIBTOOL_TRUE - BUILD_CC - LIBUTIL --HELP2MAN - POSUB - LTLIBINTL - LIBINTL -@@ -1204,6 +1203,7 @@ LEXLIB - am__fastdepCC_FALSE - am__fastdepCC_TRUE - CCDEPMODE -+am__nodep - AMDEPBACKSLASH - AMDEP_FALSE - AMDEP_TRUE -@@ -3011,7 +3011,6 @@ _ACEOF - # Let the site file select an alternate cache file if it wants to. - # Prefer an explicitly selected file to automatically selected ones. - ac_site_file1=NONE --ac_site_file2=NONE - if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( -@@ -3019,14 +3018,8 @@ if test -n "$CONFIG_SITE"; then - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac --elif test "x$prefix" != xNONE; then -- ac_site_file1=$prefix/share/config.site -- ac_site_file2=$prefix/etc/config.site --else -- ac_site_file1=$ac_default_prefix/share/config.site -- ac_site_file2=$ac_default_prefix/etc/config.site - fi --for ac_site_file in "$ac_site_file1" "$ac_site_file2" -+for ac_site_file in $ac_site_file1 - do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then -@@ -3313,8 +3306,9 @@ case $target_os in *\ *) target_os=`echo - # The aliases save the names the user supplied, while $host etc. - # will get canonicalized. - test -n "$target_alias" && -- test "$program_prefix$program_suffix$program_transform_name" = \ -- NONENONEs,x,x, && -+ test "$target_alias" != "$host_alias" && -+ test "$program_prefix$program_suffix$program_transform_name" = \ -+ NONENONEs,x,x, && - program_prefix=${target_alias}- - - am__api_version='1.11' -@@ -3786,11 +3780,11 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}ma - - # We need awk for the "check" target. The system "awk" is bad on - # some platforms. --# Always define AMTAR for backward compatibility. -- --AMTAR=${AMTAR-"${am_missing_run}tar"} -+# Always define AMTAR for backward compatibility. Yes, it's still used -+# in the wild :-( We should find a proper way to deprecate it ... -+AMTAR='$${TAR-tar}' - --am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' -+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' - - - -@@ -4256,6 +4250,7 @@ fi - if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -+ am__nodep='_no' - fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= -@@ -5069,6 +5064,7 @@ else - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. -+ rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. -@@ -5128,7 +5124,7 @@ else - break - fi - ;; -- msvisualcpp | msvcmsys) -+ msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. -@@ -6044,6 +6040,7 @@ else - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. -+ rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. -@@ -6103,7 +6100,7 @@ else - break - fi - ;; -- msvisualcpp | msvcmsys) -+ msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. -@@ -6848,6 +6845,7 @@ else - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. -+ rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. -@@ -6905,7 +6903,7 @@ else - break - fi - ;; -- msvisualcpp | msvcmsys) -+ msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. -@@ -9529,51 +9527,13 @@ if test x$grub_cv_apple_cc = xyes ; then - HOST_CFLAGS="$HOST_CFLAGS -fnested-functions" - fi - --if test "x$cross_compiling" = xyes; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot generate manual pages while cross compiling" >&5 -+# Force behaving as though we are cross-compiling with respect to HELP2MAN -+#if test "x$cross_compiling" = xyes; then -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot generate manual pages while cross compiling" >&5 - $as_echo "$as_me: WARNING: cannot generate manual pages while cross compiling" >&2;} --else -- # Extract the first word of "help2man", so it can be a program name with args. --set dummy help2man; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 --$as_echo_n "checking for $ac_word... " >&6; } --if ${ac_cv_path_HELP2MAN+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- case $HELP2MAN in -- [\\/]* | ?:[\\/]*) -- ac_cv_path_HELP2MAN="$HELP2MAN" # Let the user override the test with a path. -- ;; -- *) -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_path_HELP2MAN="$as_dir/$ac_word$ac_exec_ext" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done -- done --IFS=$as_save_IFS -- -- ;; --esac --fi --HELP2MAN=$ac_cv_path_HELP2MAN --if test -n "$HELP2MAN"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HELP2MAN" >&5 --$as_echo "$HELP2MAN" >&6; } --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } --fi -- -- --fi -+#else -+# AC_PATH_PROG(HELP2MAN, help2man) -+#fi - - # Check for functions and headers. - for ac_func in posix_memalign memalign asprintf vasprintf getextmntent -@@ -20309,6 +20269,7 @@ $as_echo_n "checking whether \`$CC' gene - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -+void g (int); - void f (int (*p) (void)); - void g (int i) - { diff --git a/meta/recipes-bsp/grub/files/grub-1.99-fix-enable_execute_stack-check.patch b/meta/recipes-bsp/grub/files/grub-1.99-fix-enable_execute_stack-check.patch deleted file mode 100644 index 9d7272b269..0000000000 --- a/meta/recipes-bsp/grub/files/grub-1.99-fix-enable_execute_stack-check.patch +++ /dev/null @@ -1,27 +0,0 @@ -Upstream-Status: Pending - - -This patch avoids this configure failure - -configure:20306: checking whether `ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/builddisk/build/build0/tmp/sysroots/emenlow' generates calls to `__enable_execute_stack()' -configure:20320: ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/builddisk/build/build0/tmp/sysroots/emenlow -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 -mfpmath=387 -fno-dwarf2-cfi-asm -m32 -fno-stack-protector -mno-stack-arg-probe -Werror -Wno-trampolines -falign-loops=1 -S conftest.c -conftest.c:308:6: error: no previous prototype for 'g' [-Werror=missing-prototypes] -cc1: all warnings being treated as errors -configure:20323: $? = 1 -configure:20327: error: ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/builddisk/build/build0/tmp/sysroots/emenlow failed to produce assembly code - -Signed-Off-By: Nitin A Kamble -2012/04/13 - -Index: grub-1.99/acinclude.m4 -=================================================================== ---- grub-1.99.orig/acinclude.m4 -+++ grub-1.99/acinclude.m4 -@@ -317,6 +317,7 @@ dnl Check if the C compiler generates ca - AC_DEFUN([grub_CHECK_ENABLE_EXECUTE_STACK],[ - AC_MSG_CHECKING([whether `$CC' generates calls to `__enable_execute_stack()']) - AC_LANG_CONFTEST([[ -+void g (int); - void f (int (*p) (void)); - void g (int i) - { 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 deleted file mode 100644 index bea594406f..0000000000 --- a/meta/recipes-bsp/grub/files/grub-1.99-fpmath-sse-387-fix.patch +++ /dev/null @@ -1,37 +0,0 @@ -Upstream-Status: pending - -This patch fixes this configure issue for grub when -mfpmath=sse is in the gcc parameters. - -configure: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 -conftest.c:1:0: error: SSE instruction set disabled, using 387 arithmetics [-Werror] -cc1: all warnings being treated as errors - -Signed-Off-By: Nitin A Kamble -2012/04/13 - -Index: grub-1.99/configure.ac -=================================================================== ---- grub-1.99.orig/configure.ac -+++ grub-1.99/configure.ac -@@ -378,7 +378,7 @@ if test "x$target_cpu" = xi386; then - - # Some toolchains enable these features by default, but they need - # registers that aren't set up properly in GRUB. -- TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow" -+ TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -mfpmath=387" - fi - - # By default, GCC 4.4 generates .eh_frame sections containing unwind -Index: grub-1.99/configure -=================================================================== ---- grub-1.99.orig/configure -+++ grub-1.99/configure -@@ -19991,7 +19991,7 @@ $as_echo "$grub_cv_cc_falign_loop" >&6; - - # Some toolchains enable these features by default, but they need - # registers that aren't set up properly in GRUB. -- TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow" -+ TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -mfpmath=387" - fi - - # By default, GCC 4.4 generates .eh_frame sections containing unwind diff --git a/meta/recipes-bsp/grub/files/grub-2.00-disable-help2man.patch b/meta/recipes-bsp/grub/files/grub-2.00-disable-help2man.patch new file mode 100644 index 0000000000..a2e42c2b7f --- /dev/null +++ b/meta/recipes-bsp/grub/files/grub-2.00-disable-help2man.patch @@ -0,0 +1,148 @@ +Upstream-Status: Inappropriate (Bitbake build environment) + +We do not need the man pages when building just the EFI payload for the target, +all the tools are built for the host. This does not trigger GRUB's built-in +cross-compilation check, so force it. After the change to configure.ac, +autogen.sh was run in devshell and the resulting configure was used to generate +the configure diff. The configure diff was included to avoid having to add +autogen.sh to a do_configure_prepend() routine which would slow down the build +unnecessarily. + +Signed-off-by: Darren Hart + +Index: grub-2.00/configure.ac +=================================================================== +--- grub-2.00.orig/configure.ac ++++ grub-2.00/configure.ac +@@ -310,11 +310,12 @@ if test x$USE_NLS = xno; then + HOST_CFLAGS="$HOST_CFLAGS -fno-builtin-gettext" + fi + +-if test "x$cross_compiling" = xyes; then +- AC_MSG_WARN([cannot generate manual pages while cross compiling]) +-else +- AC_PATH_PROG(HELP2MAN, help2man) +-fi ++# Force behaving as though we are cross-compiling with respect to HELP2MAN ++#if test "x$cross_compiling" = xyes; then ++AC_MSG_WARN([cannot generate manual pages while cross compiling]) ++#else ++# AC_PATH_PROG(HELP2MAN, help2man) ++#fi + + # Check for functions and headers. + AC_CHECK_FUNCS(posix_memalign memalign asprintf vasprintf getextmntent) +Index: grub-2.00/configure +=================================================================== +--- grub-2.00.orig/configure ++++ grub-2.00/configure +@@ -1215,7 +1215,6 @@ GL_COND_LIBTOOL_FALSE + GL_COND_LIBTOOL_TRUE + BUILD_CC + LIBUTIL +-HELP2MAN + POSUB + LTLIBINTL + LIBINTL +@@ -3069,7 +3068,6 @@ _ACEOF + # Let the site file select an alternate cache file if it wants to. + # Prefer an explicitly selected file to automatically selected ones. + ac_site_file1=NONE +-ac_site_file2=NONE + if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( +@@ -3077,14 +3075,8 @@ if test -n "$CONFIG_SITE"; then + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +-elif test "x$prefix" != xNONE; then +- ac_site_file1=$prefix/share/config.site +- ac_site_file2=$prefix/etc/config.site +-else +- ac_site_file1=$ac_default_prefix/share/config.site +- ac_site_file2=$ac_default_prefix/etc/config.site + fi +-for ac_site_file in "$ac_site_file1" "$ac_site_file2" ++for ac_site_file in $ac_site_file1 + do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then +@@ -3371,8 +3363,9 @@ case $target_os in *\ *) target_os=`echo + # The aliases save the names the user supplied, while $host etc. + # will get canonicalized. + test -n "$target_alias" && +- test "$program_prefix$program_suffix$program_transform_name" = \ +- NONENONEs,x,x, && ++ test "$target_alias" != "$host_alias" && ++ test "$program_prefix$program_suffix$program_transform_name" = \ ++ NONENONEs,x,x, && + program_prefix=${target_alias}- + + am__api_version='1.11' +@@ -9633,51 +9626,13 @@ if test x$USE_NLS = xno; then + HOST_CFLAGS="$HOST_CFLAGS -fno-builtin-gettext" + fi + +-if test "x$cross_compiling" = xyes; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot generate manual pages while cross compiling" >&5 ++# Force behaving as though we are cross-compiling with respect to HELP2MAN ++#if test "x$cross_compiling" = xyes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot generate manual pages while cross compiling" >&5 + $as_echo "$as_me: WARNING: cannot generate manual pages while cross compiling" >&2;} +-else +- # Extract the first word of "help2man", so it can be a program name with args. +-set dummy help2man; ac_word=$2 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +-$as_echo_n "checking for $ac_word... " >&6; } +-if ${ac_cv_path_HELP2MAN+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- case $HELP2MAN in +- [\\/]* | ?:[\\/]*) +- ac_cv_path_HELP2MAN="$HELP2MAN" # Let the user override the test with a path. +- ;; +- *) +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_path_HELP2MAN="$as_dir/$ac_word$ac_exec_ext" +- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +- done +-IFS=$as_save_IFS +- +- ;; +-esac +-fi +-HELP2MAN=$ac_cv_path_HELP2MAN +-if test -n "$HELP2MAN"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HELP2MAN" >&5 +-$as_echo "$HELP2MAN" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +- +- +-fi ++#else ++# AC_PATH_PROG(HELP2MAN, help2man) ++#fi + + # Check for functions and headers. + for ac_func in posix_memalign memalign asprintf vasprintf getextmntent +@@ -20477,6 +20432,7 @@ $as_echo_n "checking whether \`$CC' gene + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + ++void g (int); + void f (int (*p) (void)); + void g (int i) + { diff --git a/meta/recipes-bsp/grub/files/grub-2.00-fix-enable_execute_stack-check.patch b/meta/recipes-bsp/grub/files/grub-2.00-fix-enable_execute_stack-check.patch new file mode 100644 index 0000000000..09ef4dbff9 --- /dev/null +++ b/meta/recipes-bsp/grub/files/grub-2.00-fix-enable_execute_stack-check.patch @@ -0,0 +1,27 @@ +Upstream-Status: Pending + + +This patch avoids this configure failure + +configure:20306: checking whether `ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/builddisk/build/build0/tmp/sysroots/emenlow' generates calls to `__enable_execute_stack()' +configure:20320: ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/builddisk/build/build0/tmp/sysroots/emenlow -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 -mfpmath=387 -fno-dwarf2-cfi-asm -m32 -fno-stack-protector -mno-stack-arg-probe -Werror -Wno-trampolines -falign-loops=1 -S conftest.c +conftest.c:308:6: error: no previous prototype for 'g' [-Werror=missing-prototypes] +cc1: all warnings being treated as errors +configure:20323: $? = 1 +configure:20327: error: ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/builddisk/build/build0/tmp/sysroots/emenlow failed to produce assembly code + +Signed-Off-By: Nitin A Kamble +2012/04/13 + +Index: grub-2.00/acinclude.m4 +=================================================================== +--- grub-2.00.orig/acinclude.m4 ++++ grub-2.00/acinclude.m4 +@@ -317,6 +317,7 @@ dnl Check if the C compiler generates ca + AC_DEFUN([grub_CHECK_ENABLE_EXECUTE_STACK],[ + AC_MSG_CHECKING([whether `$CC' generates calls to `__enable_execute_stack()']) + AC_LANG_CONFTEST([AC_LANG_SOURCE([[ ++void g (int); + void f (int (*p) (void)); + void g (int i) + { diff --git a/meta/recipes-bsp/grub/files/grub-2.00-fpmath-sse-387-fix.patch b/meta/recipes-bsp/grub/files/grub-2.00-fpmath-sse-387-fix.patch new file mode 100644 index 0000000000..bea594406f --- /dev/null +++ b/meta/recipes-bsp/grub/files/grub-2.00-fpmath-sse-387-fix.patch @@ -0,0 +1,37 @@ +Upstream-Status: pending + +This patch fixes this configure issue for grub when -mfpmath=sse is in the gcc parameters. + +configure: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 +conftest.c:1:0: error: SSE instruction set disabled, using 387 arithmetics [-Werror] +cc1: all warnings being treated as errors + +Signed-Off-By: Nitin A Kamble +2012/04/13 + +Index: grub-1.99/configure.ac +=================================================================== +--- grub-1.99.orig/configure.ac ++++ grub-1.99/configure.ac +@@ -378,7 +378,7 @@ if test "x$target_cpu" = xi386; then + + # Some toolchains enable these features by default, but they need + # registers that aren't set up properly in GRUB. +- TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow" ++ TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -mfpmath=387" + fi + + # By default, GCC 4.4 generates .eh_frame sections containing unwind +Index: grub-1.99/configure +=================================================================== +--- grub-1.99.orig/configure ++++ grub-1.99/configure +@@ -19991,7 +19991,7 @@ $as_echo "$grub_cv_cc_falign_loop" >&6; + + # Some toolchains enable these features by default, but they need + # registers that aren't set up properly in GRUB. +- TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow" ++ TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -mfpmath=387" + fi + + # By default, GCC 4.4 generates .eh_frame sections containing unwind diff --git a/meta/recipes-bsp/grub/files/grub-no-unused-result.patch b/meta/recipes-bsp/grub/files/grub-no-unused-result.patch new file mode 100644 index 0000000000..ecd7f36ee3 --- /dev/null +++ b/meta/recipes-bsp/grub/files/grub-no-unused-result.patch @@ -0,0 +1,18 @@ +Signed-off-by: Radu Moisan + +I had an error because of an unused return value for read(). +I added -Wno-unused-result. + +Index: grub-2.00/configure.ac +=================================================================== +--- grub-2.00.orig/configure.ac 2012-08-13 16:32:33.000000000 +0300 ++++ grub-2.00/configure.ac 2012-08-13 16:38:22.000000000 +0300 +@@ -394,7 +394,7 @@ + LIBS="" + + # debug flags. +-WARN_FLAGS="-Wall -W -Wshadow -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Waddress -Wattributes -Wcast-align -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign" ++WARN_FLAGS="-Wall -W -Wshadow -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Waddress -Wattributes -Wcast-align -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wno-unused-result -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign" + HOST_CFLAGS="$HOST_CFLAGS $WARN_FLAGS" + TARGET_CFLAGS="$TARGET_CFLAGS $WARN_FLAGS -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations" + TARGET_CCASFLAGS="$TARGET_CCASFLAGS -g" diff --git a/meta/recipes-bsp/grub/grub-efi-native_1.99.bb b/meta/recipes-bsp/grub/grub-efi-native_1.99.bb deleted file mode 100644 index 9e923bd840..0000000000 --- a/meta/recipes-bsp/grub/grub-efi-native_1.99.bb +++ /dev/null @@ -1,81 +0,0 @@ -SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader" - -DESCRIPTION = "GRUB2 is the next generaion of a GPLed bootloader \ -intended to unify bootloading across x86 operating systems. In \ -addition to loading the Linux kernel, it implements the Multiboot \ -standard, which allows for flexible loading of multiple boot images. \ -This recipe builds an EFI binary for the target. It does not install \ -or package anything, it only deploys a target-arch GRUB EFI image." - -HOMEPAGE = "http://www.gnu.org/software/grub/" -SECTION = "bootloaders" - -LICENSE = "GPLv3" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -# FIXME: We should be able to optionally drop freetype as a dependency -DEPENDS = "autogen-native" -RDEPENDS_${PN} = "diffutils freetype" -PR = "r10" - -# Native packages do not normally rebuild when the target changes. -# Ensure this is built once per HOST-TARGET pair. -PN := "grub-efi-${TRANSLATED_TARGET_ARCH}-native" - -SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \ - file://grub-1.99_fix_for_automake_1.11.2.patch \ - file://grub-1.99-fpmath-sse-387-fix.patch \ - file://grub-1.99-gcc-4.7.0.patch \ - file://grub-1.99-gcc-4.7.0-uninitialized-var-errors.patch \ - file://grub-1.99-gcc-4.7.0-strict-aliasing-errors.patch \ - file://grub-1.99-fix-enable_execute_stack-check.patch \ - file://grub-1.99-disable-help2man.patch \ - " - -SRC_URI[md5sum] = "ca9f2a2d571b57fc5c53212d1d22e2b5" -SRC_URI[sha256sum] = "b91f420f2c51f6155e088e34ff99bea09cc1fb89585cf7c0179644e57abd28ff" - -COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)' - -S = "${WORKDIR}/grub-${PV}" - -# Determine the target arch for the grub modules before the native class -# clobbers TARGET_ARCH. -ORIG_TARGET_ARCH := "${TARGET_ARCH}" -python __anonymous () { - import re - target = d.getVar('ORIG_TARGET_ARCH', True) - if target == "x86_64": - grubtarget = 'x86_64' - grubimage = "bootx64.efi" - elif re.match('i.86', target): - grubtarget = 'i386' - grubimage = "bootia32.efi" - else: - raise bb.parse.SkipPackage("grub-efi is incompatible with target %s" % target) - d.setVar("GRUB_TARGET", grubtarget) - d.setVar("GRUB_IMAGE", grubimage) -} - -inherit autotools -inherit gettext -inherit native -inherit deploy - -EXTRA_OECONF = "--with-platform=efi --disable-grub-mkfont \ - --target=${GRUB_TARGET} --enable-efiemu=no --program-prefix=''" - -do_mkimage() { - ./grub-mkimage -p /EFI/BOOT -d ./grub-core/ \ - -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE} \ - boot linux ext2 fat serial part_msdos part_gpt normal efi_gop -} -addtask mkimage after do_compile before do_install - -do_deploy() { - install -m 644 ${S}/${GRUB_IMAGE} ${DEPLOYDIR} -} -addtask deploy after do_install before do_build - -do_install[noexec] = "1" -do_populate_sysroot[noexec] = "1" diff --git a/meta/recipes-bsp/grub/grub-efi-native_2.00.bb b/meta/recipes-bsp/grub/grub-efi-native_2.00.bb new file mode 100644 index 0000000000..776bf23f2d --- /dev/null +++ b/meta/recipes-bsp/grub/grub-efi-native_2.00.bb @@ -0,0 +1,77 @@ +SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader" + +DESCRIPTION = "GRUB2 is the next generaion of a GPLed bootloader \ +intended to unify bootloading across x86 operating systems. In \ +addition to loading the Linux kernel, it implements the Multiboot \ +standard, which allows for flexible loading of multiple boot images. \ +This recipe builds an EFI binary for the target. It does not install \ +or package anything, it only deploys a target-arch GRUB EFI image." + +HOMEPAGE = "http://www.gnu.org/software/grub/" +SECTION = "bootloaders" + +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +# FIXME: We should be able to optionally drop freetype as a dependency +DEPENDS = "autogen-native" +RDEPENDS_${PN} = "diffutils freetype" +PR = "r0" + +# Native packages do not normally rebuild when the target changes. +# Ensure this is built once per HOST-TARGET pair. +PN := "grub-efi-${TRANSLATED_TARGET_ARCH}-native" + +SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \ + file://grub-2.00-fpmath-sse-387-fix.patch \ + file://grub-2.00-fix-enable_execute_stack-check.patch \ + file://grub-2.00-disable-help2man.patch \ + file://grub-no-unused-result.patch \ + " +SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c" +SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3" + +COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)' + +S = "${WORKDIR}/grub-${PV}" + +# Determine the target arch for the grub modules before the native class +# clobbers TARGET_ARCH. +ORIG_TARGET_ARCH := "${TARGET_ARCH}" +python __anonymous () { + import re + target = d.getVar('ORIG_TARGET_ARCH', True) + if target == "x86_64": + grubtarget = 'x86_64' + grubimage = "bootx64.efi" + elif re.match('i.86', target): + grubtarget = 'i386' + grubimage = "bootia32.efi" + else: + raise bb.parse.SkipPackage("grub-efi is incompatible with target %s" % target) + d.setVar("GRUB_TARGET", grubtarget) + d.setVar("GRUB_IMAGE", grubimage) +} + +inherit autotools +inherit gettext +inherit native +inherit deploy + +EXTRA_OECONF = "--with-platform=efi --disable-grub-mkfont \ + --target=${GRUB_TARGET} --enable-efiemu=no --program-prefix=''" + +do_mkimage() { + ./grub-mkimage -p /EFI/BOOT -d ./grub-core/ \ + -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE} \ + boot linux ext2 fat serial part_msdos part_gpt normal efi_gop +} +addtask mkimage after do_compile before do_install + +do_deploy() { + install -m 644 ${S}/${GRUB_IMAGE} ${DEPLOYDIR} +} +addtask deploy after do_install before do_build + +do_install[noexec] = "1" +do_populate_sysroot[noexec] = "1" diff --git a/meta/recipes-bsp/grub/grub_2.00.bb b/meta/recipes-bsp/grub/grub_2.00.bb index c88e095d7d..821d9ffe17 100644 --- a/meta/recipes-bsp/grub/grub_2.00.bb +++ b/meta/recipes-bsp/grub/grub_2.00.bb @@ -17,7 +17,7 @@ PR = "r0" SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \ file://grub-install.in.patch \ - file://grub-1.99-fpmath-sse-387-fix.patch \ + file://grub-2.00-fpmath-sse-387-fix.patch \ file://remove-gets.patch \ file://40_custom" -- cgit v1.2.3-54-g00ecf