Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow-up bug fix in freetype when using external libz; add conflict for node-js@21: with [email protected] #499

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions var/spack/repos/builtin/packages/freetype/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def configure_args(self):
args.extend(self.with_or_without("pic"))
return args

# https://github.com/spack/spack/issues/48293
def setup_build_environment(self, env):
if self.spec.satisfies("+pic"):
env.set("CFLAGS", "-fPIC")
Expand All @@ -114,6 +115,14 @@ def setup_build_environment(self, env):
os.path.dirname(find_first(self.spec["zlib-api"].prefix, "zlib.pc", bfs_depth=10)),
)

# https://github.com/spack/spack/issues/48293
def setup_dependent_build_environment(self, env, dependent_spec):
if self.spec["zlib-api"].external:
env.append_path(
"PKG_CONFIG_PATH",
os.path.dirname(find_first(self.spec["zlib-api"].prefix, "zlib.pc", bfs_depth=10)),
)


class CMakeBuilder(CMakeBuilder):
def cmake_args(self):
Expand Down
7 changes: 7 additions & 0 deletions var/spack/repos/builtin/packages/node-js/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ class NodeJs(Package):
# See https://github.com/nodejs/node/issues/52223
patch("fix-old-glibc-random-headers.patch", when="^glibc@:2.24")

# 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: %[email protected]")
conflicts("%[email protected]", when="@21:")

def setup_build_environment(self, env):
# Force use of experimental Python 3 support
env.set("PYTHON", self.spec["python"].command.path)
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Loading