diff --git a/deno-v8-arm.patch b/deno-v8-arm.patch new file mode 100644 index 0000000..f43e837 --- /dev/null +++ b/deno-v8-arm.patch @@ -0,0 +1,23 @@ +--- a/rusty_v8/build.rs.orig 2024-06-27 14:26:40.281226961 +0200 ++++ b/rusty_v8/build.rs 2024-06-27 14:28:10.388618455 +0200 +@@ -200,16 +200,12 @@ fn build_v8(is_asan: bool) { + // 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"); ++ gn_args.push("use_sysroot=false".to_string()); + } + 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"); ++ gn_args.push("use_sysroot=false".to_string()); + } + + let target_triple = env::var("TARGET").unwrap(); + + diff --git a/deno.changes b/deno.changes index 34ba0f7..44f5d14 100644 --- a/deno.changes +++ b/deno.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Nov 10 12:46:52 UTC 2024 - Soc Virnyl Estela + +- Fix aarch64 builds with ./deno-v8-arm.patch + ------------------------------------------------------------------- Sun Nov 10 12:18:13 UTC 2024 - Soc Virnyl Estela diff --git a/deno.spec b/deno.spec index cb34708..80de4ca 100644 --- a/deno.spec +++ b/deno.spec @@ -31,6 +31,7 @@ Source0: %{name}-%{version}.tar.zst Source1: registry.tar.zst Source2: rusty_v8-%{_v8_version}.tar.zst Patch1: compiler-rt-adjust-paths.patch +Patch2: deno-v8-arm.patch BuildRequires: cargo-packaging BuildRequires: clang # needed by `libz-ng-sys` after 1.36.1 @@ -101,7 +102,7 @@ updated with the --reload flag. %autosetup -a2 -p1 -n %{name} # Extract vendor source -tar xvf %{SOURCE1} +tar xf %{SOURCE1} # Now we patch V8 or %%{SOURCE2} echo -e "\n[patch.crates-io]\nv8 = { path = './rusty_v8' }" >> Cargo.toml pushd rusty_v8