Skip to content

Commit

Permalink
rust: fix musl build
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
Rasmus Thomsen committed Oct 8, 2018
1 parent f8b6f21 commit 203021c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions srcpkgs/rust/files/musl.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
--- rustc-1.28.0-src/src/librustc_target/spec/x86_64_unknown_linux_musl.rs.orig 2018-08-08 23:21:51.673454236 +0200
+++ rustc-1.28.0-src/src/librustc_target/spec/x86_64_unknown_linux_musl.rs 2018-08-08 23:23:11.080834122 +0200
@@ -11,7 +11,7 @@
use spec::{LinkerFlavor, Target, TargetResult};

pub fn target() -> TargetResult {
- let mut base = super::linux_musl_base::opts();
+ let mut base = super::linux_base::opts();
base.cpu = "x86-64".to_string();
base.max_atomic_width = Some(64);
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
Reason: https://gist.github.com/ab75b3796a9383423deecc0828494ac5
--- 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;
2 changes: 1 addition & 1 deletion srcpkgs/rust/template
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ do_configure() {
fi
case "$XBPS_TARGET_MACHINE" in
*-musl)
configure_args+=" --musl-root=/usr"
configure_args+=" --set=target.${_host_triplet}.musl-root=/usr"
;;
esac

Expand Down

0 comments on commit 203021c

Please sign in to comment.