aports/main/rust/need-ssp_nonshared.patch
fossdd 4cc843c46d main/rust: upgrade to 1.85.0
https://blog.rust-lang.org/2025/02/20/Rust-1.85.0.html

* base.crt_static_default from linux_musl.rs in
  musl-fix-linux_musl_base.patch, was moved to the indivdual targets
  (which we already do in alpine-target.patch)
  9c37c14aa2
* Target JSON (de)serialization was moved from compiler/rustc_target/src/spec/mod.rs
  to compiler/rustc_target/src/spec/json.rs (need-rpath.patch)
  77080d8eb3
2025-03-08 23:47:57 +00:00

30 lines
1.0 KiB
Diff

this is needed for libssp-less __stack_chk_fail_local (on x86),
the other Bdynamic patch seems to break the top hunk,
so we need the bottom hack
--
diff --git a/library/std/src/sys/unix/mod.rs b/library/std/src/sys/unix/mod.rs
index 68c9520..63f8a48 100644
--- a/library/std/src/sys/pal/unix/mod.rs
+++ b/library/std/src/sys/pal/unix/mod.rs
@@ -381,6 +381,9 @@ cfg_if::cfg_if! {
#[link(name = "dl", cfg(not(target_feature = "crt-static")))]
#[link(name = "log", cfg(not(target_feature = "crt-static")))]
extern "C" {}
+ } else if #[cfg(all(target_os = "linux", target_env = "musl"))] {
+ #[link(name = "ssp_nonshared", kind = "static")]
+ extern "C" {}
} else if #[cfg(target_os = "freebsd")] {
#[link(name = "execinfo")]
#[link(name = "pthread")]
--- a/compiler/rustc_llvm/build.rs
+++ b/compiler/rustc_llvm/build.rs
@@ -111,6 +111,8 @@
return;
}
+ println!("cargo:rustc-link-lib=ssp_nonshared");
+
restore_library_path();
let llvm_config =