svn commit: r541210 - in head/www/node12: . files
Piotr Kubaj
pkubaj at FreeBSD.org
Sat Jul 4 12:47:48 UTC 2020
Author: pkubaj
Date: Sat Jul 4 12:47:46 2020
New Revision: 541210
URL: https://svnweb.freebsd.org/changeset/ports/541210
Log:
www/node12: fix runtime on powerpc64 elfv1, build / runtime on powerpc64 elfv2
Patches are backported from www/node and changed where necessary.
PR: 247433
Approved by: bhughes (maintainer timeout)
MFH: 2020Q3 (fix build / runtime blanket)
Added:
head/www/node12/files/extra-patch-common.gypi (contents, props changed)
head/www/node12/files/patch-deps_v8_src_codegen_ppc_constants-ppc.h (contents, props changed)
head/www/node12/files/patch-deps_v8_src_compiler_backend_instruction-selector.cc (contents, props changed)
head/www/node12/files/patch-deps_v8_src_compiler_backend_ppc_code-generator-ppc.cc (contents, props changed)
Modified:
head/www/node12/Makefile
head/www/node12/files/patch-deps_v8_src_execution_simulator.h
Modified: head/www/node12/Makefile
==============================================================================
--- head/www/node12/Makefile Sat Jul 4 12:39:59 2020 (r541209)
+++ head/www/node12/Makefile Sat Jul 4 12:47:46 2020 (r541210)
@@ -2,6 +2,7 @@
PORTNAME= node
PORTVERSION= 12.18.2
+PORTREVISION= 1
DISTVERSIONPREFIX= v
CATEGORIES= www
MASTER_SITES= http://nodejs.org/dist/v${PORTVERSION}/
@@ -82,6 +83,8 @@ BROKEN_SSL+= base
.if ${ARCH} == armv6 || ${ARCH} == armv7
EXTRA_PATCHES= ${PATCHDIR}/extra-patch-tools_v8__gypfiles_v8.gyp
+.elif defined(PPC_ABI) && ${PPC_ABI} == ELFv2
+EXTRA_PATCHES= ${PATCHDIR}/extra-patch-common.gypi
.endif
.if ${PORT_OPTIONS:MBUNDLED_SSL} && ${ARCH} != amd64
Added: head/www/node12/files/extra-patch-common.gypi
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/node12/files/extra-patch-common.gypi Sat Jul 4 12:47:46 2020 (r541210)
@@ -0,0 +1,13 @@
+--- common.gypi.orig 2019-10-01 15:32:40.000000000 +0200
++++ common.gypi 2019-10-16 12:47:09.236138000 +0200
+@@ -390,8 +390,8 @@
+ 'ldflags': [ '-m32' ],
+ }],
+ [ 'target_arch=="ppc64" and OS!="aix"', {
+- 'cflags': [ '-m64', '-mminimal-toc' ],
+- 'ldflags': [ '-m64' ],
++ 'cflags': [ '-m64' ],
++ 'ldflags': [ '-m64' ],
+ }],
+ [ 'target_arch=="s390x"', {
+ 'cflags': [ '-m64', '-march=z196' ],
Added: head/www/node12/files/patch-deps_v8_src_codegen_ppc_constants-ppc.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/node12/files/patch-deps_v8_src_codegen_ppc_constants-ppc.h Sat Jul 4 12:47:46 2020 (r541210)
@@ -0,0 +1,20 @@
+--- deps/v8/src/codegen/ppc/constants-ppc.h.orig 2019-09-09 16:27:17 UTC
++++ deps/v8/src/codegen/ppc/constants-ppc.h
+@@ -34,7 +34,7 @@
+ #define ABI_PASSES_HANDLES_IN_REGS 0
+ #endif
+
+-#if !V8_HOST_ARCH_PPC || !V8_TARGET_ARCH_PPC64 || V8_TARGET_LITTLE_ENDIAN || \
++#if !V8_HOST_ARCH_PPC || !V8_TARGET_ARCH_PPC64 || \
+ (defined(_CALL_ELF) && _CALL_ELF == 2)
+ #define ABI_RETURNS_OBJECT_PAIRS_IN_REGS 1
+ #else
+@@ -43,7 +43,7 @@
+
+ #if !V8_HOST_ARCH_PPC || \
+ (V8_TARGET_ARCH_PPC64 && \
+- (V8_TARGET_LITTLE_ENDIAN || (defined(_CALL_ELF) && _CALL_ELF == 2)))
++ (defined(_CALL_ELF) && _CALL_ELF == 2))
+ #define ABI_CALL_VIA_IP 1
+ #else
+ #define ABI_CALL_VIA_IP 0
Added: head/www/node12/files/patch-deps_v8_src_compiler_backend_instruction-selector.cc
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/node12/files/patch-deps_v8_src_compiler_backend_instruction-selector.cc Sat Jul 4 12:47:46 2020 (r541210)
@@ -0,0 +1,11 @@
+--- deps/v8/src/compiler/backend/instruction-selector.cc.orig 2020-04-21 11:38:50 UTC
++++ deps/v8/src/compiler/backend/instruction-selector.cc
+@@ -2783,7 +2783,7 @@ void InstructionSelector::VisitCall(Node* node, BasicB
+ switch (call_descriptor->kind()) {
+ case CallDescriptor::kCallAddress: {
+ int misc_field = static_cast<int>(call_descriptor->ParameterCount());
+-#if defined(_AIX)
++#if defined(_AIX) || (V8_TARGET_ARCH_PPC_BE && (!defined(_CALL_ELF) || _CALL_ELF == 1))
+ // Highest misc_field bit is used on AIX to indicate if a CFunction call
+ // has function descriptor or not.
+ if (!call_descriptor->NoFunctionDescriptor()) {
Added: head/www/node12/files/patch-deps_v8_src_compiler_backend_ppc_code-generator-ppc.cc
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/node12/files/patch-deps_v8_src_compiler_backend_ppc_code-generator-ppc.cc Sat Jul 4 12:47:46 2020 (r541210)
@@ -0,0 +1,11 @@
+--- deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc.orig 2020-04-21 11:38:50 UTC
++++ deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc
+@@ -1026,7 +1026,7 @@
+ Label start_call;
+ bool isWasmCapiFunction =
+ linkage()->GetIncomingDescriptor()->IsWasmCapiFunction();
+-#if defined(_AIX)
++#if defined(_AIX) || (V8_TARGET_ARCH_PPC_BE && (!defined(_CALL_ELF) || _CALL_ELF == 1))
+ // AIX/PPC64BE Linux uses a function descriptor
+ int kNumParametersMask = kHasFunctionDescriptorBitMask - 1;
+ num_parameters = kNumParametersMask & misc_field;
Modified: head/www/node12/files/patch-deps_v8_src_execution_simulator.h
==============================================================================
--- head/www/node12/files/patch-deps_v8_src_execution_simulator.h Sat Jul 4 12:39:59 2020 (r541209)
+++ head/www/node12/files/patch-deps_v8_src_execution_simulator.h Sat Jul 4 12:47:46 2020 (r541210)
@@ -1,11 +1,11 @@
---- deps/v8/src/execution/simulator.h.orig 2020-04-28 09:45:23 UTC
+--- deps/v8/src/execution/simulator.h.orig 2019-11-21 21:14:01 UTC
+++ deps/v8/src/execution/simulator.h
-@@ -122,7 +122,7 @@ class GeneratedCode {
+@@ -122,7 +122,7 @@
DISABLE_CFI_ICALL Return Call(Args... args) {
// When running without a simulator we call the entry directly.
-#if V8_OS_AIX
-+#if V8_TARGET_ARCH_PPC_BE
++#if V8_OS_AIX || (V8_TARGET_ARCH_PPC_BE && (!defined(_CALL_ELF) || _CALL_ELF == 1))
// AIX ABI requires function descriptors (FD). Artificially create a pseudo
// FD to ensure correct dispatch to generated code. The 'volatile'
// declaration is required to avoid the compiler from not observing the
More information about the svn-ports-all
mailing list