summaryrefslogtreecommitdiff
path: root/user/rust/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/rust/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch')
-rw-r--r--user/rust/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/user/rust/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch b/user/rust/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch
new file mode 100644
index 000000000..95a3bb53d
--- /dev/null
+++ b/user/rust/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch
@@ -0,0 +1,36 @@
+From d927c3bdf6e312f5c92ec33d5dfe4b77b3dfa8e0 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sat, 2 Dec 2017 17:25:44 -0600
+Subject: [PATCH 03/24] 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 | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
+index bb5a21e3e4..1b6b78b90a 100644
+--- a/src/bootstrap/bin/rustdoc.rs
++++ b/src/bootstrap/bin/rustdoc.rs
+@@ -34,9 +34,6 @@ fn main() {
+ Err(_) => 0,
+ };
+
+- let mut dylib_path = bootstrap::util::dylib_path();
+- dylib_path.insert(0, PathBuf::from(libdir.clone()));
+-
+ //FIXME(misdreavus): once stdsimd uses cfg(rustdoc) instead of cfg(dox), remove the `--cfg dox`
+ //arguments here
+ let mut cmd = Command::new(rustdoc);
+@@ -48,7 +45,7 @@ fn main() {
+ .arg("--sysroot")
+ .arg(sysroot)
+ .env(bootstrap::util::dylib_path_var(),
+- env::join_paths(&dylib_path).unwrap());
++ 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
+--
+2.18.0
+