repo/testing/rust/patches/0092-use-correct-llvm-cross.patch
Muhammad Herdiansyah 46134fa86e rust: update to 1.36.0
build (finally) works!
2019-07-30 02:02:13 +00:00

15 lines
742 B
Diff

Reason: rustc_codegen_llvm attempts to link against the host's llvm without this patch
--- rustc-1.36.0-src/src/librustc_llvm/build.rs
+++ rustc-1.36.0-src/src/librustc_llvm/build.rs
@@ -224,8 +224,8 @@ fn main() {
println!("cargo:rustc-link-search=native={}", &lib[9..]);
} else if is_crossed {
if lib.starts_with("-L") {
- println!("cargo:rustc-link-search=native={}",
- lib[2..].replace(&host, &target));
+ println!("cargo:rustc-link-search=native={}{}",
+ env::var("XBPS_CROSS_BASE").unwrap(), &lib[2..]);
}
} else if lib.starts_with("-l") {
println!("cargo:rustc-link-lib={}", &lib[2..]);