Index: Makefile =================================================================== --- Makefile (revision 539557) +++ Makefile (working copy) @@ -82,6 +82,8 @@ .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 Index: files/extra-patch-common.gypi =================================================================== --- files/extra-patch-common.gypi (nonexistent) +++ files/extra-patch-common.gypi (working copy) @@ -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' ], Property changes on: files/extra-patch-common.gypi ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: files/patch-deps_v8_src_codegen_ppc_constants-ppc.h =================================================================== --- files/patch-deps_v8_src_codegen_ppc_constants-ppc.h (nonexistent) +++ files/patch-deps_v8_src_codegen_ppc_constants-ppc.h (working copy) @@ -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 Property changes on: files/patch-deps_v8_src_codegen_ppc_constants-ppc.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: files/patch-deps_v8_src_compiler_backend_instruction-selector.cc =================================================================== --- files/patch-deps_v8_src_compiler_backend_instruction-selector.cc (nonexistent) +++ files/patch-deps_v8_src_compiler_backend_instruction-selector.cc (working copy) @@ -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(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()) { Property changes on: files/patch-deps_v8_src_compiler_backend_instruction-selector.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: files/patch-deps_v8_src_compiler_backend_ppc_code-generator-ppc.cc =================================================================== --- files/patch-deps_v8_src_compiler_backend_ppc_code-generator-ppc.cc (nonexistent) +++ files/patch-deps_v8_src_compiler_backend_ppc_code-generator-ppc.cc (working copy) @@ -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; Property changes on: files/patch-deps_v8_src_compiler_backend_ppc_code-generator-ppc.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: files/patch-deps_v8_src_execution_simulator.h =================================================================== --- files/patch-deps_v8_src_execution_simulator.h (revision 539557) +++ files/patch-deps_v8_src_execution_simulator.h (working copy) @@ -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