summaryrefslogtreecommitdiff
path: root/user/rust/0003-Fix-rustdoc-when-cross-compiling-on-musl.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/rust/0003-Fix-rustdoc-when-cross-compiling-on-musl.patch')
-rw-r--r--user/rust/0003-Fix-rustdoc-when-cross-compiling-on-musl.patch57
1 files changed, 36 insertions, 21 deletions
diff --git a/user/rust/0003-Fix-rustdoc-when-cross-compiling-on-musl.patch b/user/rust/0003-Fix-rustdoc-when-cross-compiling-on-musl.patch
index 69dbf3530..cfcc2ad83 100644
--- a/user/rust/0003-Fix-rustdoc-when-cross-compiling-on-musl.patch
+++ b/user/rust/0003-Fix-rustdoc-when-cross-compiling-on-musl.patch
@@ -1,34 +1,52 @@
-From 41ab14f51521d94673ddae78e91611a3e7197078 Mon Sep 17 00:00:00 2001
+From cb97ef40ec507c7ff20f7c0857b1892a1946a0f3 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/14] Fix rustdoc when cross-compiling on musl
+Subject: [PATCH 03/12] Fix rustdoc 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(-)
+ src/bootstrap/src/bin/rustdoc.rs | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
-diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
-index ad3800834b0..e19b589233e 100644
---- a/src/bootstrap/bin/rustdoc.rs
-+++ b/src/bootstrap/bin/rustdoc.rs
-@@ -22,14 +22,11 @@ fn main() {
- Err(_) => 0,
- };
+diff --git a/src/bootstrap/src/bin/rustdoc.rs b/src/bootstrap/src/bin/rustdoc.rs
+index dbbce6fe22047..3d3cb241eaab6 100644
+--- a/src/bootstrap/src/bin/rustdoc.rs
++++ b/src/bootstrap/src/bin/rustdoc.rs
+@@ -6,12 +6,13 @@ use std::ffi::OsString;
+ use std::path::PathBuf;
+ use std::process::Command;
+
+-use dylib_util::{dylib_path, dylib_path_var};
++use dylib_util::dylib_path_var;
+
+ #[path = "../utils/bin_helpers.rs"]
+ mod bin_helpers;
+
+ #[path = "../utils/dylib.rs"]
++#[allow(dead_code)]
+ mod dylib_util;
+
+ fn main() {
+@@ -28,9 +29,6 @@ fn main() {
+ // is passed (a bit janky...)
+ let target = args.windows(2).find(|w| &*w[0] == "--target").and_then(|w| w[1].to_str());
- let mut dylib_path = dylib_path();
- dylib_path.insert(0, PathBuf::from(libdir.clone()));
-
let mut cmd = Command::new(rustdoc);
- cmd.args(&args)
- .arg("--sysroot")
- .arg(&sysroot)
-- .env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
-+ .env(dylib_path_var(), PathBuf::from(libdir.clone()));
+
+ if target.is_some() {
+@@ -43,7 +41,7 @@ fn main() {
+ }
+
+ cmd.args(&args);
+- cmd.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
++ cmd.env(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
-@@ -62,7 +59,7 @@ fn main() {
+@@ -68,7 +66,7 @@ fn main() {
eprintln!(
"rustdoc command: {:?}={:?} {:?}",
dylib_path_var(),
@@ -36,7 +54,4 @@ index ad3800834b0..e19b589233e 100644
+ PathBuf::from(libdir.clone()),
cmd,
);
- eprintln!("sysroot: {:?}", sysroot);
---
-2.35.1
-
+ eprintln!("sysroot: {sysroot:?}");