diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:37 +0000 |
commit | 2d0ec380bae2ec8d51b6193fee6577188c6bb2ec (patch) | |
tree | 00f9136b2844d7e9ddc861b845ccc309aaa6091a /debian/patches/u-fix-sysroot-detection-logic.patch | |
parent | Merging upstream version 1.70.0+dfsg1. (diff) | |
download | rustc-9eadbf0e1ea1f3ed21eec4ac6132b7af0e179d52.tar.xz rustc-9eadbf0e1ea1f3ed21eec4ac6132b7af0e179d52.zip |
Adding debian version 1.70.0+dfsg1-7.debian/1.70.0+dfsg1-7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/u-fix-sysroot-detection-logic.patch')
-rw-r--r-- | debian/patches/u-fix-sysroot-detection-logic.patch | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/debian/patches/u-fix-sysroot-detection-logic.patch b/debian/patches/u-fix-sysroot-detection-logic.patch deleted file mode 100644 index 64cc291f7..000000000 --- a/debian/patches/u-fix-sysroot-detection-logic.patch +++ /dev/null @@ -1,46 +0,0 @@ -Description: Fix sysroot detection which would result in /usr/lib/lib/rustlib - This patch is a mixture of two upstream fix attempts. The first from - https://github.com/rust-lang/rust/pull/108376 didn't actually solve the - problem in Debian's case. After reporting that in $Bug, a second attempt is - made at https://github.com/rust-lang/rust/pull/110281, which worked. -Bug: https://github.com/rust-lang/rust/issues/109994 ---- a/compiler/rustc_session/src/filesearch.rs -+++ b/compiler/rustc_session/src/filesearch.rs -@@ -179,7 +179,7 @@ - ))?; - - // if `dir` points target's dir, move up to the sysroot -- if dir.ends_with(crate::config::host_triple()) { -+ let mut sysroot_dir = if dir.ends_with(crate::config::host_triple()) { - dir.parent() // chop off `$target` - .and_then(|p| p.parent()) // chop off `rustlib` - .and_then(|p| { -@@ -194,13 +194,25 @@ - } - }) - .map(|s| s.to_owned()) -- .ok_or(format!( -+ .ok_or_else(|| format!( - "Could not move 3 levels upper using `parent()` on {}", - dir.display() -- )) -+ ))? - } else { -- Ok(dir.to_owned()) -+ dir.to_owned() -+ }; -+ -+ // On multiarch linux systems, there will be multiarch directory named -+ // with the architecture(e.g `x86_64-linux-gnu`) under the `lib` directory. -+ // Which cause us to mistakenly end up in the lib directory instead of the sysroot directory. -+ if sysroot_dir.ends_with("lib") { -+ sysroot_dir = -+ sysroot_dir.parent().map(|real_sysroot| real_sysroot.to_owned()).ok_or_else( -+ || format!("Could not move to parent path of {}", sysroot_dir.display()), -+ )? - } -+ -+ Ok(sysroot_dir) - } - - // Use env::args().next() to get the path of the executable without |