Package: rustc / 1.46.0+dfsg1-1

u-rustc-llvm-cross-flags.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
Index: rust/src/librustc_llvm/build.rs
===================================================================
--- rust.orig/src/librustc_llvm/build.rs
+++ rust/src/librustc_llvm/build.rs
@@ -223,7 +223,7 @@ fn main() {
         if is_crossed {
             if lib.starts_with("-LIBPATH:") {
                 println!("cargo:rustc-link-search=native={}", lib[9..].replace(&host, &target));
-            } else if lib.starts_with("-L") {
+            } else if lib.starts_with("-L") && lib[2..].contains(&host) {
                 println!("cargo:rustc-link-search=native={}", lib[2..].replace(&host, &target));
             }
         } else if lib.starts_with("-LIBPATH:") {