1 |
commit: abe655fe66964de0a45e8d0c158bdf3958cdfd1c |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 23 18:47:53 2021 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 23 18:47:53 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abe655fe |
7 |
|
8 |
sys-boot/grub: fix xen build with binutils-2.36 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/787221 |
11 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
12 |
|
13 |
sys-boot/grub/files/grub-2.06-binutils-2.36.patch | 44 +++++++++++++++++++++++ |
14 |
sys-boot/grub/grub-2.06-r1.ebuild | 3 +- |
15 |
2 files changed, 46 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/sys-boot/grub/files/grub-2.06-binutils-2.36.patch b/sys-boot/grub/files/grub-2.06-binutils-2.36.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..5cb327003ad |
20 |
--- /dev/null |
21 |
+++ b/sys-boot/grub/files/grub-2.06-binutils-2.36.patch |
22 |
@@ -0,0 +1,44 @@ |
23 |
+From 5cea201f288246488e2189c49d969d00ebec2898 Mon Sep 17 00:00:00 2001 |
24 |
+From: Michael Chang <mchang@××××.com> |
25 |
+Date: Fri, 19 Feb 2021 17:40:43 +0800 |
26 |
+Subject: [PATCH] Fix build error in binutils 2.36 |
27 |
+ |
28 |
+The build fails in binutils 2.36 |
29 |
+ |
30 |
+[ 520s] cat kernel_syms.lst > syminfo.lst.new |
31 |
+[ 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] |
32 |
+ |
33 |
+It is caused by assembler now generates the GNU property notes section |
34 |
+by default. Use the assmbler option -mx86-used-note=no to disable the |
35 |
+section from being generated to workaround the ensuing linker issue. |
36 |
+ |
37 |
+Signed-off-by: Michael Chang <mchang@××××.com> |
38 |
+--- |
39 |
+ configure.ac | 14 ++++++++++++++ |
40 |
+ 1 file changed, 14 insertions(+) |
41 |
+ |
42 |
+diff --git a/configure.ac b/configure.ac |
43 |
+index fa8f74bb9..38ee5f579 100644 |
44 |
+--- a/configure.ac |
45 |
++++ b/configure.ac |
46 |
+@@ -836,6 +836,20 @@ if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ) && test "x$p |
47 |
+ TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow" |
48 |
+ fi |
49 |
+ |
50 |
++if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ); then |
51 |
++ AC_CACHE_CHECK([whether -Wa,-mx86-used-note works], [grub_cv_cc_mx86_used_note], [ |
52 |
++ CFLAGS="$TARGET_CFLAGS -Wa,-mx86-used-note=no -Werror" |
53 |
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], |
54 |
++ [grub_cv_cc_mx86_used_note=yes], |
55 |
++ [grub_cv_cc_mx86_used_note=no]) |
56 |
++ ]) |
57 |
++ |
58 |
++ if test "x$grub_cv_cc_mx86_used_note" = xyes; then |
59 |
++ TARGET_CFLAGS="$TARGET_CFLAGS -Wa,-mx86-used-note=no" |
60 |
++ TARGET_CCASFLAGS="$TARGET_CCASFLAGS -Wa,-mx86-used-note=no" |
61 |
++ fi |
62 |
++fi |
63 |
++ |
64 |
+ # GRUB doesn't use float or doubles at all. Yet some toolchains may decide |
65 |
+ # that floats are a good fit to run instead of what's written in the code. |
66 |
+ # Given that floating point unit is disabled (if present to begin with) |
67 |
|
68 |
diff --git a/sys-boot/grub/grub-2.06-r1.ebuild b/sys-boot/grub/grub-2.06-r1.ebuild |
69 |
index d80b215cc47..4224c4f643f 100644 |
70 |
--- a/sys-boot/grub/grub-2.06-r1.ebuild |
71 |
+++ b/sys-boot/grub/grub-2.06-r1.ebuild |
72 |
@@ -17,10 +17,10 @@ EAPI=7 |
73 |
# corresponding variable in make.conf or the environment. |
74 |
|
75 |
if [[ ${PV} == 9999 ]]; then |
76 |
- GRUB_AUTORECONF=1 |
77 |
GRUB_BOOTSTRAP=1 |
78 |
fi |
79 |
|
80 |
+GRUB_AUTORECONF=1 |
81 |
PYTHON_COMPAT=( python{2_7,3_{6,7,8,9}} ) |
82 |
WANT_LIBTOOL=none |
83 |
|
84 |
@@ -55,6 +55,7 @@ PATCHES=( |
85 |
"${FILESDIR}"/gfxpayload.patch |
86 |
"${FILESDIR}"/grub-2.02_beta2-KERNEL_GLOBS.patch |
87 |
"${FILESDIR}"/grub-2.06-test-words.patch |
88 |
+ "${FILESDIR}"/grub-2.06-binutils-2.36.patch |
89 |
) |
90 |
|
91 |
DEJAVU=dejavu-sans-ttf-2.37 |