summaryrefslogtreecommitdiffstats
path: root/patches/rustc-1.35.0/0001-bootstrap-don-t-try-to-canonicalize-the-prefix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/rustc-1.35.0/0001-bootstrap-don-t-try-to-canonicalize-the-prefix.patch')
-rw-r--r--patches/rustc-1.35.0/0001-bootstrap-don-t-try-to-canonicalize-the-prefix.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/patches/rustc-1.35.0/0001-bootstrap-don-t-try-to-canonicalize-the-prefix.patch b/patches/rustc-1.35.0/0001-bootstrap-don-t-try-to-canonicalize-the-prefix.patch
new file mode 100644
index 0000000..e804e36
--- /dev/null
+++ b/patches/rustc-1.35.0/0001-bootstrap-don-t-try-to-canonicalize-the-prefix.patch
@@ -0,0 +1,27 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Wed, 5 Jun 2019 22:20:52 +0200
+Subject: [PATCH] bootstrap: don't try to canonicalize the prefix
+
+This fails if the prefix does not exist. This can happen when DESTDIR is
+used.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ src/bootstrap/install.rs | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
+index 2d040d60e5fd..2b098de19ef2 100644
+--- a/src/bootstrap/install.rs
++++ b/src/bootstrap/install.rs
+@@ -67,9 +67,7 @@ fn install_sh(
+ let bindir_default = PathBuf::from("bin");
+ let libdir_default = PathBuf::from("lib");
+ let mandir_default = datadir_default.join("man");
+- let prefix = builder.config.prefix.as_ref().map_or(prefix_default, |p| {
+- fs::canonicalize(p).unwrap_or_else(|_| panic!("could not canonicalize {}", p.display()))
+- });
++ let prefix = builder.config.prefix.as_ref().unwrap_or(&prefix_default);
+ let sysconfdir = builder.config.sysconfdir.as_ref().unwrap_or(&sysconfdir_default);
+ let datadir = builder.config.datadir.as_ref().unwrap_or(&datadir_default);
+ let docdir = builder.config.docdir.as_ref().unwrap_or(&docdir_default);