]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
grub2: fix do_configure failure when largefile is not in DISTRO_FEATURES ChenQi/grub2-largefile
authorChen Qi <Qi.Chen@windriver.com>
Thu, 7 Apr 2016 09:05:50 +0000 (17:05 +0800)
committerChen Qi <Qi.Chen@windriver.com>
Thu, 7 Apr 2016 09:21:33 +0000 (17:21 +0800)
When 'largefile' is not in DISTRO_FEATURES, '--disable-largefile' is passed
to the configure options. However, the configure script checks the size
of off_t regardless of this option. This raises the following error.

  configure: error: Large file support is required

This patch fixes the above problem.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
meta/recipes-bsp/grub/files/0001-configure.ac-support-disabling-largefile.patch [new file with mode: 0644]
meta/recipes-bsp/grub/grub2.inc

diff --git a/meta/recipes-bsp/grub/files/0001-configure.ac-support-disabling-largefile.patch b/meta/recipes-bsp/grub/files/0001-configure.ac-support-disabling-largefile.patch
new file mode 100644 (file)
index 0000000..e22dc00
--- /dev/null
@@ -0,0 +1,44 @@
+Upstream-Status: Pending
+
+Subject: configure.ac: support disabling largefile
+
+Do not check off_t size when largefile is disabled.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ configure.ac | 19 ++++++++++++-------
+ 1 file changed, 12 insertions(+), 7 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index df20991..14ff7ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -306,13 +306,18 @@ if test x$grub_cv_apple_cc = xyes ; then
+   HOST_LDFLAGS="$HOST_LDFLAGS -Wl,-allow_stack_execute"
+ fi
+-case "$host_os" in
+-  cygwin | windows* | mingw32* | aros*)
+-     ;;
+-  *)
+-     AC_CHECK_SIZEOF(off_t)
+-     test x"$ac_cv_sizeof_off_t" = x8 || AC_MSG_ERROR([Large file support is required]);;
+-esac
++AC_ARG_ENABLE([largefile],
++              [AS_HELP_STRING([--enable-largefile],
++                             [Enable large file support (default=guessed)])])
++if test x"$enable_largefile" = xyes ; then
++  case "$host_os" in
++    cygwin | windows* | mingw32* | aros*)
++       ;;
++    *)
++       AC_CHECK_SIZEOF(off_t)
++       test x"$ac_cv_sizeof_off_t" = x8 || AC_MSG_ERROR([Large file support is required]);;
++  esac
++fi
+ if test x$USE_NLS = xno; then
+   HOST_CFLAGS="$HOST_CFLAGS -fno-builtin-gettext"
+-- 
+1.9.1
+
index 146dde60c0a94000fefc464997f62cf4bc3a4830..6cd8d36d44755dd4b9991c2c87393043d662db8a 100644 (file)
@@ -30,6 +30,7 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
            file://0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch \
            file://0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch \
            file://fix-texinfo.patch \
+           file://0001-configure.ac-support-disabling-largefile.patch \
             "
 
 DEPENDS = "flex-native bison-native"