From 8c3241e7a660e19bb9e59f864bf3a8a87489fc3d Mon Sep 17 00:00:00 2001 From: Robin Randhawa Date: Fri, 22 Mar 2019 19:41:02 +0000 Subject: [PATCH 1/2] prefix: Fix build breakage due to invalid prefix argument Building a rust compiler for x86_64-unknown-redox using: $ PREFIX_RUSTC=1 PREFIX_BINARY=0 make prefix fails with a message citing 'could not canonicalize prefix path'. As seen in rust/bootstrap/install.rs: https://gitlab.redox-os.org/redox-os/rust/blob/redox/src/bootstrap/install.rs#L77 .. the expectation is that either the '--prefix' argument passed to rust's configure script is a valid path or not specified at all (in which case a correct default is used). This patch uses the former approach resulting in a correct build. --- mk/prefix.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/prefix.mk b/mk/prefix.mk index 35d120251..184cee5f1 100644 --- a/mk/prefix.mk +++ b/mk/prefix.mk @@ -123,7 +123,7 @@ $(PREFIX)/rust-freestanding-install: $(ROOT)/rust | $(PREFIX)/gcc-freestanding-i cp -r "$(PREFIX)/gcc-freestanding-install" "$@.partial" cd "$(PREFIX)/rust-freestanding-build" && \ export PATH="$(ROOT)/$@.partial/bin:$$PATH" && \ - "$ Date: Sat, 23 Mar 2019 22:17:00 +0000 Subject: [PATCH 2/2] prefix: Fix RUSTUP_TOOLCHAIN spec Needs full path to PREFIX_FREESTANDING_INSTALL. --- mk/prefix.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/prefix.mk b/mk/prefix.mk index 184cee5f1..1d54982e1 100644 --- a/mk/prefix.mk +++ b/mk/prefix.mk @@ -5,7 +5,7 @@ PREFIX_INSTALL=$(PREFIX)/relibc-install ifeq ($(PREFIX_RUSTC),1) PREFIX_FREESTANDING_INSTALL=$(PREFIX)/rust-freestanding-install - export RUSTUP_TOOLCHAIN=$(PREFIX)/rust-freestanding-install + export RUSTUP_TOOLCHAIN=$(ROOT)/$(PREFIX)/rust-freestanding-install endif PREFIX_FREESTANDING_PATH=$(ROOT)/$(PREFIX_FREESTANDING_INSTALL)/bin