void-packages/srcpkgs/rust/patches/0016-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch

29 lines
1 KiB
Diff
Raw Normal View History

2019-12-21 15:27:02 +00:00
From d9bb87c68c7db5377be751ae736bcd5864e3ad6e Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sat, 21 Dec 2019 17:06:17 +0100
Subject: [PATCH 16/18] 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.24.0