void-packages/srcpkgs/rust/patches/0002-Allow-rustdoc-to-work-when-cross-compiling-on-musl.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

45 lines
1.6 KiB
Diff

From a78859bb6690e0ad285d1892d7a40796a40ac287 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sat, 2 Dec 2017 17:25:44 -0600
Subject: [PATCH 02/15] Allow rustdoc to work when cross-compiling on musl
musl can't handle foreign-architecture libraries in LD_LIBRARY_PATH.
---
src/bootstrap/bin/rustdoc.rs | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
index cba17c8e6..45cbdd81b 100644
--- a/src/bootstrap/bin/rustdoc.rs
+++ b/src/bootstrap/bin/rustdoc.rs
@@ -20,9 +20,6 @@ fn main() {
Err(_) => 0,
};
- let mut dylib_path = bootstrap::util::dylib_path();
- dylib_path.insert(0, PathBuf::from(libdir.clone()));
-
let mut cmd = Command::new(rustdoc);
cmd.args(&args)
.arg("--sysroot")
@@ -35,7 +32,7 @@ fn main() {
.arg("dox")
.arg("--sysroot")
.arg(&sysroot)
- .env(bootstrap::util::dylib_path_var(), env::join_paths(&dylib_path).unwrap());
+ .env(bootstrap::util::dylib_path_var(), PathBuf::from(libdir.clone()));
// Force all crates compiled by this compiler to (a) be unstable and (b)
// allow the `rustc_private` feature to link to other unstable crates
@@ -83,7 +80,7 @@ fn main() {
eprintln!(
"rustdoc command: {:?}={:?} {:?}",
bootstrap::util::dylib_path_var(),
- env::join_paths(&dylib_path).unwrap(),
+ PathBuf::from(libdir.clone()),
cmd,
);
eprintln!("sysroot: {:?}", sysroot);
--
2.26.2