From owner-svn-ports-all@freebsd.org Sat Jul 4 12:47:48 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78FB434CF69; Sat, 4 Jul 2020 12:47:48 +0000 (UTC) (envelope-from pkubaj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zWnw2f94z4fFb; Sat, 4 Jul 2020 12:47:48 +0000 (UTC) (envelope-from pkubaj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3E8741C769; Sat, 4 Jul 2020 12:47:48 +0000 (UTC) (envelope-from pkubaj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 064Clm87064532; Sat, 4 Jul 2020 12:47:48 GMT (envelope-from pkubaj@FreeBSD.org) Received: (from pkubaj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 064CllWx064527; Sat, 4 Jul 2020 12:47:47 GMT (envelope-from pkubaj@FreeBSD.org) Message-Id: <202007041247.064CllWx064527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkubaj set sender to pkubaj@FreeBSD.org using -f From: Piotr Kubaj Date: Sat, 4 Jul 2020 12:47:47 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r541210 - in head/www/node12: . files X-SVN-Group: ports-head X-SVN-Commit-Author: pkubaj X-SVN-Commit-Paths: in head/www/node12: . files X-SVN-Commit-Revision: 541210 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 12:47:48 -0000 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(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