void-packages/srcpkgs/rust/files/patches/sys-llvm/use-correct-llvm-when-cross.patch
Rasmus Thomsen 4aa64287db rust: update to 1.32.0.
* Add support for all ppc64 targets.
* Add an 'internal-llvm' option, in case we
  ever need to build against the vendored LLVM
  instead of system LLVM

Co-authored-by: q66 <daniel@octaforge.org>

[ci skip]
2019-01-30 16:15:18 +01:00

16 lines
811 B
Diff

Reason: rustc_codegen_llvm attempts to link against the host's llvm without this patch
--- rustc-1.28.0-src/src/librustc_llvm/build.rs.orig 2018-10-01 04:00:15.481334857 +0200
+++ rustc-1.28.0-src/src/librustc_llvm/build.rs 2018-10-01 04:01:15.145790417 +0200
@@ -227,8 +227,8 @@
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..]);