void-packages/srcpkgs/rust/patches/0015-Void-fix-linkage-again...

29 lines
1.0 KiB
Diff

From e83770856411e2ff780551143fc6c26a8552741e Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sat, 21 Dec 2019 17:06:17 +0100
Subject: [PATCH 15/16] Void: fix linkage against host/target LLVM in cross
setups
---
src/librustc_llvm/build.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/librustc_llvm/build.rs b/src/librustc_llvm/build.rs
index c5d5f066..91799142 100644
--- a/src/librustc_llvm/build.rs
+++ b/src/librustc_llvm/build.rs
@@ -225,8 +225,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..]);
--
2.25.0