Index: head/www/node/Makefile =================================================================== --- head/www/node/Makefile +++ head/www/node/Makefile @@ -77,6 +77,10 @@ .include +.if defined(PPC_ABI) && ${PPC_ABI} == ELFv2 +EXTRA_PATCHES= ${PATCHDIR}/extra-patch-common.gypi +.endif + .if ${OPSYS} == FreeBSD && ${OSVERSION} < 1200085 BROKEN_SSL+= base .endif Index: head/www/node/files/extra-patch-common.gypi =================================================================== --- head/www/node/files/extra-patch-common.gypi +++ head/www/node/files/extra-patch-common.gypi @@ -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' ], Index: head/www/node/files/patch-deps_v8_src_codegen_ppc_constants-ppc.h =================================================================== --- head/www/node/files/patch-deps_v8_src_codegen_ppc_constants-ppc.h +++ head/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: head/www/node/files/patch-deps_v8_src_execution_simulator.h =================================================================== --- head/www/node/files/patch-deps_v8_src_execution_simulator.h +++ head/www/node/files/patch-deps_v8_src_execution_simulator.h @@ -5,7 +5,7 @@ FATAL("Generated code execution not possible during cross-compilation."); #endif // defined(V8_TARGET_OS_WIN) && !defined(V8_OS_WIN) -#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