diff --git a/extra/nodejs/build b/extra/nodejs/build index b15d5815..b96885da 100755 --- a/extra/nodejs/build +++ b/extra/nodejs/build @@ -1,5 +1,7 @@ #!/bin/sh -e +patch -p1 < gcc-13.patch + # Fix build when libatomic.so does not exist in the system. # This may be provided by compiler-rt which requires no additional # linker flags to be used. diff --git a/extra/nodejs/checksums b/extra/nodejs/checksums index 13abbf7d..ee544177 100644 --- a/extra/nodejs/checksums +++ b/extra/nodejs/checksums @@ -1 +1,2 @@ bc59c0d2867daed8f814a084fd45c6b4108bc23a078b5306ec88928320d218f887 +58325e9f67df55c410451510a8e29c9a091b824599f38229503908e3d345ee849b diff --git a/extra/nodejs/patches/gcc-13.patch b/extra/nodejs/patches/gcc-13.patch new file mode 100644 index 00000000..e2044215 --- /dev/null +++ b/extra/nodejs/patches/gcc-13.patch @@ -0,0 +1,44 @@ +From 0164c09d4025df2bd1a42f14de29166aa0e7ac7a Mon Sep 17 00:00:00 2001 +From: Richard Lau +Date: Wed, 26 Apr 2023 15:46:00 -0400 +Subject: [PATCH] deps: V8: cherry-pick c5ab3e4f0c5a + +Original commit message: + + libstdc++: fix incomplete type in v8::internal::is_subtype + + Using std::convertible with incomplete types is UB. However, till + GCC 12 it was accepted and std::convertible returned false. + This fails now for e.g. v8::internal::WasmArray. Use + std::disjunction and std::conjunction instead which are short- + circuiting, because std::is_base_of is already true. + + Bug: chromium:957519 + Change-Id: Ia26643dbdf0fb00d5586c71ae6b18e8d0f3cf96e + Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4394663 + Commit-Queue: Stephan Hartmann + Reviewed-by: Clemens Backes + Cr-Commit-Position: refs/heads/main@{#86904} + +Refs: https://github.com/v8/v8/commit/c5ab3e4f0c5a3ce880941184ef8447c27cd19a93 +--- + common.gypi | 2 +- + deps/v8/src/codegen/tnode.h | 5 +++-- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/deps/v8/src/codegen/tnode.h b/deps/v8/src/codegen/tnode.h +index cd7bd8db98c24..7629e89ad693f 100644 +--- a/deps/v8/src/codegen/tnode.h ++++ b/deps/v8/src/codegen/tnode.h +@@ -269,8 +269,9 @@ using BuiltinPtr = Smi; + template + struct is_subtype { + static const bool value = +- std::is_base_of::value || (std::is_same::value && +- std::is_convertible::value); ++ std::disjunction, ++ std::conjunction, ++ std::is_convertible>>::value; + }; + template + struct is_subtype, U> { diff --git a/extra/nodejs/sources b/extra/nodejs/sources index e6d1f4b6..f6be7029 100644 --- a/extra/nodejs/sources +++ b/extra/nodejs/sources @@ -1 +1,2 @@ https://nodejs.org/download/release/v20.0.0/node-v20.0.0.tar.xz +patches/gcc-13.patch