summaryrefslogtreecommitdiffstats
path: root/patches/rustc-1.35.0/0001-bootstrap-don-t-try-to-canonicalize-the-prefix.patch
blob: e804e365062db6d88b60eecdbf4dbb3ac4fcc701 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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);