aboutsummaryrefslogtreecommitdiffstats
path: root/community/rust/musl-dont-use-crt-static.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/rust/musl-dont-use-crt-static.patch')
-rw-r--r--community/rust/musl-dont-use-crt-static.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/community/rust/musl-dont-use-crt-static.patch b/community/rust/musl-dont-use-crt-static.patch
new file mode 100644
index 0000000000..4cddfc4c7a
--- /dev/null
+++ b/community/rust/musl-dont-use-crt-static.patch
@@ -0,0 +1,13 @@
+We first have to build against upstream triplets, which by default use crt-static
+linking. This won't build though, so let's just disable it, we disable it in our
+triplets too.
+--- rustc-1.28.0-src/src/librustc_target/spec/linux_musl_base.rs.orig 2018-10-08 21:02:21.588611506 +0200
++++ rustc-1.28.0-src/src/librustc_target/spec/linux_musl_base.rs 2018-10-08 21:02:40.846454873 +0200
+@@ -61,7 +61,7 @@
+ base.post_link_objects_crt.push("crtn.o".to_string());
+
+ // These targets statically link libc by default
+- base.crt_static_default = true;
++ base.crt_static_default = false;
+ // These targets allow the user to choose between static and dynamic linking.
+ base.crt_static_respected = true;