Index: www/node/Makefile =================================================================== --- www/node/Makefile +++ www/node/Makefile @@ -16,6 +16,9 @@ BROKEN_SSL_REASON= Node.js 11.x requires OpenSSL 1.1.x or the BUNDLED_SSL option enabled ONLY_FOR_ARCHS= aarch64 amd64 armv6 armv7 i386 powerpc64 +EXTRA_PATCHES= ${EXTRA_PATCHES_${OSREL:R}} +EXTRA_PATCHES_13= ${PATCHDIR}/extra-patch-common.gypi + OPTIONS_DEFINE= BUNDLED_SSL DOCS NLS DTRACE OPTIONS_DEFAULT= DTRACE OPTIONS_DEFAULT_FreeBSD_11= BUNDLED_SSL Index: www/node/files/extra-patch-common.gypi =================================================================== --- /dev/null +++ www/node/files/extra-patch-common.gypi @@ -0,0 +1,11 @@ +--- common.gypi.orig 2019-09-09 16:35:03 UTC ++++ common.gypi +@@ -390,7 +390,7 @@ + 'ldflags': [ '-m32' ], + }], + [ 'target_arch=="ppc64" and OS!="aix"', { +- 'cflags': [ '-m64', '-mminimal-toc' ], ++ 'cflags': [ '-m64' ], + 'ldflags': [ '-m64' ], + }], + [ 'target_arch=="s390x"', { Index: www/node/files/patch-deps_v8_src_codegen_ppc_constants-ppc.h =================================================================== --- /dev/null +++ www/node/files/patch-deps_v8_src_codegen_ppc_constants-ppc.h @@ -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 Index: www/node/files/patch-deps_v8_src_execution_simulator.h =================================================================== --- www/node/files/patch-deps_v8_src_execution_simulator.h +++ www/node/files/patch-deps_v8_src_execution_simulator.h @@ -1,11 +1,11 @@ ---- deps/v8/src/execution/simulator.h.orig 2019-04-26 17:47:06 UTC +--- deps/v8/src/execution/simulator.h.orig 2019-09-04 15:36:23 UTC +++ deps/v8/src/execution/simulator.h @@ -124,7 +124,7 @@ class GeneratedCode { 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 Index: www/node/files/patch-tools_v8__gypfiles_v8.gyp =================================================================== --- /dev/null +++ www/node/files/patch-tools_v8__gypfiles_v8.gyp @@ -0,0 +1,11 @@ +--- tools/v8_gypfiles/v8.gyp.orig 2019-09-09 16:33:56 UTC ++++ tools/v8_gypfiles/v8.gyp +@@ -858,7 +858,7 @@ + }], + # Platforms that don't have Compare-And-Swap (CAS) support need to link atomic library + # to implement atomic memory access +- ['v8_current_cpu in ["mips", "mipsel", "mips64", "mips64el", "ppc", "ppc64", "s390x"]', { ++ ['v8_current_cpu in ["mips", "mipsel", "mips64", "mips64el", "ppc", "s390x"]', { + 'link_settings': { + 'libraries': ['-latomic', ], + },