From 434882dc131aead995f59fe1c8e815a8fe3415da Mon Sep 17 00:00:00 2001 From: volker Date: Fri, 15 May 2026 19:26:32 +0000 Subject: [PATCH] lang/node: align patches with www/chromium This does *not* resolve the random build failures seen with chromium-based browsers recently --- lang/node/Makefile | 2 +- .../patches/patch-deps_v8_src_base_macros_h | 12 ++++++++ .../patch-deps_v8_src_base_platform_memory_h | 19 ++++++++++++ .../patches/patch-tools_v8_gypfiles_v8_gyp | 30 ++++--------------- 4 files changed, 37 insertions(+), 26 deletions(-) create mode 100644 lang/node/patches/patch-deps_v8_src_base_macros_h create mode 100644 lang/node/patches/patch-deps_v8_src_base_platform_memory_h diff --git a/lang/node/Makefile b/lang/node/Makefile index 8c163779c2e..6bbd4693b09 100644 --- a/lang/node/Makefile +++ b/lang/node/Makefile @@ -13,7 +13,7 @@ DIST_TUPLE = github qbit node-pledge 1.1.3 \ DISTNAME = node-${NODE_VERSION} PKGNAME = ${DISTNAME:S/v//g} EPOCH = 0 -REVISION = 0 +REVISION = 1 CATEGORIES = lang devel diff --git a/lang/node/patches/patch-deps_v8_src_base_macros_h b/lang/node/patches/patch-deps_v8_src_base_macros_h new file mode 100644 index 00000000000..23ab54e33eb --- /dev/null +++ b/lang/node/patches/patch-deps_v8_src_base_macros_h @@ -0,0 +1,12 @@ +Index: deps/v8/src/base/macros.h +--- deps/v8/src/base/macros.h.orig ++++ deps/v8/src/base/macros.h +@@ -181,7 +181,7 @@ V8_INLINE Dest bit_cast(Source const& source) { + + // Define V8_USE_UNDEFINED_BEHAVIOR_SANITIZER macro. + #if defined(__has_feature) +-#if __has_feature(undefined_behavior_sanitizer) ++#if __has_feature(undefined_behavior_sanitizer) && !defined(V8_OS_BSD) + #define V8_USE_UNDEFINED_BEHAVIOR_SANITIZER 1 + #endif + #endif diff --git a/lang/node/patches/patch-deps_v8_src_base_platform_memory_h b/lang/node/patches/patch-deps_v8_src_base_platform_memory_h new file mode 100644 index 00000000000..37dfcd4d58e --- /dev/null +++ b/lang/node/patches/patch-deps_v8_src_base_platform_memory_h @@ -0,0 +1,19 @@ +Index: deps/v8/src/base/platform/memory.h +--- deps/v8/src/base/platform/memory.h.orig ++++ deps/v8/src/base/platform/memory.h +@@ -21,13 +21,13 @@ + #include + #elif V8_OS_OPENBSD + #include +-#elif V8_OS_ZOS ++#elif (V8_OS_ZOS || V8_OS_BSD) + #include + #else + #include + #endif + +-#if (V8_OS_POSIX && !V8_OS_AIX && !V8_OS_SOLARIS && !V8_OS_ZOS && !V8_OS_OPENBSD) || V8_OS_WIN ++#if (V8_OS_POSIX && !V8_OS_AIX && !V8_OS_SOLARIS && !V8_OS_ZOS && !V8_OS_BSD) || V8_OS_WIN + #define V8_HAS_MALLOC_USABLE_SIZE 1 + #endif + diff --git a/lang/node/patches/patch-tools_v8_gypfiles_v8_gyp b/lang/node/patches/patch-tools_v8_gypfiles_v8_gyp index 4f365088e18..53e9a7a191b 100644 --- a/lang/node/patches/patch-tools_v8_gypfiles_v8_gyp +++ b/lang/node/patches/patch-tools_v8_gypfiles_v8_gyp @@ -7,17 +7,7 @@ from "0.0" if llvm (clang) is detected. Index: tools/v8_gypfiles/v8.gyp --- tools/v8_gypfiles/v8.gyp.orig +++ tools/v8_gypfiles/v8.gyp -@@ -315,6 +315,9 @@ - '<(icu_gyp_path):icuuc', - ], - }], -+ ['v8_control_flow_integrity==1', { -+ 'sources': [ '<(V8_ROOT)/src/deoptimizer/deoptimizer-cfi-builtins.cc' ], -+ }], - ], - }, # v8_initializers_slow - { -@@ -733,7 +736,7 @@ +@@ -733,7 +733,7 @@ }], ['v8_enable_webassembly==1', { 'conditions': [ @@ -26,7 +16,7 @@ Index: tools/v8_gypfiles/v8.gyp 'sources': [ '<(V8_ROOT)/src/trap-handler/handler-inside-posix.h', ], -@@ -776,7 +779,7 @@ +@@ -776,7 +776,7 @@ }], ['v8_enable_webassembly==1', { 'conditions': [ @@ -35,7 +25,7 @@ Index: tools/v8_gypfiles/v8.gyp 'sources': [ '<(V8_ROOT)/src/trap-handler/handler-inside-posix.h', ], -@@ -1153,7 +1156,7 @@ +@@ -1153,7 +1153,7 @@ }], ['v8_enable_webassembly==1', { 'conditions': [ @@ -44,7 +34,7 @@ Index: tools/v8_gypfiles/v8.gyp 'sources': [ '<(V8_ROOT)/src/trap-handler/handler-inside-posix.cc', '<(V8_ROOT)/src/trap-handler/handler-outside-posix.cc', -@@ -1181,7 +1184,7 @@ +@@ -1181,7 +1181,7 @@ 'conditions': [ ['v8_enable_webassembly==1', { 'conditions': [ @@ -53,7 +43,7 @@ Index: tools/v8_gypfiles/v8.gyp 'sources': [ '<(V8_ROOT)/src/trap-handler/handler-inside-posix.cc', '<(V8_ROOT)/src/trap-handler/handler-outside-posix.cc', -@@ -1229,7 +1232,7 @@ +@@ -1229,7 +1229,7 @@ 'conditions': [ ['v8_enable_webassembly==1', { 'conditions': [ @@ -62,13 +52,3 @@ Index: tools/v8_gypfiles/v8.gyp 'sources': [ '<(V8_ROOT)/src/trap-handler/handler-inside-posix.cc', '<(V8_ROOT)/src/trap-handler/handler-outside-posix.cc', -@@ -1804,6 +1807,9 @@ - # "build/win:default_exe_manifest", - ], - 'conditions': [ -+ ['v8_control_flow_integrity==1', { -+ 'sources': [ '<(V8_ROOT)/src/deoptimizer/deoptimizer-cfi-empty.cc' ], -+ }], - ['want_separate_host_toolset', { - 'toolsets': ['host'], - }],