summaryrefslogtreecommitdiff
path: root/bootstrap/rust-1.68/0006-Link-libssp_nonshared.a-on-all-musl-targets.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2024-07-30 09:27:55 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2024-08-09 15:21:38 -0500
commite50c8b2647ce482654ab0e4f77a88893b497ed37 (patch)
treeeb0c442d10d190933dac120b525e6779e44ea2bd /bootstrap/rust-1.68/0006-Link-libssp_nonshared.a-on-all-musl-targets.patch
parentecce2855f3220b8b9b39c58ef05c97643fd62f1b (diff)
downloadpackages-e50c8b2647ce482654ab0e4f77a88893b497ed37.tar.gz
packages-e50c8b2647ce482654ab0e4f77a88893b497ed37.tar.bz2
packages-e50c8b2647ce482654ab0e4f77a88893b497ed37.tar.xz
packages-e50c8b2647ce482654ab0e4f77a88893b497ed37.zip
bootstrap/rust-1.{61-79}: New package
Diffstat (limited to 'bootstrap/rust-1.68/0006-Link-libssp_nonshared.a-on-all-musl-targets.patch')
-rw-r--r--bootstrap/rust-1.68/0006-Link-libssp_nonshared.a-on-all-musl-targets.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/bootstrap/rust-1.68/0006-Link-libssp_nonshared.a-on-all-musl-targets.patch b/bootstrap/rust-1.68/0006-Link-libssp_nonshared.a-on-all-musl-targets.patch
new file mode 100644
index 000000000..d379a1048
--- /dev/null
+++ b/bootstrap/rust-1.68/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 <samuel@sholland.org>
+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;
+