From 8439929974083d62308ffae7eb9d178db94b960a Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Sun, 6 Feb 2022 16:37:50 +0100 Subject: [PATCH] nodejs: unbreak aarch64. --- ...s-v8-src-trap-handler-trap-handler.h.patch | 31 +++++++++++++++++++ srcpkgs/nodejs/template | 1 - 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/nodejs/patches/999-deps-v8-src-trap-handler-trap-handler.h.patch diff --git a/srcpkgs/nodejs/patches/999-deps-v8-src-trap-handler-trap-handler.h.patch b/srcpkgs/nodejs/patches/999-deps-v8-src-trap-handler-trap-handler.h.patch new file mode 100644 index 0000000000..56529af972 --- /dev/null +++ b/srcpkgs/nodejs/patches/999-deps-v8-src-trap-handler-trap-handler.h.patch @@ -0,0 +1,31 @@ +https://github.com/nxhack/openwrt-node-packages/blob/master/node/patches/v16.x/999-deps-v8-src-trap-handler-trap-handler.h.patch + +--- a/deps/v8/src/trap-handler/trap-handler.h ++++ b/deps/v8/src/trap-handler/trap-handler.h +@@ -17,19 +17,16 @@ namespace v8 { + namespace internal { + namespace trap_handler { + +-// X64 on Linux, Windows, MacOS, FreeBSD. +-#if V8_HOST_ARCH_X64 && V8_TARGET_ARCH_X64 && \ +- ((V8_OS_LINUX && !V8_OS_ANDROID) || V8_OS_WIN || V8_OS_MACOSX || \ +- V8_OS_FREEBSD) ++#if V8_TARGET_ARCH_X64 && V8_OS_LINUX && !V8_OS_ANDROID + #define V8_TRAP_HANDLER_SUPPORTED true +-// Arm64 (non-simulator) on Mac. +-#elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_ARM64 && V8_OS_MACOSX ++#elif V8_TARGET_ARCH_X64 && V8_OS_WIN + #define V8_TRAP_HANDLER_SUPPORTED true +-// Arm64 simulator on x64 on Linux or Mac. +-#elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_X64 && (V8_OS_LINUX || V8_OS_MACOSX) +-#define V8_TRAP_HANDLER_VIA_SIMULATOR ++#elif V8_TARGET_ARCH_X64 && V8_OS_MACOSX ++#define V8_TRAP_HANDLER_SUPPORTED true ++#elif V8_TARGET_ARCH_X64 && V8_OS_FREEBSD ++#define V8_TRAP_HANDLER_SUPPORTED true ++#elif V8_HOST_ARCH_ARM64 && V8_TARGET_ARCH_ARM64 && V8_OS_MACOSX + #define V8_TRAP_HANDLER_SUPPORTED true +-// Everything else is unsupported. + #else + #define V8_TRAP_HANDLER_SUPPORTED false + #endif diff --git a/srcpkgs/nodejs/template b/srcpkgs/nodejs/template index 30f6abee2a..3fd0894190 100644 --- a/srcpkgs/nodejs/template +++ b/srcpkgs/nodejs/template @@ -43,7 +43,6 @@ fi case "$XBPS_TARGET_MACHINE" in ppc64*) ;; ppc*) broken="Node 12.x does not support 32-bit ppc" ;; - aarch64*) broken="https://build.voidlinux.org/builders/aarch64-musl_builder/builds/36246/steps/shell_3/logs/stdio maybe https://github.com/nodejs/node/issues/36287" ;; esac CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"