svn commit: r518665 - in head/www/node: . files
Piotr Kubaj
pkubaj at FreeBSD.org
Fri Nov 29 16:28:49 UTC 2019
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 at eldorado.org.br
Reviewed by: mikael.urankar at 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 <bsd.port.options.mk>
+.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
More information about the svn-ports-head
mailing list