rust: fix musl by readding mistakenly removed hunks.

This commit is contained in:
Leah Neukirchen 2017-01-04 11:57:27 +01:00
parent 974d5abb8f
commit 063b51fc7e
2 changed files with 36 additions and 1 deletions

View file

@ -41,3 +41,39 @@
if target.contains("msvc") {
// There are three builds of cmake on windows: MSVC, MinGW, and
// Cygwin. The Cygwin build does not have generators for Visual
--- a/src/liblibc/src/unix/mod.rs
+++ b/src/liblibc/src/unix/mod.rs
@@ -197,9 +197,6 @@
} else if #[cfg(all(not(stdbuild), feature = "use_std"))] {
// cargo build, don't pull in anything extra as the libstd dep
// already pulls in all libs.
- } else if #[cfg(any(all(target_env = "musl", not(target_arch = "mips"))))] {
- #[link(name = "c", kind = "static")]
- extern {}
} else if #[cfg(target_os = "emscripten")] {
#[link(name = "c")]
extern {}
--- a/src/librustc_back/target/x86_64_unknown_linux_musl.rs
+++ b/src/librustc_back/target/x86_64_unknown_linux_musl.rs
@@ -11,7 +11,7 @@
use target::{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 = 64;
base.pre_link_args.push("-m64".to_string());
--- a/src/libunwind/build.rs
+++ b/src/libunwind/build.rs
@@ -16,9 +16,7 @@
let target = env::var("TARGET").unwrap();
if target.contains("linux") {
- if target.contains("musl") && !target.contains("mips") {
- println!("cargo:rustc-link-lib=static=unwind");
- } else if !target.contains("android") {
+ if !target.contains("android") {
println!("cargo:rustc-link-lib=gcc_s");
}
} else if target.contains("freebsd") {

View file

@ -21,7 +21,6 @@ checksum=c790edd2e915bd01bea46122af2942108479a2fda9a6f76d1094add520ac3b6b
case "$XBPS_MACHINE" in
x86_64-musl)
broken="https://build.voidlinux.eu/builders/x86_64-musl_builder/builds/43/steps/shell_3/logs/stdio"
distfiles+="
https://repo.voidlinux.eu/distfiles/rustc-1.13.0-x86_64-unknown-linux-musl.tar.gz
https://repo.voidlinux.eu/distfiles/rust-std-1.13.0-x86_64-unknown-linux-musl.tar.gz