From 381c48dfad8c6a58cdfa4b5d7e554e5e24ba52eb Mon Sep 17 00:00:00 2001 From: Lewis Revill Date: Mon, 15 Jan 2024 14:44:20 +0000 Subject: [PATCH] Fix cc sysroot path and target for morello linux in bootstrap --- src/bootstrap/builder.rs | 2 +- src/bootstrap/lib.rs | 3 ++- src/bootstrap/native.rs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 895c14ce942..0f77021984a 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -1752,7 +1752,7 @@ impl<'a> Builder<'a> { rustflags.arg("-Clink-args=-march=morello+c64"); rustflags.arg("-Clink-args=-mabi=purecap"); let sysroot = match home_dir() { - Some(path) => path.as_path().join("cheri").join("output").join("musl-bin"), + Some(path) => path.as_path().join("morello").join("musl"), None => Path::new("").to_path_buf(), }; let sysroot = sysroot.into_os_string().into_string().unwrap(); diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 0506111b6ae..89a034492d7 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -1088,8 +1088,9 @@ impl Build { base.push(format!("--sysroot={}", sysroot)); } if &*target.triple == "morello-unknown-linux-purecap" { + base.push("--target=aarch64-unknown-linux-musl_purecap".into()); let sysroot = match home_dir() { - Some(path) => path.as_path().join("cheri").join("output").join("musl-bin"), + Some(path) => path.as_path().join("morello").join("musl"), None => Path::new("").to_path_buf(), }; let sysroot = sysroot.into_os_string().into_string().unwrap(); diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index f294e7e591f..33bdeebafce 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -1039,7 +1039,7 @@ impl Step for TestHelpers { } if self.target == "morello-unknown-linux-purecap" { let sysroot = match home_dir() { - Some(path) => path.as_path().join("cheri").join("output").join("musl-bin"), + Some(path) => path.as_path().join("morello").join("musl"), None => Path::new("").to_path_buf(), }; let sysroot = sysroot.into_os_string().into_string().unwrap();