From a9168fc16106b0e64e81b842c47e9a0af7e1f7a4 Mon Sep 17 00:00:00 2001 From: Min RK Date: Fri, 26 Nov 2021 22:07:23 +0100 Subject: [PATCH] bug cross-compiling v8 linux x64->aarch64 --- recipe/aarch64-trap-handler.patch | 27 +++++++++++++++++++++++++++ recipe/meta.yaml | 1 + 2 files changed, 28 insertions(+) create mode 100644 recipe/aarch64-trap-handler.patch diff --git a/recipe/aarch64-trap-handler.patch b/recipe/aarch64-trap-handler.patch new file mode 100644 index 00000000..d9aa8672 --- /dev/null +++ b/recipe/aarch64-trap-handler.patch @@ -0,0 +1,27 @@ +From 0ae9f7a221b5ff347904eb0d1e88e0b87199eca2 Mon Sep 17 00:00:00 2001 +From: Min RK +Date: Fri, 26 Nov 2021 22:04:02 +0100 +Subject: [PATCH] trap handler doesn't work on linux cross-compile to arm + +--- + deps/v8/src/trap-handler/trap-handler.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/deps/v8/src/trap-handler/trap-handler.h b/deps/v8/src/trap-handler/trap-handler.h +index 0b3a6e0a70..363495129d 100644 +--- a/deps/v8/src/trap-handler/trap-handler.h ++++ b/deps/v8/src/trap-handler/trap-handler.h +@@ -25,8 +25,8 @@ namespace trap_handler { + // Arm64 (non-simulator) on Mac. + #elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_ARM64 && V8_OS_MACOSX + #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) ++// Arm64 simulator on x64 on Mac. ++#elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_X64 && V8_OS_MACOSX + #define V8_TRAP_HANDLER_VIA_SIMULATOR + #define V8_TRAP_HANDLER_SUPPORTED true + // Everything else is unsupported. +-- +2.29.2 + diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 85742e1e..3c68bc43 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -20,6 +20,7 @@ source: - 0001-Force-include-handler-outside-simulator.patch # [osx and arm64] - test-dep-shared-openssl.patch # [not win] - ppc-issignaling.patch # [ppc64le] + - aarch64-trap-handler.patch # [linux and aarch64] build: number: 0