1 |
commit: 180d1e95aaa2e831bd2480b73af927a1632a9817 |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 7 03:14:36 2020 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 7 04:04:24 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=180d1e95 |
7 |
|
8 |
sys-fs/zfs-kmod: add powerpc setjmp/longjmp patch to 0.8.4 |
9 |
|
10 |
kernel-builtin build fails with |
11 |
powerpc64le-unknown-linux-gnu-ld.bfd: fs/zfs/lua/setjmp/setjmp.o: in |
12 |
function `setjmp': |
13 |
(.text+0x0): multiple definition of `setjmp'; |
14 |
arch/powerpc/kernel/misc.o:(.text+0x30): first defined here |
15 |
powerpc64le-unknown-linux-gnu-ld.bfd: fs/zfs/lua/setjmp/setjmp.o: in |
16 |
function `longjmp': |
17 |
(.text+0x78): multiple definition of `longjmp'; |
18 |
arch/powerpc/kernel/misc.o:(.text+0x9c): first defined here |
19 |
Package-Manager: Portage-3.0.5, Repoman-3.0.1 |
20 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
21 |
|
22 |
sys-fs/zfs-kmod/files/0.8.4-powerpc_jmp_weak.patch | 48 ++++++++++++++++++++++ |
23 |
sys-fs/zfs-kmod/zfs-kmod-0.8.4-r1.ebuild | 2 + |
24 |
2 files changed, 50 insertions(+) |
25 |
|
26 |
diff --git a/sys-fs/zfs-kmod/files/0.8.4-powerpc_jmp_weak.patch b/sys-fs/zfs-kmod/files/0.8.4-powerpc_jmp_weak.patch |
27 |
new file mode 100644 |
28 |
index 00000000000..1a2948a3158 |
29 |
--- /dev/null |
30 |
+++ b/sys-fs/zfs-kmod/files/0.8.4-powerpc_jmp_weak.patch |
31 |
@@ -0,0 +1,48 @@ |
32 |
+From bd0efd1f062bfba5dd2d6b1fe30b6949f8e0a8ef Mon Sep 17 00:00:00 2001 |
33 |
+From: sterlingjensen <5555776+sterlingjensen@××××××××××××××××××××.com> |
34 |
+Date: Mon, 24 Aug 2020 22:41:05 -0500 |
35 |
+Subject: [PATCH] Mark lua setjmp/longjmp for powerpc weak |
36 |
+ |
37 |
+Linux already defines setjmp/longjmp for powerpc, which leads to |
38 |
+duplicate symbols in a statically linked build. |
39 |
+ |
40 |
+Signed-off-by: Sterlng Jensen <sterlingjensen@××××××××××××××××××××.com> |
41 |
+--- |
42 |
+ module/lua/setjmp/setjmp_ppc.S | 10 +++++----- |
43 |
+ 1 file changed, 5 insertions(+), 5 deletions(-) |
44 |
+ |
45 |
+diff --git a/module/lua/setjmp/setjmp_ppc.S b/module/lua/setjmp/setjmp_ppc.S |
46 |
+index f787ef34913..72aa5d5ab5b 100644 |
47 |
+--- a/module/lua/setjmp/setjmp_ppc.S |
48 |
++++ b/module/lua/setjmp/setjmp_ppc.S |
49 |
+@@ -56,7 +56,7 @@ |
50 |
+ #define ENTRY(name) \ |
51 |
+ .align 2 ; \ |
52 |
+ .type name,@function; \ |
53 |
+- .globl name; \ |
54 |
++ .weak name; \ |
55 |
+ name: |
56 |
+ |
57 |
+ #else /* PPC64_ELF_ABI_v1 */ |
58 |
+@@ -65,8 +65,8 @@ name: |
59 |
+ #define GLUE(a,b) XGLUE(a,b) |
60 |
+ #define ENTRY(name) \ |
61 |
+ .align 2 ; \ |
62 |
+- .globl name; \ |
63 |
+- .globl GLUE(.,name); \ |
64 |
++ .weak name; \ |
65 |
++ .weak GLUE(.,name); \ |
66 |
+ .pushsection ".opd","aw"; \ |
67 |
+ name: \ |
68 |
+ .quad GLUE(.,name); \ |
69 |
+@@ -83,8 +83,8 @@ GLUE(.,name): |
70 |
+ #define ENTRY(name) \ |
71 |
+ .text; \ |
72 |
+ .p2align 4; \ |
73 |
+- .globl name; \ |
74 |
+- .type name,@function; \ |
75 |
++ .weak name; \ |
76 |
++ .type name,@function; \ |
77 |
+ name: |
78 |
+ |
79 |
+ #endif /* __powerpc64__ */ |
80 |
|
81 |
diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.8.4-r1.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.8.4-r1.ebuild |
82 |
index 59ea52ab658..2276604b161 100644 |
83 |
--- a/sys-fs/zfs-kmod/zfs-kmod-0.8.4-r1.ebuild |
84 |
+++ b/sys-fs/zfs-kmod/zfs-kmod-0.8.4-r1.ebuild |
85 |
@@ -37,6 +37,8 @@ RESTRICT="debug? ( strip ) test" |
86 |
|
87 |
DOCS=( AUTHORS COPYRIGHT META README.md ) |
88 |
|
89 |
+PATCHES=( "${FILESDIR}/${PV}-powerpc_jmp_weak.patch" ) |
90 |
+ |
91 |
pkg_setup() { |
92 |
CONFIG_CHECK=" |
93 |
!DEBUG_LOCK_ALLOC |