From e50c8b2647ce482654ab0e4f77a88893b497ed37 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Tue, 30 Jul 2024 09:27:55 -0500 Subject: bootstrap/rust-1.{61-79}: New package --- ...nk-libssp_nonshared.a-on-all-musl-targets.patch | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 bootstrap/rust-1.71/0006-Link-libssp_nonshared.a-on-all-musl-targets.patch (limited to 'bootstrap/rust-1.71/0006-Link-libssp_nonshared.a-on-all-musl-targets.patch') diff --git a/bootstrap/rust-1.71/0006-Link-libssp_nonshared.a-on-all-musl-targets.patch b/bootstrap/rust-1.71/0006-Link-libssp_nonshared.a-on-all-musl-targets.patch new file mode 100644 index 000000000..d379a1048 --- /dev/null +++ b/bootstrap/rust-1.71/0006-Link-libssp_nonshared.a-on-all-musl-targets.patch @@ -0,0 +1,28 @@ +From 5e7144b4963e6c733033738dbf5552c9ae0f19e3 Mon Sep 17 00:00:00 2001 +From: Samuel Holland +Date: Sun, 3 Nov 2019 17:01:32 -0600 +Subject: [PATCH 06/13] Link libssp_nonshared.a on all musl targets + +--- + compiler/rustc_target/src/spec/linux_musl_base.rs | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs +index 67d18c886eba5..f9be51095d6fc 100644 +--- a/compiler/rustc_target/src/spec/linux_musl_base.rs ++++ b/compiler/rustc_target/src/spec/linux_musl_base.rs +@@ -1,10 +1,13 @@ +-use crate::spec::TargetOptions; ++use crate::spec::{Cc, LinkerFlavor, Lld, TargetOptions}; + + pub fn opts() -> TargetOptions { + let mut base = super::linux_base::opts(); + + base.env = "musl".into(); + ++ // libssp_nonshared.a is needed for __stack_chk_fail_local when using libc.so ++ base.add_post_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-lssp_nonshared"]); ++ + // These targets statically link libc by default + base.crt_static_default = true; + -- cgit v1.2.3-70-g09d2