1 |
commit: cd0cb8e673c0a2609174f456c3145e61ec408791 |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 8 22:53:40 2021 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 8 22:53:40 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd0cb8e6 |
7 |
|
8 |
net-libs/nodejs-12.20.1: fix mksnapshot segfaults on ppc64 |
9 |
|
10 |
Upstream regression? |
11 |
|
12 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
13 |
|
14 |
.../files/nodejs-12.20.1-fix_ppc64_crashes.patch | 44 ++++++++++++++++++++++ |
15 |
net-libs/nodejs/nodejs-12.20.1.ebuild | 1 + |
16 |
2 files changed, 45 insertions(+) |
17 |
|
18 |
diff --git a/net-libs/nodejs/files/nodejs-12.20.1-fix_ppc64_crashes.patch b/net-libs/nodejs/files/nodejs-12.20.1-fix_ppc64_crashes.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..0982d3c81c2 |
21 |
--- /dev/null |
22 |
+++ b/net-libs/nodejs/files/nodejs-12.20.1-fix_ppc64_crashes.patch |
23 |
@@ -0,0 +1,44 @@ |
24 |
+Backport of https://github.com/nodejs/node/pull/33866 to nodejs-12 |
25 |
+ |
26 |
+--- a/deps/v8/src/compiler/backend/instruction-selector.cc |
27 |
++++ b/deps/v8/src/compiler/backend/instruction-selector.cc |
28 |
+@@ -2788,7 +2788,7 @@ |
29 |
+ switch (call_descriptor->kind()) { |
30 |
+ case CallDescriptor::kCallAddress: { |
31 |
+ int misc_field = static_cast<int>(call_descriptor->ParameterCount()); |
32 |
+-#if defined(_AIX) |
33 |
++#if ABI_USES_FUNCTION_DESCRIPTORS |
34 |
+ // Highest misc_field bit is used on AIX to indicate if a CFunction call |
35 |
+ // has function descriptor or not. |
36 |
+ misc_field |= call_descriptor->HasFunctionDescriptor() |
37 |
+--- a/deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc |
38 |
++++ b/deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc |
39 |
+@@ -1026,7 +1026,7 @@ |
40 |
+ Label start_call; |
41 |
+ bool isWasmCapiFunction = |
42 |
+ linkage()->GetIncomingDescriptor()->IsWasmCapiFunction(); |
43 |
+-#if defined(_AIX) |
44 |
++#if ABI_USES_FUNCTION_DESCRIPTORS |
45 |
+ // AIX/PPC64BE Linux uses a function descriptor |
46 |
+ int kNumParametersMask = kHasFunctionDescriptorBitMask - 1; |
47 |
+ num_parameters = kNumParametersMask & misc_field; |
48 |
+--- a/deps/v8/src/execution/simulator.h |
49 |
++++ b/deps/v8/src/execution/simulator.h |
50 |
+@@ -122,7 +122,7 @@ |
51 |
+ |
52 |
+ DISABLE_CFI_ICALL Return Call(Args... args) { |
53 |
+ // When running without a simulator we call the entry directly. |
54 |
+-#if V8_OS_AIX |
55 |
++#if ABI_USES_FUNCTION_DESCRIPTORS |
56 |
+ // AIX ABI requires function descriptors (FD). Artificially create a pseudo |
57 |
+ // FD to ensure correct dispatch to generated code. The 'volatile' |
58 |
+ // declaration is required to avoid the compiler from not observing the |
59 |
+@@ -134,7 +134,7 @@ |
60 |
+ return fn(args...); |
61 |
+ #else |
62 |
+ return fn_ptr_(args...); |
63 |
+-#endif // V8_OS_AIX |
64 |
++#endif // ABI_USES_FUNCTION_DESCRIPTORS |
65 |
+ } |
66 |
+ #endif // USE_SIMULATOR |
67 |
+ |
68 |
|
69 |
diff --git a/net-libs/nodejs/nodejs-12.20.1.ebuild b/net-libs/nodejs/nodejs-12.20.1.ebuild |
70 |
index 87b53e063d2..fc8227e01db 100644 |
71 |
--- a/net-libs/nodejs/nodejs-12.20.1.ebuild |
72 |
+++ b/net-libs/nodejs/nodejs-12.20.1.ebuild |
73 |
@@ -45,6 +45,7 @@ DEPEND=" |
74 |
" |
75 |
PATCHES=( |
76 |
"${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch |
77 |
+ "${FILESDIR}"/${PN}-12.20.1-fix_ppc64_crashes.patch |
78 |
"${FILESDIR}"/${PN}-99999999-llhttp.patch |
79 |
) |
80 |
RESTRICT="test" |