diff options
-rw-r--r-- | meta/recipes-bsp/grub/files/0001-configure-fix-check-for-sys-sysmacros.h-under-glibc-.patch | 48 | ||||
-rw-r--r-- | meta/recipes-bsp/grub/grub-efi_2.00.bb | 1 |
2 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/files/0001-configure-fix-check-for-sys-sysmacros.h-under-glibc-.patch b/meta/recipes-bsp/grub/files/0001-configure-fix-check-for-sys-sysmacros.h-under-glibc-.patch new file mode 100644 index 0000000000..23717e3859 --- /dev/null +++ b/meta/recipes-bsp/grub/files/0001-configure-fix-check-for-sys-sysmacros.h-under-glibc-.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From 07662af7aed55bcec448bc2a6610de1f0cb62100 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrei Borzenkov <arvidjaar@gmail.com> | ||
3 | Date: Thu, 22 Dec 2016 22:48:25 +0300 | ||
4 | Subject: [PATCH] configure: fix check for sys/sysmacros.h under glibc 2.25+ | ||
5 | |||
6 | glibc 2.25 still includes sys/sysmacros.h in sys/types.h but also emits | ||
7 | deprecation warning. So test for sys/types.h succeeds in configure but later | ||
8 | compilation fails because we use -Werror by default. | ||
9 | |||
10 | While this is fixed in current autoconf GIT, we really cannot force everyone | ||
11 | to use bleeding edge (that is not even released right now). So run test under | ||
12 | -Werror as well to force proper detection. | ||
13 | |||
14 | This should have no impact on autoconf 2.70+ as AC_HEADER_MAJOR in this version | ||
15 | simply checks for header existence. | ||
16 | |||
17 | Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/grub.git/commit/?id=07662af7aed55bcec448bc2a6610de1f0cb62100] | ||
18 | |||
19 | Reported and tested by Khem Raj <raj.khem@gmail.com> | ||
20 | |||
21 | Signed-off-by: Andrei Borzenkov <arvidjaar@gmail.com> | ||
22 | Signed-off-by: Maxin B. John <maxin.john@intel.com> | ||
23 | --- | ||
24 | configure.ac | 7 +++++++ | ||
25 | 1 file changed, 7 insertions(+) | ||
26 | |||
27 | diff --git a/configure.ac b/configure.ac | ||
28 | index dc56564..4e980c5 100644 | ||
29 | --- a/configure.ac | ||
30 | +++ b/configure.ac | ||
31 | @@ -389,7 +389,14 @@ fi | ||
32 | # Check for functions and headers. | ||
33 | AC_CHECK_FUNCS(posix_memalign memalign getextmntent) | ||
34 | AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/mnttab.h limits.h) | ||
35 | + | ||
36 | +# glibc 2.25 still includes sys/sysmacros.h in sys/types.h but emits deprecation | ||
37 | +# warning which causes compilation failure later with -Werror. So use -Werror here | ||
38 | +# as well to force proper sys/sysmacros.h detection. | ||
39 | +SAVED_CFLAGS="$CFLAGS" | ||
40 | +CFLAGS="$HOST_CFLAGS -Werror" | ||
41 | AC_HEADER_MAJOR | ||
42 | +CFLAGS="$SAVED_CFLAGS" | ||
43 | |||
44 | AC_CHECK_MEMBERS([struct statfs.f_fstypename],,,[$ac_includes_default | ||
45 | #include <sys/param.h> | ||
46 | -- | ||
47 | 2.4.0 | ||
48 | |||
diff --git a/meta/recipes-bsp/grub/grub-efi_2.00.bb b/meta/recipes-bsp/grub/grub-efi_2.00.bb index 5a0dc954a3..013fe42ee3 100644 --- a/meta/recipes-bsp/grub/grub-efi_2.00.bb +++ b/meta/recipes-bsp/grub/grub-efi_2.00.bb | |||
@@ -6,6 +6,7 @@ PR = "r3" | |||
6 | 6 | ||
7 | SRC_URI += " \ | 7 | SRC_URI += " \ |
8 | file://cfg \ | 8 | file://cfg \ |
9 | file://0001-configure-fix-check-for-sys-sysmacros.h-under-glibc-.patch \ | ||
9 | " | 10 | " |
10 | 11 | ||
11 | S = "${WORKDIR}/grub-${PV}" | 12 | S = "${WORKDIR}/grub-${PV}" |