aports/main/rust/need-ssp_nonshared.patch

29 lines
1 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
@@ -374,6 +374,9 @@
#[link(name = "dl", cfg(not(target_feature = "crt-static")))]
#[link(name = "log", cfg(not(target_feature = "crt-static")))]
unsafe extern "C" {}
+ } else if #[cfg(all(target_os = "linux", target_env = "musl"))] {
+ #[link(name = "ssp_nonshared", kind = "static")]
+ unsafe 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 =