aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/grub/0008-fix-build-error-in-binutils-2.36.patch44
-rw-r--r--main/grub/APKBUILD4
2 files changed, 47 insertions, 1 deletions
diff --git a/main/grub/0008-fix-build-error-in-binutils-2.36.patch b/main/grub/0008-fix-build-error-in-binutils-2.36.patch
new file mode 100644
index 00000000000..5cb327003ad
--- /dev/null
+++ b/main/grub/0008-fix-build-error-in-binutils-2.36.patch
@@ -0,0 +1,44 @@
+From 5cea201f288246488e2189c49d969d00ebec2898 Mon Sep 17 00:00:00 2001
+From: Michael Chang <mchang@suse.com>
+Date: Fri, 19 Feb 2021 17:40:43 +0800
+Subject: [PATCH] Fix build error in binutils 2.36
+
+The build fails in binutils 2.36
+
+[ 520s] cat kernel_syms.lst > syminfo.lst.new
+[ 520s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: section .note.gnu.property VMA [0000000000400158,0000000000400187] overlaps section .bss VMA [000000000000f000,000000000041e1af]
+
+It is caused by assembler now generates the GNU property notes section
+by default. Use the assmbler option -mx86-used-note=no to disable the
+section from being generated to workaround the ensuing linker issue.
+
+Signed-off-by: Michael Chang <mchang@suse.com>
+---
+ configure.ac | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index fa8f74bb9..38ee5f579 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -836,6 +836,20 @@ if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ) && test "x$p
+ TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow"
+ fi
+
++if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ); then
++ AC_CACHE_CHECK([whether -Wa,-mx86-used-note works], [grub_cv_cc_mx86_used_note], [
++ CFLAGS="$TARGET_CFLAGS -Wa,-mx86-used-note=no -Werror"
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
++ [grub_cv_cc_mx86_used_note=yes],
++ [grub_cv_cc_mx86_used_note=no])
++ ])
++
++ if test "x$grub_cv_cc_mx86_used_note" = xyes; then
++ TARGET_CFLAGS="$TARGET_CFLAGS -Wa,-mx86-used-note=no"
++ TARGET_CCASFLAGS="$TARGET_CCASFLAGS -Wa,-mx86-used-note=no"
++ fi
++fi
++
+ # GRUB doesn't use float or doubles at all. Yet some toolchains may decide
+ # that floats are a good fit to run instead of what's written in the code.
+ # Given that floating point unit is disabled (if present to begin with)
diff --git a/main/grub/APKBUILD b/main/grub/APKBUILD
index 21423674f8c..91455e0534c 100644
--- a/main/grub/APKBUILD
+++ b/main/grub/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=grub
pkgver=2.06
-pkgrel=0
+pkgrel=1
pkgdesc="Bootloader with support for Linux, Multiboot and more"
url="https://www.gnu.org/software/grub/"
arch="all !s390x"
@@ -49,6 +49,7 @@ source="https://ftp.gnu.org/gnu/grub/grub-$pkgver.tar.xz
0005-loader-Move-arm64-linux-loader-to-common-code.patch
0006-RISC-V-Update-image-header.patch
0007-RISC-V-Use-common-linux-loader.patch
+ 0008-fix-build-error-in-binutils-2.36.patch
"
prepare() {
@@ -252,4 +253,5 @@ aa2fbabeab2e8f517128f0d81d3c76eba18b24518b616d4574ffaaec7d4765e02b5b118caf04da1e
74b2bf8e9da604c5ca60ed13e389e48ceb4eeea1669b8ac720cdc452a4450676fe4bb961a63d31603bcdc9fe15ab6a8cb74b9ff97b6d7d85f1aaba24b1e9e244 0005-loader-Move-arm64-linux-loader-to-common-code.patch
4901c964278ab8a46901b905efef4562aa4942d6c37be052db9536d4779ecea6a0cf68fcc97fe6ef2b39c54cd598d4f8351cf3e27c3dacff888549bdc35deee3 0006-RISC-V-Update-image-header.patch
721c9d7aefd9d9fdd4fe92c229122c3311e75266a9419a12f5f77536099070a232b6c4ff3c33ab5a2cb6f7f917ae0d6510b09045d2f035f87c65b4dd7f09d3ee 0007-RISC-V-Use-common-linux-loader.patch
+8c35663ef72683bd23c18e75134a0ddb1bb9a7c053ed87691e2ac5c9765fdf802761a6ad54f8bdc7999679d9cc5ebea9c01f1c0f615ac90505f7a398129d157b 0008-fix-build-error-in-binutils-2.36.patch
"