Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rust: fix musl build #3548

Merged
merged 1 commit into from
Oct 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions srcpkgs/rust/files/musl.patch

This file was deleted.

11 changes: 11 additions & 0 deletions srcpkgs/rust/patches/musl-dont-use-crt-static.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
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;
6 changes: 1 addition & 5 deletions srcpkgs/rust/template
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@ esac
post_extract() {
rm -rf src/llvm

case "$XBPS_MACHINE" in
*-musl) patch -p1 < $FILESDIR/musl.patch ;;
esac

if [ -z "$CROSS_BUILD" ]; then
mkdir -p stage0
cp -bflr ../rustc-*/rustc/* stage0
Expand Down Expand Up @@ -155,7 +151,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