[rustbuild] fix cross compilation of std for mips(el)-linux-musl

These targets don't link statically to libunwind or libc
This commit is contained in:
Jorge Aparicio 2016-03-03 14:50:28 -05:00
parent f6e125f04a
commit ddd2e99d02
2 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ pub fn check(build: &mut Build) {
}
// Make sure musl-root is valid if specified
if target.contains("musl") {
if target.contains("musl") && target.contains("x86_64") {
match build.config.musl_root {
Some(ref root) => {
if fs::metadata(root.join("lib/libc.a")).is_err() {

View File

@ -28,7 +28,7 @@ fn main() {
}
if target.contains("unknown-linux") {
if target.contains("musl") {
if target.contains("musl") && target.contains("x86_64") {
println!("cargo:rustc-link-lib=static=unwind");
} else {
println!("cargo:rustc-link-lib=dl");