void-packages/srcpkgs/rust/patches/0014-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
Érico Nogueira af802e87d4 rust: update to 1.53.0.
- rebase patches
- fix type of 'llvm-unwind' in config.toml
- move linux_musl_base stuff to a single patch which makes it behave
  just line linux_gnu_base
- copy new version of need-ssp_nonshared.patch from alpine
- temporary workaround for the new rust-llvm-dwp binary: it's copied
  from the llvm toolchain and shoved into /usr/lib, but they copied the
  binary from the build machine
- fix do_check (thanks cinerea0)
- preliminary ppcle patches (q66)
2021-07-04 22:27:37 +02:00

31 lines
1.4 KiB
Diff

From 07efbc3bdd67de4e13b0f3f4df853a9de0800ec3 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 3 May 2020 18:05:22 +0200
Subject: [PATCH 14/15] Void: fix linkage against host/target LLVM in cross
setups
---
src/librustc_llvm/build.rs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs
index 621363bed..01322e1d2 100644
--- a/compiler/rustc_llvm/build.rs
+++ b/compiler/rustc_llvm/build.rs
@@ -242,9 +242,11 @@ fn main() {
for lib in output(&mut cmd).split_whitespace() {
if is_crossed {
if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
- println!("cargo:rustc-link-search=native={}", stripped.replace(&host, &target));
+ println!("cargo:rustc-link-search=native={}{}",
+ env::var("XBPS_CROSS_BASE").unwrap(), stripped);
} else if let Some(stripped) = lib.strip_prefix("-L") {
- println!("cargo:rustc-link-search=native={}", stripped.replace(&host, &target));
+ println!("cargo:rustc-link-search=native={}{}",
+ env::var("XBPS_CROSS_BASE").unwrap(), stripped);
}
} else if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
println!("cargo:rustc-link-search=native={}", stripped);
--
2.26.2