mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-13 03:09:51 +03:00
126 lines
4.9 KiB
Diff
126 lines
4.9 KiB
Diff
From: Jakub Jirutka <jakub@jirutka.cz>
|
|
Date: Fri, 21 Jul 2023 13:22:58 +0200
|
|
Date: Wed, 30 Apr 2025 23:12:25 +0200
|
|
Subject: [PATCH] Never download anything, enable verbose logging, link with system libraries
|
|
|
|
Linking libatomic to fix this error:
|
|
|
|
= note: ld.lld: error: undefined symbol: __atomic_compare_exchange
|
|
>>> referenced by isolate.cc
|
|
>>> isolate.o:(v8::internal::JSDispatchTable::TryAllocateAndInitializeEntry(v8::internal::ExternalEntityTable<v8::internal::JSDispatchEntry, 268435456ul>::SpaceWithBlackAllocationSupport*, unsigned short, v8::internal::Tagged<v8::internal::Code>)) in archive /builds/alpine/aports/community/deno/src/deno/target/release/deps/libv8-97fcce57012ba75f.rlib
|
|
>>> referenced by wasm-objects.cc
|
|
>>> wasm-objects.o:(v8::internal::WasmDispatchTableData::~WasmDispatchTableData()) in archive /builds/alpine/aports/community/deno/src/deno/target/release/deps/libv8-97fcce57012ba75f.rlib
|
|
>>> referenced by wasm-objects.cc
|
|
>>> wasm-objects.o:(v8::internal::WasmDispatchTableData::Remove(int, v8::internal::WasmCodePointer)) in archive /builds/alpine/aports/community/deno/src/deno/target/release/deps/libv8-97fcce57012ba75f.rlib
|
|
>>> referenced 6 more times
|
|
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
|
|
|
|
Linking with system simdutf requires also v8-unbundle-simdutf.patch.
|
|
|
|
--- a/vendor/v8/build.rs
|
|
+++ b/vendor/v8/build.rs
|
|
@@ -223,6 +223,9 @@
|
|
println!("clang_base_path (system): {}", clang_base_path.display());
|
|
gn_args.push(format!("clang_base_path={clang_base_path:?}"));
|
|
gn_args.push("treat_warnings_as_errors=false".to_string());
|
|
+ // XXX-Patched
|
|
+ } else if true {
|
|
+ panic!("no compatible clang found");
|
|
} else {
|
|
println!("using Chromium's clang");
|
|
let clang_base_path = clang_download();
|
|
@@ -253,16 +256,18 @@
|
|
// cross-compilation setup
|
|
if target_arch == "aarch64" {
|
|
gn_args.push(r#"target_cpu="arm64""#.to_string());
|
|
- gn_args.push("use_sysroot=true".to_string());
|
|
- maybe_install_sysroot("arm64");
|
|
- maybe_install_sysroot("amd64");
|
|
+ // XXX-Patched
|
|
+ //gn_args.push("use_sysroot=true".to_string());
|
|
+ //maybe_install_sysroot("arm64");
|
|
+ //maybe_install_sysroot("amd64");
|
|
}
|
|
if target_arch == "arm" {
|
|
gn_args.push(r#"target_cpu="arm""#.to_string());
|
|
gn_args.push(r#"v8_target_cpu="arm""#.to_string());
|
|
- gn_args.push("use_sysroot=true".to_string());
|
|
- maybe_install_sysroot("i386");
|
|
- maybe_install_sysroot("arm");
|
|
+ // XXX-Patched
|
|
+ //gn_args.push("use_sysroot=true".to_string());
|
|
+ //maybe_install_sysroot("i386");
|
|
+ //maybe_install_sysroot("arm");
|
|
}
|
|
|
|
let target_triple = env::var("TARGET").unwrap();
|
|
@@ -345,6 +350,7 @@
|
|
}
|
|
|
|
fn maybe_clone_repo(dest: &str, repo: &str) {
|
|
+ panic!("Won't clone repo {}", repo); // XXX-Patched
|
|
if !Path::new(&dest).exists() {
|
|
assert!(
|
|
Command::new("git")
|
|
@@ -374,6 +380,7 @@
|
|
}
|
|
|
|
fn download_ninja_gn_binaries() {
|
|
+ panic!("gn and ninja must be installed"); // XXX-Patched
|
|
let target_dir = build_dir().join("ninja_gn_binaries");
|
|
|
|
let gn = target_dir.join("gn").join("gn");
|
|
@@ -494,6 +501,7 @@
|
|
}
|
|
|
|
fn download_file(url: &str, filename: &Path) {
|
|
+ panic!("Won't download file: {}", url); // XXX-Patched
|
|
if !url.starts_with("http:") && !url.starts_with("https:") {
|
|
copy_archive(url, filename);
|
|
return;
|
|
@@ -566,6 +574,8 @@
|
|
}
|
|
|
|
fn download_static_lib_binaries() {
|
|
+ panic!("Won't download library"); // XXX-Patched
|
|
+
|
|
let url = static_lib_url();
|
|
println!("static lib URL: {url}");
|
|
|
|
@@ -699,6 +709,20 @@
|
|
println!("cargo:rustc-link-lib=dylib=msvcprt");
|
|
}
|
|
}
|
|
+
|
|
+ // XXX-Patched: v8 requires symbols provided by libatomic.so.
|
|
+ println!("cargo:rustc-link-lib=dylib=atomic");
|
|
+
|
|
+ // XXX-Patched: Link with system-provided zlib.
|
|
+ println!("cargo:rustc-link-lib=dylib=z");
|
|
+
|
|
+ // XXX-Patched: Link with system-provided ICU libraries.
|
|
+ println!("cargo:rustc-link-lib=dylib=icui18n");
|
|
+ println!("cargo:rustc-link-lib=dylib=icuuc");
|
|
+ println!("cargo:rustc-link-lib=dylib=icudata");
|
|
+
|
|
+ // XXX-Patched: Link with system-provided simdutf library.
|
|
+ println!("cargo:rustc-link-lib=dylib=simdutf");
|
|
}
|
|
|
|
fn print_prebuilt_src_binding_path() {
|
|
@@ -917,6 +941,7 @@
|
|
fn ninja(gn_out_dir: &Path, maybe_env: Option<NinjaEnv>) -> Command {
|
|
let cmd_string = env::var("NINJA").unwrap_or_else(|_| "ninja".to_owned());
|
|
let mut cmd = Command::new(&cmd_string);
|
|
+ cmd.arg("-v"); // XXX-Patched
|
|
cmd.arg("-C");
|
|
cmd.arg(gn_out_dir);
|
|
if !cmd_string.ends_with("autoninja") {
|
|
@@ -957,6 +982,7 @@
|
|
.arg(format!("--script-executable={}", python()))
|
|
.arg("gen")
|
|
.arg(&gn_out_dir)
|
|
+ .arg("-vv") // XXX-Patched
|
|
.arg("--ide=json")
|
|
.arg("--args=".to_owned() + &args)
|
|
.stdout(Stdio::inherit())
|