Partial bug fix + conflict for compiling node-js@21: with gcc@11.2 (#48494)

* Bug fix for compiling node-js@21: with gcc@11.2 (var/spack/repos/builtin/packages/node-js/package.py var/spack/repos/builtin/packages/node-js/wasm-compiler-gcc11p2.patch)

Since this bug fix is not sufficient, add a conflict for node-js@21: with gcc@11.2

* In var/spack/repos/builtin/packages/node-js/package.py, restrict patch wasm-compiler-gcc11p2.patch to versions 21:22 for gcc@11.2
This commit is contained in:
Dom Heinzeller 2025-02-23 18:13:56 -07:00 committed by GitHub
parent 92c16d085f
commit a92419ffe4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 47 additions and 0 deletions

View File

@ -138,6 +138,13 @@ class NodeJs(Package):
# and https://github.com/nodejs/node/issues/53633
patch("fix-broken-gcc12-pr53728.patch", when="@22.2:22.5")
# https://github.com/nodejs/node/issues/55596
# This patch is not sufficient, however, therefore
# add a conflict with this particular version of gcc
# until https://github.com/spack/spack/issues/48492 is resolved
patch("wasm-compiler-gcc11p2.patch", when="@21:22 %gcc@11.2")
conflicts("%gcc@11.2", when="@21:")
executables = ["^node$"]
@classmethod

View File

@ -0,0 +1,40 @@
diff --git a/deps/v8/src/compiler/wasm-compiler.cc b/deps/v8/src/compiler/wasm-compiler.cc
--- a/deps/v8/src/compiler/wasm-compiler.cc 2024-10-28 21:25:11.000000000 -0400
+++ b/deps/v8/src/compiler/wasm-compiler.cc 2024-11-01 02:02:22.554537121 -0400
@@ -8613,11 +8613,13 @@
'-');
auto compile_with_turboshaft = [&]() {
+ wasm::WrapperCompilationInfo ci;
+ ci.code_kind = CodeKind::WASM_TO_JS_FUNCTION;
+ ci.import_info.import_kind = kind;
+ ci.import_info.expected_arity = expected_arity;
+ ci.import_info.suspend = suspend;
return Pipeline::GenerateCodeForWasmNativeStubFromTurboshaft(
- env->module, sig,
- wasm::WrapperCompilationInfo{
- .code_kind = CodeKind::WASM_TO_JS_FUNCTION,
- .import_info = {kind, expected_arity, suspend}},
+ env->module, sig, ci,
func_name, WasmStubAssemblerOptions(), nullptr);
};
auto compile_with_turbofan = [&]() {
@@ -8774,12 +8776,14 @@
base::VectorOf(name_buffer.get(), kMaxNameLen) + kNamePrefixLen, sig);
auto compile_with_turboshaft = [&]() {
+ wasm::WrapperCompilationInfo ci;
+ ci.code_kind = CodeKind::WASM_TO_JS_FUNCTION;
+ ci.import_info.import_kind = kind;
+ ci.import_info.expected_arity = expected_arity;
+ ci.import_info.suspend = suspend;
std::unique_ptr<turboshaft::TurboshaftCompilationJob> job =
Pipeline::NewWasmTurboshaftWrapperCompilationJob(
- isolate, sig,
- wasm::WrapperCompilationInfo{
- .code_kind = CodeKind::WASM_TO_JS_FUNCTION,
- .import_info = {kind, expected_arity, suspend}},
+ isolate, sig, ci,
nullptr, std::move(name_buffer), WasmAssemblerOptions());
// Compile the wrapper