void-packages/srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch
q66 ce3b8aef99 rust: update to 1.57.0
- separate bootstrap into packages (cleans up template mess)
- sync patches from chimera linux (only relevant ones)
- drop bootstrap for BE ppc musl targets i don't do anymore
- some minor patch updates from ericonr

Closes https://github.com/void-linux/void-packages/pull/32555
2022-01-04 16:51:10 +01:00

21 lines
1 KiB
Diff

diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs
index 36a6d2cc3..af4e1219f 100644
--- a/compiler/rustc_llvm/build.rs
+++ b/compiler/rustc_llvm/build.rs
@@ -230,9 +230,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.34.1