mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
30 lines
1.1 KiB
Diff
30 lines
1.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
|
|
@@ -376,6 +376,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
|
|
@@ -110,6 +110,8 @@
|
|
return;
|
|
}
|
|
|
|
+ println!("cargo:rustc-link-lib=ssp_nonshared");
|
|
+
|
|
restore_library_path();
|
|
|
|
let target = env::var("TARGET").expect("TARGET was not set");
|