summaryrefslogtreecommitdiffstats
path: root/boot/grub2
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-07-25 22:03:14 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-07-25 22:07:05 +0200
commit4770c4ef83f89fc3348fd6df636b0e4adac05d16 (patch)
treed6ef1f8fad66eab9a65a320ef43b4e604d2e6080 /boot/grub2
parent238761e3903093ef93c26fa9e788be0c4b6ffe52 (diff)
downloadbuildroot-4770c4ef83f89fc3348fd6df636b0e4adac05d16.tar.gz
buildroot-4770c4ef83f89fc3348fd6df636b0e4adac05d16.zip
grub2: add patch to fix build with recent gcc versions
This commit backports a patch from upstream grub2 that fixes a build issue occuring at least with recent gcc versions: gettext/gettext.c:37:36: error: storage size of 'main_context' isn't known static struct grub_gettext_context main_context, secondary_context; Fixes bug #8991. Bug reproduced with: BR2_x86_64=y BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_5=y BR2_TOOLCHAIN_BUILDROOT_GLIBC=y BR2_GCC_VERSION_6_X=y BR2_TARGET_GRUB2=y BR2_TARGET_GRUB2_X86_64_EFI=y BR2_TARGET_GRUB2_BUILTIN_MODULES="boot linux ext2 fat squash4 part_msdos part_gpt normal efi_gop terminal" and verified fixed after adding this patch. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'boot/grub2')
-rw-r--r--boot/grub2/0002-grub-core-gettext-gettext.c-main_context-secondary_c.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/boot/grub2/0002-grub-core-gettext-gettext.c-main_context-secondary_c.patch b/boot/grub2/0002-grub-core-gettext-gettext.c-main_context-secondary_c.patch
new file mode 100644
index 0000000000..94be092710
--- /dev/null
+++ b/boot/grub2/0002-grub-core-gettext-gettext.c-main_context-secondary_c.patch
@@ -0,0 +1,39 @@
+From f30c692c1f9ef0e93bee2b408a24baa017f1ca9d Mon Sep 17 00:00:00 2001
+From: Vladimir Serbinenko <phcoder@gmail.com>
+Date: Thu, 7 Nov 2013 01:01:47 +0100
+Subject: [PATCH] * grub-core/gettext/gettext.c (main_context),
+ (secondary_context): Define after defining type and not before.
+
+[Thomas: backport from upstream commit
+f30c692c1f9ef0e93bee2b408a24baa017f1ca9d, and remove ChangeLog
+modifications to avoid conflicts.]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ grub-core/gettext/gettext.c | 4 ++--
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c
+index df73570..4880cef 100644
+--- a/grub-core/gettext/gettext.c
++++ b/grub-core/gettext/gettext.c
+@@ -34,8 +34,6 @@ GRUB_MOD_LICENSE ("GPLv3+");
+ http://www.gnu.org/software/autoconf/manual/gettext/MO-Files.html .
+ */
+
+-static struct grub_gettext_context main_context, secondary_context;
+-
+ static const char *(*grub_gettext_original) (const char *s);
+
+ struct grub_gettext_msg
+@@ -69,6 +67,8 @@ struct grub_gettext_context
+ struct grub_gettext_msg *grub_gettext_msg_list;
+ };
+
++static struct grub_gettext_context main_context, secondary_context;
++
+ #define MO_MAGIC_NUMBER 0x950412de
+
+ static grub_err_t
+--
+2.7.4
+
OpenPOWER on IntegriCloud