From owner-svn-ports-all@freebsd.org Fri Nov 29 16:28:49 2019 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 1DC2A1B537A; Fri, 29 Nov 2019 16:28:49 +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) server-signature RSA-PSS (4096 bits) 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 47Pg1X75Shz44qm; Fri, 29 Nov 2019 16:28: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 D7B3718CEA; Fri, 29 Nov 2019 16:28: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 xATGSmav072582; Fri, 29 Nov 2019 16:28:48 GMT (envelope-from pkubaj@FreeBSD.org) Received: (from pkubaj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xATGSmoq072578; Fri, 29 Nov 2019 16:28:48 GMT (envelope-from pkubaj@FreeBSD.org) Message-Id: <201911291628.xATGSmoq072578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkubaj set sender to pkubaj@FreeBSD.org using -f From: Piotr Kubaj Date: Fri, 29 Nov 2019 16:28:48 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r518665 - in head/www/node: . files X-SVN-Group: ports-head X-SVN-Commit-Author: pkubaj X-SVN-Commit-Paths: in head/www/node: . files X-SVN-Commit-Revision: 518665 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.29 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: Fri, 29 Nov 2019 16:28:49 -0000 Author: pkubaj Date: Fri Nov 29 16:28:47 2019 New Revision: 518665 URL: https://svnweb.freebsd.org/changeset/ports/518665 Log: www/node: fix build and runtime when using ELFv2 ABI on powerpc64 Submitted by: alfredo.junior@eldorado.org.br Reviewed by: mikael.urankar@gmail.com Approved by: bhughes (maintainer timeout), mentors (implicit approval) Differential Revision: https://reviews.freebsd.org/D21588 Added: head/www/node/files/extra-patch-common.gypi (contents, props changed) head/www/node/files/patch-deps_v8_src_codegen_ppc_constants-ppc.h (contents, props changed) Modified: head/www/node/Makefile head/www/node/files/patch-deps_v8_src_execution_simulator.h Modified: head/www/node/Makefile ============================================================================== --- head/www/node/Makefile Fri Nov 29 16:14:55 2019 (r518664) +++ head/www/node/Makefile Fri Nov 29 16:28:47 2019 (r518665) @@ -77,6 +77,10 @@ LIB_DEPENDS+= libcares.so:dns/c-ares\ .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 Added: head/www/node/files/extra-patch-common.gypi ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/node/files/extra-patch-common.gypi Fri Nov 29 16:28:47 2019 (r518665) @@ -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/node/files/patch-deps_v8_src_codegen_ppc_constants-ppc.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/node/files/patch-deps_v8_src_codegen_ppc_constants-ppc.h Fri Nov 29 16:28:47 2019 (r518665) @@ -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 Modified: head/www/node/files/patch-deps_v8_src_execution_simulator.h ============================================================================== --- head/www/node/files/patch-deps_v8_src_execution_simulator.h Fri Nov 29 16:14:55 2019 (r518664) +++ head/www/node/files/patch-deps_v8_src_execution_simulator.h Fri Nov 29 16:28:47 2019 (r518665) @@ -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