summaryrefslogtreecommitdiff
path: root/user/rust
diff options
context:
space:
mode:
Diffstat (limited to 'user/rust')
-rw-r--r--user/rust/0001-Fix-LLVM-build.patch21
-rw-r--r--user/rust/0002-Fix-linking-to-zlib-when-cross-compiling.patch30
-rw-r--r--user/rust/0003-Fix-rustdoc-when-cross-compiling-on-musl.patch57
-rw-r--r--user/rust/0004-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch (renamed from user/rust/0005-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch)623
-rw-r--r--user/rust/0004-Use-static-native-libraries-when-linking-static-exec.patch70
-rw-r--r--user/rust/0005-Prefer-libgcc_eh-over-libunwind-for-musl.patch (renamed from user/rust/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch)4
-rw-r--r--user/rust/0006-Link-libssp_nonshared.a-on-all-musl-targets.patch28
-rw-r--r--user/rust/0007-Link-libssp_nonshared.a-on-all-musl-targets.patch31
-rw-r--r--user/rust/0007-test-failed-doctest-output-Fix-normalization.patch33
-rw-r--r--user/rust/0008-test-failed-doctest-output-Fix-normalization.patch36
-rw-r--r--user/rust/0008-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch22
-rw-r--r--user/rust/0009-Ignore-broken-and-non-applicable-tests.patch47
-rw-r--r--user/rust/0009-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch25
-rw-r--r--user/rust/0010-Link-stage-2-tools-dynamically-to-libstd.patch (renamed from user/rust/0012-Link-stage-2-tools-dynamically-to-libstd.patch)19
-rw-r--r--user/rust/0010-test-use-extern-for-plugins-Don-t-assume-multilib.patch30
-rw-r--r--user/rust/0011-Ignore-broken-and-non-applicable-tests.patch61
-rw-r--r--user/rust/0011-Move-debugger-scripts-to-usr-share-rust.patch (renamed from user/rust/0013-Move-debugger-scripts-to-usr-share-rust.patch)29
-rw-r--r--user/rust/0012-Add-foxkit-target-specs.patch206
-rw-r--r--user/rust/0014-Add-foxkit-target-specs.patch144
-rw-r--r--user/rust/0015-Use-OpenPOWER-ABI-on-BE-PowerPC-64-musl.patch25
-rw-r--r--user/rust/0040-rls-atomics.patch58
-rw-r--r--user/rust/APKBUILD151
-rwxr-xr-xuser/rust/maintain17
-rw-r--r--user/rust/mir-opt-tests-endianness.patch1564
-rw-r--r--user/rust/powerpc-atomics.patch72
-rw-r--r--user/rust/ppc64-abi.patch251
-rw-r--r--user/rust/stdarch-ppc.patch116
-rw-r--r--user/rust/test-be.patch49
-rw-r--r--user/rust/ui-test-strings.patch25
29 files changed, 2797 insertions, 1047 deletions
diff --git a/user/rust/0001-Fix-LLVM-build.patch b/user/rust/0001-Fix-LLVM-build.patch
index 3be2eb456..67ad9dbf8 100644
--- a/user/rust/0001-Fix-LLVM-build.patch
+++ b/user/rust/0001-Fix-LLVM-build.patch
@@ -1,17 +1,17 @@
-From 1a5423cf2c7eb0784fcc9b789cdd271efbf43d45 Mon Sep 17 00:00:00 2001
+From 855b7d97e96e67bd5db5c0016c3b9965a5c1843f Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Fri, 8 Sep 2017 00:04:29 -0500
-Subject: [PATCH 01/14] Fix LLVM build
+Subject: [PATCH 01/12] Fix LLVM build
---
- src/bootstrap/lib.rs | 2 +-
+ src/bootstrap/src/lib.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index 3130dcc277b..c6ac4f9e636 100644
---- a/src/bootstrap/lib.rs
-+++ b/src/bootstrap/lib.rs
-@@ -957,7 +957,7 @@ fn cflags(&self, target: TargetSelection, which: GitRepo, c: CLang) -> Vec<Strin
+diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
+index 33b8f1a7ce720..d933a8bc37f88 100644
+--- a/src/bootstrap/src/lib.rs
++++ b/src/bootstrap/src/lib.rs
+@@ -1262,7 +1262,7 @@ impl Build {
.args()
.iter()
.map(|s| s.to_string_lossy().into_owned())
@@ -19,7 +19,4 @@ index 3130dcc277b..c6ac4f9e636 100644
+ .filter(|s| !s.starts_with("-O") && !s.starts_with("/O") && !s.starts_with("-static"))
.collect::<Vec<String>>();
- // If we're compiling on macOS then we add a few unconditional flags
---
-2.35.1
-
+ // If we're compiling C++ on macOS then we add a flag indicating that
diff --git a/user/rust/0002-Fix-linking-to-zlib-when-cross-compiling.patch b/user/rust/0002-Fix-linking-to-zlib-when-cross-compiling.patch
index a78395597..d7c5fc1dc 100644
--- a/user/rust/0002-Fix-linking-to-zlib-when-cross-compiling.patch
+++ b/user/rust/0002-Fix-linking-to-zlib-when-cross-compiling.patch
@@ -1,36 +1,34 @@
-From 702ebc6e2283f69e8b024b2cf12899a2bbdf6e8b Mon Sep 17 00:00:00 2001
+From 9357baa3eede8062b7c17407d23c3d2102af8435 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Wed, 10 Jan 2018 13:36:41 -0600
-Subject: [PATCH 02/14] Fix linking to zlib when cross-compiling
+Subject: [PATCH 02/12] Fix linking to zlib when cross-compiling
---
- compiler/rustc_llvm/build.rs | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
+ compiler/rustc_llvm/build.rs | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs
-index 3b6808d693f..4713f550a73 100644
+index 4b0c1229da134..2d61b834c784b 100644
--- a/compiler/rustc_llvm/build.rs
+++ b/compiler/rustc_llvm/build.rs
-@@ -177,16 +177,15 @@ fn main() {
+@@ -219,10 +219,8 @@ fn main() {
// of llvm-config, not the target that we're attempting to link.
let mut cmd = Command::new(&llvm_config);
cmd.arg(llvm_link_arg).arg("--libs");
+-
+- if !is_crossed {
+- cmd.arg("--system-libs");
+- }
+ cmd.arg("--system-libs");
+ cmd.args(&components);
-- if !is_crossed {
-- cmd.arg("--system-libs");
-- } else if target.contains("windows-gnu") {
-+ if target.contains("windows-gnu") {
- println!("cargo:rustc-link-lib=shell32");
- println!("cargo:rustc-link-lib=uuid");
- } else if target.contains("netbsd") || target.contains("haiku") || target.contains("darwin") {
+ // We need libkstat for getHostCPUName on SPARC builds.
+ // See also: https://github.com/llvm/llvm-project/issues/64186
+@@ -255,7 +253,6 @@ fn main() {
println!("cargo:rustc-link-lib=z");
+ println!("cargo:rustc-link-lib=execinfo");
}
- cmd.args(&components);
for lib in output(&mut cmd).split_whitespace() {
let name = if let Some(stripped) = lib.strip_prefix("-l") {
---
-2.35.1
-
diff --git a/user/rust/0003-Fix-rustdoc-when-cross-compiling-on-musl.patch b/user/rust/0003-Fix-rustdoc-when-cross-compiling-on-musl.patch
index 69dbf3530..cfcc2ad83 100644
--- a/user/rust/0003-Fix-rustdoc-when-cross-compiling-on-musl.patch
+++ b/user/rust/0003-Fix-rustdoc-when-cross-compiling-on-musl.patch
@@ -1,34 +1,52 @@
-From 41ab14f51521d94673ddae78e91611a3e7197078 Mon Sep 17 00:00:00 2001
+From cb97ef40ec507c7ff20f7c0857b1892a1946a0f3 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sat, 2 Dec 2017 17:25:44 -0600
-Subject: [PATCH 03/14] Fix rustdoc when cross-compiling on musl
+Subject: [PATCH 03/12] Fix rustdoc when cross-compiling on musl
musl can't handle foreign-architecture libraries in LD_LIBRARY_PATH.
---
- src/bootstrap/bin/rustdoc.rs | 7 ++-----
- 1 file changed, 2 insertions(+), 5 deletions(-)
+ src/bootstrap/src/bin/rustdoc.rs | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
-diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
-index ad3800834b0..e19b589233e 100644
---- a/src/bootstrap/bin/rustdoc.rs
-+++ b/src/bootstrap/bin/rustdoc.rs
-@@ -22,14 +22,11 @@ fn main() {
- Err(_) => 0,
- };
+diff --git a/src/bootstrap/src/bin/rustdoc.rs b/src/bootstrap/src/bin/rustdoc.rs
+index dbbce6fe22047..3d3cb241eaab6 100644
+--- a/src/bootstrap/src/bin/rustdoc.rs
++++ b/src/bootstrap/src/bin/rustdoc.rs
+@@ -6,12 +6,13 @@ use std::ffi::OsString;
+ use std::path::PathBuf;
+ use std::process::Command;
+
+-use dylib_util::{dylib_path, dylib_path_var};
++use dylib_util::dylib_path_var;
+
+ #[path = "../utils/bin_helpers.rs"]
+ mod bin_helpers;
+
+ #[path = "../utils/dylib.rs"]
++#[allow(dead_code)]
+ mod dylib_util;
+
+ fn main() {
+@@ -28,9 +29,6 @@ fn main() {
+ // is passed (a bit janky...)
+ let target = args.windows(2).find(|w| &*w[0] == "--target").and_then(|w| w[1].to_str());
- let mut dylib_path = dylib_path();
- dylib_path.insert(0, PathBuf::from(libdir.clone()));
-
let mut cmd = Command::new(rustdoc);
- cmd.args(&args)
- .arg("--sysroot")
- .arg(&sysroot)
-- .env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
-+ .env(dylib_path_var(), PathBuf::from(libdir.clone()));
+
+ if target.is_some() {
+@@ -43,7 +41,7 @@ fn main() {
+ }
+
+ cmd.args(&args);
+- cmd.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
++ cmd.env(dylib_path_var(), PathBuf::from(libdir.clone()));
// Force all crates compiled by this compiler to (a) be unstable and (b)
// allow the `rustc_private` feature to link to other unstable crates
-@@ -62,7 +59,7 @@ fn main() {
+@@ -68,7 +66,7 @@ fn main() {
eprintln!(
"rustdoc command: {:?}={:?} {:?}",
dylib_path_var(),
@@ -36,7 +54,4 @@ index ad3800834b0..e19b589233e 100644
+ PathBuf::from(libdir.clone()),
cmd,
);
- eprintln!("sysroot: {:?}", sysroot);
---
-2.35.1
-
+ eprintln!("sysroot: {sysroot:?}");
diff --git a/user/rust/0005-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch b/user/rust/0004-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch
index 418346caa..56dfc19d4 100644
--- a/user/rust/0005-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch
+++ b/user/rust/0004-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch
@@ -1,57 +1,80 @@
-From e653caa13dce250139440eab3da38c9ec2f641d5 Mon Sep 17 00:00:00 2001
+From 7e2507b33ffb027a331f7cbd3477043288f49797 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Fri, 8 Sep 2017 22:11:14 -0500
-Subject: [PATCH 05/14] Remove musl_root and CRT fallback from musl targets
+Subject: [PATCH 04/12] Remove musl_root and CRT fallback from musl targets
---
compiler/rustc_codegen_ssa/src/back/link.rs | 6 +--
- compiler/rustc_target/src/spec/crt_objects.rs | 25 -----------
- .../rustc_target/src/spec/linux_musl_base.rs | 4 --
- config.toml.example | 17 --------
- src/bootstrap/cc_detect.rs | 27 +-----------
- src/bootstrap/compile.rs | 42 +------------------
- src/bootstrap/config.rs | 10 -----
- src/bootstrap/configure.py | 28 -------------
- src/bootstrap/lib.rs | 19 ---------
- src/bootstrap/sanity.rs | 23 ----------
+ .../rustc_target/src/spec/base/linux_musl.rs | 6 +--
+ compiler/rustc_target/src/spec/crt_objects.rs | 22 ----------
+ compiler/rustc_target/src/spec/mod.rs | 5 ---
+ config.example.toml | 17 --------
+ src/bootstrap/configure.py | 34 ---------------
+ src/bootstrap/src/core/build_steps/compile.rs | 42 +------------------
+ src/bootstrap/src/core/config/config.rs | 11 -----
+ src/bootstrap/src/core/sanity.rs | 23 ----------
+ src/bootstrap/src/lib.rs | 19 ---------
+ src/bootstrap/src/utils/cc_detect.rs | 26 ------------
+ .../host-x86_64/dist-arm-linux/Dockerfile | 1 -
.../dist-i586-gnu-i586-i686-musl/Dockerfile | 2 -
- .../host-x86_64/dist-various-1/Dockerfile | 8 ----
+ .../host-x86_64/dist-various-1/Dockerfile | 4 --
.../host-x86_64/dist-various-2/Dockerfile | 3 +-
.../host-x86_64/dist-x86_64-musl/Dockerfile | 1 -
.../host-x86_64/test-various/Dockerfile | 1 -
- 15 files changed, 5 insertions(+), 211 deletions(-)
+ 17 files changed, 4 insertions(+), 219 deletions(-)
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
-index 93d8a6e8680..a14b0c943e3 100644
+index f5e8d5fc92a91..b65999ec7230f 100644
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
-@@ -1508,16 +1508,12 @@ fn detect_self_contained_mingw(sess: &Session) -> bool {
-
- /// Whether we link to our own CRT objects instead of relying on gcc to pull them.
+@@ -1806,7 +1806,7 @@ fn detect_self_contained_mingw(sess: &Session) -> bool {
+ /// Various toolchain components used during linking are used from rustc distribution
+ /// instead of being found somewhere on the host system.
/// We only provide such support for a very limited number of targets.
--fn crt_objects_fallback(sess: &Session, crate_type: CrateType) -> bool {
-+fn crt_objects_fallback(sess: &Session, _crate_type: CrateType) -> bool {
- if let Some(self_contained) = sess.opts.cg.link_self_contained {
- return self_contained;
- }
+-fn self_contained_components(sess: &Session, crate_type: CrateType) -> LinkSelfContainedComponents {
++fn self_contained_components(sess: &Session, _crate_type: CrateType) -> LinkSelfContainedComponents {
+ // Turn the backwards compatible bool values for `self_contained` into fully inferred
+ // `LinkSelfContainedComponents`.
+ let self_contained =
+@@ -1828,10 +1828,6 @@ fn self_contained_components(sess: &Session, crate_type: CrateType) -> LinkSelfC
+ return components;
+ }
+
+- // FIXME: Find a better heuristic for "native musl toolchain is available",
+- // based on host and linker path, for example.
+- // (https://github.com/rust-lang/rust/pull/71769#issuecomment-626330237).
+- LinkSelfContainedDefault::InferredForMusl => sess.crt_static(Some(crate_type)),
+ LinkSelfContainedDefault::InferredForMingw => {
+ sess.host == sess.target
+ && sess.target.vendor != "uwp"
+diff --git a/compiler/rustc_target/src/spec/base/linux_musl.rs b/compiler/rustc_target/src/spec/base/linux_musl.rs
+index 5117cadbee0e6..36d64059d59ad 100644
+--- a/compiler/rustc_target/src/spec/base/linux_musl.rs
++++ b/compiler/rustc_target/src/spec/base/linux_musl.rs
+@@ -1,13 +1,9 @@
+-use crate::spec::crt_objects;
+-use crate::spec::{base, LinkSelfContainedDefault, TargetOptions};
++use crate::spec::{base, TargetOptions};
+
+ pub fn opts() -> TargetOptions {
+ let mut base = base::linux::opts();
- match sess.target.crt_objects_fallback {
-- // FIXME: Find a better heuristic for "native musl toolchain is available",
-- // based on host and linker path, for example.
-- // (https://github.com/rust-lang/rust/pull/71769#issuecomment-626330237).
-- Some(CrtObjectsFallback::Musl) => sess.crt_static(Some(crate_type)),
- Some(CrtObjectsFallback::Mingw) => {
- sess.host == sess.target
- && sess.target.vendor != "uwp"
+ base.env = "musl".into();
+- base.pre_link_objects_self_contained = crt_objects::pre_musl_self_contained();
+- base.post_link_objects_self_contained = crt_objects::post_musl_self_contained();
+- base.link_self_contained = LinkSelfContainedDefault::InferredForMusl;
+
+ // These targets statically link libc by default
+ base.crt_static_default = true;
diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
-index 2fc9ab29f92..0bf7d197583 100644
+index 53f710b8f9e14..2a4eec15f2027 100644
--- a/compiler/rustc_target/src/spec/crt_objects.rs
+++ b/compiler/rustc_target/src/spec/crt_objects.rs
-@@ -62,28 +62,6 @@ pub(super) fn all(obj: &str) -> CrtObjects {
+@@ -61,28 +61,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects {
])
}
--pub(super) fn pre_musl_fallback() -> CrtObjects {
+-pub(super) fn pre_musl_self_contained() -> CrtObjects {
- new(&[
- (LinkOutputKind::DynamicNoPicExe, &["crt1.o", "crti.o", "crtbegin.o"]),
- (LinkOutputKind::DynamicPicExe, &["Scrt1.o", "crti.o", "crtbeginS.o"]),
@@ -62,7 +85,7 @@ index 2fc9ab29f92..0bf7d197583 100644
- ])
-}
-
--pub(super) fn post_musl_fallback() -> CrtObjects {
+-pub(super) fn post_musl_self_contained() -> CrtObjects {
- new(&[
- (LinkOutputKind::DynamicNoPicExe, &["crtend.o", "crtn.o"]),
- (LinkOutputKind::DynamicPicExe, &["crtendS.o", "crtn.o"]),
@@ -73,58 +96,46 @@ index 2fc9ab29f92..0bf7d197583 100644
- ])
-}
-
- pub(super) fn pre_mingw_fallback() -> CrtObjects {
+ pub(super) fn pre_mingw_self_contained() -> CrtObjects {
new(&[
(LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
-@@ -126,7 +104,6 @@ pub(super) fn post_wasi_fallback() -> CrtObjects {
- /// Which logic to use to determine whether to fall back to the "self-contained" mode or not.
- #[derive(Clone, Copy, PartialEq, Hash, Debug)]
- pub enum CrtObjectsFallback {
-- Musl,
- Mingw,
- Wasm,
- }
-@@ -136,7 +113,6 @@ impl FromStr for CrtObjectsFallback {
+diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
+index 941d767b850dc..1ce8e0e64e4c7 100644
+--- a/compiler/rustc_target/src/spec/mod.rs
++++ b/compiler/rustc_target/src/spec/mod.rs
+@@ -549,9 +549,6 @@ pub enum LinkSelfContainedDefault {
+ /// The target spec explicitly disables self-contained linking.
+ False,
+
+- /// The target spec requests that the self-contained mode is inferred, in the context of musl.
+- InferredForMusl,
+-
+ /// The target spec requests that the self-contained mode is inferred, in the context of mingw.
+ InferredForMingw,
- fn from_str(s: &str) -> Result<CrtObjectsFallback, ()> {
+@@ -568,7 +565,6 @@ impl FromStr for LinkSelfContainedDefault {
Ok(match s {
-- "musl" => CrtObjectsFallback::Musl,
- "mingw" => CrtObjectsFallback::Mingw,
- "wasm" => CrtObjectsFallback::Wasm,
+ "false" => LinkSelfContainedDefault::False,
+ "true" | "wasm" => LinkSelfContainedDefault::True,
+- "musl" => LinkSelfContainedDefault::InferredForMusl,
+ "mingw" => LinkSelfContainedDefault::InferredForMingw,
_ => return Err(()),
-@@ -147,7 +123,6 @@ fn from_str(s: &str) -> Result<CrtObjectsFallback, ()> {
- impl ToJson for CrtObjectsFallback {
- fn to_json(&self) -> Json {
- match *self {
-- CrtObjectsFallback::Musl => "musl",
- CrtObjectsFallback::Mingw => "mingw",
- CrtObjectsFallback::Wasm => "wasm",
+ })
+@@ -590,7 +586,6 @@ impl ToJson for LinkSelfContainedDefault {
+ // Stable backwards-compatible values
+ LinkSelfContainedDefault::True => "true".to_json(),
+ LinkSelfContainedDefault::False => "false".to_json(),
+- LinkSelfContainedDefault::InferredForMusl => "musl".to_json(),
+ LinkSelfContainedDefault::InferredForMingw => "mingw".to_json(),
}
-diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs
-index 5038a967d0a..9931578ba86 100644
---- a/compiler/rustc_target/src/spec/linux_musl_base.rs
-+++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
-@@ -1,13 +1,9 @@
--use crate::spec::crt_objects::{self, CrtObjectsFallback};
- use crate::spec::TargetOptions;
-
- pub fn opts() -> TargetOptions {
- let mut base = super::linux_base::opts();
-
- base.env = "musl".to_string();
-- base.pre_link_objects_fallback = crt_objects::pre_musl_fallback();
-- base.post_link_objects_fallback = crt_objects::post_musl_fallback();
-- base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
-
- // These targets statically link libc by default
- base.crt_static_default = true;
-diff --git a/config.toml.example b/config.toml.example
-index ad48cc881f3..40c7e5ae06d 100644
---- a/config.toml.example
-+++ b/config.toml.example
-@@ -511,14 +511,6 @@ changelog-seen = 2
- # supplementary build information, like distro-specific package versions.
- #description = <none> (string)
+ }
+diff --git a/config.example.toml b/config.example.toml
+index f94553dd63f72..687a79bdd3ccc 100644
+--- a/config.example.toml
++++ b/config.example.toml
+@@ -592,14 +592,6 @@
+ # behavior -- this may lead to miscompilations or other bugs.
+ #description = ""
-# The root location of the musl installation directory. The library directory
-# will also need to contain libunwind.a for an unwinding implementation. Note
@@ -137,7 +148,7 @@ index ad48cc881f3..40c7e5ae06d 100644
# By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
# platforms to ensure that the compiler is usable by default from the build
# directory (as it links to a number of dynamic libraries). This may not be
-@@ -684,15 +676,6 @@ changelog-seen = 2
+@@ -835,15 +827,6 @@
# only use static libraries. If unset, the target's default linkage is used.
#crt-static = <platform-specific> (bool)
@@ -150,80 +161,59 @@ index ad48cc881f3..40c7e5ae06d 100644
-# The full path to the musl libdir.
-#musl-libdir = musl-root/lib
-
- # The root location of the `wasm32-wasi` sysroot. Only used for the
- # `wasm32-wasi` target. If you are building wasm32-wasi target, make sure to
- # create a `[target.wasm32-wasi]` section and move this field there.
-diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index 8c47f625d73..9e3b3e880ec 100644
---- a/src/bootstrap/cc_detect.rs
-+++ b/src/bootstrap/cc_detect.rs
-@@ -42,8 +42,6 @@ fn cc2ar(cc: &Path, target: TargetSelection) -> Option<PathBuf> {
- Some(PathBuf::from(ar))
- } else if target.contains("msvc") {
- None
-- } else if target.contains("musl") {
-- Some(PathBuf::from("ar"))
- } else if target.contains("openbsd") {
- Some(PathBuf::from("ar"))
- } else if target.contains("vxworks") {
-@@ -98,7 +96,7 @@ pub fn find(build: &mut Build) {
- if let Some(cc) = config.and_then(|c| c.cc.as_ref()) {
- cfg.compiler(cc);
- } else {
-- set_compiler(&mut cfg, Language::C, target, config, build);
-+ set_compiler(&mut cfg, Language::C, target, config);
- }
-
- let compiler = cfg.get_compiler();
-@@ -126,7 +124,7 @@ pub fn find(build: &mut Build) {
- cfg.compiler(cxx);
- true
- } else if build.hosts.contains(&target) || build.build == target {
-- set_compiler(&mut cfg, Language::CPlusPlus, target, config, build);
-+ set_compiler(&mut cfg, Language::CPlusPlus, target, config);
- true
- } else {
- // Use an auto-detected compiler (or one configured via `CXX_target_triple` env vars).
-@@ -158,7 +156,6 @@ fn set_compiler(
- compiler: Language,
- target: TargetSelection,
- config: Option<&Target>,
-- build: &Build,
- ) {
- match &*target.triple {
- // When compiling for android we may have the NDK configured in the
-@@ -201,26 +198,6 @@ fn set_compiler(
- }
- }
-
-- "mips-unknown-linux-musl" => {
-- if cfg.get_compiler().path().to_str() == Some("gcc") {
-- cfg.compiler("mips-linux-musl-gcc");
-- }
-- }
-- "mipsel-unknown-linux-musl" => {
-- if cfg.get_compiler().path().to_str() == Some("gcc") {
-- cfg.compiler("mipsel-linux-musl-gcc");
-- }
-- }
--
-- t if t.contains("musl") => {
-- if let Some(root) = build.musl_root(target) {
-- let guess = root.join("bin/musl-gcc");
-- if guess.exists() {
-- cfg.compiler(guess);
-- }
-- }
-- }
--
- _ => {}
- }
- }
-diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index f05d1dcf4fc..f3f04f07dd2 100644
---- a/src/bootstrap/compile.rs
-+++ b/src/bootstrap/compile.rs
-@@ -200,38 +200,7 @@ fn copy_self_contained_objects(
+ # The root location of the `wasm32-wasip1` sysroot. Only used for WASI
+ # related targets. Make sure to create a `[target.wasm32-wasip1]`
+ # section and move this field there (or equivalent for the target being built).
+diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
+index 818a7daadcab8..a7331009faf82 100755
+--- a/src/bootstrap/configure.py
++++ b/src/bootstrap/configure.py
+@@ -99,40 +99,6 @@ def v(*args):
+ v("llvm-filecheck", None, "set path to LLVM's FileCheck utility")
+ v("python", "build.python", "set path to python")
+ v("android-ndk", "build.android-ndk", "set path to Android NDK")
+-v("musl-root", "target.x86_64-unknown-linux-musl.musl-root",
+- "MUSL root installation directory (deprecated)")
+-v("musl-root-x86_64", "target.x86_64-unknown-linux-musl.musl-root",
+- "x86_64-unknown-linux-musl install directory")
+-v("musl-root-i586", "target.i586-unknown-linux-musl.musl-root",
+- "i586-unknown-linux-musl install directory")
+-v("musl-root-i686", "target.i686-unknown-linux-musl.musl-root",
+- "i686-unknown-linux-musl install directory")
+-v("musl-root-arm", "target.arm-unknown-linux-musleabi.musl-root",
+- "arm-unknown-linux-musleabi install directory")
+-v("musl-root-armhf", "target.arm-unknown-linux-musleabihf.musl-root",
+- "arm-unknown-linux-musleabihf install directory")
+-v("musl-root-armv5te", "target.armv5te-unknown-linux-musleabi.musl-root",
+- "armv5te-unknown-linux-musleabi install directory")
+-v("musl-root-armv7", "target.armv7-unknown-linux-musleabi.musl-root",
+- "armv7-unknown-linux-musleabi install directory")
+-v("musl-root-armv7hf", "target.armv7-unknown-linux-musleabihf.musl-root",
+- "armv7-unknown-linux-musleabihf install directory")
+-v("musl-root-aarch64", "target.aarch64-unknown-linux-musl.musl-root",
+- "aarch64-unknown-linux-musl install directory")
+-v("musl-root-mips", "target.mips-unknown-linux-musl.musl-root",
+- "mips-unknown-linux-musl install directory")
+-v("musl-root-mipsel", "target.mipsel-unknown-linux-musl.musl-root",
+- "mipsel-unknown-linux-musl install directory")
+-v("musl-root-mips64", "target.mips64-unknown-linux-muslabi64.musl-root",
+- "mips64-unknown-linux-muslabi64 install directory")
+-v("musl-root-mips64el", "target.mips64el-unknown-linux-muslabi64.musl-root",
+- "mips64el-unknown-linux-muslabi64 install directory")
+-v("musl-root-riscv32gc", "target.riscv32gc-unknown-linux-musl.musl-root",
+- "riscv32gc-unknown-linux-musl install directory")
+-v("musl-root-riscv64gc", "target.riscv64gc-unknown-linux-musl.musl-root",
+- "riscv64gc-unknown-linux-musl install directory")
+-v("musl-root-loongarch64", "target.loongarch64-unknown-linux-musl.musl-root",
+- "loongarch64-unknown-linux-musl install directory")
+ v("qemu-armhf-rootfs", "target.arm-unknown-linux-gnueabihf.qemu-rootfs",
+ "rootfs in qemu testing, you probably don't want to use this")
+ v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs",
+diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
+index e927b491c71ea..b77e1a1598f12 100644
+--- a/src/bootstrap/src/core/build_steps/compile.rs
++++ b/src/bootstrap/src/core/build_steps/compile.rs
+@@ -362,38 +362,7 @@ fn copy_self_contained_objects(
// Copies the libc and CRT objects.
//
@@ -232,7 +222,7 @@ index f05d1dcf4fc..f3f04f07dd2 100644
- // to using gcc from a glibc-targeting toolchain for linking.
- // To do that we have to distribute musl startup objects as a part of Rust toolchain
- // and link with them manually in the self-contained mode.
-- if target.contains("musl") {
+- if target.contains("musl") && !target.contains("unikraft") {
- let srcdir = builder.musl_libdir(target).unwrap_or_else(|| {
- panic!("Target {:?} does not have a \"musl-libdir\" key", target.triple)
- });
@@ -246,11 +236,11 @@ index f05d1dcf4fc..f3f04f07dd2 100644
- DependencyType::TargetSelfContained,
- );
- }
-- let crt_path = builder.ensure(native::CrtBeginEnd { target });
+- let crt_path = builder.ensure(llvm::CrtBeginEnd { target });
- for &obj in &["crtbegin.o", "crtbeginS.o", "crtend.o", "crtendS.o"] {
- let src = crt_path.join(obj);
- let target = libdir_self_contained.join(obj);
-- builder.copy(&src, &target);
+- builder.copy_link(&src, &target);
- target_deps.push((target, DependencyType::TargetSelfContained));
- }
-
@@ -258,14 +248,14 @@ index f05d1dcf4fc..f3f04f07dd2 100644
- let libunwind_path = copy_llvm_libunwind(builder, target, &libdir_self_contained);
- target_deps.push((libunwind_path, DependencyType::TargetSelfContained));
- }
-- } else if target.ends_with("-wasi") {
-+ if target.ends_with("-wasi") {
- let srcdir = builder
- .wasi_root(target)
- .unwrap_or_else(|| {
-@@ -315,15 +284,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+- } else if target.contains("-wasi") {
++ if target.contains("-wasi") {
+ let srcdir = builder.wasi_libdir(target).unwrap_or_else(|| {
+ panic!(
+ "Target {:?} does not have a \"wasi-root\" key in Config.toml \
+@@ -501,15 +470,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
.arg("--manifest-path")
- .arg(builder.src.join("library/test/Cargo.toml"));
+ .arg(builder.src.join("library/sysroot/Cargo.toml"));
- // Help the libc crate compile by assisting it in finding various
- // sysroot native libraries.
@@ -276,57 +266,65 @@ index f05d1dcf4fc..f3f04f07dd2 100644
- }
- }
-
- if target.ends_with("-wasi") {
- if let Some(p) = builder.wasi_root(target) {
- let root = format!("native={}/lib/wasm32-wasi", p.to_str().unwrap());
-diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index d6f77fe6cd6..a2be14e5d5a 100644
---- a/src/bootstrap/config.rs
-+++ b/src/bootstrap/config.rs
-@@ -173,8 +173,6 @@ pub struct Config {
+ if target.contains("-wasi") {
+ if let Some(dir) = builder.wasi_libdir(target) {
+ let root = format!("native={}", dir.to_str().unwrap());
+diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs
+index 3e1bc9a9acdd9..2289138cbc3e6 100644
+--- a/src/bootstrap/src/core/config/config.rs
++++ b/src/bootstrap/src/core/config/config.rs
+@@ -313,8 +313,6 @@ pub struct Config {
+ pub print_step_timings: bool,
pub print_step_rusage: bool,
- pub missing_tools: bool,
- // Fallback musl-root for all targets
- pub musl_root: Option<PathBuf>,
pub prefix: Option<PathBuf>,
pub sysconfdir: Option<PathBuf>,
pub datadir: Option<PathBuf>,
-@@ -301,8 +299,6 @@ pub struct Target {
- pub sanitizers: Option<bool>,
- pub profiler: Option<bool>,
+@@ -558,8 +556,6 @@ pub struct Target {
+ pub profiler: Option<StringOrBool>,
+ pub rpath: Option<bool>,
pub crt_static: Option<bool>,
- pub musl_root: Option<PathBuf>,
- pub musl_libdir: Option<PathBuf>,
pub wasi_root: Option<PathBuf>,
pub qemu_rootfs: Option<PathBuf>,
- pub no_std: bool,
-@@ -534,7 +530,6 @@ struct Rust {
- default_linker: Option<String>,
- channel: Option<String>,
- description: Option<String>,
-- musl_root: Option<String>,
- rpath: Option<bool>,
- verbose_tests: Option<bool>,
- optimize_tests: Option<bool>,
-@@ -580,8 +575,6 @@ struct TomlTarget {
- sanitizers: Option<bool>,
- profiler: Option<bool>,
- crt_static: Option<bool>,
-- musl_root: Option<String>,
-- musl_libdir: Option<String>,
- wasi_root: Option<String>,
- qemu_rootfs: Option<String>,
- no_std: Option<bool>,
-@@ -943,7 +936,6 @@ pub fn parse(args: &[String]) -> Config {
- set(&mut config.llvm_tools_enabled, rust.llvm_tools);
- config.rustc_parallel = rust.parallel_compiler.unwrap_or(false);
- config.rustc_default_linker = rust.default_linker;
-- config.musl_root = rust.musl_root.map(PathBuf::from);
- config.save_toolstates = rust.save_toolstates.map(PathBuf::from);
- set(&mut config.deny_warnings, flags.deny_warnings.or(rust.deny_warnings));
- set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
-@@ -989,8 +981,6 @@ pub fn parse(args: &[String]) -> Config {
+ pub runner: Option<String>,
+@@ -1080,7 +1076,6 @@ define_config! {
+ default_linker: Option<String> = "default-linker",
+ channel: Option<String> = "channel",
+ description: Option<String> = "description",
+- musl_root: Option<String> = "musl-root",
+ rpath: Option<bool> = "rpath",
+ strip: Option<bool> = "strip",
+ frame_pointers: Option<bool> = "frame-pointers",
+@@ -1134,8 +1129,6 @@ define_config! {
+ profiler: Option<StringOrBool> = "profiler",
+ rpath: Option<bool> = "rpath",
+ crt_static: Option<bool> = "crt-static",
+- musl_root: Option<String> = "musl-root",
+- musl_libdir: Option<String> = "musl-libdir",
+ wasi_root: Option<String> = "wasi-root",
+ qemu_rootfs: Option<String> = "qemu-rootfs",
+ no_std: Option<bool> = "no-std",
+@@ -1570,7 +1563,6 @@ impl Config {
+ default_linker,
+ channel,
+ description,
+- musl_root,
+ rpath,
+ verbose_tests,
+ optimize_tests,
+@@ -1673,7 +1665,6 @@ impl Config {
+ config.rustc_parallel =
+ parallel_compiler.unwrap_or(config.channel == "dev" || config.channel == "nightly");
+ config.rustc_default_linker = default_linker;
+- config.musl_root = musl_root.map(PathBuf::from);
+ config.save_toolstates = save_toolstates.map(PathBuf::from);
+ set(
+ &mut config.deny_warnings,
+@@ -1876,8 +1867,6 @@ impl Config {
target.ranlib = cfg.ranlib.map(PathBuf::from);
target.linker = cfg.linker.map(PathBuf::from);
target.crt_static = cfg.crt_static;
@@ -334,80 +332,11 @@ index d6f77fe6cd6..a2be14e5d5a 100644
- target.musl_libdir = cfg.musl_libdir.map(PathBuf::from);
target.wasi_root = cfg.wasi_root.map(PathBuf::from);
target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
- target.sanitizers = cfg.sanitizers;
-diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
-index 94424cb4548..9ae0cc053e3 100755
---- a/src/bootstrap/configure.py
-+++ b/src/bootstrap/configure.py
-@@ -114,34 +114,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
- "aarch64-linux-android NDK standalone path")
- v("x86_64-linux-android-ndk", "target.x86_64-linux-android.android-ndk",
- "x86_64-linux-android NDK standalone path")
--v("musl-root", "target.x86_64-unknown-linux-musl.musl-root",
-- "MUSL root installation directory (deprecated)")
--v("musl-root-x86_64", "target.x86_64-unknown-linux-musl.musl-root",
-- "x86_64-unknown-linux-musl install directory")
--v("musl-root-i586", "target.i586-unknown-linux-musl.musl-root",
-- "i586-unknown-linux-musl install directory")
--v("musl-root-i686", "target.i686-unknown-linux-musl.musl-root",
-- "i686-unknown-linux-musl install directory")
--v("musl-root-arm", "target.arm-unknown-linux-musleabi.musl-root",
-- "arm-unknown-linux-musleabi install directory")
--v("musl-root-armhf", "target.arm-unknown-linux-musleabihf.musl-root",
-- "arm-unknown-linux-musleabihf install directory")
--v("musl-root-armv5te", "target.armv5te-unknown-linux-musleabi.musl-root",
-- "armv5te-unknown-linux-musleabi install directory")
--v("musl-root-armv7", "target.armv7-unknown-linux-musleabi.musl-root",
-- "armv7-unknown-linux-musleabi install directory")
--v("musl-root-armv7hf", "target.armv7-unknown-linux-musleabihf.musl-root",
-- "armv7-unknown-linux-musleabihf install directory")
--v("musl-root-aarch64", "target.aarch64-unknown-linux-musl.musl-root",
-- "aarch64-unknown-linux-musl install directory")
--v("musl-root-mips", "target.mips-unknown-linux-musl.musl-root",
-- "mips-unknown-linux-musl install directory")
--v("musl-root-mipsel", "target.mipsel-unknown-linux-musl.musl-root",
-- "mipsel-unknown-linux-musl install directory")
--v("musl-root-mips64", "target.mips64-unknown-linux-muslabi64.musl-root",
-- "mips64-unknown-linux-muslabi64 install directory")
--v("musl-root-mips64el", "target.mips64el-unknown-linux-muslabi64.musl-root",
-- "mips64el-unknown-linux-muslabi64 install directory")
- v("qemu-armhf-rootfs", "target.arm-unknown-linux-gnueabihf.qemu-rootfs",
- "rootfs in qemu testing, you probably don't want to use this")
- v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs",
-diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index c6ac4f9e636..d381678b02a 100644
---- a/src/bootstrap/lib.rs
-+++ b/src/bootstrap/lib.rs
-@@ -1059,25 +1059,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
- }
- }
-
-- /// Returns the "musl root" for this `target`, if defined
-- fn musl_root(&self, target: TargetSelection) -> Option<&Path> {
-- self.config
-- .target_config
-- .get(&target)
-- .and_then(|t| t.musl_root.as_ref())
-- .or_else(|| self.config.musl_root.as_ref())
-- .map(|p| &**p)
-- }
--
-- /// Returns the "musl libdir" for this `target`.
-- fn musl_libdir(&self, target: TargetSelection) -> Option<PathBuf> {
-- let t = self.config.target_config.get(&target)?;
-- if let libdir @ Some(_) = &t.musl_libdir {
-- return libdir.clone();
-- }
-- self.musl_root(target).map(|root| root.join("lib"))
-- }
--
- /// Returns the sysroot for the wasi target, if defined
- fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
- self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
-diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index d7db2cef24f..a791177956d 100644
---- a/src/bootstrap/sanity.rs
-+++ b/src/bootstrap/sanity.rs
+ target.runner = cfg.runner;
+diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs
+index e03b1e179084e..e61335d9b46c1 100644
+--- a/src/bootstrap/src/core/sanity.rs
++++ b/src/bootstrap/src/core/sanity.rs
@@ -11,7 +11,6 @@
use std::collections::HashMap;
use std::env;
@@ -416,12 +345,12 @@ index d7db2cef24f..a791177956d 100644
use std::path::PathBuf;
use std::process::Command;
-@@ -178,28 +177,6 @@ pub fn check(build: &mut Build) {
- }
+@@ -323,28 +322,6 @@ than building it.
+ continue;
}
-- // Make sure musl-root is valid
-- if target.contains("musl") {
+- // Make sure musl-root is valid.
+- if target.contains("musl") && !target.contains("unikraft") {
- // If this is a native target (host is also musl) and no musl-root is given,
- // fall back to the system toolchain in /usr before giving up
- if build.musl_root(*target).is_none() && build.config.build == *target {
@@ -442,15 +371,101 @@ index d7db2cef24f..a791177956d 100644
- }
- }
-
- if need_cmake && target.contains("msvc") {
+ if need_cmake && target.is_msvc() {
// There are three builds of cmake on windows: MSVC, MinGW, and
// Cygwin. The Cygwin build does not have generators for Visual
+diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
+index 30d775f774ce7..23145199b4bbb 100644
+--- a/src/bootstrap/src/lib.rs
++++ b/src/bootstrap/src/lib.rs
+@@ -1365,25 +1365,6 @@ impl Build {
+ }
+ }
+
+- /// Returns the "musl root" for this `target`, if defined
+- fn musl_root(&self, target: TargetSelection) -> Option<&Path> {
+- self.config
+- .target_config
+- .get(&target)
+- .and_then(|t| t.musl_root.as_ref())
+- .or(self.config.musl_root.as_ref())
+- .map(|p| &**p)
+- }
+-
+- /// Returns the "musl libdir" for this `target`.
+- fn musl_libdir(&self, target: TargetSelection) -> Option<PathBuf> {
+- let t = self.config.target_config.get(&target)?;
+- if let libdir @ Some(_) = &t.musl_libdir {
+- return libdir.clone();
+- }
+- self.musl_root(target).map(|root| root.join("lib"))
+- }
+-
+ /// Returns the `lib` directory for the WASI target specified, if
+ /// configured.
+ ///
+diff --git a/src/bootstrap/src/utils/cc_detect.rs b/src/bootstrap/src/utils/cc_detect.rs
+index 3ba4e0cb686e6..33dba449dee2a 100644
+--- a/src/bootstrap/src/utils/cc_detect.rs
++++ b/src/bootstrap/src/utils/cc_detect.rs
+@@ -41,7 +41,7 @@ fn cc2ar(cc: &Path, target: TargetSelection) -> Option<PathBuf> {
+ Some(PathBuf::from(ar))
+ } else if target.is_msvc() {
+ None
+- } else if target.contains("musl") || target.contains("openbsd") {
++ } else if target.contains("openbsd") {
+ Some(PathBuf::from("ar"))
+ } else if target.contains("vxworks") {
+ Some(PathBuf::from("wr-ar"))
+@@ -197,30 +197,6 @@ fn default_compiler(
+ }
+ }
+
+- "mips-unknown-linux-musl" if compiler == Language::C => {
+- if cfg.get_compiler().path().to_str() == Some("gcc") {
+- Some(PathBuf::from("mips-linux-musl-gcc"))
+- } else {
+- None
+- }
+- }
+- "mipsel-unknown-linux-musl" if compiler == Language::C => {
+- if cfg.get_compiler().path().to_str() == Some("gcc") {
+- Some(PathBuf::from("mipsel-linux-musl-gcc"))
+- } else {
+- None
+- }
+- }
+-
+- t if t.contains("musl") && compiler == Language::C => {
+- if let Some(root) = build.musl_root(target) {
+- let guess = root.join("bin/musl-gcc");
+- if guess.exists() { Some(guess) } else { None }
+- } else {
+- None
+- }
+- }
+-
+ t if t.contains("-wasi") => {
+ let root = PathBuf::from(std::env::var_os("WASI_SDK_PATH")?);
+ let compiler = match compiler {
+diff --git a/src/ci/docker/host-x86_64/dist-arm-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-arm-linux/Dockerfile
+index 420c42bc9d807..83ff773c08e1a 100644
+--- a/src/ci/docker/host-x86_64/dist-arm-linux/Dockerfile
++++ b/src/ci/docker/host-x86_64/dist-arm-linux/Dockerfile
+@@ -36,7 +36,6 @@ ENV HOSTS=arm-unknown-linux-gnueabi,aarch64-unknown-linux-musl
+ ENV RUST_CONFIGURE_ARGS \
+ --enable-full-tools \
+ --disable-docs \
+- --musl-root-aarch64=/usr/local/aarch64-linux-musl \
+ --enable-sanitizers \
+ --enable-profiler \
+ --set target.aarch64-unknown-linux-musl.crt-static=false
diff --git a/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile b/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile
-index c98fc7dcfff..c2f1494f7e2 100644
+index a62f98b21d225..f949736e866c4 100644
--- a/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile
+++ b/src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile
-@@ -34,8 +34,6 @@ COPY scripts/cmake.sh /scripts/
- RUN /scripts/cmake.sh
+@@ -58,8 +58,6 @@ COPY scripts/sccache.sh /scripts/
+ RUN sh /scripts/sccache.sh
ENV RUST_CONFIGURE_ARGS \
- --musl-root-i586=/musl-i586 \
@@ -459,42 +474,37 @@ index c98fc7dcfff..c2f1494f7e2 100644
# Newer binutils broke things on some vms/distros (i.e., linking against
diff --git a/src/ci/docker/host-x86_64/dist-various-1/Dockerfile b/src/ci/docker/host-x86_64/dist-various-1/Dockerfile
-index cd0f01faa1b..6951c9ea9b1 100644
+index 09fbbac466c72..1ab841763db19 100644
--- a/src/ci/docker/host-x86_64/dist-various-1/Dockerfile
+++ b/src/ci/docker/host-x86_64/dist-various-1/Dockerfile
-@@ -172,14 +172,6 @@ ENV CFLAGS_armv5te_unknown_linux_musleabi="-march=armv5te -marm -mfloat-abi=soft
- CC_riscv64gc_unknown_none_elf=false
+@@ -154,10 +154,6 @@ ENV CFLAGS_armv5te_unknown_linux_musleabi="-march=armv5te -marm -mfloat-abi=soft
+ CC_x86_64_pc_windows_gnullvm=x86_64-w64-mingw32-clang
ENV RUST_CONFIGURE_ARGS \
- --musl-root-armv5te=/musl-armv5te \
- --musl-root-arm=/musl-arm \
- --musl-root-armhf=/musl-armhf \
- --musl-root-armv7hf=/musl-armv7hf \
-- --musl-root-mips=/musl-mips \
-- --musl-root-mipsel=/musl-mipsel \
-- --musl-root-mips64=/musl-mips64 \
-- --musl-root-mips64el=/musl-mips64el \
--disable-docs
ENV SCRIPT \
diff --git a/src/ci/docker/host-x86_64/dist-various-2/Dockerfile b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile
-index e363c4f79f9..7aaf101e4b5 100644
+index 9b15bb3530b61..d15d69e4fee47 100644
--- a/src/ci/docker/host-x86_64/dist-various-2/Dockerfile
+++ b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile
-@@ -119,7 +119,6 @@ ENV TARGETS=$TARGETS,i686-unknown-freebsd
- RUN ln -s /usr/include/asm-generic /usr/local/include/asm
+@@ -134,6 +134,5 @@ RUN ln -s /usr/include/x86_64-linux-gnu/asm /usr/local/include/asm
+ RUN ln -s /usr/include/x86_64-linux-gnu/asm /usr/local/include/asm
- ENV RUST_CONFIGURE_ARGS --enable-extended --enable-lld --disable-docs \
-- --set target.wasm32-wasi.wasi-root=/wasm32-wasi \
+-ENV RUST_CONFIGURE_ARGS --enable-extended --enable-lld --enable-llvm-bitcode-linker --disable-docs \
++ENV RUST_CONFIGURE_ARGS --enable-extended --enable-lld --enable-llvm-bitcode-linker --disable-docs
- --musl-root-armv7=/musl-armv7
-+ --set target.wasm32-wasi.wasi-root=/wasm32-wasi
ENV SCRIPT python3 ../x.py dist --host='' --target $TARGETS
diff --git a/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile
-index 51645a81853..b9edb339cc0 100644
+index c9a6a2dd069e2..30eda009dee30 100644
--- a/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile
+++ b/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile
-@@ -37,7 +37,6 @@ RUN sh /scripts/sccache.sh
+@@ -35,7 +35,6 @@ RUN sh /scripts/sccache.sh
ENV HOSTS=x86_64-unknown-linux-musl
ENV RUST_CONFIGURE_ARGS \
@@ -503,17 +513,14 @@ index 51645a81853..b9edb339cc0 100644
--enable-sanitizers \
--enable-profiler \
diff --git a/src/ci/docker/host-x86_64/test-various/Dockerfile b/src/ci/docker/host-x86_64/test-various/Dockerfile
-index 4d554a2852a..919e267724c 100644
+index 944d9aed3190b..b0ffa7c0e316e 100644
--- a/src/ci/docker/host-x86_64/test-various/Dockerfile
+++ b/src/ci/docker/host-x86_64/test-various/Dockerfile
-@@ -31,7 +31,6 @@ COPY scripts/sccache.sh /scripts/
- RUN sh /scripts/sccache.sh
+@@ -45,7 +45,6 @@ COPY host-x86_64/dist-various-2/build-wasi-toolchain.sh /tmp/
+ ENV WASI_SDK_PATH=/wasi-sdk-22.0
ENV RUST_CONFIGURE_ARGS \
- --musl-root-x86_64=/usr/local/x86_64-linux-musl \
- --set build.nodejs=/node-v15.14.0-linux-x64/bin/node \
--set rust.lld
---
-2.35.1
-
+ # Some run-make tests have assertions about code size, and enabling debug
diff --git a/user/rust/0004-Use-static-native-libraries-when-linking-static-exec.patch b/user/rust/0004-Use-static-native-libraries-when-linking-static-exec.patch
deleted file mode 100644
index 0682ec78d..000000000
--- a/user/rust/0004-Use-static-native-libraries-when-linking-static-exec.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 53c4a9c8ab26e10d1790b5a85fa26058f4252e2d Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Fri, 8 Sep 2017 00:05:18 -0500
-Subject: [PATCH 04/14] Use static native libraries when linking static
- executables
-
-On ELF targets like Linux, gcc/ld will create a dynamically-linked
-executable without warning, even when passed `-static`, when asked to
-link to a `.so`. Avoid this confusing and unintended behavior by always
-using the static version of libraries when trying to link static
-executables.
----
- compiler/rustc_codegen_ssa/src/back/link.rs | 20 ++++++++++++++++----
- 1 file changed, 16 insertions(+), 4 deletions(-)
-
-diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
-index 58e0667d678..93d8a6e8680 100644
---- a/compiler/rustc_codegen_ssa/src/back/link.rs
-+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
-@@ -1833,7 +1833,7 @@ fn linker_with_args<'a, B: ArchiveBuilder<'a>>(
- // external build system already has the native dependencies defined, and it
- // will provide them to the linker itself.
- if sess.opts.debugging_opts.link_native_libraries {
-- add_upstream_native_libraries(cmd, sess, codegen_results);
-+ add_upstream_native_libraries(cmd, sess, codegen_results, crate_type);
- }
-
- // Library linking above uses some global state for things like `-Bstatic`/`-Bdynamic` to make
-@@ -2359,8 +2359,7 @@ fn add_dynamic_crate(cmd: &mut dyn Linker, sess: &Session, cratepath: &Path) {
- }
- }
-
--/// Link in all of our upstream crates' native dependencies. Remember that all of these upstream
--/// native dependencies are all non-static dependencies. We've got two cases then:
-+/// Link in all of our upstream crates' native dependencies. We have two cases:
- ///
- /// 1. The upstream crate is an rlib. In this case we *must* link in the native dependency because
- /// the rlib is just an archive.
-@@ -2378,6 +2377,7 @@ fn add_upstream_native_libraries(
- cmd: &mut dyn Linker,
- sess: &Session,
- codegen_results: &CodegenResults,
-+ crate_type: CrateType,
- ) {
- let mut last = (NativeLibKind::Unspecified, None);
- for &cnum in &codegen_results.crate_info.used_crates {
-@@ -2398,7 +2398,19 @@ fn add_upstream_native_libraries(
- NativeLibKind::Dylib { as_needed } => {
- cmd.link_dylib(name, verbatim, as_needed.unwrap_or(true))
- }
-- NativeLibKind::Unspecified => cmd.link_dylib(name, verbatim, true),
-+ NativeLibKind::Unspecified => {
-+ // On some targets, like Linux, linking a static executable inhibits using
-+ // dylibs at all. Force native libraries to be static, even if for example
-+ // an upstream rlib was originally linked against a native shared library.
-+ if crate_type == config::CrateType::Executable
-+ && sess.crt_static(Some(crate_type))
-+ && !sess.target.options.crt_static_allows_dylibs
-+ {
-+ cmd.link_staticlib(name, verbatim)
-+ } else {
-+ cmd.link_dylib(name, verbatim, true)
-+ }
-+ },
- NativeLibKind::Framework { as_needed } => {
- cmd.link_framework(name, as_needed.unwrap_or(true))
- }
---
-2.35.1
-
diff --git a/user/rust/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch b/user/rust/0005-Prefer-libgcc_eh-over-libunwind-for-musl.patch
index 27b3cd547..cbb22cd45 100644
--- a/user/rust/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
+++ b/user/rust/0005-Prefer-libgcc_eh-over-libunwind-for-musl.patch
@@ -1,7 +1,7 @@
From 78ae73f09d07c847ede1dc683b8907f5bd5bd17f Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sat, 9 Sep 2017 00:14:16 -0500
-Subject: [PATCH 06/14] Prefer libgcc_eh over libunwind for musl
+Subject: [PATCH 05/12] Prefer libgcc_eh over libunwind for musl
---
library/unwind/src/lib.rs | 2 +-
@@ -11,7 +11,7 @@ diff --git a/library/unwind/src/lib.rs b/library/unwind/src/lib.rs
index 079626f0fea..590fca0acfa 100644
--- a/library/unwind/src/lib.rs
+++ b/library/unwind/src/lib.rs
-@@ -51,7 +51,7 @@
+@@ -63,7 +63,7 @@
#[link(name = "unwind", cfg(not(target_feature = "crt-static")))]
extern "C" {}
} else {
diff --git a/user/rust/0006-Link-libssp_nonshared.a-on-all-musl-targets.patch b/user/rust/0006-Link-libssp_nonshared.a-on-all-musl-targets.patch
new file mode 100644
index 000000000..d34bb560d
--- /dev/null
+++ b/user/rust/0006-Link-libssp_nonshared.a-on-all-musl-targets.patch
@@ -0,0 +1,28 @@
+From f516ef748075ddfbcbaec493e1a7ee1e59538bd0 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 3 Nov 2019 17:01:32 -0600
+Subject: [PATCH 06/12] Link libssp_nonshared.a on all musl targets
+
+---
+ compiler/rustc_target/src/spec/base/linux_musl.rs | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/compiler/rustc_target/src/spec/base/linux_musl.rs b/compiler/rustc_target/src/spec/base/linux_musl.rs
+index 36d64059d59ad..c113af2464423 100644
+--- a/compiler/rustc_target/src/spec/base/linux_musl.rs
++++ b/compiler/rustc_target/src/spec/base/linux_musl.rs
+@@ -1,10 +1,13 @@
+-use crate::spec::{base, TargetOptions};
++use crate::spec::{add_link_args, base, Cc, LinkerFlavor, Lld, TargetOptions};
+
+ pub fn opts() -> TargetOptions {
+ let mut base = base::linux::opts();
+
+ base.env = "musl".into();
+
++ // libssp_nonshared.a is needed for __stack_chk_fail_local when using libc.so
++ add_link_args(&mut base.post_link_args, LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-lssp_nonshared"]);
++
+ // These targets statically link libc by default
+ base.crt_static_default = true;
+
diff --git a/user/rust/0007-Link-libssp_nonshared.a-on-all-musl-targets.patch b/user/rust/0007-Link-libssp_nonshared.a-on-all-musl-targets.patch
deleted file mode 100644
index 7838e5a05..000000000
--- a/user/rust/0007-Link-libssp_nonshared.a-on-all-musl-targets.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 976ff1e1bbdbb9c0c0a32a6a27238b51e6467f8f Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 3 Nov 2019 17:01:32 -0600
-Subject: [PATCH 07/14] Link libssp_nonshared.a on all musl targets
-
----
- compiler/rustc_target/src/spec/linux_musl_base.rs | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs
-index 9931578ba86..a1cece5733c 100644
---- a/compiler/rustc_target/src/spec/linux_musl_base.rs
-+++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
-@@ -1,10 +1,13 @@
--use crate::spec::TargetOptions;
-+use crate::spec::{LinkerFlavor, TargetOptions};
-
- pub fn opts() -> TargetOptions {
- let mut base = super::linux_base::opts();
-
- base.env = "musl".to_string();
-
-+ // libssp_nonshared.a is needed for __stack_chk_fail_local when using libc.so
-+ base.post_link_args.insert(LinkerFlavor::Gcc, vec!["-lssp_nonshared".to_string()]);
-+
- // These targets statically link libc by default
- base.crt_static_default = true;
-
---
-2.35.1
-
diff --git a/user/rust/0007-test-failed-doctest-output-Fix-normalization.patch b/user/rust/0007-test-failed-doctest-output-Fix-normalization.patch
new file mode 100644
index 000000000..373e1751a
--- /dev/null
+++ b/user/rust/0007-test-failed-doctest-output-Fix-normalization.patch
@@ -0,0 +1,33 @@
+From 5ecc3bac493f2df5b76f42cff6ea602d1624d323 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Mon, 7 Oct 2019 18:36:28 -0500
+Subject: [PATCH 07/12] test/failed-doctest-output: Fix normalization
+
+Otherwise we get:
+
+1
+2 running 2 tests
+- test $DIR/failed-doctest-output.rs - OtherStruct (line 20) ... FAILED
+- test $DIR/failed-doctest-output.rs - SomeStruct (line 10) ... FAILED
++ test src/rustc-1.38.0-src/$DIR/failed-doctest-output.rs - OtherStruct (line 20) ... FAILED
++ test src/rustc-1.38.0-src/$DIR/failed-doctest-output.rs - SomeStruct (line 10) ... FAILED
+5
+6 failures:
+7
+---
+ tests/rustdoc-ui/doctest/failed-doctest-output.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/rustdoc-ui/doctest/failed-doctest-output.rs b/tests/rustdoc-ui/doctest/failed-doctest-output.rs
+index d4d49b73793e6..9c44f7ce23281 100644
+--- a/tests/rustdoc-ui/doctest/failed-doctest-output.rs
++++ b/tests/rustdoc-ui/doctest/failed-doctest-output.rs
+@@ -7,7 +7,7 @@
+
+ //@ compile-flags:--test --test-args --test-threads=1
+ //@ rustc-env:RUST_BACKTRACE=0
+-//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
++//@ normalize-stdout-test: "[[:graph:]]*tests/rustdoc-ui/doctest" -> "$$DIR"
+ //@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
+ //@ failure-status: 101
+
diff --git a/user/rust/0008-test-failed-doctest-output-Fix-normalization.patch b/user/rust/0008-test-failed-doctest-output-Fix-normalization.patch
deleted file mode 100644
index f8c537afe..000000000
--- a/user/rust/0008-test-failed-doctest-output-Fix-normalization.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 26ba9c852ad73dcc0401b74534b34bf33d5b6444 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 7 Oct 2019 18:36:28 -0500
-Subject: [PATCH 08/14] test/failed-doctest-output: Fix normalization
-
-Otherwise we get:
-
-1
-2 running 2 tests
-- test $DIR/failed-doctest-output.rs - OtherStruct (line 20) ... FAILED
-- test $DIR/failed-doctest-output.rs - SomeStruct (line 10) ... FAILED
-+ test src/rustc-1.38.0-src/$DIR/failed-doctest-output.rs - OtherStruct (line 20) ... FAILED
-+ test src/rustc-1.38.0-src/$DIR/failed-doctest-output.rs - SomeStruct (line 10) ... FAILED
-5
-6 failures:
-7
----
- src/test/rustdoc-ui/failed-doctest-output.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/test/rustdoc-ui/failed-doctest-output.rs b/src/test/rustdoc-ui/failed-doctest-output.rs
-index 92473b49e14..ed29b446aba 100644
---- a/src/test/rustdoc-ui/failed-doctest-output.rs
-+++ b/src/test/rustdoc-ui/failed-doctest-output.rs
-@@ -4,7 +4,7 @@
-
- // compile-flags:--test --test-args --test-threads=1
- // rustc-env:RUST_BACKTRACE=0
--// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
-+// normalize-stdout-test: "[[:graph:]]*src/test/rustdoc-ui" -> "$$DIR"
- // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
- // failure-status: 101
-
---
-2.35.1
-
diff --git a/user/rust/0008-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch b/user/rust/0008-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
new file mode 100644
index 000000000..43f0f37f2
--- /dev/null
+++ b/user/rust/0008-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
@@ -0,0 +1,22 @@
+From cf671a6f53fe74b02aa48c0206d48506d6cdd7cd Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Mon, 17 Sep 2018 01:32:20 +0000
+Subject: [PATCH 08/12] test/sysroot-crates-are-unstable: Fix test when rpath is
+ disabled
+
+Without this environment var, the test can't run rustc to find
+the sysroot path.
+---
+ tests/run-make/sysroot-crates-are-unstable/Makefile | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/tests/run-make/sysroot-crates-are-unstable/Makefile b/tests/run-make/sysroot-crates-are-unstable/Makefile
+index 1e267fb9576ba..30c33c5c13d20 100644
+--- a/tests/run-make/sysroot-crates-are-unstable/Makefile
++++ b/tests/run-make/sysroot-crates-are-unstable/Makefile
+@@ -1,2 +1,4 @@
++-include ../tools.mk
++
+ all:
+- '$(PYTHON)' test.py
++ env '$(HOST_RPATH_ENV)' '$(PYTHON)' test.py
diff --git a/user/rust/0009-Ignore-broken-and-non-applicable-tests.patch b/user/rust/0009-Ignore-broken-and-non-applicable-tests.patch
new file mode 100644
index 000000000..b8b1b8932
--- /dev/null
+++ b/user/rust/0009-Ignore-broken-and-non-applicable-tests.patch
@@ -0,0 +1,47 @@
+From cc6d3d3ab26517d5f8f09536b016154944bdceff Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 16 Sep 2018 16:38:48 +0000
+Subject: [PATCH 09/12] Ignore broken and non-applicable tests
+
+env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
+long-linker-command-lines: takes >10 minutes to run (but still passes)
+sysroot-crates-are-unstable: can't run rustc without RPATH
+---
+ tests/run-make/long-linker-command-lines/Makefile | 2 ++
+ tests/run-make/sysroot-crates-are-unstable/Makefile | 2 ++
+ tests/ui/process/env-funky-keys.rs | 1 +
+ 3 files changed, 7 insertions(+)
+
+diff --git a/tests/run-make/long-linker-command-lines/Makefile b/tests/run-make/long-linker-command-lines/Makefile
+index f864ea74f4a95..f16eaf544cc3f 100644
+--- a/tests/run-make/long-linker-command-lines/Makefile
++++ b/tests/run-make/long-linker-command-lines/Makefile
+@@ -1,4 +1,6 @@
+ # ignore-cross-compile
++# ignore-test
++
+ include ../tools.mk
+
+ export LD_LIBRARY_PATH := $(HOST_RPATH_DIR)
+diff --git a/tests/run-make/sysroot-crates-are-unstable/Makefile b/tests/run-make/sysroot-crates-are-unstable/Makefile
+index 30c33c5c13d20..d733bb1c557f5 100644
+--- a/tests/run-make/sysroot-crates-are-unstable/Makefile
++++ b/tests/run-make/sysroot-crates-are-unstable/Makefile
+@@ -1,3 +1,5 @@
++# ignore-test
++
+ -include ../tools.mk
+
+ all:
+diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs
+index 314ccaea01525..7f5b9efaa10b1 100644
+--- a/tests/ui/process/env-funky-keys.rs
++++ b/tests/ui/process/env-funky-keys.rs
+@@ -1,6 +1,7 @@
+ //@ run-pass
+ // Ignore this test on Android, because it segfaults there.
+
++//@ ignore-test
+ //@ ignore-android
+ //@ ignore-windows
+ //@ ignore-wasm32 no execve
diff --git a/user/rust/0009-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch b/user/rust/0009-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
deleted file mode 100644
index dfefc36ec..000000000
--- a/user/rust/0009-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 765788107fca34a8fcedf03a8902932255ad01cb Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 17 Sep 2018 01:32:20 +0000
-Subject: [PATCH 09/14] test/sysroot-crates-are-unstable: Fix test when rpath
- is disabled
-
-Without this environment var, the test can't run rustc to find
-the sysroot path.
----
- .../run-make-fulldeps/sysroot-crates-are-unstable/Makefile | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
-index 1e267fb9576..30c33c5c13d 100644
---- a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
-+++ b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
-@@ -1,2 +1,4 @@
-+-include ../tools.mk
-+
- all:
-- '$(PYTHON)' test.py
-+ env '$(HOST_RPATH_ENV)' '$(PYTHON)' test.py
---
-2.35.1
-
diff --git a/user/rust/0012-Link-stage-2-tools-dynamically-to-libstd.patch b/user/rust/0010-Link-stage-2-tools-dynamically-to-libstd.patch
index 6f1c99212..4a83e137f 100644
--- a/user/rust/0012-Link-stage-2-tools-dynamically-to-libstd.patch
+++ b/user/rust/0010-Link-stage-2-tools-dynamically-to-libstd.patch
@@ -1,17 +1,17 @@
-From 74767e8d9cad131d8fb67054df8110065649e6dd Mon Sep 17 00:00:00 2001
+From 4443dc788cea90bdb1f9e5f3d9b702a3be46d4ed Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Mon, 24 Sep 2018 23:42:23 +0000
-Subject: [PATCH 12/14] Link stage 2 tools dynamically to libstd
+Subject: [PATCH 10/12] Link stage 2 tools dynamically to libstd
---
- src/bootstrap/builder.rs | 2 +-
+ src/bootstrap/src/core/builder.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index 0d387ff1e37..f3ecd9067d3 100644
---- a/src/bootstrap/builder.rs
-+++ b/src/bootstrap/builder.rs
-@@ -1639,7 +1639,7 @@ pub fn cargo(
+diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs
+index cd276674dee6b..a16297b4fe6cc 100644
+--- a/src/bootstrap/src/core/builder.rs
++++ b/src/bootstrap/src/core/builder.rs
+@@ -2096,7 +2096,7 @@ impl<'a> Builder<'a> {
// When we build Rust dylibs they're all intended for intermediate
// usage, so make sure we pass the -Cprefer-dynamic flag instead of
// linking all deps statically into the dylib.
@@ -20,6 +20,3 @@ index 0d387ff1e37..f3ecd9067d3 100644
rustflags.arg("-Cprefer-dynamic");
}
---
-2.35.1
-
diff --git a/user/rust/0010-test-use-extern-for-plugins-Don-t-assume-multilib.patch b/user/rust/0010-test-use-extern-for-plugins-Don-t-assume-multilib.patch
deleted file mode 100644
index e55c1bffc..000000000
--- a/user/rust/0010-test-use-extern-for-plugins-Don-t-assume-multilib.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 5f08947cef0556245748e5a3d0b9d1da926939ff Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sat, 6 Oct 2018 04:01:48 +0000
-Subject: [PATCH 10/14] test/use-extern-for-plugins: Don't assume multilib
-
----
- src/test/run-make-fulldeps/use-extern-for-plugins/Makefile | 7 +------
- 1 file changed, 1 insertion(+), 6 deletions(-)
-
-diff --git a/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile b/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile
-index 838b1a2719b..94fa9f6d067 100644
---- a/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile
-+++ b/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile
-@@ -4,12 +4,7 @@
- # ignore-openbsd
- # ignore-sunos
-
--HOST := $(shell $(RUSTC) -vV | grep 'host:' | sed 's/host: //')
--ifeq ($(findstring i686,$(HOST)),i686)
--TARGET := $(subst i686,x86_64,$(HOST))
--else
--TARGET := $(subst x86_64,i686,$(HOST))
--endif
-+TARGET := $(shell $(RUSTC) -vV | grep 'host:' | sed 's/host: //')
-
- all:
- $(RUSTC) foo.rs -C extra-filename=-host
---
-2.35.1
-
diff --git a/user/rust/0011-Ignore-broken-and-non-applicable-tests.patch b/user/rust/0011-Ignore-broken-and-non-applicable-tests.patch
deleted file mode 100644
index b01d5f490..000000000
--- a/user/rust/0011-Ignore-broken-and-non-applicable-tests.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From b7ab3ecb6233472afdbb5247b4c48cc8f45ad8ac Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 16 Sep 2018 16:38:48 +0000
-Subject: [PATCH 11/14] Ignore broken and non-applicable tests
-
-c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
-env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
-long-linker-command-lines: takes >10 minutes to run (but still passes)
-sysroot-crates-are-unstable: can't run rustc without RPATH
----
- src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile | 2 ++
- src/test/run-make-fulldeps/long-linker-command-lines/Makefile | 2 ++
- src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile | 2 ++
- src/test/ui/env-funky-keys.rs | 1 +
- 4 files changed, 7 insertions(+)
-
-diff --git a/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile b/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
-index f124ca2ab61..363b18f0985 100644
---- a/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
-+++ b/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
-@@ -1,3 +1,5 @@
-+# ignore-aarch64
-+
- -include ../tools.mk
-
- all:
-diff --git a/src/test/run-make-fulldeps/long-linker-command-lines/Makefile b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile
-index 5876fbc94bc..5f167ece1a2 100644
---- a/src/test/run-make-fulldeps/long-linker-command-lines/Makefile
-+++ b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile
-@@ -1,3 +1,5 @@
-+# ignore-test
-+
- -include ../tools.mk
-
- all:
-diff --git a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
-index 30c33c5c13d..d733bb1c557 100644
---- a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
-+++ b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
-@@ -1,3 +1,5 @@
-+# ignore-test
-+
- -include ../tools.mk
-
- all:
-diff --git a/src/test/ui/env-funky-keys.rs b/src/test/ui/env-funky-keys.rs
-index 4548d333947..00dd85244d8 100644
---- a/src/test/ui/env-funky-keys.rs
-+++ b/src/test/ui/env-funky-keys.rs
-@@ -1,6 +1,7 @@
- // run-pass
- // Ignore this test on Android, because it segfaults there.
-
-+// ignore-test
- // ignore-android
- // ignore-windows
- // ignore-emscripten no execve
---
-2.35.1
-
diff --git a/user/rust/0013-Move-debugger-scripts-to-usr-share-rust.patch b/user/rust/0011-Move-debugger-scripts-to-usr-share-rust.patch
index 912a99395..604e223e8 100644
--- a/user/rust/0013-Move-debugger-scripts-to-usr-share-rust.patch
+++ b/user/rust/0011-Move-debugger-scripts-to-usr-share-rust.patch
@@ -1,7 +1,7 @@
-From 137de7f431c116721de728a121f0c38aa24f58b6 Mon Sep 17 00:00:00 2001
+From 762d3cd3f87b7fdbb885e1bcd4d1314437dd9377 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Mon, 17 Sep 2018 02:09:10 +0000
-Subject: [PATCH 13/14] Move debugger scripts to /usr/share/rust
+Subject: [PATCH 11/12] Move debugger scripts to /usr/share/rust
---
src/bootstrap/dist.rs | 2 +-
@@ -11,10 +11,10 @@ Subject: [PATCH 13/14] Move debugger scripts to /usr/share/rust
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index f5ae8103cb0..28c9f3c05bc 100644
---- a/src/bootstrap/dist.rs
-+++ b/src/bootstrap/dist.rs
-@@ -474,7 +474,7 @@ fn make_run(run: RunConfig<'_>) {
+index 76aad16c1fc26..db53459e8cae4 100644
+--- a/src/bootstrap/src/core/build_steps/dist.rs
++++ b/src/bootstrap/src/core/build_steps/dist.rs
+@@ -521,7 +521,7 @@ impl Step for DebuggerScripts {
fn run(self, builder: &Builder<'_>) {
let host = self.host;
let sysroot = self.sysroot;
@@ -24,7 +24,7 @@ index f5ae8103cb0..28c9f3c05bc 100644
let cp_debugger_script = |file: &str| {
builder.install(&builder.src.join("src/etc/").join(file), &dst, 0o644);
diff --git a/src/etc/rust-gdb b/src/etc/rust-gdb
-index b950cea79ed..559bfe3f1f9 100755
+index 9abed30ea6f73..4c7f953edfa46 100755
--- a/src/etc/rust-gdb
+++ b/src/etc/rust-gdb
@@ -12,7 +12,7 @@ fi
@@ -33,11 +33,11 @@ index b950cea79ed..559bfe3f1f9 100755
RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
-GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
+GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/share/rust"
+ # Get the commit hash for path remapping
+ RUSTC_COMMIT_HASH="$("$RUSTC" -vV | sed -n 's/commit-hash: \([a-zA-Z0-9_]*\)/\1/p')"
- # Run GDB with the additional arguments that load the pretty printers
- # Set the environment variable `RUST_GDB` to overwrite the call to a
diff --git a/src/etc/rust-gdbgui b/src/etc/rust-gdbgui
-index 9744913b686..8722acdcc52 100755
+index 913269316bd4c..f444fbc4b104e 100755
--- a/src/etc/rust-gdbgui
+++ b/src/etc/rust-gdbgui
@@ -41,7 +41,7 @@ fi
@@ -46,11 +46,11 @@ index 9744913b686..8722acdcc52 100755
RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
-GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
+GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/share/rust"
+ # Get the commit hash for path remapping
+ RUSTC_COMMIT_HASH="$("$RUSTC" -vV | sed -n 's/commit-hash: \([a-zA-Z0-9_]*\)/\1/p')"
- # Set the environment variable `RUST_GDB` to overwrite the call to a
- # different/specific command (defaults to `gdb`).
diff --git a/src/etc/rust-lldb b/src/etc/rust-lldb
-index bce72f1bad6..8abb0124527 100755
+index bce72f1bad698..8abb012452787 100755
--- a/src/etc/rust-lldb
+++ b/src/etc/rust-lldb
@@ -30,8 +30,8 @@ EOF
@@ -64,6 +64,3 @@ index bce72f1bad6..8abb0124527 100755
# Call LLDB with the commands added to the argument list
exec "$lldb" --one-line-before-file "$script_import" --source-before-file "$commands_file" "$@"
---
-2.35.1
-
diff --git a/user/rust/0012-Add-foxkit-target-specs.patch b/user/rust/0012-Add-foxkit-target-specs.patch
new file mode 100644
index 000000000..06ba6a488
--- /dev/null
+++ b/user/rust/0012-Add-foxkit-target-specs.patch
@@ -0,0 +1,206 @@
+From 7e50215a21b198c73fe575d28c847fd645c4ee40 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Mon, 17 Sep 2018 02:29:06 +0000
+Subject: [PATCH 12/12] Add foxkit target specs
+
+---
+ .../src/spec/targets/aarch64_foxkit_linux_musl.rs | 11 +++++++++++
+ .../src/spec/targets/armv7_foxkit_linux_musleabihf.rs | 11 +++++++++++
+ .../rustc_target/src/spec/targets/i586_foxkit_linux_musl.rs | 11 +++++++++++
+ compiler/rustc_target/src/spec/mod.rs | 7 +++++++
+ .../src/spec/targets/powerpc64_foxkit_linux_musl.rs | 11 +++++++++++
+ .../src/spec/targets/powerpc_foxkit_linux_musl.rs | 11 +++++++++++
+ .../rustc_target/src/spec/targets/x86_64_foxkit_linux_musl.rs | 11 +++++++++++
+ 7 files changed, 73 insertions(+)
+ create mode 100644 compiler/rustc_target/src/spec/targets/aarch64_foxkit_linux_musl.rs
+ create mode 100644 compiler/rustc_target/src/spec/targets/armv7_foxkit_linux_musleabihf.rs
+ create mode 100644 compiler/rustc_target/src/spec/targets/i586_foxkit_linux_musl.rs
+ create mode 100644 compiler/rustc_target/src/spec/targets/powerpc64_foxkit_linux_musl.rs
+ create mode 100644 compiler/rustc_target/src/spec/targets/powerpc_foxkit_linux_musl.rs
+ create mode 100644 compiler/rustc_target/src/spec/targets/x86_64_foxkit_linux_musl.rs
+
+diff --git a/compiler/rustc_target/src/spec/targets/aarch64_foxkit_linux_musl.rs b/compiler/rustc_target/src/spec/targets/aarch64_foxkit_linux_musl.rs
+new file mode 100644
+index 00000000000..4bdd51af4fe
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/targets/aarch64_foxkit_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::aarch64_unknown_linux_musl::target();
++
++ base.llvm_target = "aarch64-foxkit-linux-musl".into();
++ base.vendor = "foxkit".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+diff --git a/compiler/rustc_target/src/spec/targets/armv7_foxkit_linux_musleabihf.rs b/compiler/rustc_target/src/spec/targets/armv7_foxkit_linux_musleabihf.rs
+new file mode 100644
+index 00000000000..994f3c39e7c
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/targets/armv7_foxkit_linux_musleabihf.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::armv7_unknown_linux_musleabihf::target();
++
++ base.llvm_target = "armv7-foxkit-linux-musleabihf".into();
++ base.vendor = "foxkit".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+diff --git a/compiler/rustc_target/src/spec/targets/i586_foxkit_linux_musl.rs b/compiler/rustc_target/src/spec/targets/i586_foxkit_linux_musl.rs
+new file mode 100644
+index 00000000000..028e4b5e930
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/targets/i586_foxkit_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::i586_unknown_linux_musl::target();
++
++ base.llvm_target = "i586-foxkit-linux-musl".into();
++ base.vendor = "foxkit".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
+index 92678aed5b1..66a408d0b36 100644
+--- a/compiler/rustc_target/src/spec/mod.rs
++++ b/compiler/rustc_target/src/spec/mod.rs
+@@ -1519,6 +1519,13 @@ fn $module() {
+ }
+
+ supported_targets! {
++ ("aarch64-foxkit-linux-musl", aarch64_foxkit_linux_musl),
++ ("armv7-foxkit-linux-musleabihf", armv7_foxkit_linux_musleabihf),
++ ("i586-foxkit-linux-musl", i586_foxkit_linux_musl),
++ ("powerpc-foxkit-linux-musl", powerpc_foxkit_linux_musl),
++ ("powerpc64-foxkit-linux-musl", powerpc64_foxkit_linux_musl),
++ ("x86_64-foxkit-linux-musl", x86_64_foxkit_linux_musl),
++
+ ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu),
+ ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32),
+ ("i686-unknown-linux-gnu", i686_unknown_linux_gnu),
+diff --git a/compiler/rustc_target/src/spec/targets/powerpc64_foxkit_linux_musl.rs b/compiler/rustc_target/src/spec/targets/powerpc64_foxkit_linux_musl.rs
+new file mode 100644
+index 00000000000..04a50f84b60
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/targets/powerpc64_foxkit_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::powerpc64_unknown_linux_musl::target();
++
++ base.llvm_target = "powerpc64-foxkit-linux-musl".into();
++ base.vendor = "foxkit".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+diff --git a/compiler/rustc_target/src/spec/targets/powerpc_foxkit_linux_musl.rs b/compiler/rustc_target/src/spec/targets/powerpc_foxkit_linux_musl.rs
+new file mode 100644
+index 00000000000..7bca52c4299
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/targets/powerpc_foxkit_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::powerpc_unknown_linux_musl::target();
++
++ base.llvm_target = "powerpc-foxkit-linux-musl".into();
++ base.vendor = "foxkit".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+diff --git a/compiler/rustc_target/src/spec/targets/x86_64_foxkit_linux_musl.rs b/compiler/rustc_target/src/spec/targets/x86_64_foxkit_linux_musl.rs
+new file mode 100644
+index 00000000000..1ff73687c00
+--- /dev/null
++++ b/compiler/rustc_target/src/spec/targets/x86_64_foxkit_linux_musl.rs
+@@ -0,0 +1,11 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::x86_64_unknown_linux_musl::target();
++
++ base.llvm_target = "x86_64-foxkit-linux-musl".into();
++ base.vendor = "foxkit".into();
++ base.options.crt_static_default = false;
++
++ base
++}
+--
+2.35.1
+
+--- rustc-1.80.0-src/tests/assembly/targets/targets-elf.rs.old 2006-07-23 20:21:28.000000000 -0500
++++ rustc-1.80.0-src/tests/assembly/targets/targets-elf.rs 2024-07-30 09:49:06.031041198 -0500
+@@ -9,6 +9,9 @@
+ //@ revisions: aarch64_be_unknown_netbsd
+ //@ [aarch64_be_unknown_netbsd] compile-flags: --target aarch64_be-unknown-netbsd
+ //@ [aarch64_be_unknown_netbsd] needs-llvm-components: aarch64
++//@ revisions: aarch64_foxkit_linux_musl
++//@ [aarch64_foxkit_linux_musl] compile-flags: --target aarch64-foxkit-linux-musl
++//@ [aarch64_foxkit_linux_musl] needs-llvm-components: aarch64
+ //@ revisions: aarch64_fuchsia
+ //@ [aarch64_fuchsia] compile-flags: --target aarch64-fuchsia
+ //@ [aarch64_fuchsia] needs-llvm-components: aarch64
+@@ -120,6 +123,9 @@
+ //@ revisions: armv6k_nintendo_3ds
+ //@ [armv6k_nintendo_3ds] compile-flags: --target armv6k-nintendo-3ds
+ //@ [armv6k_nintendo_3ds] needs-llvm-components: arm
++//@ revisions: armv7_foxkit_linux_musleabihf
++//@ [armv7_foxkit_linux_musleabihf] compile-flags: --target armv7-foxkit-linux-musleabihf
++//@ [armv7_foxkit_linux_musleabihf] needs-llvm-components: arm
+ //@ revisions: armv7_linux_androideabi
+ //@ [armv7_linux_androideabi] compile-flags: --target armv7-linux-androideabi
+ //@ [armv7_linux_androideabi] needs-llvm-components: arm
+@@ -192,6 +198,9 @@
+ //@ revisions: hexagon_unknown_none_elf
+ //@ [hexagon_unknown_none_elf] compile-flags: --target hexagon-unknown-none-elf
+ //@ [hexagon_unknown_none_elf] needs-llvm-components: hexagon
++//@ revisions: i586_foxkit_linux_musl
++//@ [i586_foxkit_linux_musl] compile-flags: --target i586-foxkit-linux-musl
++//@ [i586_foxkit_linux_musl] needs-llvm-components: x86
+ //@ revisions: i586_pc_nto_qnx700
+ //@ [i586_pc_nto_qnx700] compile-flags: --target i586-pc-nto-qnx700
+ //@ [i586_pc_nto_qnx700] needs-llvm-components: x86
+@@ -306,6 +315,9 @@
+ //@ revisions: msp430_none_elf
+ //@ [msp430_none_elf] compile-flags: --target msp430-none-elf
+ //@ [msp430_none_elf] needs-llvm-components: msp430
++//@ revisions: powerpc64_foxkit_linux_musl
++//@ [powerpc64_foxkit_linux_musl] compile-flags: --target powerpc64-foxkit-linux-musl
++//@ [powerpc64_foxkit_linux_musl] needs-llvm-components: powerpc
+ //@ revisions: powerpc64_unknown_freebsd
+ //@ [powerpc64_unknown_freebsd] compile-flags: --target powerpc64-unknown-freebsd
+ //@ [powerpc64_unknown_freebsd] needs-llvm-components: powerpc
+@@ -330,6 +342,9 @@
+ //@ revisions: powerpc64le_unknown_linux_musl
+ //@ [powerpc64le_unknown_linux_musl] compile-flags: --target powerpc64le-unknown-linux-musl
+ //@ [powerpc64le_unknown_linux_musl] needs-llvm-components: powerpc
++//@ revisions: powerpc_foxkit_linux_musl
++//@ [powerpc_foxkit_linux_musl] compile-flags: --target powerpc-foxkit-linux-musl
++//@ [powerpc_foxkit_linux_musl] needs-llvm-components: powerpc
+ //@ revisions: powerpc_unknown_freebsd
+ //@ [powerpc_unknown_freebsd] compile-flags: --target powerpc-unknown-freebsd
+ //@ [powerpc_unknown_freebsd] needs-llvm-components: powerpc
+@@ -507,6 +522,9 @@
+ //@ revisions: x86_64_fortanix_unknown_sgx
+ //@ [x86_64_fortanix_unknown_sgx] compile-flags: --target x86_64-fortanix-unknown-sgx
+ //@ [x86_64_fortanix_unknown_sgx] needs-llvm-components: x86
++//@ revisions: x86_64_foxkit_linux_musl
++//@ [x86_64_foxkit_linux_musl] compile-flags: --target x86_64-foxkit-linux-musl
++//@ [x86_64_foxkit_linux_musl] needs-llvm-components: x86
+ //@ revisions: x86_64_fuchsia
+ //@ [x86_64_fuchsia] compile-flags: --target x86_64-fuchsia
+ //@ [x86_64_fuchsia] needs-llvm-components: x86
diff --git a/user/rust/0014-Add-foxkit-target-specs.patch b/user/rust/0014-Add-foxkit-target-specs.patch
deleted file mode 100644
index ec1a4a0e7..000000000
--- a/user/rust/0014-Add-foxkit-target-specs.patch
+++ /dev/null
@@ -1,144 +0,0 @@
-From 7e50215a21b198c73fe575d28c847fd645c4ee40 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 17 Sep 2018 02:29:06 +0000
-Subject: [PATCH 14/14] Add foxkit target specs
-
----
- .../src/spec/aarch64_foxkit_linux_musl.rs | 11 +++++++++++
- .../src/spec/armv7_foxkit_linux_musleabihf.rs | 11 +++++++++++
- .../rustc_target/src/spec/i586_foxkit_linux_musl.rs | 11 +++++++++++
- compiler/rustc_target/src/spec/mod.rs | 7 +++++++
- .../src/spec/powerpc64_foxkit_linux_musl.rs | 11 +++++++++++
- .../src/spec/powerpc_foxkit_linux_musl.rs | 11 +++++++++++
- .../rustc_target/src/spec/x86_64_foxkit_linux_musl.rs | 11 +++++++++++
- 7 files changed, 73 insertions(+)
- create mode 100644 compiler/rustc_target/src/spec/aarch64_foxkit_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/armv7_foxkit_linux_musleabihf.rs
- create mode 100644 compiler/rustc_target/src/spec/i586_foxkit_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/powerpc64_foxkit_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/powerpc_foxkit_linux_musl.rs
- create mode 100644 compiler/rustc_target/src/spec/x86_64_foxkit_linux_musl.rs
-
-diff --git a/compiler/rustc_target/src/spec/aarch64_foxkit_linux_musl.rs b/compiler/rustc_target/src/spec/aarch64_foxkit_linux_musl.rs
-new file mode 100644
-index 00000000000..4bdd51af4fe
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/aarch64_foxkit_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::aarch64_unknown_linux_musl::target();
-+
-+ base.llvm_target = "aarch64-foxkit-linux-musl".to_string();
-+ base.vendor = "foxkit".to_string();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/armv7_foxkit_linux_musleabihf.rs b/compiler/rustc_target/src/spec/armv7_foxkit_linux_musleabihf.rs
-new file mode 100644
-index 00000000000..994f3c39e7c
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/armv7_foxkit_linux_musleabihf.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::armv7_unknown_linux_musleabihf::target();
-+
-+ base.llvm_target = "armv7-foxkit-linux-musleabihf".to_string();
-+ base.vendor = "foxkit".to_string();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/i586_foxkit_linux_musl.rs b/compiler/rustc_target/src/spec/i586_foxkit_linux_musl.rs
-new file mode 100644
-index 00000000000..028e4b5e930
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/i586_foxkit_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::i586_unknown_linux_musl::target();
-+
-+ base.llvm_target = "i586-foxkit-linux-musl".to_string();
-+ base.vendor = "foxkit".to_string();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
-index 92678aed5b1..66a408d0b36 100644
---- a/compiler/rustc_target/src/spec/mod.rs
-+++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -804,6 +804,13 @@ fn $module() {
- }
-
- supported_targets! {
-+ ("aarch64-foxkit-linux-musl", aarch64_foxkit_linux_musl),
-+ ("armv7-foxkit-linux-musleabihf", armv7_foxkit_linux_musleabihf),
-+ ("i586-foxkit-linux-musl", i586_foxkit_linux_musl),
-+ ("powerpc-foxkit-linux-musl", powerpc_foxkit_linux_musl),
-+ ("powerpc64-foxkit-linux-musl", powerpc64_foxkit_linux_musl),
-+ ("x86_64-foxkit-linux-musl", x86_64_foxkit_linux_musl),
-+
- ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu),
- ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32),
- ("i686-unknown-linux-gnu", i686_unknown_linux_gnu),
-diff --git a/compiler/rustc_target/src/spec/powerpc64_foxkit_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64_foxkit_linux_musl.rs
-new file mode 100644
-index 00000000000..04a50f84b60
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/powerpc64_foxkit_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::powerpc64_unknown_linux_musl::target();
-+
-+ base.llvm_target = "powerpc64-foxkit-linux-musl".to_string();
-+ base.vendor = "foxkit".to_string();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/powerpc_foxkit_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc_foxkit_linux_musl.rs
-new file mode 100644
-index 00000000000..7bca52c4299
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/powerpc_foxkit_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::powerpc_unknown_linux_musl::target();
-+
-+ base.llvm_target = "powerpc-foxkit-linux-musl".to_string();
-+ base.vendor = "foxkit".to_string();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
-diff --git a/compiler/rustc_target/src/spec/x86_64_foxkit_linux_musl.rs b/compiler/rustc_target/src/spec/x86_64_foxkit_linux_musl.rs
-new file mode 100644
-index 00000000000..1ff73687c00
---- /dev/null
-+++ b/compiler/rustc_target/src/spec/x86_64_foxkit_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::Target;
-+
-+pub fn target() -> Target {
-+ let mut base = super::x86_64_unknown_linux_musl::target();
-+
-+ base.llvm_target = "x86_64-foxkit-linux-musl".to_string();
-+ base.vendor = "foxkit".to_string();
-+ base.options.crt_static_default = false;
-+
-+ base
-+}
---
-2.35.1
-
diff --git a/user/rust/0015-Use-OpenPOWER-ABI-on-BE-PowerPC-64-musl.patch b/user/rust/0015-Use-OpenPOWER-ABI-on-BE-PowerPC-64-musl.patch
deleted file mode 100644
index 6a65b8f35..000000000
--- a/user/rust/0015-Use-OpenPOWER-ABI-on-BE-PowerPC-64-musl.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From fc0cf16ce6bdf46929c91a4826b93370ba08a970 Mon Sep 17 00:00:00 2001
-From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
-Date: Sun, 3 Jul 2022 18:24:44 -0500
-Subject: [PATCH] psm: Use OpenPOWER ABI on BE PowerPC 64/musl
-
-The musl libc uses ELFv2 (OpenPOWER ABI) on both big and little endian
-64-bit PowerPC targets. Before this change, running `cargo test` on a
-powerpc64-foxkit-linux-musl host showed a SIGSEGV. Now all tests pass.
-
---- rustc-1.60.0-src/vendor/psm/build.rs.old 2022-04-04 06:10:56.000000000 -0500
-+++ rustc-1.60.0-src/vendor/psm/build.rs 2022-07-03 18:52:46.829357810 -0500
-@@ -41,6 +41,7 @@
- ("arm", _, _, _) => Some(("src/arch/arm_aapcs.s", true)),
- ("aarch64", _, _, _) => Some(("src/arch/aarch_aapcs64.s", true)),
- ("powerpc", _, _, _) => Some(("src/arch/powerpc32.s", true)),
-+ ("powerpc64", _, _, "musl") => Some(("src/arch/powerpc64_openpower.s", true)),
- ("powerpc64", "little", _, _) => Some(("src/arch/powerpc64_openpower.s", true)),
- ("powerpc64", _, _, _) => Some(("src/arch/powerpc64.s", true)),
- ("s390x", _, _, _) => Some(("src/arch/zseries_linux.s", true)),
---- rustc-1.60.0-src/vendor/psm/.cargo-checksum.json.old 2022-04-04 06:10:56.000000000 -0500
-+++ rustc-1.60.0-src/vendor/psm/.cargo-checksum.json 2022-07-03 18:53:10.636824874 -0500
-@@ -1 +1 @@
--{"files":{"Cargo.lock":"2928b712f89aee2b62581df1e552b7cb8288d999ba180291b4900b86a05c6d8d","Cargo.toml":"c2c5a0154a80cffc82349cd98f819ea1259c92f195c5878ceefb66e06b14d28c","LICENSE-APACHE":"965a63a81d9a2fbeb5f9096954dabb49690f9dffcdac9825f675b25c807252a2","LICENSE-MIT":"3e3714aa69bd874601741fd7d7ad5298740cece37778e279fc1ab4451c5a11af","README.mkd":"6385ecaced99b0a29a5b40166d34ef9312f322c1b8ad002bef3b08cd6c3e29b2","build.rs":"1d7872546e6924bbb2947edc055ddd01f48683cc80d9d75a846adb65540345f0","examples/info.rs":"8ffb89912304ecbf3d714dcc094f42e86fdd0738625b2e76be2e7d59ab0736cf","examples/on_stack_fibo.rs":"287f0a08b177a97366a5da39e24e33e1f4bbe30a1f2473956721c8a9d93926a4","examples/on_stack_fibo_alloc_each_frame.rs":"e084041bbb81d51b195a4db539a765409272916df29c83a62213a93de4b6fca3","examples/panics.rs":"6791fe0dda9456b3becf989cbc89bc45ae27302e633572a57bbf10a57b830076","examples/replace_stack_1.rs":"374a28881f5e5dbf9db9b9e34929fb7a7e6f3910d782a6718f53ac269807b990","examples/thread.rs":"3cf92882aff96151608584d63535701cc8e5ae953d7ecf706d77371180bff025","src/arch/aarch64_armasm.asm":"1c737338287f3de981fbae97f104ac5e49425ba7fbcb4f7d80120afae47a86d5","src/arch/aarch_aapcs64.s":"459b8cd5a96104893e8f849ac83369101d7204c933841672df162104bebd2375","src/arch/arm_aapcs.s":"4ada635e8528279bd0326654f5203b6bdc94dd68c94fdef5de551384ba1b1747","src/arch/arm_armasm.asm":"e3b514169f19368b0b49374412de38bd9f50576e7b93b64d685a0f84fa8f4c91","src/arch/mips64_eabi.s":"4e6f95f89ba72fc4dd1a9a547920764f66d98251d236941cee4d227010484520","src/arch/mips_eabi.s":"8b7927fd63660eb276e2951f28df6b11920f04be4dc17a16b66ad386da12c4c3","src/arch/powerpc32.s":"0b508a65dec7254ba2e0dc65a2c9e86c21069fe62f5d7c41f5190415a4885912","src/arch/powerpc64.s":"c1602d09d12ba1df48fc96af0f827f8679fc93cee728813527fb1b817a788911","src/arch/powerpc64_openpower.s":"421b11cc7381427d1e2acb4e681c9836ccfea0b79930492f0a99ec4d27495e58","src/arch/psm.h":"2cebda3740aa73b167b8ec18e3d2202ca46e400a081a46329b86051abd1a872a","src/arch/riscv.s":"a81d2af4bcc9c29db304730697e52a89a7376b51d2735185c67be8910d0cdf39","src/arch/riscv64.s":"a51da67ce569e2442ff487b062bb8fdfe7c769f3f05a88de480bd5ab214d9a4f","src/arch/sparc64.s":"6250acbd938aea2e440061663a79fbb2dac0592b3a193f027b6b910e2a8e3af1","src/arch/sparc_sysv.s":"c2da7576e1fbe2234cc8a5cf937f7676e125435295f8c32089bfa0b0f27fde5e","src/arch/wasm32.o":"d7279f419cb7e169cae2af2463507652e0393b801c2f4580244de70d3def58b6","src/arch/wasm32.s":"1ebdc90de48f13e6474ee17c406578fc090ff61e57c1f560ecf6e6b75c7ef10a","src/arch/x86.s":"1919a4af1474895f904ed4281a4a8fcdd0428dab257bff4ea262db83ed63b445","src/arch/x86_64.s":"c80f1a3e22db61fd62b5ef2e1b6663185403bdcbcfbfe7ff0f8e0831ff0cafcf","src/arch/x86_64_msvc.asm":"85683bc65a03371ea7d8d79dcbe487f690cc2460c359817fc63c30d575ad8957","src/arch/x86_64_windows_gnu.s":"44637034e094ec0ad76dbe1232e97271c8155eb93bcb1dd86fe825acd05978a0","src/arch/x86_msvc.asm":"1735d4b19f8e46d0699fc9538baa7ab0885d27531ef7d9960e2027ad8137769b","src/arch/x86_windows_gnu.s":"b94d907a86f230c5c8ca1c708ede173f73c5269496f3959e08e4a92155e160d7","src/arch/zseries_linux.s":"5c3379a76e31bf13abf240efda12596fabce108cf63f60f9d0495e82ab8f1717","src/lib.rs":"18774ee37630bc6c7a36273014f80f6afa3f73bf34f4c49f5795d2eb5df1c195","tests/stack_direction.rs":"77d8f9dee196e99e70d569f59fef82bc2f88a8ec17bfe07ebe2f005fcb815c8b","tests/stack_direction_2.rs":"f9191394de5b6381af6ba8223e7717230059dc335f639238c0ddbc7eb87bfc0e"},"package":"cd136ff4382c4753fc061cb9e4712ab2af263376b95bbd5bd8cd50c020b78e69"}
-\ No newline at end of file
-+{"files":{"Cargo.lock":"2928b712f89aee2b62581df1e552b7cb8288d999ba180291b4900b86a05c6d8d","Cargo.toml":"c2c5a0154a80cffc82349cd98f819ea1259c92f195c5878ceefb66e06b14d28c","LICENSE-APACHE":"965a63a81d9a2fbeb5f9096954dabb49690f9dffcdac9825f675b25c807252a2","LICENSE-MIT":"3e3714aa69bd874601741fd7d7ad5298740cece37778e279fc1ab4451c5a11af","README.mkd":"6385ecaced99b0a29a5b40166d34ef9312f322c1b8ad002bef3b08cd6c3e29b2","build.rs":"1720311de1fd3ffb442697d68a9f1522996de80daf9db44b2635d31e7b3ffbc0","examples/info.rs":"8ffb89912304ecbf3d714dcc094f42e86fdd0738625b2e76be2e7d59ab0736cf","examples/on_stack_fibo.rs":"287f0a08b177a97366a5da39e24e33e1f4bbe30a1f2473956721c8a9d93926a4","examples/on_stack_fibo_alloc_each_frame.rs":"e084041bbb81d51b195a4db539a765409272916df29c83a62213a93de4b6fca3","examples/panics.rs":"6791fe0dda9456b3becf989cbc89bc45ae27302e633572a57bbf10a57b830076","examples/replace_stack_1.rs":"374a28881f5e5dbf9db9b9e34929fb7a7e6f3910d782a6718f53ac269807b990","examples/thread.rs":"3cf92882aff96151608584d63535701cc8e5ae953d7ecf706d77371180bff025","src/arch/aarch64_armasm.asm":"1c737338287f3de981fbae97f104ac5e49425ba7fbcb4f7d80120afae47a86d5","src/arch/aarch_aapcs64.s":"459b8cd5a96104893e8f849ac83369101d7204c933841672df162104bebd2375","src/arch/arm_aapcs.s":"4ada635e8528279bd0326654f5203b6bdc94dd68c94fdef5de551384ba1b1747","src/arch/arm_armasm.asm":"e3b514169f19368b0b49374412de38bd9f50576e7b93b64d685a0f84fa8f4c91","src/arch/mips64_eabi.s":"4e6f95f89ba72fc4dd1a9a547920764f66d98251d236941cee4d227010484520","src/arch/mips_eabi.s":"8b7927fd63660eb276e2951f28df6b11920f04be4dc17a16b66ad386da12c4c3","src/arch/powerpc32.s":"0b508a65dec7254ba2e0dc65a2c9e86c21069fe62f5d7c41f5190415a4885912","src/arch/powerpc64.s":"c1602d09d12ba1df48fc96af0f827f8679fc93cee728813527fb1b817a788911","src/arch/powerpc64_openpower.s":"421b11cc7381427d1e2acb4e681c9836ccfea0b79930492f0a99ec4d27495e58","src/arch/psm.h":"2cebda3740aa73b167b8ec18e3d2202ca46e400a081a46329b86051abd1a872a","src/arch/riscv.s":"a81d2af4bcc9c29db304730697e52a89a7376b51d2735185c67be8910d0cdf39","src/arch/riscv64.s":"a51da67ce569e2442ff487b062bb8fdfe7c769f3f05a88de480bd5ab214d9a4f","src/arch/sparc64.s":"6250acbd938aea2e440061663a79fbb2dac0592b3a193f027b6b910e2a8e3af1","src/arch/sparc_sysv.s":"c2da7576e1fbe2234cc8a5cf937f7676e125435295f8c32089bfa0b0f27fde5e","src/arch/wasm32.o":"d7279f419cb7e169cae2af2463507652e0393b801c2f4580244de70d3def58b6","src/arch/wasm32.s":"1ebdc90de48f13e6474ee17c406578fc090ff61e57c1f560ecf6e6b75c7ef10a","src/arch/x86.s":"1919a4af1474895f904ed4281a4a8fcdd0428dab257bff4ea262db83ed63b445","src/arch/x86_64.s":"c80f1a3e22db61fd62b5ef2e1b6663185403bdcbcfbfe7ff0f8e0831ff0cafcf","src/arch/x86_64_msvc.asm":"85683bc65a03371ea7d8d79dcbe487f690cc2460c359817fc63c30d575ad8957","src/arch/x86_64_windows_gnu.s":"44637034e094ec0ad76dbe1232e97271c8155eb93bcb1dd86fe825acd05978a0","src/arch/x86_msvc.asm":"1735d4b19f8e46d0699fc9538baa7ab0885d27531ef7d9960e2027ad8137769b","src/arch/x86_windows_gnu.s":"b94d907a86f230c5c8ca1c708ede173f73c5269496f3959e08e4a92155e160d7","src/arch/zseries_linux.s":"5c3379a76e31bf13abf240efda12596fabce108cf63f60f9d0495e82ab8f1717","src/lib.rs":"18774ee37630bc6c7a36273014f80f6afa3f73bf34f4c49f5795d2eb5df1c195","tests/stack_direction.rs":"77d8f9dee196e99e70d569f59fef82bc2f88a8ec17bfe07ebe2f005fcb815c8b","tests/stack_direction_2.rs":"f9191394de5b6381af6ba8223e7717230059dc335f639238c0ddbc7eb87bfc0e"},"package":"cd136ff4382c4753fc061cb9e4712ab2af263376b95bbd5bd8cd50c020b78e69"}
diff --git a/user/rust/0040-rls-atomics.patch b/user/rust/0040-rls-atomics.patch
deleted file mode 100644
index e084217ba..000000000
--- a/user/rust/0040-rls-atomics.patch
+++ /dev/null
@@ -1,58 +0,0 @@
---- rustc-1.58.1-src/src/tools/rls/rls/src/cmd.rs
-+++ rustc-1.58.1-src/src/tools/rls/rls/src/cmd.rs
-@@ -7,7 +7,7 @@ use crate::config::Config;
- use crate::server::{self, LsService, Notification, Request, RequestId};
- use rls_analysis::{AnalysisHost, Target};
- use rls_vfs::Vfs;
--use std::sync::atomic::{AtomicU64, Ordering};
-+use std::sync::atomic::{AtomicU32, Ordering};
-
- use lsp_types::{
- ClientCapabilities, CodeActionContext, CodeActionParams, CompletionItem,
-@@ -316,8 +316,8 @@ fn url(file_name: &str) -> Url {
- }
-
- fn next_id() -> RequestId {
-- static ID: AtomicU64 = AtomicU64::new(1);
-- RequestId::Num(ID.fetch_add(1, Ordering::SeqCst))
-+ static ID: AtomicU32 = AtomicU32::new(1);
-+ RequestId::Num(ID.fetch_add(1, Ordering::SeqCst).into())
- }
-
- // Custom reader and output for the RLS server.
---- rustc-1.58.1-src/src/tools/rls/rls/src/server/io.rs
-+++ rustc-1.58.1-src/src/tools/rls/rls/src/server/io.rs
-@@ -5,7 +5,7 @@ use crate::lsp_data::{LSPNotification, LSPRequest};
-
- use std::fmt;
- use std::io::{self, BufRead, Write};
--use std::sync::atomic::{AtomicU64, Ordering};
-+use std::sync::atomic::{AtomicU32, Ordering};
- use std::sync::Arc;
-
- use jsonrpc_core::{self as jsonrpc, response, version, Id};
-@@ -169,13 +169,13 @@ pub trait Output: Sync + Send + Clone + 'static {
- /// An output that sends notifications and responses on `stdout`.
- #[derive(Clone)]
- pub(super) struct StdioOutput {
-- next_id: Arc<AtomicU64>,
-+ next_id: Arc<AtomicU32>,
- }
-
- impl StdioOutput {
- /// Constructs a new `stdout` output.
- pub(crate) fn new() -> StdioOutput {
-- StdioOutput { next_id: Arc::new(AtomicU64::new(1)) }
-+ StdioOutput { next_id: Arc::new(AtomicU32::new(1).into()) }
- }
- }
-
-@@ -192,7 +192,7 @@ impl Output for StdioOutput {
- }
-
- fn provide_id(&self) -> RequestId {
-- RequestId::Num(self.next_id.fetch_add(1, Ordering::SeqCst))
-+ RequestId::Num(self.next_id.fetch_add(1, Ordering::SeqCst).into())
- }
- }
-
diff --git a/user/rust/APKBUILD b/user/rust/APKBUILD
index 71c68ec18..ede75b2d8 100644
--- a/user/rust/APKBUILD
+++ b/user/rust/APKBUILD
@@ -1,21 +1,27 @@
# Maintainer: Samuel Holland <samuel@sholland.org>
pkgname=rust
-pkgver=1.60.0
-_bootver=1.60.0
-_llvmver=14
+pkgver=1.80.0
+_bootver=1.79.0-r0
+_llvmver=18
pkgrel=0
pkgdesc="The Rust Programming Language"
url="https://www.rust-lang.org"
arch="all"
-options="!check" # Failures on aarch64 and ppc64.
+#options="!check" # Failures on aarch64 and ppc64.
license="(Apache-2.0 OR MIT) AND (NCSA OR MIT) AND BSD-2-Clause AND BSD-3-Clause"
depends="$pkgname-std=$pkgver-r$pkgrel gcc musl-dev"
+# debuginfo-gdb tests fail due to security settings
+# node makes Rust think it can do rustdoc-gui tests which require many NPM pkgs
+checkdepends="!gdb !node"
makedepends="
curl-dev
llvm$_llvmver-dev
llvm$_llvmver-test-utils
openssl-dev
python3
+ cargo-bootstrap=$_bootver
+ rust-bootstrap=$_bootver
+ rustfmt-bootstrap=$_bootver
zlib-dev
"
provides="$pkgname-bootstrap=$pkgver-r$pkgrel"
@@ -33,66 +39,43 @@ subpackages="
cargo-doc:_cargo_doc:noarch
cargo-bash-completion:_cargo_bashcomp:noarch
cargo-zsh-completion:_cargo_zshcomp:noarch
- rls
rustfmt
"
-_targets="
- aarch64-foxkit-linux-musl
- armv7-foxkit-linux-musleabihf
- i586-foxkit-linux-musl
- powerpc-foxkit-linux-musl
- powerpc64-foxkit-linux-musl
- x86_64-foxkit-linux-musl
- "
source="https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.xz
0001-Fix-LLVM-build.patch
0002-Fix-linking-to-zlib-when-cross-compiling.patch
0003-Fix-rustdoc-when-cross-compiling-on-musl.patch
- 0004-Use-static-native-libraries-when-linking-static-exec.patch
- 0005-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch
- 0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
- 0007-Link-libssp_nonshared.a-on-all-musl-targets.patch
- 0008-test-failed-doctest-output-Fix-normalization.patch
- 0009-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
- 0010-test-use-extern-for-plugins-Don-t-assume-multilib.patch
- 0011-Ignore-broken-and-non-applicable-tests.patch
- 0012-Link-stage-2-tools-dynamically-to-libstd.patch
- 0013-Move-debugger-scripts-to-usr-share-rust.patch
- 0014-Add-foxkit-target-specs.patch
- 0015-Use-OpenPOWER-ABI-on-BE-PowerPC-64-musl.patch
- 0040-rls-atomics.patch
+ 0004-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch
+ 0005-Prefer-libgcc_eh-over-libunwind-for-musl.patch
+ 0006-Link-libssp_nonshared.a-on-all-musl-targets.patch
+ 0007-test-failed-doctest-output-Fix-normalization.patch
+ 0008-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
+ 0009-Ignore-broken-and-non-applicable-tests.patch
+ 0010-Link-stage-2-tools-dynamically-to-libstd.patch
+ 0011-Move-debugger-scripts-to-usr-share-rust.patch
+ 0012-Add-foxkit-target-specs.patch
+ mir-opt-tests-endianness.patch
powerpc-atomics.patch
+ ppc64-abi.patch
+ stdarch-ppc.patch
+ test-be.patch
+ ui-test-strings.patch
"
-for t in $_targets; do
- source="$source
- https://distfiles.adelielinux.org/source/rust/cargo-$_bootver-$t.tar.xz
- https://distfiles.adelielinux.org/source/rust/rust-std-$_bootver-$t.tar.xz
- https://distfiles.adelielinux.org/source/rust/rustc-$_bootver-$t.tar.xz
- "
-done
builddir="$srcdir/rustc-$pkgver-src"
_rlibdir="/usr/lib/rustlib/$CTARGET/lib"
prepare() {
default_prepare
+ # These tests require Node and various NPM packages.
+ rm -rf "$builddir"/tests/rustdoc-*
- $srcdir/cargo-$_bootver-$CBUILD/install.sh \
- --destdir=$srcdir/prebuilt \
- --prefix=/ \
- --disable-ldconfig
- $srcdir/rust-std-$_bootver-$CBUILD/install.sh \
- --destdir=$srcdir/prebuilt \
- --prefix=/ \
- --disable-ldconfig
- $srcdir/rustc-$_bootver-$CBUILD/install.sh \
- --destdir=$srcdir/prebuilt \
- --prefix=/ \
- --disable-ldconfig
+ # Tests depend on FP precision that can't be given on i586: #1259
+ rm -f "$builddir"/tests/ui/traits/object/print_vtable_sizes.rs
+ rm -f "$builddir"/tests/ui/traits/object/print_vtable_sizes.stdout
}
build() {
cat > config.toml <<- EOF
- changelog-seen = 2
[build]
doc-stage = 2
build-stage = 2
@@ -100,9 +83,9 @@ build() {
build = "$CBUILD"
host = [ "$CHOST" ]
target = [ "$CTARGET" ]
- cargo = "$srcdir/prebuilt/bin/cargo"
- rustc = "$srcdir/prebuilt/bin/rustc"
- rustfmt = "$srcdir/prebuilt/bin/rustfmt"
+ cargo = "/usr/bin/cargo"
+ rustc = "/usr/bin/rustc"
+ rustfmt = "/usr/bin/rustfmt"
docs = true
compiler-docs = false
submodules = false
@@ -110,7 +93,7 @@ build() {
locked-deps = true
vendor = true
extended = true
- tools = [ "analysis", "cargo", "clippy", "rls", "rustfmt", "src" ]
+ tools = [ "analysis", "cargo", "clippy", "rustfmt", "src" ]
verbose = 1
sanitizers = false
profiler = false
@@ -121,7 +104,7 @@ build() {
optimize = true
debug = false
codegen-units = 1
- debuginfo-level = 2
+ debuginfo-level = 1
debuginfo-level-rustc = 0
debuginfo-level-tests = 0
backtrace = true
@@ -162,7 +145,7 @@ build() {
check() {
LLVM_LINK_SHARED=1 \
- python3 x.py test -j ${JOBS:-2} --no-doc --no-fail-fast
+ python3 x.py test -j ${JOBS:-2} --no-doc tests/ui
}
package() {
@@ -294,16 +277,9 @@ _cargo_doc() {
"$subpkgdir"/usr/share/man/man1
}
-rls() {
- pkgdesc="The Rust language server"
- license="Apache-2.0 OR MIT"
- depends="$pkgname-std=$pkgver-r$pkgrel"
-
- _mv "$pkgdir"/usr/bin/rls "$subpkgdir"/usr/bin
-}
-
rustfmt() {
pkgdesc="Format Rust code"
+ provides="rustfmt-bootstrap=$pkgver-r$pkgrel"
depends="$pkgname-std=$pkgver-r$pkgrel"
_mv "$pkgdir"/usr/bin/rustfmt "$subpkgdir"/usr/bin
@@ -315,39 +291,22 @@ _mv() {
mv "$@"
}
-sha512sums="d0c113e8c2c67bf10773c9403dc4c4700c4deb2fb287bfec51e565d3473d2b481d8ae2c90b272cd67b3a87d7443ea25a34c7b40ba8cd7106bf5d71126ab141c3 rustc-1.60.0-src.tar.xz
-c65d52bbc3745fcc5c4fd314cc7f00be6778579983002d3f8d173611d034686293f318b07e3327d2d09d2e81f092c2f287d6aede7494e94f12e99d2575875e27 0001-Fix-LLVM-build.patch
-e28d0f44ab0b4af68ed8fbef394ca362bdbbfee7011342bfd5e4195069e716b581bd50e21494ce51f6d8f7a4797d1342fb807c910a275fb394ca503f345a8664 0002-Fix-linking-to-zlib-when-cross-compiling.patch
-7d174cd27e618212e534459455b9017636f56e9a9db81413a714f718a988a9d1fc7b4c0b98d4a2f0b1971d662c7df98be370e0d10e81d3e50d37589fe3b671fa 0003-Fix-rustdoc-when-cross-compiling-on-musl.patch
-0ea1605f7e7b94a317cead8b2552fa0d95b6bd41a4727d892fa284ccb5b718aa32a625abcaa4c651a324437c4c06e53da464c6cb21518663bda05ded4ba12815 0004-Use-static-native-libraries-when-linking-static-exec.patch
-dad4fc3ece2e093ed90e10b04a7c1fcdcec3e6fcfc5818401db19ec20365f581dc2ed1f771abca64e24edf3e6bc9c67fbecb85e1470a00359a00a47eab3b45f6 0005-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch
-65116731811c178e980b1d980d524645897bc3f81e9f9ad8051235fa4bad7bbf20519173057e9d7b3f9c8459cc35dd2902c7ccd9e5070587848ea9886793ea35 0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
-21550b68581c46847ccd5fb20551441b8ce41e948a596bfaffa6f81fcb1a273756e76bcf7ac033241b248b93661a09a9962ae7ffd93b7850d13e5e51695ec705 0007-Link-libssp_nonshared.a-on-all-musl-targets.patch
-9242b001e8c4a9ae5a7a726e43724c3e07813e3105fae50efab5f289f15fb6493cb6f15694f5a0289d5a7effc0704f2fe715af981c50d54a805393c0c72e2cf7 0008-test-failed-doctest-output-Fix-normalization.patch
-45bcce759138df475f8fbeb8089420bd38a399f5a018ebdf6d5a79e7c714c9ec770c765c32dda0ab4e368c5dd226f474b6894d70b14e41bea57284eeeb1a2f58 0009-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
-23f622841ba2030b02f52ed560c4be6800469e8021aa71842a702860c97b90edadf5de593ea4f6b9a158d7d0e4c83b52b419f770a8dac2b69633d643468c54d5 0010-test-use-extern-for-plugins-Don-t-assume-multilib.patch
-73282af6c50155a29c2c98117a1ce6d28be42d04c25dc8ea2388de6923361fb7ae44d16bb81c57bb3d326d434f11ae6cdf72b8a0293421e8d0eaa931398e52d3 0011-Ignore-broken-and-non-applicable-tests.patch
-2f139d1d544b2f1248f352bf3cadb93ca5935338a671480045979579ebab8f0f6b8f7509256fb0f31083291c58310f83c32b9034ca2229dd6dbacb6a743eae74 0012-Link-stage-2-tools-dynamically-to-libstd.patch
-62b08c73e62da98fa02c26f47a5009f9ebcab95090d51cc55ae005827f366de5b556c32c995f55f9025fadeff4e0485ed0908526845a02abe5ae8b1b86839130 0013-Move-debugger-scripts-to-usr-share-rust.patch
-530bae858f9db0049f4b4666afb05cadf25f37181597274a7a456fc51b32f04523da75ee7ab9ab1d8226c7e7ddd2b771bb9d2052cab430e482d2d1ee6b34eafc 0014-Add-foxkit-target-specs.patch
-7fee0667793d5d5ee5cb600e24129c81de50511814e8f1a2f16bb47350087c5f42a01671415b10b01e414e9ff03008892a35c6cb616737175217bdccd1fa3f1e 0015-Use-OpenPOWER-ABI-on-BE-PowerPC-64-musl.patch
-a2a05a64ca57dcde23c11ed8bd6ce530d80b99464c895c256b4e9cba02997121205a091de43f516563d5d618ea522d89639507ba94961807ada743a3099fe8d8 0040-rls-atomics.patch
-99db0614b821a1ef767f68396253f7a620a491adf29ea01887cf4614e4dbb63c2544e1d7a6ad63a629995a2093cb26b4013f9a321dab65a235187e825c51c6a8 powerpc-atomics.patch
-d9140531c720f128371a7abe1b15dcafd44859e52ef64c18cbebad16fa60bb928671eced22ef2b6ec46e2826bc7a1f4e1eeffcd5f187b26b74b41e543d515a01 cargo-1.60.0-aarch64-foxkit-linux-musl.tar.xz
-b620eb8855190bb6d56d79decfef1bc90f073fb11f61cf236443c43b774502499735cc18b778886df226bdffbb834bc39ef8c910877849600377c97d0ba33cee rust-std-1.60.0-aarch64-foxkit-linux-musl.tar.xz
-d436a1b5bccac1917ba8ef3110c66e81d146369833729081ffb56004fbbde2becee871dc636f13b722517fb443e74d8f532c7eaa92f8e1f65608c9f5bd2d5ab3 rustc-1.60.0-aarch64-foxkit-linux-musl.tar.xz
-114063a3624c2c7bc65f4176209baa13cf633a64b75fc7c962cc999f5caf3ee5b9f60e3ad2c6a93df3ea1e00ac45259ad076d8ec04a0e4d9511b21c804ae5eb5 cargo-1.60.0-armv7-foxkit-linux-musleabihf.tar.xz
-9819a4f9e7c8125896cd42fed02e84678218937cd0a8758e5b16011d4486305211b777c191cc1f9ac68f3100b7b94bd6a874a3f5f63400851bac90db055c9f6b rust-std-1.60.0-armv7-foxkit-linux-musleabihf.tar.xz
-40a57b5a05e31145e7664db674c8793ab874cd651bcd7577aea9225904413f085086102abfe244bdc78b19b8d6e6d0bc3a7009294b9021a1befa8f2f0216f68d rustc-1.60.0-armv7-foxkit-linux-musleabihf.tar.xz
-9c8679b6611a4b356e500fe4f4b1b3523db09ddf9abec9b39ca2e0436a0b34558790348f7594132a8a5d6b8d4390a24252ae9afa7c16962f7b3609fa970c9775 cargo-1.60.0-i586-foxkit-linux-musl.tar.xz
-a37fa51e63cfbb357b197f8c4d0ba3673e8eee5bd788cca8a79836248451f6e34304bc93960b758848089e2c99d6ae8fd20ad9f9838af53b2243d396666f6ea9 rust-std-1.60.0-i586-foxkit-linux-musl.tar.xz
-b66f58da3a9f72a051342df3e57e4a204f44570c5e05c2bd2e00d22051403fac57f0edbaf595d05f1d57ac91dcb5bdab01a32c081b9b4d45c9768f58fff85a0e rustc-1.60.0-i586-foxkit-linux-musl.tar.xz
-649c554666a2ed39db0176daf1f76ea51093cf2aa56c692830cff22c9e79ce622be9117c1026efed5a0fdcbe65efe57f5233cc2e88126dc708527f8ee9d03687 cargo-1.60.0-powerpc-foxkit-linux-musl.tar.xz
-f262de70c936bc33ec4836a66f0320ca0a99b19c8996174dba2596a4d373cfe6e19acfe12b255fbd0fe54fe2a8a5ca31e85f7974c3504d58b219f6bca6164efa rust-std-1.60.0-powerpc-foxkit-linux-musl.tar.xz
-f52d03674577fca4b48f9ea3d5d60170a63a4f378ab8cdffca62bb3c6e9850371ad37d125bdf155e15edae1ca7a86ef7bef6ec02216755a96cef35f3a98cdb50 rustc-1.60.0-powerpc-foxkit-linux-musl.tar.xz
-8a70eec1ccbad10022b6bbdd4c2be096130fdccad776f21608c074653afc3dc68aee0ee2475d9df877c447109584d36f94936dc22eead3700b6cee59ac5ae7e8 cargo-1.60.0-powerpc64-foxkit-linux-musl.tar.xz
-72848344807e1dff8b872848c7449631397f8167619a6916ffeb4e0a43ecc394ec32c407cf2c7a85613690abba1d39087568a307f99e0e5a9afe656133c85765 rust-std-1.60.0-powerpc64-foxkit-linux-musl.tar.xz
-7ce9d9b10e50e96b377fe1e3e1bab2b422432b234fe217c2df5bbd766d384bdeceb015e0a847a45ab2906144e09cdd2d95857941a4f46ede78597d04438e7aa5 rustc-1.60.0-powerpc64-foxkit-linux-musl.tar.xz
-249322775192152da6578122cd608cc2649edbbb9df54ea1132b2ec0b353b4ad9e2ac3295c8fb32777b3a255a4a8569feca4a63f5e1723299f53265a9d32945a cargo-1.60.0-x86_64-foxkit-linux-musl.tar.xz
-c55fb5896fdabd091f14dfdb872cec249358dfffe8a5fd8987a3ee193cdfc741dd47e5577718e00386abf4015e0717747cc377d11a467f8774a4d0e9cd4657a9 rust-std-1.60.0-x86_64-foxkit-linux-musl.tar.xz
-f63c79a5f51c5369747d2bc3bccd06ddac3d2c36b68fd058f499217d64abddad00902c5b59be4601bd587ff9761fc95f9af8a6182868b125d9a9fdae80db4ade rustc-1.60.0-x86_64-foxkit-linux-musl.tar.xz"
+sha512sums="548522599122bdff739472c1d120dcff8de171d6f4155c2fb73e47c7d80431694ceceb0439f36ef2a7bea23ac5a76de8e1f75fcade1f3ff2c3fca0ab21e6197a rustc-1.80.0-src.tar.xz
+b701f9ae32c4e62dde7ecaef40a9083f6253d83dcd3821c6ce86784fb439b11c5b908e42b4d9eff9ebe8860b3b4673c489ff8e6b4828e15df02756e4c8985c94 0001-Fix-LLVM-build.patch
+1f976da43d99ff58b7d8716e594485e191c2df43ab4c75123a223ae0cfcca0c129281575d2bee5996faf10f9008357d30c48876a491b62bdd722c83c4f3d35d2 0002-Fix-linking-to-zlib-when-cross-compiling.patch
+619a0150bdc59ef8d844e9eff907e51015003164d17012b38bcac642618efb65e25ea4b1ead06d4b023caf02d4eb8dbd481daa04b42d0002a9986f05854c0ca4 0003-Fix-rustdoc-when-cross-compiling-on-musl.patch
+cfd8cfc1a8af2a8319ae9bd4ed14b1ef22d429e99da4237ea7d037d6fa556174db6b47e9268c8c258e08b7a71d8c2370cce8445c3dd994a07e4699705f2ae2de 0004-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch
+6868fe48b7424d39c94ea560037ab4154a0b8f20a027617433d912a5ec60cf0bf1a49da165009345b75f8aedf7d0f81dd23135f9bb28d3f5cd081b56aa74a986 0005-Prefer-libgcc_eh-over-libunwind-for-musl.patch
+b34187a82cd3db02b8aac8f18147d653a7191b841e145460dfbff518a7747a6aa1c08721703929bfc7e446c9ed9512383a5eefaad2cb5c02d16e8f00d12627db 0006-Link-libssp_nonshared.a-on-all-musl-targets.patch
+e13020274290c1149b7fcf3a119cc34d7f6b64abaa69d6ac9a8780569c4f44041c40b915da6e9675cc7e0ee05d42b13e14608fbab6eac6d3547428bf21f4e9f2 0007-test-failed-doctest-output-Fix-normalization.patch
+6850174cebb3dfb2f41e277b0b46db9cabe18c904f39a6775f8cd12dc6c237a7de820a5dc8c538f9b965c069b4197141f0613add096574a7df4ca2d1ae01ab4d 0008-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
+f98ae741a9f33a0e3541c6c43a3eb86b653b202d70783435ea2cc1b35c1da8b6db796e9217e243050de05b9ea2520600c5e890481d2366a1da742aad3482fab2 0009-Ignore-broken-and-non-applicable-tests.patch
+6b68d068d7653b81590f7a0bd5359868c0ce48fa3eda467cac9dbfcead7b566ab27489ee923b024e71294130a17b1f2efc1a06a8effc93ea4a4d5a43ec8d091d 0010-Link-stage-2-tools-dynamically-to-libstd.patch
+c6d94cbb80394d270302a2389c22b528583c4ad7298c7b3f657175912e0abd075b45ec847daa2c8e6e4eb38536a8a37461cd15d78c0f83771d816f11e1cf2e01 0011-Move-debugger-scripts-to-usr-share-rust.patch
+690d12d2b983f82fadad1ff661887852227871787d8b4f5dff7de96ac94dbb7d64887e19258fa146e8cf1e6356cffa6e5954739e9e133165e8d2c970c6f47a84 0012-Add-foxkit-target-specs.patch
+e8561c9ceadf121239ad13496e4baeca6a93e29bb99bc2d37d9e1919caaf0e2456219a0e3d3cd88af281b2b9d23c735597f1ee05cc99daa690961397aa28efa6 mir-opt-tests-endianness.patch
+5d57a7a18e0a7f8b7755de89255f97642e4fe585a02465de70227867ac99db84766cd25e702ae13c3a4488504bd4c84eb7e9ceb3a83fdf8f2df0eacf64cc16c1 powerpc-atomics.patch
+4d21e0e04768e19f1d93ee54d787ed1c4c6fe1e7cab91c92413caa22765f96843f9d98ccb014210d893b3a6bb3246b6fba60b8d6d8a832fedbeff50803225b81 ppc64-abi.patch
+63592425a6f68046b75148a25289ff1b8b6a7db02ca0aa7c97d35697f18267a6adeb8be3136c8fd930704352d5528e70b0d57f79bac39b9331953174f76d5919 stdarch-ppc.patch
+07591c0b6731349093aee868723ab526391a6dda946e9dd442428d878e3d5f23223277778ea71860f0101cac23f47e7973f36d4fd88cf5d3e3ad95e9d6b07b27 test-be.patch
+c1cdcff68504e5b7b9d5f3081c83c8d8855d9523cc3539bd727f3dc78b7db70b4ce40c76852dd62fc50423128faf86ed8af1c65f7955134af85bc494dd376001 ui-test-strings.patch"
diff --git a/user/rust/maintain b/user/rust/maintain
deleted file mode 100755
index 7242bcc60..000000000
--- a/user/rust/maintain
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh -e
-
-# https://distfiles.smaeul.xyz/distfiles/adelie/
-# https://gist.github.com/smaeul/21b74f847c31824eed4291eb265fa801
-
-BASE=https://distfiles.smaeul.xyz/distfiles/adelie;
-DEST=/var/www/source/rust;
-
-cd ${DEST};
-
-curl -s ${BASE}/ \
- | grep -Eo 'href=.*\.xz"' \
- | cut -d'"' -f2 \
- | while read k; do
- printf " * %s\n" "${k}";
- curl -sO ${BASE}/${k};
- done
diff --git a/user/rust/mir-opt-tests-endianness.patch b/user/rust/mir-opt-tests-endianness.patch
new file mode 100644
index 000000000..e6972ebe9
--- /dev/null
+++ b/user/rust/mir-opt-tests-endianness.patch
@@ -0,0 +1,1564 @@
+Upstream: https://github.com/rust-lang/rust/pull/126502
+
+From 31851d4770774ac95a694f2596138fc43fcd39b4 Mon Sep 17 00:00:00 2001
+From: Josh Stone <jistone@redhat.com>
+Date: Fri, 14 Jun 2024 15:49:45 -0700
+Subject: [PATCH 1/3] Add `-Zdump-mir-exclude-alloc-bytes`
+
+---
+ compiler/rustc_interface/src/tests.rs | 1 +
+ compiler/rustc_middle/src/mir/pretty.rs | 3 +++
+ compiler/rustc_session/src/options.rs | 2 ++
+ 3 files changed, 6 insertions(+)
+
+diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/src/tests.rs
+index 6ffc518097ef0..619b125a8780d 100644
+--- a/compiler/rustc_interface/src/tests.rs
++++ b/compiler/rustc_interface/src/tests.rs
+@@ -683,6 +683,7 @@ fn test_unstable_options_tracking_hash() {
+ untracked!(dump_mir, Some(String::from("abc")));
+ untracked!(dump_mir_dataflow, true);
+ untracked!(dump_mir_dir, String::from("abc"));
++ untracked!(dump_mir_exclude_alloc_bytes, true);
+ untracked!(dump_mir_exclude_pass_number, true);
+ untracked!(dump_mir_graphviz, true);
+ untracked!(dump_mono_stats, SwitchWithOptPath::Enabled(Some("mono-items-dir/".into())));
+diff --git a/compiler/rustc_middle/src/mir/pretty.rs b/compiler/rustc_middle/src/mir/pretty.rs
+index 4657f4dcf8132..3ea98de1a177d 100644
+--- a/compiler/rustc_middle/src/mir/pretty.rs
++++ b/compiler/rustc_middle/src/mir/pretty.rs
+@@ -1521,6 +1521,9 @@ impl<'a, 'tcx, Prov: Provenance, Extra, Bytes: AllocBytes> std::fmt::Display
+ // We are done.
+ return write!(w, " {{}}");
+ }
++ if tcx.sess.opts.unstable_opts.dump_mir_exclude_alloc_bytes {
++ return write!(w, " {{ .. }}");
++ }
+ // Write allocation bytes.
+ writeln!(w, " {{")?;
+ write_allocation_bytes(tcx, alloc, w, " ")?;
+diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs
+index 9a10adeb6d1a1..a3f1369776de4 100644
+--- a/compiler/rustc_session/src/options.rs
++++ b/compiler/rustc_session/src/options.rs
+@@ -1647,6 +1647,8 @@ options! {
+ (default: no)"),
+ dump_mir_dir: String = ("mir_dump".to_string(), parse_string, [UNTRACKED],
+ "the directory the MIR is dumped into (default: `mir_dump`)"),
++ dump_mir_exclude_alloc_bytes: bool = (false, parse_bool, [UNTRACKED],
++ "exclude the raw bytes of allocations when dumping MIR (used in tests) (default: no)"),
+ dump_mir_exclude_pass_number: bool = (false, parse_bool, [UNTRACKED],
+ "exclude the pass number when dumping MIR (used in tests) (default: no)"),
+ dump_mir_graphviz: bool = (false, parse_bool, [UNTRACKED],
+
+From 1a05cb2d9358879468c87645b0c1d5d1e8e12a12 Mon Sep 17 00:00:00 2001
+From: Josh Stone <jistone@redhat.com>
+Date: Fri, 14 Jun 2024 16:01:26 -0700
+Subject: [PATCH 2/3] Use `-Zdump-mir-exclude-alloc-bytes` in some mir-opt
+ tests
+
+---
+ tests/mir-opt/const_debuginfo.rs | 2 +-
+ tests/mir-opt/const_prop/address_of_pair.rs | 1 +
+ tests/mir-opt/const_prop/checked_add.rs | 2 +-
+ tests/mir-opt/const_prop/mutable_variable_aggregate.rs | 1 +
+ tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs | 1 +
+ tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs | 1 +
+ tests/mir-opt/const_prop/return_place.rs | 2 +-
+ tests/mir-opt/const_prop/slice_len.rs | 2 +-
+ tests/mir-opt/const_prop/tuple_literal_propagation.rs | 1 +
+ tests/mir-opt/dataflow-const-prop/checked.rs | 2 +-
+ tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs | 2 +-
+ tests/mir-opt/dataflow-const-prop/enum.rs | 1 +
+ tests/mir-opt/dataflow-const-prop/struct.rs | 1 +
+ tests/mir-opt/dataflow-const-prop/tuple.rs | 1 +
+ tests/mir-opt/enum_opt.rs | 2 +-
+ tests/mir-opt/gvn.rs | 1 +
+ tests/mir-opt/pre-codegen/optimizes_into_variable.rs | 2 +-
+ 17 files changed, 17 insertions(+), 8 deletions(-)
+
+diff --git a/tests/mir-opt/const_debuginfo.rs b/tests/mir-opt/const_debuginfo.rs
+index 907d7fef06746..3b2bc4559ced9 100644
+--- a/tests/mir-opt/const_debuginfo.rs
++++ b/tests/mir-opt/const_debuginfo.rs
+@@ -1,5 +1,5 @@
+ //@ test-mir-pass: ConstDebugInfo
+-//@ compile-flags: -C overflow-checks=no -Zmir-enable-passes=+GVN
++//@ compile-flags: -C overflow-checks=no -Zmir-enable-passes=+GVN -Zdump-mir-exclude-alloc-bytes
+
+ struct Point {
+ x: u32,
+diff --git a/tests/mir-opt/const_prop/address_of_pair.rs b/tests/mir-opt/const_prop/address_of_pair.rs
+index 6d0c0f8ad52a7..9acaaa0ccaf9d 100644
+--- a/tests/mir-opt/const_prop/address_of_pair.rs
++++ b/tests/mir-opt/const_prop/address_of_pair.rs
+@@ -1,4 +1,5 @@
+ //@ test-mir-pass: GVN
++//@ compile-flags: -Zdump-mir-exclude-alloc-bytes
+
+ // EMIT_MIR address_of_pair.fn0.GVN.diff
+ pub fn fn0() -> bool {
+diff --git a/tests/mir-opt/const_prop/checked_add.rs b/tests/mir-opt/const_prop/checked_add.rs
+index 0560b04957311..d450f7d03f38c 100644
+--- a/tests/mir-opt/const_prop/checked_add.rs
++++ b/tests/mir-opt/const_prop/checked_add.rs
+@@ -1,6 +1,6 @@
+ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+ //@ test-mir-pass: GVN
+-//@ compile-flags: -C overflow-checks=on
++//@ compile-flags: -C overflow-checks=on -Zdump-mir-exclude-alloc-bytes
+
+ // EMIT_MIR checked_add.main.GVN.diff
+ fn main() {
+diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate.rs b/tests/mir-opt/const_prop/mutable_variable_aggregate.rs
+index 7de647ed9c37f..80cd75215c1b7 100644
+--- a/tests/mir-opt/const_prop/mutable_variable_aggregate.rs
++++ b/tests/mir-opt/const_prop/mutable_variable_aggregate.rs
+@@ -1,4 +1,5 @@
+ //@ test-mir-pass: GVN
++//@ compile-flags: -Zdump-mir-exclude-alloc-bytes
+
+ // EMIT_MIR mutable_variable_aggregate.main.GVN.diff
+ fn main() {
+diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs b/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs
+index 5656c0e7a6863..856afd53ab46b 100644
+--- a/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs
++++ b/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs
+@@ -1,4 +1,5 @@
+ //@ test-mir-pass: GVN
++//@ compile-flags: -Zdump-mir-exclude-alloc-bytes
+
+ // EMIT_MIR mutable_variable_aggregate_mut_ref.main.GVN.diff
+ fn main() {
+diff --git a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs
+index cc92949128f72..2c6cc0db6b211 100644
+--- a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs
++++ b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs
+@@ -1,5 +1,6 @@
+ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+ //@ test-mir-pass: GVN
++//@ compile-flags: -Zdump-mir-exclude-alloc-bytes
+
+ // EMIT_MIR mutable_variable_unprop_assign.main.GVN.diff
+ fn main() {
+diff --git a/tests/mir-opt/const_prop/return_place.rs b/tests/mir-opt/const_prop/return_place.rs
+index e7eea11ae492f..c5293aa73e55b 100644
+--- a/tests/mir-opt/const_prop/return_place.rs
++++ b/tests/mir-opt/const_prop/return_place.rs
+@@ -1,6 +1,6 @@
+ //@ test-mir-pass: GVN
+ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+-//@ compile-flags: -C overflow-checks=on
++//@ compile-flags: -C overflow-checks=on -Zdump-mir-exclude-alloc-bytes
+
+ // EMIT_MIR return_place.add.GVN.diff
+ // EMIT_MIR return_place.add.PreCodegen.before.mir
+diff --git a/tests/mir-opt/const_prop/slice_len.rs b/tests/mir-opt/const_prop/slice_len.rs
+index 63cdbf01b3e82..265a496f39a36 100644
+--- a/tests/mir-opt/const_prop/slice_len.rs
++++ b/tests/mir-opt/const_prop/slice_len.rs
+@@ -1,5 +1,5 @@
+ //@ test-mir-pass: GVN
+-//@ compile-flags: -Zmir-enable-passes=+InstSimplify
++//@ compile-flags: -Zmir-enable-passes=+InstSimplify -Zdump-mir-exclude-alloc-bytes
+ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+ // EMIT_MIR_FOR_EACH_BIT_WIDTH
+
+diff --git a/tests/mir-opt/const_prop/tuple_literal_propagation.rs b/tests/mir-opt/const_prop/tuple_literal_propagation.rs
+index e42a62cb6fdf3..baed5670dda81 100644
+--- a/tests/mir-opt/const_prop/tuple_literal_propagation.rs
++++ b/tests/mir-opt/const_prop/tuple_literal_propagation.rs
+@@ -1,4 +1,5 @@
+ //@ test-mir-pass: GVN
++//@ compile-flags: -Zdump-mir-exclude-alloc-bytes
+ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+ // EMIT_MIR tuple_literal_propagation.main.GVN.diff
+
+diff --git a/tests/mir-opt/dataflow-const-prop/checked.rs b/tests/mir-opt/dataflow-const-prop/checked.rs
+index a73693464f95b..f5a6cdb2c8d35 100644
+--- a/tests/mir-opt/dataflow-const-prop/checked.rs
++++ b/tests/mir-opt/dataflow-const-prop/checked.rs
+@@ -1,5 +1,5 @@
+ //@ test-mir-pass: DataflowConstProp
+-//@ compile-flags: -Coverflow-checks=on
++//@ compile-flags: -Coverflow-checks=on -Zdump-mir-exclude-alloc-bytes
+ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+
+ // EMIT_MIR checked.main.DataflowConstProp.diff
+diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs
+index 3a0cbac328cb5..087bd7a18572c 100644
+--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs
++++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs
+@@ -1,5 +1,5 @@
+ //@ test-mir-pass: DataflowConstProp
+-//@ compile-flags: -Zmir-enable-passes=+GVN,+Inline
++//@ compile-flags: -Zmir-enable-passes=+GVN,+Inline -Zdump-mir-exclude-alloc-bytes
+ // EMIT_MIR_FOR_EACH_BIT_WIDTH
+ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+
+diff --git a/tests/mir-opt/dataflow-const-prop/enum.rs b/tests/mir-opt/dataflow-const-prop/enum.rs
+index 946cfa4c76c02..37304e3a270e9 100644
+--- a/tests/mir-opt/dataflow-const-prop/enum.rs
++++ b/tests/mir-opt/dataflow-const-prop/enum.rs
+@@ -1,4 +1,5 @@
+ //@ test-mir-pass: DataflowConstProp
++//@ compile-flags: -Zdump-mir-exclude-alloc-bytes
+ // EMIT_MIR_FOR_EACH_BIT_WIDTH
+
+ #![feature(custom_mir, core_intrinsics, rustc_attrs)]
+diff --git a/tests/mir-opt/dataflow-const-prop/struct.rs b/tests/mir-opt/dataflow-const-prop/struct.rs
+index eed782c9036b2..4b160c3dab7e8 100644
+--- a/tests/mir-opt/dataflow-const-prop/struct.rs
++++ b/tests/mir-opt/dataflow-const-prop/struct.rs
+@@ -1,4 +1,5 @@
+ //@ test-mir-pass: DataflowConstProp
++//@ compile-flags: -Zdump-mir-exclude-alloc-bytes
+ // EMIT_MIR_FOR_EACH_BIT_WIDTH
+
+ #[derive(Copy, Clone)]
+diff --git a/tests/mir-opt/dataflow-const-prop/tuple.rs b/tests/mir-opt/dataflow-const-prop/tuple.rs
+index d624e21f21ac4..19b675770abe9 100644
+--- a/tests/mir-opt/dataflow-const-prop/tuple.rs
++++ b/tests/mir-opt/dataflow-const-prop/tuple.rs
+@@ -1,4 +1,5 @@
+ //@ test-mir-pass: DataflowConstProp
++//@ compile-flags: -Zdump-mir-exclude-alloc-bytes
+ // EMIT_MIR_FOR_EACH_BIT_WIDTH
+
+ // EMIT_MIR tuple.main.DataflowConstProp.diff
+diff --git a/tests/mir-opt/enum_opt.rs b/tests/mir-opt/enum_opt.rs
+index 2cc5df84d6b59..e42be8ac06dc9 100644
+--- a/tests/mir-opt/enum_opt.rs
++++ b/tests/mir-opt/enum_opt.rs
+@@ -1,7 +1,7 @@
+ // skip-filecheck
+ //@ test-mir-pass: EnumSizeOpt
+ // EMIT_MIR_FOR_EACH_BIT_WIDTH
+-//@ compile-flags: -Zunsound-mir-opts
++//@ compile-flags: -Zunsound-mir-opts -Zdump-mir-exclude-alloc-bytes
+
+ #![feature(arbitrary_enum_discriminant, repr128)]
+
+diff --git a/tests/mir-opt/gvn.rs b/tests/mir-opt/gvn.rs
+index 86f42d23f3835..29f28e7af4145 100644
+--- a/tests/mir-opt/gvn.rs
++++ b/tests/mir-opt/gvn.rs
+@@ -1,4 +1,5 @@
+ //@ test-mir-pass: GVN
++//@ compile-flags: -Zdump-mir-exclude-alloc-bytes
+ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+ //@ only-64bit
+
+diff --git a/tests/mir-opt/pre-codegen/optimizes_into_variable.rs b/tests/mir-opt/pre-codegen/optimizes_into_variable.rs
+index de5e2d5c3121b..44b4b0ad888a5 100644
+--- a/tests/mir-opt/pre-codegen/optimizes_into_variable.rs
++++ b/tests/mir-opt/pre-codegen/optimizes_into_variable.rs
+@@ -1,6 +1,6 @@
+ // skip-filecheck
+ // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+-//@ compile-flags: -C overflow-checks=on
++//@ compile-flags: -C overflow-checks=on -Zdump-mir-exclude-alloc-bytes
+
+ struct Point {
+ x: u32,
+
+From 7c3673ff6f2ff4e8e85344c091c9feb4b5da1290 Mon Sep 17 00:00:00 2001
+From: Josh Stone <jistone@redhat.com>
+Date: Fri, 14 Jun 2024 16:05:22 -0700
+Subject: [PATCH 3/3] Bless mir-opt for excluded alloc bytes
+
+---
+ .../const_debuginfo.main.ConstDebugInfo.diff | 8 +--
+ .../const_prop/address_of_pair.fn0.GVN.diff | 6 +-
+ .../checked_add.main.GVN.panic-abort.diff | 6 +-
+ .../checked_add.main.GVN.panic-unwind.diff | 6 +-
+ .../mutable_variable_aggregate.main.GVN.diff | 6 +-
+ ...e_variable_aggregate_mut_ref.main.GVN.diff | 6 +-
+ ...le_unprop_assign.main.GVN.panic-abort.diff | 6 +-
+ ...e_unprop_assign.main.GVN.panic-unwind.diff | 6 +-
+ .../return_place.add.GVN.panic-abort.diff | 6 +-
+ .../return_place.add.GVN.panic-unwind.diff | 6 +-
+ ...lace.add.PreCodegen.before.panic-abort.mir | 4 +-
+ ...ace.add.PreCodegen.before.panic-unwind.mir | 4 +-
+ .../slice_len.main.GVN.32bit.panic-abort.diff | 6 +-
+ ...slice_len.main.GVN.32bit.panic-unwind.diff | 6 +-
+ .../slice_len.main.GVN.64bit.panic-abort.diff | 6 +-
+ ...slice_len.main.GVN.64bit.panic-unwind.diff | 6 +-
+ ...eral_propagation.main.GVN.panic-abort.diff | 6 +-
+ ...ral_propagation.main.GVN.panic-unwind.diff | 6 +-
+ ...ed.main.DataflowConstProp.panic-abort.diff | 10 +---
+ ...d.main.DataflowConstProp.panic-unwind.diff | 10 +---
+ ...n.DataflowConstProp.32bit.panic-abort.diff | 12 +---
+ ....DataflowConstProp.32bit.panic-unwind.diff | 12 +---
+ ...n.DataflowConstProp.64bit.panic-abort.diff | 12 +---
+ ....DataflowConstProp.64bit.panic-unwind.diff | 12 +---
+ ...oxed_slice.main.GVN.32bit.panic-abort.diff | 14 ++---
+ ...xed_slice.main.GVN.32bit.panic-unwind.diff | 14 ++---
+ ...oxed_slice.main.GVN.64bit.panic-abort.diff | 14 ++---
+ ...xed_slice.main.GVN.64bit.panic-unwind.diff | 14 ++---
+ .../enum.simple.DataflowConstProp.32bit.diff | 6 +-
+ .../enum.simple.DataflowConstProp.64bit.diff | 6 +-
+ .../enum.statics.DataflowConstProp.32bit.diff | 23 +++-----
+ .../enum.statics.DataflowConstProp.64bit.diff | 23 +++-----
+ .../struct.main.DataflowConstProp.32bit.diff | 58 ++++++-------------
+ .../struct.main.DataflowConstProp.64bit.diff | 58 ++++++-------------
+ .../tuple.main.DataflowConstProp.32bit.diff | 18 ++----
+ .../tuple.main.DataflowConstProp.64bit.diff | 18 ++----
+ .../enum_opt.cand.EnumSizeOpt.32bit.diff | 6 +-
+ .../enum_opt.cand.EnumSizeOpt.64bit.diff | 6 +-
+ .../enum_opt.unin.EnumSizeOpt.32bit.diff | 6 +-
+ .../enum_opt.unin.EnumSizeOpt.64bit.diff | 6 +-
+ ...vn.arithmetic_checked.GVN.panic-abort.diff | 6 +-
+ ...n.arithmetic_checked.GVN.panic-unwind.diff | 6 +-
+ .../gvn.fn_pointers.GVN.panic-abort.diff | 18 +++---
+ .../gvn.fn_pointers.GVN.panic-unwind.diff | 18 +++---
+ .../gvn.indirect_static.GVN.panic-abort.diff | 4 +-
+ .../gvn.indirect_static.GVN.panic-unwind.diff | 4 +-
+ .../gvn.wide_ptr_integer.GVN.panic-abort.diff | 10 +---
+ ...gvn.wide_ptr_integer.GVN.panic-unwind.diff | 10 +---
+ ...o_variable.main.GVN.32bit.panic-abort.diff | 6 +-
+ ..._variable.main.GVN.32bit.panic-unwind.diff | 6 +-
+ ...o_variable.main.GVN.64bit.panic-abort.diff | 6 +-
+ ..._variable.main.GVN.64bit.panic-unwind.diff | 6 +-
+ 52 files changed, 182 insertions(+), 382 deletions(-)
+
+diff --git a/tests/mir-opt/const_debuginfo.main.ConstDebugInfo.diff b/tests/mir-opt/const_debuginfo.main.ConstDebugInfo.diff
+index ac33f51984cd8..8088984bc77ab 100644
+--- a/tests/mir-opt/const_debuginfo.main.ConstDebugInfo.diff
++++ b/tests/mir-opt/const_debuginfo.main.ConstDebugInfo.diff
+@@ -105,11 +105,7 @@
+ }
+ }
+
+- ALLOC0 (size: 8, align: 4) {
+- 20 00 00 00 20 00 00 00 │ ... ...
+- }
++ ALLOC0 (size: 8, align: 4) { .. }
+
+- ALLOC1 (size: 4, align: 2) {
+- 01 00 63 00 │ ..c.
+- }
++ ALLOC1 (size: 4, align: 2) { .. }
+
+diff --git a/tests/mir-opt/const_prop/address_of_pair.fn0.GVN.diff b/tests/mir-opt/const_prop/address_of_pair.fn0.GVN.diff
+index 3f4958f60e85b..ac372f837268b 100644
+--- a/tests/mir-opt/const_prop/address_of_pair.fn0.GVN.diff
++++ b/tests/mir-opt/const_prop/address_of_pair.fn0.GVN.diff
+@@ -44,9 +44,7 @@
+ StorageDead(_2);
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 01 00 00 00 00 __ __ __ │ .....░░░
+ }
+++
+++ ALLOC0 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/const_prop/checked_add.main.GVN.panic-abort.diff b/tests/mir-opt/const_prop/checked_add.main.GVN.panic-abort.diff
+index 0e93c167ebc96..798f957caa58c 100644
+--- a/tests/mir-opt/const_prop/checked_add.main.GVN.panic-abort.diff
++++ b/tests/mir-opt/const_prop/checked_add.main.GVN.panic-abort.diff
+@@ -24,9 +24,7 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 02 00 00 00 00 __ __ __ │ .....░░░
+ }
+++
+++ ALLOC0 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/const_prop/checked_add.main.GVN.panic-unwind.diff b/tests/mir-opt/const_prop/checked_add.main.GVN.panic-unwind.diff
+index 589eed5776c9f..a09f8ee5be12a 100644
+--- a/tests/mir-opt/const_prop/checked_add.main.GVN.panic-unwind.diff
++++ b/tests/mir-opt/const_prop/checked_add.main.GVN.panic-unwind.diff
+@@ -24,9 +24,7 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 02 00 00 00 00 __ __ __ │ .....░░░
+ }
+++
+++ ALLOC0 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate.main.GVN.diff b/tests/mir-opt/const_prop/mutable_variable_aggregate.main.GVN.diff
+index b6ff7b0fc234d..7584353620ec5 100644
+--- a/tests/mir-opt/const_prop/mutable_variable_aggregate.main.GVN.diff
++++ b/tests/mir-opt/const_prop/mutable_variable_aggregate.main.GVN.diff
+@@ -24,9 +24,7 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 2a 00 00 00 2b 00 00 00 │ *...+...
+ }
+++
+++ ALLOC0 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.main.GVN.diff b/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.main.GVN.diff
+index 4ed7c98514796..e16e2969eb895 100644
+--- a/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.main.GVN.diff
++++ b/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.main.GVN.diff
+@@ -31,9 +31,7 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 2a 00 00 00 2b 00 00 00 │ *...+...
+ }
+++
+++ ALLOC0 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.GVN.panic-abort.diff b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.GVN.panic-abort.diff
+index d1d23675bfd91..19d79694666f2 100644
+--- a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.GVN.panic-abort.diff
++++ b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.GVN.panic-abort.diff
+@@ -48,9 +48,7 @@
+ + nop;
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 01 00 00 00 02 00 00 00 │ ........
+ }
+++
+++ ALLOC0 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.GVN.panic-unwind.diff b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.GVN.panic-unwind.diff
+index 4d69c9ce2efe6..2bb277bf27f7f 100644
+--- a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.GVN.panic-unwind.diff
++++ b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.GVN.panic-unwind.diff
+@@ -48,9 +48,7 @@
+ + nop;
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 01 00 00 00 02 00 00 00 │ ........
+ }
+++
+++ ALLOC0 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/const_prop/return_place.add.GVN.panic-abort.diff b/tests/mir-opt/const_prop/return_place.add.GVN.panic-abort.diff
+index b2d40daa80c4c..037fe60c2fdb3 100644
+--- a/tests/mir-opt/const_prop/return_place.add.GVN.panic-abort.diff
++++ b/tests/mir-opt/const_prop/return_place.add.GVN.panic-abort.diff
+@@ -17,9 +17,7 @@
+ + _0 = const 4_u32;
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 04 00 00 00 00 __ __ __ │ .....░░░
+ }
+++
+++ ALLOC0 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/const_prop/return_place.add.GVN.panic-unwind.diff b/tests/mir-opt/const_prop/return_place.add.GVN.panic-unwind.diff
+index 2eafc51cd3db6..438a1cebea8cb 100644
+--- a/tests/mir-opt/const_prop/return_place.add.GVN.panic-unwind.diff
++++ b/tests/mir-opt/const_prop/return_place.add.GVN.panic-unwind.diff
+@@ -17,9 +17,7 @@
+ + _0 = const 4_u32;
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 04 00 00 00 00 __ __ __ │ .....░░░
+ }
+++
+++ ALLOC0 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/const_prop/return_place.add.PreCodegen.before.panic-abort.mir b/tests/mir-opt/const_prop/return_place.add.PreCodegen.before.panic-abort.mir
+index f87c26bb004c6..66fd61cc3aee9 100644
+--- a/tests/mir-opt/const_prop/return_place.add.PreCodegen.before.panic-abort.mir
++++ b/tests/mir-opt/const_prop/return_place.add.PreCodegen.before.panic-abort.mir
+@@ -15,6 +15,4 @@ fn add() -> u32 {
+ }
+ }
+
+-ALLOC0 (size: 8, align: 4) {
+- 04 00 00 00 00 __ __ __ │ .....░░░
+-}
++ALLOC0 (size: 8, align: 4) { .. }
+diff --git a/tests/mir-opt/const_prop/return_place.add.PreCodegen.before.panic-unwind.mir b/tests/mir-opt/const_prop/return_place.add.PreCodegen.before.panic-unwind.mir
+index 33f97591387c3..f9b07a59de9c3 100644
+--- a/tests/mir-opt/const_prop/return_place.add.PreCodegen.before.panic-unwind.mir
++++ b/tests/mir-opt/const_prop/return_place.add.PreCodegen.before.panic-unwind.mir
+@@ -15,6 +15,4 @@ fn add() -> u32 {
+ }
+ }
+
+-ALLOC0 (size: 8, align: 4) {
+- 04 00 00 00 00 __ __ __ │ .....░░░
+-}
++ALLOC0 (size: 8, align: 4) { .. }
+diff --git a/tests/mir-opt/const_prop/slice_len.main.GVN.32bit.panic-abort.diff b/tests/mir-opt/const_prop/slice_len.main.GVN.32bit.panic-abort.diff
+index ef298dddd5a49..8415789de6ecd 100644
+--- a/tests/mir-opt/const_prop/slice_len.main.GVN.32bit.panic-abort.diff
++++ b/tests/mir-opt/const_prop/slice_len.main.GVN.32bit.panic-abort.diff
+@@ -49,9 +49,7 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 12, align: 4) {
+-+ 01 00 00 00 02 00 00 00 03 00 00 00 │ ............
+ }
+++
+++ ALLOC0 (size: 12, align: 4) { .. }
+
+diff --git a/tests/mir-opt/const_prop/slice_len.main.GVN.32bit.panic-unwind.diff b/tests/mir-opt/const_prop/slice_len.main.GVN.32bit.panic-unwind.diff
+index 5379df3f60b44..fea7caac3cdce 100644
+--- a/tests/mir-opt/const_prop/slice_len.main.GVN.32bit.panic-unwind.diff
++++ b/tests/mir-opt/const_prop/slice_len.main.GVN.32bit.panic-unwind.diff
+@@ -49,9 +49,7 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 12, align: 4) {
+-+ 01 00 00 00 02 00 00 00 03 00 00 00 │ ............
+ }
+++
+++ ALLOC0 (size: 12, align: 4) { .. }
+
+diff --git a/tests/mir-opt/const_prop/slice_len.main.GVN.64bit.panic-abort.diff b/tests/mir-opt/const_prop/slice_len.main.GVN.64bit.panic-abort.diff
+index ef298dddd5a49..8415789de6ecd 100644
+--- a/tests/mir-opt/const_prop/slice_len.main.GVN.64bit.panic-abort.diff
++++ b/tests/mir-opt/const_prop/slice_len.main.GVN.64bit.panic-abort.diff
+@@ -49,9 +49,7 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 12, align: 4) {
+-+ 01 00 00 00 02 00 00 00 03 00 00 00 │ ............
+ }
+++
+++ ALLOC0 (size: 12, align: 4) { .. }
+
+diff --git a/tests/mir-opt/const_prop/slice_len.main.GVN.64bit.panic-unwind.diff b/tests/mir-opt/const_prop/slice_len.main.GVN.64bit.panic-unwind.diff
+index 5379df3f60b44..fea7caac3cdce 100644
+--- a/tests/mir-opt/const_prop/slice_len.main.GVN.64bit.panic-unwind.diff
++++ b/tests/mir-opt/const_prop/slice_len.main.GVN.64bit.panic-unwind.diff
+@@ -49,9 +49,7 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 12, align: 4) {
+-+ 01 00 00 00 02 00 00 00 03 00 00 00 │ ............
+ }
+++
+++ ALLOC0 (size: 12, align: 4) { .. }
+
+diff --git a/tests/mir-opt/const_prop/tuple_literal_propagation.main.GVN.panic-abort.diff b/tests/mir-opt/const_prop/tuple_literal_propagation.main.GVN.panic-abort.diff
+index c2f3fb1b3b575..bf8fece3d37b9 100644
+--- a/tests/mir-opt/const_prop/tuple_literal_propagation.main.GVN.panic-abort.diff
++++ b/tests/mir-opt/const_prop/tuple_literal_propagation.main.GVN.panic-abort.diff
+@@ -31,9 +31,7 @@
+ + nop;
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 01 00 00 00 02 00 00 00 │ ........
+ }
+++
+++ ALLOC0 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/const_prop/tuple_literal_propagation.main.GVN.panic-unwind.diff b/tests/mir-opt/const_prop/tuple_literal_propagation.main.GVN.panic-unwind.diff
+index 55d9a3b0cac67..02a75849d8872 100644
+--- a/tests/mir-opt/const_prop/tuple_literal_propagation.main.GVN.panic-unwind.diff
++++ b/tests/mir-opt/const_prop/tuple_literal_propagation.main.GVN.panic-unwind.diff
+@@ -31,9 +31,7 @@
+ + nop;
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 01 00 00 00 02 00 00 00 │ ........
+ }
+++
+++ ALLOC0 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/dataflow-const-prop/checked.main.DataflowConstProp.panic-abort.diff b/tests/mir-opt/dataflow-const-prop/checked.main.DataflowConstProp.panic-abort.diff
+index 53663c6476bdc..79ea55617481e 100644
+--- a/tests/mir-opt/dataflow-const-prop/checked.main.DataflowConstProp.panic-abort.diff
++++ b/tests/mir-opt/dataflow-const-prop/checked.main.DataflowConstProp.panic-abort.diff
+@@ -76,13 +76,9 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
++ }
+ +
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 00 00 00 80 01 __ __ __ │ .....░░░
+-+ }
+++ ALLOC0 (size: 8, align: 4) { .. }
+ +
+-+ ALLOC1 (size: 8, align: 4) {
+-+ 03 00 00 00 00 __ __ __ │ .....░░░
+- }
+++ ALLOC1 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/dataflow-const-prop/checked.main.DataflowConstProp.panic-unwind.diff b/tests/mir-opt/dataflow-const-prop/checked.main.DataflowConstProp.panic-unwind.diff
+index 34feb2a640629..bd22c50dd8fcf 100644
+--- a/tests/mir-opt/dataflow-const-prop/checked.main.DataflowConstProp.panic-unwind.diff
++++ b/tests/mir-opt/dataflow-const-prop/checked.main.DataflowConstProp.panic-unwind.diff
+@@ -76,13 +76,9 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
++ }
+ +
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 00 00 00 80 01 __ __ __ │ .....░░░
+-+ }
+++ ALLOC0 (size: 8, align: 4) { .. }
+ +
+-+ ALLOC1 (size: 8, align: 4) {
+-+ 03 00 00 00 00 __ __ __ │ .....░░░
+- }
+++ ALLOC1 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-abort.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-abort.diff
+index 8005bc23cf699..4097e060f4d47 100644
+--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-abort.diff
++++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-abort.diff
+@@ -94,15 +94,9 @@
+ }
+ }
+
+- ALLOC2 (size: 8, align: 4) {
+- 01 00 00 00 00 00 00 00 │ ........
+- }
++ ALLOC2 (size: 8, align: 4) { .. }
+
+- ALLOC1 (size: 8, align: 4) {
+- 01 00 00 00 00 00 00 00 │ ........
+- }
++ ALLOC1 (size: 8, align: 4) { .. }
+
+- ALLOC0 (size: 8, align: 4) {
+- 01 00 00 00 00 00 00 00 │ ........
+- }
++ ALLOC0 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-unwind.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-unwind.diff
+index 42b1be32387c4..ff44d0df5e3e9 100644
+--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-unwind.diff
++++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-unwind.diff
+@@ -98,15 +98,9 @@
+ }
+ }
+
+- ALLOC2 (size: 8, align: 4) {
+- 01 00 00 00 00 00 00 00 │ ........
+- }
++ ALLOC2 (size: 8, align: 4) { .. }
+
+- ALLOC1 (size: 8, align: 4) {
+- 01 00 00 00 00 00 00 00 │ ........
+- }
++ ALLOC1 (size: 8, align: 4) { .. }
+
+- ALLOC0 (size: 8, align: 4) {
+- 01 00 00 00 00 00 00 00 │ ........
+- }
++ ALLOC0 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-abort.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-abort.diff
+index 7b57b0db50c94..3662c3b59d271 100644
+--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-abort.diff
++++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-abort.diff
+@@ -94,15 +94,9 @@
+ }
+ }
+
+- ALLOC2 (size: 16, align: 8) {
+- 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
+- }
++ ALLOC2 (size: 16, align: 8) { .. }
+
+- ALLOC1 (size: 16, align: 8) {
+- 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
+- }
++ ALLOC1 (size: 16, align: 8) { .. }
+
+- ALLOC0 (size: 16, align: 8) {
+- 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
+- }
++ ALLOC0 (size: 16, align: 8) { .. }
+
+diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-unwind.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-unwind.diff
+index 2e75a63e29052..68dee57dee9e0 100644
+--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-unwind.diff
++++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-unwind.diff
+@@ -98,15 +98,9 @@
+ }
+ }
+
+- ALLOC2 (size: 16, align: 8) {
+- 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
+- }
++ ALLOC2 (size: 16, align: 8) { .. }
+
+- ALLOC1 (size: 16, align: 8) {
+- 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
+- }
++ ALLOC1 (size: 16, align: 8) { .. }
+
+- ALLOC0 (size: 16, align: 8) {
+- 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
+- }
++ ALLOC0 (size: 16, align: 8) { .. }
+
+diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.GVN.32bit.panic-abort.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.GVN.32bit.panic-abort.diff
+index 06011f9d75967..9d96e895c8aa5 100644
+--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.GVN.32bit.panic-abort.diff
++++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.GVN.32bit.panic-abort.diff
+@@ -102,17 +102,11 @@
+ _0 = const ();
+ drop(_1) -> [return: bb1, unwind unreachable];
+ }
+-+ }
++ }
+ +
+-+ ALLOC2 (size: 8, align: 4) {
+-+ 01 00 00 00 00 00 00 00 │ ........
+-+ }
+++ ALLOC2 (size: 8, align: 4) { .. }
+ +
+-+ ALLOC1 (size: 8, align: 4) {
+-+ 01 00 00 00 00 00 00 00 │ ........
+-+ }
+++ ALLOC1 (size: 8, align: 4) { .. }
+ +
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 01 00 00 00 00 00 00 00 │ ........
+- }
+++ ALLOC0 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.GVN.32bit.panic-unwind.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.GVN.32bit.panic-unwind.diff
+index eb4a3ffd91d2e..0bdff584b01ec 100644
+--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.GVN.32bit.panic-unwind.diff
++++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.GVN.32bit.panic-unwind.diff
+@@ -106,17 +106,11 @@
+ _0 = const ();
+ drop(_1) -> [return: bb1, unwind: bb2];
+ }
+-+ }
++ }
+ +
+-+ ALLOC2 (size: 8, align: 4) {
+-+ 01 00 00 00 00 00 00 00 │ ........
+-+ }
+++ ALLOC2 (size: 8, align: 4) { .. }
+ +
+-+ ALLOC1 (size: 8, align: 4) {
+-+ 01 00 00 00 00 00 00 00 │ ........
+-+ }
+++ ALLOC1 (size: 8, align: 4) { .. }
+ +
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 01 00 00 00 00 00 00 00 │ ........
+- }
+++ ALLOC0 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.GVN.64bit.panic-abort.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.GVN.64bit.panic-abort.diff
+index a7cc243e548e9..99e96fe5d70fd 100644
+--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.GVN.64bit.panic-abort.diff
++++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.GVN.64bit.panic-abort.diff
+@@ -102,17 +102,11 @@
+ _0 = const ();
+ drop(_1) -> [return: bb1, unwind unreachable];
+ }
+-+ }
++ }
+ +
+-+ ALLOC2 (size: 16, align: 8) {
+-+ 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
+-+ }
+++ ALLOC2 (size: 16, align: 8) { .. }
+ +
+-+ ALLOC1 (size: 16, align: 8) {
+-+ 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
+-+ }
+++ ALLOC1 (size: 16, align: 8) { .. }
+ +
+-+ ALLOC0 (size: 16, align: 8) {
+-+ 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
+- }
+++ ALLOC0 (size: 16, align: 8) { .. }
+
+diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.GVN.64bit.panic-unwind.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.GVN.64bit.panic-unwind.diff
+index c905a48862caa..5eefabeac3868 100644
+--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.GVN.64bit.panic-unwind.diff
++++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.GVN.64bit.panic-unwind.diff
+@@ -106,17 +106,11 @@
+ _0 = const ();
+ drop(_1) -> [return: bb1, unwind: bb2];
+ }
+-+ }
++ }
+ +
+-+ ALLOC2 (size: 16, align: 8) {
+-+ 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
+-+ }
+++ ALLOC2 (size: 16, align: 8) { .. }
+ +
+-+ ALLOC1 (size: 16, align: 8) {
+-+ 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
+-+ }
+++ ALLOC1 (size: 16, align: 8) { .. }
+ +
+-+ ALLOC0 (size: 16, align: 8) {
+-+ 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
+- }
+++ ALLOC0 (size: 16, align: 8) { .. }
+
+diff --git a/tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.32bit.diff b/tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.32bit.diff
+index 89ed26f065b28..a64dda0d06c48 100644
+--- a/tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.32bit.diff
++++ b/tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.32bit.diff
+@@ -60,9 +60,7 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 00 00 00 00 00 00 00 00 │ ........
+ }
+++
+++ ALLOC0 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.64bit.diff b/tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.64bit.diff
+index 89ed26f065b28..a64dda0d06c48 100644
+--- a/tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.64bit.diff
++++ b/tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.64bit.diff
+@@ -60,9 +60,7 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 00 00 00 00 00 00 00 00 │ ........
+ }
+++
+++ ALLOC0 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.32bit.diff b/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.32bit.diff
+index fe8ed0114897d..b4d14f25fe2ab 100644
+--- a/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.32bit.diff
++++ b/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.32bit.diff
+@@ -43,7 +43,7 @@
+ bb0: {
+ StorageLive(_1);
+ StorageLive(_2);
+- _2 = const {ALLOC1: &E};
++ _2 = const {ALLOC0: &E};
+ - _1 = (*_2);
+ + _1 = const E::V1(0_i32);
+ StorageDead(_2);
+@@ -79,7 +79,7 @@
+ bb4: {
+ StorageLive(_7);
+ StorageLive(_8);
+- _8 = const {ALLOC2: &&E};
++ _8 = const {ALLOC1: &&E};
+ _7 = (*_8);
+ StorageDead(_8);
+ StorageLive(_9);
+@@ -111,21 +111,14 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
+-+
+-+ ALLOC3 (size: 8, align: 4) {
+-+ 00 00 00 00 00 00 00 00 │ ........
+ }
+
+- ALLOC2 (static: RC, size: 4, align: 4) {
+- ╾ALLOC0<imm>╼ │ ╾──╼
+- }
+++ ALLOC2 (size: 8, align: 4) { .. }
+++
++ ALLOC1 (static: RC, size: 4, align: 4) { .. }
+
+- ALLOC0 (size: 8, align: 4) {
+- 01 00 00 00 04 00 00 00 │ ........
+- }
++- ALLOC2 (size: 8, align: 4) { .. }
+++ ALLOC3 (size: 8, align: 4) { .. }
+
+- ALLOC1 (static: statics::C, size: 8, align: 4) {
+- 00 00 00 00 00 00 00 00 │ ........
+- }
++ ALLOC0 (static: statics::C, size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.64bit.diff b/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.64bit.diff
+index df3a989d09eba..57d02b87d1369 100644
+--- a/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.64bit.diff
++++ b/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.64bit.diff
+@@ -43,7 +43,7 @@
+ bb0: {
+ StorageLive(_1);
+ StorageLive(_2);
+- _2 = const {ALLOC1: &E};
++ _2 = const {ALLOC0: &E};
+ - _1 = (*_2);
+ + _1 = const E::V1(0_i32);
+ StorageDead(_2);
+@@ -79,7 +79,7 @@
+ bb4: {
+ StorageLive(_7);
+ StorageLive(_8);
+- _8 = const {ALLOC2: &&E};
++ _8 = const {ALLOC1: &&E};
+ _7 = (*_8);
+ StorageDead(_8);
+ StorageLive(_9);
+@@ -111,21 +111,14 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
+-+
+-+ ALLOC3 (size: 8, align: 4) {
+-+ 00 00 00 00 00 00 00 00 │ ........
+ }
+
+- ALLOC2 (static: RC, size: 8, align: 8) {
+- ╾ALLOC0<imm>╼ │ ╾──────╼
+- }
+++ ALLOC2 (size: 8, align: 4) { .. }
+++
++ ALLOC1 (static: RC, size: 8, align: 8) { .. }
+
+- ALLOC0 (size: 8, align: 4) {
+- 01 00 00 00 04 00 00 00 │ ........
+- }
++- ALLOC2 (size: 8, align: 4) { .. }
+++ ALLOC3 (size: 8, align: 4) { .. }
+
+- ALLOC1 (static: statics::C, size: 8, align: 4) {
+- 00 00 00 00 00 00 00 00 │ ........
+- }
++ ALLOC0 (static: statics::C, size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.32bit.diff b/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.32bit.diff
+index f674169e28b26..a6da1483c1ac5 100644
+--- a/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.32bit.diff
++++ b/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.32bit.diff
+@@ -112,7 +112,7 @@
+ _9 = (_10.2: &[f32]);
+ StorageDead(_10);
+ StorageLive(_14);
+- _14 = const {ALLOC4: &&SmallStruct};
++ _14 = const {ALLOC0: &&SmallStruct};
+ _31 = deref_copy (*_14);
+ StorageLive(_11);
+ _32 = deref_copy (*_14);
+@@ -149,7 +149,7 @@
+ _21 = (_22.2: &[f32]);
+ StorageDead(_22);
+ StorageLive(_26);
+- _26 = const {ALLOC5: &&BigStruct};
++ _26 = const {ALLOC1: &&BigStruct};
+ _35 = deref_copy (*_26);
+ StorageLive(_23);
+ _36 = deref_copy (*_26);
+@@ -197,51 +197,31 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
++ }
++
+++ ALLOC2 (size: 8, align: 4) { .. }
+ +
+-+ ALLOC6 (size: 8, align: 4) {
+-+ 01 00 00 00 23 00 00 00 │ ....#...
+-+ }
+++ ALLOC3 (size: 8, align: 4) { .. }
+ +
+-+ ALLOC7 (size: 8, align: 4) {
+-+ 01 00 00 00 23 00 00 00 │ ....#...
+-+ }
+++ ALLOC4 (size: 8, align: 4) { .. }
+ +
+-+ ALLOC8 (size: 8, align: 4) {
+-+ 01 00 00 00 23 00 00 00 │ ....#...
+-+ }
+++ ALLOC5 (size: 8, align: 4) { .. }
+ +
+-+ ALLOC9 (size: 8, align: 4) {
+-+ 01 00 00 00 01 00 00 00 │ ........
+-+ }
+++ ALLOC6 (size: 4, align: 4) { .. }
+ +
+-+ ALLOC10 (size: 4, align: 4) {
+-+ 01 00 00 00 │ ....
+- }
+-
+- ALLOC5 (static: BIG_STAT, size: 4, align: 4) {
+- ╾ALLOC0<imm>╼ │ ╾──╼
+- }
++ ALLOC1 (static: BIG_STAT, size: 4, align: 4) { .. }
+
+- ALLOC0 (size: 20, align: 4) {
+- 0x00 │ 01 00 00 00 23 00 00 00 ╾ALLOC1<imm>╼ 02 00 00 00 │ ....#...╾──╼....
+- 0x10 │ 00 00 a4 42 │ ...B
+- }
++- ALLOC2 (size: 20, align: 4) { .. }
+++ ALLOC7 (size: 20, align: 4) { .. }
+
+- ALLOC1 (size: 8, align: 4) {
+- 00 00 34 42 00 00 90 42 │ ..4B...B
+- }
++- ALLOC3 (size: 8, align: 4) { .. }
+++ ALLOC8 (size: 8, align: 4) { .. }
+
+- ALLOC4 (static: SMALL_STAT, size: 4, align: 4) {
+- ╾ALLOC2<imm>╼ │ ╾──╼
+- }
++ ALLOC0 (static: SMALL_STAT, size: 4, align: 4) { .. }
+
+- ALLOC2 (size: 20, align: 4) {
+- 0x00 │ 00 00 00 00 __ __ __ __ ╾ALLOC3<imm>╼ 01 00 00 00 │ ....░░░░╾──╼....
+- 0x10 │ 00 00 10 41 │ ...A
+- }
++- ALLOC4 (size: 20, align: 4) { .. }
+++ ALLOC9 (size: 20, align: 4) { .. }
+
+- ALLOC3 (size: 4, align: 4) {
+- 00 00 50 41 │ ..PA
+- }
++- ALLOC5 (size: 4, align: 4) { .. }
+++ ALLOC10 (size: 4, align: 4) { .. }
+
+diff --git a/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.64bit.diff b/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.64bit.diff
+index c2608190a6b97..7ca25e4429953 100644
+--- a/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.64bit.diff
++++ b/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.64bit.diff
+@@ -112,7 +112,7 @@
+ _9 = (_10.2: &[f32]);
+ StorageDead(_10);
+ StorageLive(_14);
+- _14 = const {ALLOC4: &&SmallStruct};
++ _14 = const {ALLOC0: &&SmallStruct};
+ _31 = deref_copy (*_14);
+ StorageLive(_11);
+ _32 = deref_copy (*_14);
+@@ -149,7 +149,7 @@
+ _21 = (_22.2: &[f32]);
+ StorageDead(_22);
+ StorageLive(_26);
+- _26 = const {ALLOC5: &&BigStruct};
++ _26 = const {ALLOC1: &&BigStruct};
+ _35 = deref_copy (*_26);
+ StorageLive(_23);
+ _36 = deref_copy (*_26);
+@@ -197,51 +197,31 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
++ }
++
+++ ALLOC2 (size: 8, align: 4) { .. }
+ +
+-+ ALLOC6 (size: 8, align: 4) {
+-+ 01 00 00 00 23 00 00 00 │ ....#...
+-+ }
+++ ALLOC3 (size: 8, align: 4) { .. }
+ +
+-+ ALLOC7 (size: 8, align: 4) {
+-+ 01 00 00 00 23 00 00 00 │ ....#...
+-+ }
+++ ALLOC4 (size: 8, align: 4) { .. }
+ +
+-+ ALLOC8 (size: 8, align: 4) {
+-+ 01 00 00 00 23 00 00 00 │ ....#...
+-+ }
+++ ALLOC5 (size: 8, align: 4) { .. }
+ +
+-+ ALLOC9 (size: 8, align: 4) {
+-+ 01 00 00 00 01 00 00 00 │ ........
+-+ }
+++ ALLOC6 (size: 4, align: 4) { .. }
+ +
+-+ ALLOC10 (size: 4, align: 4) {
+-+ 01 00 00 00 │ ....
+- }
+-
+- ALLOC5 (static: BIG_STAT, size: 8, align: 8) {
+- ╾ALLOC0<imm>╼ │ ╾──────╼
+- }
++ ALLOC1 (static: BIG_STAT, size: 8, align: 8) { .. }
+
+- ALLOC0 (size: 32, align: 8) {
+- 0x00 │ 01 00 00 00 23 00 00 00 ╾ALLOC1<imm>╼ │ ....#...╾──────╼
+- 0x10 │ 02 00 00 00 00 00 00 00 00 00 a4 42 __ __ __ __ │ ...........B░░░░
+- }
++- ALLOC2 (size: 32, align: 8) { .. }
+++ ALLOC7 (size: 32, align: 8) { .. }
+
+- ALLOC1 (size: 8, align: 4) {
+- 00 00 34 42 00 00 90 42 │ ..4B...B
+- }
++- ALLOC3 (size: 8, align: 4) { .. }
+++ ALLOC8 (size: 8, align: 4) { .. }
+
+- ALLOC4 (static: SMALL_STAT, size: 8, align: 8) {
+- ╾ALLOC2<imm>╼ │ ╾──────╼
+- }
++ ALLOC0 (static: SMALL_STAT, size: 8, align: 8) { .. }
+
+- ALLOC2 (size: 32, align: 8) {
+- 0x00 │ 00 00 00 00 __ __ __ __ ╾ALLOC3<imm>╼ │ ....░░░░╾──────╼
+- 0x10 │ 01 00 00 00 00 00 00 00 00 00 10 41 __ __ __ __ │ ...........A░░░░
+- }
++- ALLOC4 (size: 32, align: 8) { .. }
+++ ALLOC9 (size: 32, align: 8) { .. }
+
+- ALLOC3 (size: 4, align: 4) {
+- 00 00 50 41 │ ..PA
+- }
++- ALLOC5 (size: 4, align: 4) { .. }
+++ ALLOC10 (size: 4, align: 4) { .. }
+
+diff --git a/tests/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.32bit.diff b/tests/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.32bit.diff
+index f5723cac7d9c8..e4031b65caafe 100644
+--- a/tests/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.32bit.diff
++++ b/tests/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.32bit.diff
+@@ -92,21 +92,13 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
++ }
+ +
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 02 00 00 00 03 00 00 00 │ ........
+-+ }
+++ ALLOC0 (size: 8, align: 4) { .. }
+ +
+-+ ALLOC1 (size: 8, align: 4) {
+-+ 02 00 00 00 03 00 00 00 │ ........
+-+ }
+++ ALLOC1 (size: 8, align: 4) { .. }
+ +
+-+ ALLOC2 (size: 8, align: 4) {
+-+ 02 00 00 00 03 00 00 00 │ ........
+-+ }
+++ ALLOC2 (size: 8, align: 4) { .. }
+ +
+-+ ALLOC3 (size: 8, align: 4) {
+-+ 01 00 00 00 02 00 00 00 │ ........
+- }
+++ ALLOC3 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.64bit.diff b/tests/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.64bit.diff
+index f5723cac7d9c8..e4031b65caafe 100644
+--- a/tests/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.64bit.diff
++++ b/tests/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.64bit.diff
+@@ -92,21 +92,13 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
++ }
+ +
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 02 00 00 00 03 00 00 00 │ ........
+-+ }
+++ ALLOC0 (size: 8, align: 4) { .. }
+ +
+-+ ALLOC1 (size: 8, align: 4) {
+-+ 02 00 00 00 03 00 00 00 │ ........
+-+ }
+++ ALLOC1 (size: 8, align: 4) { .. }
+ +
+-+ ALLOC2 (size: 8, align: 4) {
+-+ 02 00 00 00 03 00 00 00 │ ........
+-+ }
+++ ALLOC2 (size: 8, align: 4) { .. }
+ +
+-+ ALLOC3 (size: 8, align: 4) {
+-+ 01 00 00 00 02 00 00 00 │ ........
+- }
+++ ALLOC3 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/enum_opt.cand.EnumSizeOpt.32bit.diff b/tests/mir-opt/enum_opt.cand.EnumSizeOpt.32bit.diff
+index 775a60f1c9603..085c55caaa03c 100644
+--- a/tests/mir-opt/enum_opt.cand.EnumSizeOpt.32bit.diff
++++ b/tests/mir-opt/enum_opt.cand.EnumSizeOpt.32bit.diff
+@@ -64,9 +64,7 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 02 00 00 00 05 20 00 00 │ ..... ..
+ }
+++
+++ ALLOC0 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/enum_opt.cand.EnumSizeOpt.64bit.diff b/tests/mir-opt/enum_opt.cand.EnumSizeOpt.64bit.diff
+index c4b57579943d4..798b7c10fe8d5 100644
+--- a/tests/mir-opt/enum_opt.cand.EnumSizeOpt.64bit.diff
++++ b/tests/mir-opt/enum_opt.cand.EnumSizeOpt.64bit.diff
+@@ -64,9 +64,7 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 16, align: 8) {
+-+ 02 00 00 00 00 00 00 00 05 20 00 00 00 00 00 00 │ ......... ......
+ }
+++
+++ ALLOC0 (size: 16, align: 8) { .. }
+
+diff --git a/tests/mir-opt/enum_opt.unin.EnumSizeOpt.32bit.diff b/tests/mir-opt/enum_opt.unin.EnumSizeOpt.32bit.diff
+index f7d0d1fb56c3e..a04829af4b532 100644
+--- a/tests/mir-opt/enum_opt.unin.EnumSizeOpt.32bit.diff
++++ b/tests/mir-opt/enum_opt.unin.EnumSizeOpt.32bit.diff
+@@ -64,9 +64,7 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 05 20 00 00 01 00 00 00 │ . ......
+ }
+++
+++ ALLOC0 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/enum_opt.unin.EnumSizeOpt.64bit.diff b/tests/mir-opt/enum_opt.unin.EnumSizeOpt.64bit.diff
+index 15f1bd0df51a2..f5521a1e22a47 100644
+--- a/tests/mir-opt/enum_opt.unin.EnumSizeOpt.64bit.diff
++++ b/tests/mir-opt/enum_opt.unin.EnumSizeOpt.64bit.diff
+@@ -64,9 +64,7 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 16, align: 8) {
+-+ 05 20 00 00 00 00 00 00 01 00 00 00 00 00 00 00 │ . ..............
+ }
+++
+++ ALLOC0 (size: 16, align: 8) { .. }
+
+diff --git a/tests/mir-opt/gvn.arithmetic_checked.GVN.panic-abort.diff b/tests/mir-opt/gvn.arithmetic_checked.GVN.panic-abort.diff
+index 5bf22af6ae83d..0e3f2459fae35 100644
+--- a/tests/mir-opt/gvn.arithmetic_checked.GVN.panic-abort.diff
++++ b/tests/mir-opt/gvn.arithmetic_checked.GVN.panic-abort.diff
+@@ -140,9 +140,7 @@
+ _0 = const ();
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 16, align: 8) {
+-+ 00 00 00 00 00 00 00 00 00 __ __ __ __ __ __ __ │ .........░░░░░░░
+ }
+++
+++ ALLOC0 (size: 16, align: 8) { .. }
+
+diff --git a/tests/mir-opt/gvn.arithmetic_checked.GVN.panic-unwind.diff b/tests/mir-opt/gvn.arithmetic_checked.GVN.panic-unwind.diff
+index 18d2029e44500..2873d7ef0ab13 100644
+--- a/tests/mir-opt/gvn.arithmetic_checked.GVN.panic-unwind.diff
++++ b/tests/mir-opt/gvn.arithmetic_checked.GVN.panic-unwind.diff
+@@ -140,9 +140,7 @@
+ _0 = const ();
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 16, align: 8) {
+-+ 00 00 00 00 00 00 00 00 00 __ __ __ __ __ __ __ │ .........░░░░░░░
+ }
+++
+++ ALLOC0 (size: 16, align: 8) { .. }
+
+diff --git a/tests/mir-opt/gvn.fn_pointers.GVN.panic-abort.diff b/tests/mir-opt/gvn.fn_pointers.GVN.panic-abort.diff
+index 0c49e706c9ecf..b5c0cee784688 100644
+--- a/tests/mir-opt/gvn.fn_pointers.GVN.panic-abort.diff
++++ b/tests/mir-opt/gvn.fn_pointers.GVN.panic-abort.diff
+@@ -8,10 +8,10 @@
+ let mut _3: fn(u8) -> u8;
+ let _5: ();
+ let mut _6: fn(u8) -> u8;
+- let mut _9: {closure@$DIR/gvn.rs:612:19: 612:21};
++ let mut _9: {closure@$DIR/gvn.rs:613:19: 613:21};
+ let _10: ();
+ let mut _11: fn();
+- let mut _13: {closure@$DIR/gvn.rs:612:19: 612:21};
++ let mut _13: {closure@$DIR/gvn.rs:613:19: 613:21};
+ let _14: ();
+ let mut _15: fn();
+ scope 1 {
+@@ -19,7 +19,7 @@
+ let _4: fn(u8) -> u8;
+ scope 2 {
+ debug g => _4;
+- let _7: {closure@$DIR/gvn.rs:612:19: 612:21};
++ let _7: {closure@$DIR/gvn.rs:613:19: 613:21};
+ scope 3 {
+ debug closure => _7;
+ let _8: fn();
+@@ -62,16 +62,16 @@
+ StorageDead(_6);
+ StorageDead(_5);
+ - StorageLive(_7);
+-- _7 = {closure@$DIR/gvn.rs:612:19: 612:21};
++- _7 = {closure@$DIR/gvn.rs:613:19: 613:21};
+ - StorageLive(_8);
+ + nop;
+-+ _7 = const ZeroSized: {closure@$DIR/gvn.rs:612:19: 612:21};
+++ _7 = const ZeroSized: {closure@$DIR/gvn.rs:613:19: 613:21};
+ + nop;
+ StorageLive(_9);
+ - _9 = _7;
+ - _8 = move _9 as fn() (PointerCoercion(ClosureFnPointer(Safe)));
+-+ _9 = const ZeroSized: {closure@$DIR/gvn.rs:612:19: 612:21};
+-+ _8 = const ZeroSized: {closure@$DIR/gvn.rs:612:19: 612:21} as fn() (PointerCoercion(ClosureFnPointer(Safe)));
+++ _9 = const ZeroSized: {closure@$DIR/gvn.rs:613:19: 613:21};
+++ _8 = const ZeroSized: {closure@$DIR/gvn.rs:613:19: 613:21} as fn() (PointerCoercion(ClosureFnPointer(Safe)));
+ StorageDead(_9);
+ StorageLive(_10);
+ StorageLive(_11);
+@@ -88,8 +88,8 @@
+ StorageLive(_13);
+ - _13 = _7;
+ - _12 = move _13 as fn() (PointerCoercion(ClosureFnPointer(Safe)));
+-+ _13 = const ZeroSized: {closure@$DIR/gvn.rs:612:19: 612:21};
+-+ _12 = const ZeroSized: {closure@$DIR/gvn.rs:612:19: 612:21} as fn() (PointerCoercion(ClosureFnPointer(Safe)));
+++ _13 = const ZeroSized: {closure@$DIR/gvn.rs:613:19: 613:21};
+++ _12 = const ZeroSized: {closure@$DIR/gvn.rs:613:19: 613:21} as fn() (PointerCoercion(ClosureFnPointer(Safe)));
+ StorageDead(_13);
+ StorageLive(_14);
+ StorageLive(_15);
+diff --git a/tests/mir-opt/gvn.fn_pointers.GVN.panic-unwind.diff b/tests/mir-opt/gvn.fn_pointers.GVN.panic-unwind.diff
+index e5f865b74b9f4..7bc6573c13d4d 100644
+--- a/tests/mir-opt/gvn.fn_pointers.GVN.panic-unwind.diff
++++ b/tests/mir-opt/gvn.fn_pointers.GVN.panic-unwind.diff
+@@ -8,10 +8,10 @@
+ let mut _3: fn(u8) -> u8;
+ let _5: ();
+ let mut _6: fn(u8) -> u8;
+- let mut _9: {closure@$DIR/gvn.rs:612:19: 612:21};
++ let mut _9: {closure@$DIR/gvn.rs:613:19: 613:21};
+ let _10: ();
+ let mut _11: fn();
+- let mut _13: {closure@$DIR/gvn.rs:612:19: 612:21};
++ let mut _13: {closure@$DIR/gvn.rs:613:19: 613:21};
+ let _14: ();
+ let mut _15: fn();
+ scope 1 {
+@@ -19,7 +19,7 @@
+ let _4: fn(u8) -> u8;
+ scope 2 {
+ debug g => _4;
+- let _7: {closure@$DIR/gvn.rs:612:19: 612:21};
++ let _7: {closure@$DIR/gvn.rs:613:19: 613:21};
+ scope 3 {
+ debug closure => _7;
+ let _8: fn();
+@@ -62,16 +62,16 @@
+ StorageDead(_6);
+ StorageDead(_5);
+ - StorageLive(_7);
+-- _7 = {closure@$DIR/gvn.rs:612:19: 612:21};
++- _7 = {closure@$DIR/gvn.rs:613:19: 613:21};
+ - StorageLive(_8);
+ + nop;
+-+ _7 = const ZeroSized: {closure@$DIR/gvn.rs:612:19: 612:21};
+++ _7 = const ZeroSized: {closure@$DIR/gvn.rs:613:19: 613:21};
+ + nop;
+ StorageLive(_9);
+ - _9 = _7;
+ - _8 = move _9 as fn() (PointerCoercion(ClosureFnPointer(Safe)));
+-+ _9 = const ZeroSized: {closure@$DIR/gvn.rs:612:19: 612:21};
+-+ _8 = const ZeroSized: {closure@$DIR/gvn.rs:612:19: 612:21} as fn() (PointerCoercion(ClosureFnPointer(Safe)));
+++ _9 = const ZeroSized: {closure@$DIR/gvn.rs:613:19: 613:21};
+++ _8 = const ZeroSized: {closure@$DIR/gvn.rs:613:19: 613:21} as fn() (PointerCoercion(ClosureFnPointer(Safe)));
+ StorageDead(_9);
+ StorageLive(_10);
+ StorageLive(_11);
+@@ -88,8 +88,8 @@
+ StorageLive(_13);
+ - _13 = _7;
+ - _12 = move _13 as fn() (PointerCoercion(ClosureFnPointer(Safe)));
+-+ _13 = const ZeroSized: {closure@$DIR/gvn.rs:612:19: 612:21};
+-+ _12 = const ZeroSized: {closure@$DIR/gvn.rs:612:19: 612:21} as fn() (PointerCoercion(ClosureFnPointer(Safe)));
+++ _13 = const ZeroSized: {closure@$DIR/gvn.rs:613:19: 613:21};
+++ _12 = const ZeroSized: {closure@$DIR/gvn.rs:613:19: 613:21} as fn() (PointerCoercion(ClosureFnPointer(Safe)));
+ StorageDead(_13);
+ StorageLive(_14);
+ StorageLive(_15);
+diff --git a/tests/mir-opt/gvn.indirect_static.GVN.panic-abort.diff b/tests/mir-opt/gvn.indirect_static.GVN.panic-abort.diff
+index f853942bbb664..e84f91e495d9c 100644
+--- a/tests/mir-opt/gvn.indirect_static.GVN.panic-abort.diff
++++ b/tests/mir-opt/gvn.indirect_static.GVN.panic-abort.diff
+@@ -13,7 +13,5 @@
+ }
+ }
+
+- ALLOC0 (static: A, size: 2, align: 1) {
+- 00 __ │ .░
+- }
++ ALLOC0 (static: A, size: 2, align: 1) { .. }
+
+diff --git a/tests/mir-opt/gvn.indirect_static.GVN.panic-unwind.diff b/tests/mir-opt/gvn.indirect_static.GVN.panic-unwind.diff
+index f853942bbb664..e84f91e495d9c 100644
+--- a/tests/mir-opt/gvn.indirect_static.GVN.panic-unwind.diff
++++ b/tests/mir-opt/gvn.indirect_static.GVN.panic-unwind.diff
+@@ -13,7 +13,5 @@
+ }
+ }
+
+- ALLOC0 (static: A, size: 2, align: 1) {
+- 00 __ │ .░
+- }
++ ALLOC0 (static: A, size: 2, align: 1) { .. }
+
+diff --git a/tests/mir-opt/gvn.wide_ptr_integer.GVN.panic-abort.diff b/tests/mir-opt/gvn.wide_ptr_integer.GVN.panic-abort.diff
+index 07c4c7663c154..3eed0473f7fc2 100644
+--- a/tests/mir-opt/gvn.wide_ptr_integer.GVN.panic-abort.diff
++++ b/tests/mir-opt/gvn.wide_ptr_integer.GVN.panic-abort.diff
+@@ -176,13 +176,9 @@
+ + nop;
+ return;
+ }
+-+ }
++ }
+ +
+-+ ALLOC1 (size: 16, align: 8) {
+-+ 01 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 │ ................
+-+ }
+++ ALLOC1 (size: 16, align: 8) { .. }
+ +
+-+ ALLOC0 (size: 16, align: 8) {
+-+ 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 │ ................
+- }
+++ ALLOC0 (size: 16, align: 8) { .. }
+
+diff --git a/tests/mir-opt/gvn.wide_ptr_integer.GVN.panic-unwind.diff b/tests/mir-opt/gvn.wide_ptr_integer.GVN.panic-unwind.diff
+index df0f93f1077ee..9a6e255a872ea 100644
+--- a/tests/mir-opt/gvn.wide_ptr_integer.GVN.panic-unwind.diff
++++ b/tests/mir-opt/gvn.wide_ptr_integer.GVN.panic-unwind.diff
+@@ -176,13 +176,9 @@
+ + nop;
+ return;
+ }
+-+ }
++ }
+ +
+-+ ALLOC1 (size: 16, align: 8) {
+-+ 01 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 │ ................
+-+ }
+++ ALLOC1 (size: 16, align: 8) { .. }
+ +
+-+ ALLOC0 (size: 16, align: 8) {
+-+ 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 │ ................
+- }
+++ ALLOC0 (size: 16, align: 8) { .. }
+
+diff --git a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.GVN.32bit.panic-abort.diff b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.GVN.32bit.panic-abort.diff
+index 2f34a62b3d136..45b8d89c0f4fa 100644
+--- a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.GVN.32bit.panic-abort.diff
++++ b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.GVN.32bit.panic-abort.diff
+@@ -61,9 +61,7 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 04 00 00 00 00 __ __ __ │ .....░░░
+ }
+++
+++ ALLOC0 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.GVN.32bit.panic-unwind.diff b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.GVN.32bit.panic-unwind.diff
+index da7add371a5bf..e6ee1e6f9a348 100644
+--- a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.GVN.32bit.panic-unwind.diff
++++ b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.GVN.32bit.panic-unwind.diff
+@@ -61,9 +61,7 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 04 00 00 00 00 __ __ __ │ .....░░░
+ }
+++
+++ ALLOC0 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.GVN.64bit.panic-abort.diff b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.GVN.64bit.panic-abort.diff
+index 2f34a62b3d136..45b8d89c0f4fa 100644
+--- a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.GVN.64bit.panic-abort.diff
++++ b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.GVN.64bit.panic-abort.diff
+@@ -61,9 +61,7 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 04 00 00 00 00 __ __ __ │ .....░░░
+ }
+++
+++ ALLOC0 (size: 8, align: 4) { .. }
+
+diff --git a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.GVN.64bit.panic-unwind.diff b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.GVN.64bit.panic-unwind.diff
+index da7add371a5bf..e6ee1e6f9a348 100644
+--- a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.GVN.64bit.panic-unwind.diff
++++ b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.GVN.64bit.panic-unwind.diff
+@@ -61,9 +61,7 @@
+ StorageDead(_1);
+ return;
+ }
+-+ }
+-+
+-+ ALLOC0 (size: 8, align: 4) {
+-+ 04 00 00 00 00 __ __ __ │ .....░░░
+ }
+++
+++ ALLOC0 (size: 8, align: 4) { .. }
+
diff --git a/user/rust/powerpc-atomics.patch b/user/rust/powerpc-atomics.patch
index 8ce1802e3..1a7d4dbea 100644
--- a/user/rust/powerpc-atomics.patch
+++ b/user/rust/powerpc-atomics.patch
@@ -1,37 +1,5 @@
---- rustc-1.60.0-src/vendor/crossbeam-epoch-0.9.6/no_atomic.rs.old 2022-04-04 11:10:55.000000000 +0000
-+++ rustc-1.60.0-src/vendor/crossbeam-epoch-0.9.6/no_atomic.rs 2022-11-23 07:34:18.412044423 +0000
-@@ -33,6 +33,7 @@
- "mipsel-unknown-none",
- "mipsisa32r6-unknown-linux-gnu",
- "mipsisa32r6el-unknown-linux-gnu",
-+ "powerpc-foxkit-linux-musl",
- "powerpc-unknown-freebsd",
- "powerpc-unknown-linux-gnu",
- "powerpc-unknown-linux-gnuspe",
---- rustc-1.60.0-src/vendor/crossbeam-epoch-0.9.6/.cargo-checksum.json.old 2022-04-04 11:10:55.000000000 +0000
-+++ rustc-1.60.0-src/vendor/crossbeam-epoch-0.9.6/.cargo-checksum.json 2022-11-23 07:34:44.339249221 +0000
-@@ -1 +1 @@
--{"files":{"CHANGELOG.md":"7f3c7198f2e33ba93bb8270e1c1e8dc6d70c343987acd9d0706e3632cbb9e0ad","Cargo.lock":"10e3899295e7e8ce93d3f0b597efbec844bdda40f78ae717f5995341d41ee937","Cargo.toml":"d7e7ab87ca4a4e8cc4ae9644e1537eedc46473ff5f89399b4733c4bdf59058db","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"5734ed989dfca1f625b40281ee9f4530f91b2411ec01cb748223e7eb87e201ab","README.md":"f946b25082979595d3851d90c4e76424be921a779e88e982f8455d44d46057ec","benches/defer.rs":"c330b704d96b2ad1aed29f72c37a99da534adef8cb06a3976d5f93bf567abb20","benches/flush.rs":"0389ac6c473632f0e93c962f223404cc360257f6699b4ec90b9b3be16bb6d74f","benches/pin.rs":"2f649a5153745c7930efdb32a52f9dc522f7b8cf548a251c5e2c82ee25dc3fff","build.rs":"58a36da8f9ca3a9206d31a0d6e7548f200fe8746ebca5edca48679b0d29a8043","examples/sanitize.rs":"a39d1635fa61e643e59192d7a63becc97ff81f03c1f4e03d38cedefb1525026a","no_atomic.rs":"3529c0833bcd1e09a352d3bd1696d3666850c9b09fe2111bf1a783ec16a5f467","src/atomic.rs":"63843b5ecd51b3fc98336247abe8efa824d826f142e40a761636e530d06f3b41","src/collector.rs":"e2d9780d8707e49360b3c33f2f829f29f70e6929307e65e23449b8ba6def6358","src/default.rs":"e1449bd6e61d7c19e9cbdf183f81c67c3487775fcc55572947874ca535d3d54f","src/deferred.rs":"ea532517c8ca22010ed9a624b059471c8a57b25e7925f6a5dfb391be7646a1fa","src/epoch.rs":"d31e66d8fe62299928e25867336d96391b26a4fe890a1cae0885dfcf36d6835b","src/guard.rs":"55c56ca1b2fbc067ae21108f0f7de4be91e5b41df2492055b635ed436782dd52","src/internal.rs":"67a6811b8c58e1152fd1dc17e389884025a0d99d79ab03dee26efcd0d6896690","src/lib.rs":"bcaa7c8dc9f9eb1ef6f56b4c0705db348d00b21325b6c0c1544cd7aec0613dc9","src/sync/list.rs":"10aa4c59845ab9ff1d8bcb6f594b70bbe23c320fa7a2b125fdf85df88b9d61e2","src/sync/mod.rs":"cbc6334460d73761c3dea7f99ed2ccbf267d5da3bc76c812e94f85c9f4565c6a","src/sync/queue.rs":"06173b2255677d0d39178ceb49876fda2878f491e907c595eb65643dbb43c9ba","tests/loom.rs":"db772f4478966de6ec98774ca4093171dc942da635822a0d2d3257d31188cb9b"},"package":"97242a70df9b89a65d0b6df3c4bf5b9ce03c5b7309019777fbde37e7537f8762"}
-\ No newline at end of file
-+{"files":{"CHANGELOG.md":"7f3c7198f2e33ba93bb8270e1c1e8dc6d70c343987acd9d0706e3632cbb9e0ad","Cargo.lock":"10e3899295e7e8ce93d3f0b597efbec844bdda40f78ae717f5995341d41ee937","Cargo.toml":"d7e7ab87ca4a4e8cc4ae9644e1537eedc46473ff5f89399b4733c4bdf59058db","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"5734ed989dfca1f625b40281ee9f4530f91b2411ec01cb748223e7eb87e201ab","README.md":"f946b25082979595d3851d90c4e76424be921a779e88e982f8455d44d46057ec","benches/defer.rs":"c330b704d96b2ad1aed29f72c37a99da534adef8cb06a3976d5f93bf567abb20","benches/flush.rs":"0389ac6c473632f0e93c962f223404cc360257f6699b4ec90b9b3be16bb6d74f","benches/pin.rs":"2f649a5153745c7930efdb32a52f9dc522f7b8cf548a251c5e2c82ee25dc3fff","build.rs":"58a36da8f9ca3a9206d31a0d6e7548f200fe8746ebca5edca48679b0d29a8043","examples/sanitize.rs":"a39d1635fa61e643e59192d7a63becc97ff81f03c1f4e03d38cedefb1525026a","no_atomic.rs":"9414a8b6357e7c09f0d3d27e7738c96e1de8f5123a9183a90d463887ad3d91fb","src/atomic.rs":"63843b5ecd51b3fc98336247abe8efa824d826f142e40a761636e530d06f3b41","src/collector.rs":"e2d9780d8707e49360b3c33f2f829f29f70e6929307e65e23449b8ba6def6358","src/default.rs":"e1449bd6e61d7c19e9cbdf183f81c67c3487775fcc55572947874ca535d3d54f","src/deferred.rs":"ea532517c8ca22010ed9a624b059471c8a57b25e7925f6a5dfb391be7646a1fa","src/epoch.rs":"d31e66d8fe62299928e25867336d96391b26a4fe890a1cae0885dfcf36d6835b","src/guard.rs":"55c56ca1b2fbc067ae21108f0f7de4be91e5b41df2492055b635ed436782dd52","src/internal.rs":"67a6811b8c58e1152fd1dc17e389884025a0d99d79ab03dee26efcd0d6896690","src/lib.rs":"bcaa7c8dc9f9eb1ef6f56b4c0705db348d00b21325b6c0c1544cd7aec0613dc9","src/sync/list.rs":"10aa4c59845ab9ff1d8bcb6f594b70bbe23c320fa7a2b125fdf85df88b9d61e2","src/sync/mod.rs":"cbc6334460d73761c3dea7f99ed2ccbf267d5da3bc76c812e94f85c9f4565c6a","src/sync/queue.rs":"06173b2255677d0d39178ceb49876fda2878f491e907c595eb65643dbb43c9ba","tests/loom.rs":"db772f4478966de6ec98774ca4093171dc942da635822a0d2d3257d31188cb9b"},"package":"97242a70df9b89a65d0b6df3c4bf5b9ce03c5b7309019777fbde37e7537f8762"}
---- rustc-1.60.0-src/vendor/crossbeam-epoch/no_atomic.rs.old 2022-04-04 11:10:55.000000000 +0000
-+++ rustc-1.60.0-src/vendor/crossbeam-epoch/no_atomic.rs 2022-11-23 07:36:20.388894146 +0000
-@@ -38,6 +38,7 @@
- "mipsisa32r6-unknown-linux-gnu",
- "mipsisa32r6el-unknown-linux-gnu",
- "msp430-none-elf",
-+ "powerpc-foxkit-linux-musl",
- "powerpc-unknown-freebsd",
- "powerpc-unknown-linux-gnu",
- "powerpc-unknown-linux-gnuspe",
---- rustc-1.60.0-src/vendor/crossbeam-epoch/.cargo-checksum.json.old 2022-04-04 11:10:55.000000000 +0000
-+++ rustc-1.60.0-src/vendor/crossbeam-epoch/.cargo-checksum.json 2022-11-23 07:37:55.218670583 +0000
-@@ -1 +1 @@
--{"files":{"CHANGELOG.md":"e365bcbfe702521e5001b10a9020da1625a02ea10f9f85a6ea94b61ced1e3c52","Cargo.lock":"cd2eea41973a985820c82112362fa654b4ceae9a0c7d5a67b8a5d3bc5cc34bde","Cargo.toml":"ea11651861129a3c0b0fc9ef38b725368e3983f674f8783fc5d9787459636456","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"5734ed989dfca1f625b40281ee9f4530f91b2411ec01cb748223e7eb87e201ab","README.md":"f946b25082979595d3851d90c4e76424be921a779e88e982f8455d44d46057ec","benches/defer.rs":"c330b704d96b2ad1aed29f72c37a99da534adef8cb06a3976d5f93bf567abb20","benches/flush.rs":"0389ac6c473632f0e93c962f223404cc360257f6699b4ec90b9b3be16bb6d74f","benches/pin.rs":"2f649a5153745c7930efdb32a52f9dc522f7b8cf548a251c5e2c82ee25dc3fff","build.rs":"ee1eaeee830c08c770bb84b40e6400af52c8db464945df0b82c8a4a4b4c681ec","examples/sanitize.rs":"a39d1635fa61e643e59192d7a63becc97ff81f03c1f4e03d38cedefb1525026a","no_atomic.rs":"e9050fceb20d62c608ff58e96f0324ad35e52137007115b03ba11011a5f673b5","src/atomic.rs":"3cbcf2aed303d5c2ce0a77461da9a01d31dec15a5d5ff4315d6dda3d090c3a90","src/collector.rs":"e2d9780d8707e49360b3c33f2f829f29f70e6929307e65e23449b8ba6def6358","src/default.rs":"e1449bd6e61d7c19e9cbdf183f81c67c3487775fcc55572947874ca535d3d54f","src/deferred.rs":"8ced786536d8d688381a8aa0b61e6e4d5e4fdd88e892cf82c0c5731e4801aa60","src/epoch.rs":"d31e66d8fe62299928e25867336d96391b26a4fe890a1cae0885dfcf36d6835b","src/guard.rs":"55c56ca1b2fbc067ae21108f0f7de4be91e5b41df2492055b635ed436782dd52","src/internal.rs":"67a6811b8c58e1152fd1dc17e389884025a0d99d79ab03dee26efcd0d6896690","src/lib.rs":"bcaa7c8dc9f9eb1ef6f56b4c0705db348d00b21325b6c0c1544cd7aec0613dc9","src/sync/list.rs":"10aa4c59845ab9ff1d8bcb6f594b70bbe23c320fa7a2b125fdf85df88b9d61e2","src/sync/mod.rs":"cbc6334460d73761c3dea7f99ed2ccbf267d5da3bc76c812e94f85c9f4565c6a","src/sync/queue.rs":"06173b2255677d0d39178ceb49876fda2878f491e907c595eb65643dbb43c9ba","tests/loom.rs":"db772f4478966de6ec98774ca4093171dc942da635822a0d2d3257d31188cb9b"},"package":"c00d6d2ea26e8b151d99093005cb442fb9a37aeaca582a03ec70946f49ab5ed9"}
-\ No newline at end of file
-+{"files":{"CHANGELOG.md":"e365bcbfe702521e5001b10a9020da1625a02ea10f9f85a6ea94b61ced1e3c52","Cargo.lock":"cd2eea41973a985820c82112362fa654b4ceae9a0c7d5a67b8a5d3bc5cc34bde","Cargo.toml":"ea11651861129a3c0b0fc9ef38b725368e3983f674f8783fc5d9787459636456","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"5734ed989dfca1f625b40281ee9f4530f91b2411ec01cb748223e7eb87e201ab","README.md":"f946b25082979595d3851d90c4e76424be921a779e88e982f8455d44d46057ec","benches/defer.rs":"c330b704d96b2ad1aed29f72c37a99da534adef8cb06a3976d5f93bf567abb20","benches/flush.rs":"0389ac6c473632f0e93c962f223404cc360257f6699b4ec90b9b3be16bb6d74f","benches/pin.rs":"2f649a5153745c7930efdb32a52f9dc522f7b8cf548a251c5e2c82ee25dc3fff","build.rs":"ee1eaeee830c08c770bb84b40e6400af52c8db464945df0b82c8a4a4b4c681ec","examples/sanitize.rs":"a39d1635fa61e643e59192d7a63becc97ff81f03c1f4e03d38cedefb1525026a","no_atomic.rs":"946da1976a3d8606f0fe4b573163d57636f82e2d8d1b73330675e23c606d954f","src/atomic.rs":"3cbcf2aed303d5c2ce0a77461da9a01d31dec15a5d5ff4315d6dda3d090c3a90","src/collector.rs":"e2d9780d8707e49360b3c33f2f829f29f70e6929307e65e23449b8ba6def6358","src/default.rs":"e1449bd6e61d7c19e9cbdf183f81c67c3487775fcc55572947874ca535d3d54f","src/deferred.rs":"8ced786536d8d688381a8aa0b61e6e4d5e4fdd88e892cf82c0c5731e4801aa60","src/epoch.rs":"d31e66d8fe62299928e25867336d96391b26a4fe890a1cae0885dfcf36d6835b","src/guard.rs":"55c56ca1b2fbc067ae21108f0f7de4be91e5b41df2492055b635ed436782dd52","src/internal.rs":"67a6811b8c58e1152fd1dc17e389884025a0d99d79ab03dee26efcd0d6896690","src/lib.rs":"bcaa7c8dc9f9eb1ef6f56b4c0705db348d00b21325b6c0c1544cd7aec0613dc9","src/sync/list.rs":"10aa4c59845ab9ff1d8bcb6f594b70bbe23c320fa7a2b125fdf85df88b9d61e2","src/sync/mod.rs":"cbc6334460d73761c3dea7f99ed2ccbf267d5da3bc76c812e94f85c9f4565c6a","src/sync/queue.rs":"06173b2255677d0d39178ceb49876fda2878f491e907c595eb65643dbb43c9ba","tests/loom.rs":"db772f4478966de6ec98774ca4093171dc942da635822a0d2d3257d31188cb9b"},"package":"c00d6d2ea26e8b151d99093005cb442fb9a37aeaca582a03ec70946f49ab5ed9"}
---- rustc-1.60.0-src/vendor/valuable/no_atomic.rs.old 2022-04-04 11:10:57.000000000 +0000
-+++ rustc-1.60.0-src/vendor/valuable/no_atomic.rs 2022-11-23 07:36:37.687029241 +0000
+--- rustc-1.60.0-src/vendor/valuable-0.1.0/no_atomic.rs.old 2022-04-04 11:10:57.000000000 +0000
++++ rustc-1.60.0-src/vendor/valuable-0.1.0/no_atomic.rs 2022-11-23 07:36:37.687029241 +0000
@@ -32,6 +32,7 @@
"mipsel-unknown-none",
"mipsisa32r6-unknown-linux-gnu",
@@ -40,41 +8,9 @@
"powerpc-unknown-freebsd",
"powerpc-unknown-linux-gnu",
"powerpc-unknown-linux-gnuspe",
---- rustc-1.60.0-src/vendor/valuable/.cargo-checksum.json.old 2022-04-04 11:10:57.000000000 +0000
-+++ rustc-1.60.0-src/vendor/valuable/.cargo-checksum.json 2022-11-23 07:38:07.397357603 +0000
+--- rustc-1.60.0-src/vendor/valuable-0.1.0/.cargo-checksum.json.old 2022-04-04 11:10:57.000000000 +0000
++++ rustc-1.60.0-src/vendor/valuable-0.1.0/.cargo-checksum.json 2022-11-23 07:38:07.397357603 +0000
@@ -1 +1 @@
-{"files":{"Cargo.lock":"fea5e41d2befef0b42734010a85f95548b5255ff1e4ee2dd2e6827adb8fe5f3e","Cargo.toml":"995a2454b4e3e583124d60b694e106ebd193b9742df3e050a6f49e5801b3597b","benches/structable.rs":"1baad763d1b0900004682b139efd58b17c974dc2068ede2229f8786e4a21372e","build.rs":"4ad508d818c27ee58bf7da2b9b4b425dae3e2656850327b3080fe2ad38767928","examples/derive.rs":"238473e63c0647cdb6652f1613575e24b323d40db5c8f3e5c32d64a3ea6b4048","examples/hello_world.rs":"75e48360e53b37e077e574d9c1aa2754b197f551ac5d604b03ebec9d31bab5cf","examples/print.rs":"924c55402b18e518317acc013a6cf407fcc13532c1eca8d9cd5f5631e79df960","no_atomic.rs":"b1c5cb0bd10733eb20516d10edc047b45aa67943f3347ae44fb779ed7fc7aff2","src/enumerable.rs":"008fe833c558f7e956ba0238a9d66947a671f66c5762905ed79d48a428c0ad44","src/field.rs":"c3d96f215c4bfc2a3910d0616fb335332d17f7dcf93ca739c933d88e1f98d229","src/lib.rs":"6954630c4c7c389192f3f8b5097076bbba6e43b5c4cd4ec68b4ffc18bff0a5b4","src/listable.rs":"f1a0743ed650604634972c19b66505a5727a6a6e2d7b54861e65cdcf10949432","src/mappable.rs":"ef7d334ef00d6b34cbff45b73b13935de6659933abafff9ad3d5d2a16d7ccac1","src/named_values.rs":"df5009074379ea59b02ebaf730890d0a4b6fa5c67c4057cc60f84d3652ca2bc5","src/slice.rs":"e382f56eb14ea7848276a4c8bda537f5207a4a6ed7a4b2ee4d2dde7feebce3b4","src/structable.rs":"369b17701d59bab138eac22ec043d434a052f49976236cc5ee680e72ca23ed6e","src/tuplable.rs":"e8b64a0761263666d984257109b5d54337cd97be59f08b08ec153e68ec1636c5","src/valuable.rs":"f8fdef201d3181935330fb86b27c455a5c86079f9f2cad363cda765801d7dd50","src/value.rs":"479d2c5b9d84c930e3abfe0032734ad92b243cf095f5fea6226a9da5eec81484","src/visit.rs":"060bacd3e1c0b333692f96c3ca970ca47a859cc28700713630996d9f0dc1668e"},"package":"830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"}
\ No newline at end of file
+{"files":{"Cargo.lock":"fea5e41d2befef0b42734010a85f95548b5255ff1e4ee2dd2e6827adb8fe5f3e","Cargo.toml":"995a2454b4e3e583124d60b694e106ebd193b9742df3e050a6f49e5801b3597b","benches/structable.rs":"1baad763d1b0900004682b139efd58b17c974dc2068ede2229f8786e4a21372e","build.rs":"4ad508d818c27ee58bf7da2b9b4b425dae3e2656850327b3080fe2ad38767928","examples/derive.rs":"238473e63c0647cdb6652f1613575e24b323d40db5c8f3e5c32d64a3ea6b4048","examples/hello_world.rs":"75e48360e53b37e077e574d9c1aa2754b197f551ac5d604b03ebec9d31bab5cf","examples/print.rs":"924c55402b18e518317acc013a6cf407fcc13532c1eca8d9cd5f5631e79df960","no_atomic.rs":"66d1146a63de2d24058f657aa14570038b96795a7facbab11402a96b6008f01a","src/enumerable.rs":"008fe833c558f7e956ba0238a9d66947a671f66c5762905ed79d48a428c0ad44","src/field.rs":"c3d96f215c4bfc2a3910d0616fb335332d17f7dcf93ca739c933d88e1f98d229","src/lib.rs":"6954630c4c7c389192f3f8b5097076bbba6e43b5c4cd4ec68b4ffc18bff0a5b4","src/listable.rs":"f1a0743ed650604634972c19b66505a5727a6a6e2d7b54861e65cdcf10949432","src/mappable.rs":"ef7d334ef00d6b34cbff45b73b13935de6659933abafff9ad3d5d2a16d7ccac1","src/named_values.rs":"df5009074379ea59b02ebaf730890d0a4b6fa5c67c4057cc60f84d3652ca2bc5","src/slice.rs":"e382f56eb14ea7848276a4c8bda537f5207a4a6ed7a4b2ee4d2dde7feebce3b4","src/structable.rs":"369b17701d59bab138eac22ec043d434a052f49976236cc5ee680e72ca23ed6e","src/tuplable.rs":"e8b64a0761263666d984257109b5d54337cd97be59f08b08ec153e68ec1636c5","src/valuable.rs":"f8fdef201d3181935330fb86b27c455a5c86079f9f2cad363cda765801d7dd50","src/value.rs":"479d2c5b9d84c930e3abfe0032734ad92b243cf095f5fea6226a9da5eec81484","src/visit.rs":"060bacd3e1c0b333692f96c3ca970ca47a859cc28700713630996d9f0dc1668e"},"package":"830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"}
---- rustc-1.60.0-src/vendor/crossbeam-utils-0.8.6/no_atomic.rs.old 2022-04-04 11:10:55.000000000 +0000
-+++ rustc-1.60.0-src/vendor/crossbeam-utils-0.8.6/no_atomic.rs 2022-11-23 07:36:45.626173325 +0000
-@@ -33,6 +33,7 @@
- "mipsel-unknown-none",
- "mipsisa32r6-unknown-linux-gnu",
- "mipsisa32r6el-unknown-linux-gnu",
-+ "powerpc-foxkit-linux-musl",
- "powerpc-unknown-freebsd",
- "powerpc-unknown-linux-gnu",
- "powerpc-unknown-linux-gnuspe",
---- rustc-1.60.0-src/vendor/crossbeam-utils-0.8.6/.cargo-checksum.json.old 2022-04-04 11:10:55.000000000 +0000
-+++ rustc-1.60.0-src/vendor/crossbeam-utils-0.8.6/.cargo-checksum.json 2022-11-23 07:38:18.586151345 +0000
-@@ -1 +1 @@
--{"files":{"CHANGELOG.md":"097eb3484f4f13471dfe6879ce61450cc60d4453aecb924f38a8f0e4af593cdd","Cargo.toml":"2734493ab832f12a4f849c333d2dd11760c6ce614b88355da21118f77acdcd70","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"5734ed989dfca1f625b40281ee9f4530f91b2411ec01cb748223e7eb87e201ab","README.md":"dfa9fbed47c344c134a63c84b7c0e4651baeac1554b7b3266d0e38643743fc33","benches/atomic_cell.rs":"c927eb3cd1e5ecc4b91adbc3bde98af15ffab4086190792ba64d5cde0e24df3d","build.rs":"39cf39e855e52559c8f68880a02b3e2778ae2d8f089650af1b3e34a85898aed7","no_atomic.rs":"3529c0833bcd1e09a352d3bd1696d3666850c9b09fe2111bf1a783ec16a5f467","src/atomic/atomic_cell.rs":"9d0785073f506b75c110270947f6a8367ead7faaf29c507d4ede37125310cff6","src/atomic/consume.rs":"7a7736fcd64f6473dfea7653559ffc5e1a2a234df43835f8aa8734862145ac15","src/atomic/mod.rs":"7f6afd5bd0da1f7b51765ab04da4e5f683588ac2d23506e61bf7007bb1e61ba2","src/atomic/seq_lock.rs":"27182e6b87a9db73c5f6831759f8625f9fcdec3c2828204c444aef04f427735a","src/atomic/seq_lock_wide.rs":"9888dd03116bb89ca36d4ab8d5a0b5032107a2983a7eb8024454263b09080088","src/backoff.rs":"7cc7754e15f69b52e92a70d4f49d1bc274693455a0933a2d7eb0605806566af3","src/cache_padded.rs":"6a512698115ad0d5a5b163dbd7a83247e1f1c146c4a30f3fc74b952e3b767b59","src/lib.rs":"6f1bcf157abe06ad8458a53e865bf8efab9fad4a9424790147cee8fefb3795d8","src/sync/mod.rs":"59986f559a8f170a4b3247ab2eea2460b09809d87c8110ed88e4e7103d3519dc","src/sync/parker.rs":"3f997f5b41fec286ccedcf3d36f801d741387badb574820b8e3456117ecd9154","src/sync/sharded_lock.rs":"14be659744918d0b27db24c56b41c618b0f0484b6761da46561023d96c4c120f","src/sync/wait_group.rs":"32e946a7581c55f8aa9904527b92b177c538fa0cf7cbcfa1d1f25990582cb6ea","src/thread.rs":"6a7676fd4e50af63aec6f655121a10cd6e8c704f4677125388186ba58dc5842d","tests/atomic_cell.rs":"ba2e34ed1e27f0d0d4f1bb8a5feb4eb8131f756adb27a719de52c26ee7b86b9c","tests/cache_padded.rs":"1bfaff8354c8184e1ee1f902881ca9400b60effb273b0d3f752801a483d2b66d","tests/parker.rs":"6def4721287d9d70b1cfd63ebb34e1c83fbb3376edbad2bc8aac6ef69dd99d20","tests/sharded_lock.rs":"eb6c5b59f007e0d290dd0f58758e8ccb5cacd38af34e3341368ced815f0c41be","tests/thread.rs":"9a7d7d3028c552fd834c68598b04a1cc252a816bc20ab62cec060d6cd09cab10","tests/wait_group.rs":"ad8f0cdfed31f9594a2e0737234d418f8b924d784a4db8d7e469deab8c95f5f8"},"package":"cfcae03edb34f947e64acdb1c33ec169824e20657e9ecb61cef6c8c74dcb8120"}
-\ No newline at end of file
-+{"files":{"CHANGELOG.md":"097eb3484f4f13471dfe6879ce61450cc60d4453aecb924f38a8f0e4af593cdd","Cargo.toml":"2734493ab832f12a4f849c333d2dd11760c6ce614b88355da21118f77acdcd70","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"5734ed989dfca1f625b40281ee9f4530f91b2411ec01cb748223e7eb87e201ab","README.md":"dfa9fbed47c344c134a63c84b7c0e4651baeac1554b7b3266d0e38643743fc33","benches/atomic_cell.rs":"c927eb3cd1e5ecc4b91adbc3bde98af15ffab4086190792ba64d5cde0e24df3d","build.rs":"39cf39e855e52559c8f68880a02b3e2778ae2d8f089650af1b3e34a85898aed7","no_atomic.rs":"9414a8b6357e7c09f0d3d27e7738c96e1de8f5123a9183a90d463887ad3d91fb","src/atomic/atomic_cell.rs":"9d0785073f506b75c110270947f6a8367ead7faaf29c507d4ede37125310cff6","src/atomic/consume.rs":"7a7736fcd64f6473dfea7653559ffc5e1a2a234df43835f8aa8734862145ac15","src/atomic/mod.rs":"7f6afd5bd0da1f7b51765ab04da4e5f683588ac2d23506e61bf7007bb1e61ba2","src/atomic/seq_lock.rs":"27182e6b87a9db73c5f6831759f8625f9fcdec3c2828204c444aef04f427735a","src/atomic/seq_lock_wide.rs":"9888dd03116bb89ca36d4ab8d5a0b5032107a2983a7eb8024454263b09080088","src/backoff.rs":"7cc7754e15f69b52e92a70d4f49d1bc274693455a0933a2d7eb0605806566af3","src/cache_padded.rs":"6a512698115ad0d5a5b163dbd7a83247e1f1c146c4a30f3fc74b952e3b767b59","src/lib.rs":"6f1bcf157abe06ad8458a53e865bf8efab9fad4a9424790147cee8fefb3795d8","src/sync/mod.rs":"59986f559a8f170a4b3247ab2eea2460b09809d87c8110ed88e4e7103d3519dc","src/sync/parker.rs":"3f997f5b41fec286ccedcf3d36f801d741387badb574820b8e3456117ecd9154","src/sync/sharded_lock.rs":"14be659744918d0b27db24c56b41c618b0f0484b6761da46561023d96c4c120f","src/sync/wait_group.rs":"32e946a7581c55f8aa9904527b92b177c538fa0cf7cbcfa1d1f25990582cb6ea","src/thread.rs":"6a7676fd4e50af63aec6f655121a10cd6e8c704f4677125388186ba58dc5842d","tests/atomic_cell.rs":"ba2e34ed1e27f0d0d4f1bb8a5feb4eb8131f756adb27a719de52c26ee7b86b9c","tests/cache_padded.rs":"1bfaff8354c8184e1ee1f902881ca9400b60effb273b0d3f752801a483d2b66d","tests/parker.rs":"6def4721287d9d70b1cfd63ebb34e1c83fbb3376edbad2bc8aac6ef69dd99d20","tests/sharded_lock.rs":"eb6c5b59f007e0d290dd0f58758e8ccb5cacd38af34e3341368ced815f0c41be","tests/thread.rs":"9a7d7d3028c552fd834c68598b04a1cc252a816bc20ab62cec060d6cd09cab10","tests/wait_group.rs":"ad8f0cdfed31f9594a2e0737234d418f8b924d784a4db8d7e469deab8c95f5f8"},"package":"cfcae03edb34f947e64acdb1c33ec169824e20657e9ecb61cef6c8c74dcb8120"}
---- rustc-1.60.0-src/vendor/crossbeam-utils/no_atomic.rs.old 2022-04-04 11:10:55.000000000 +0000
-+++ rustc-1.60.0-src/vendor/crossbeam-utils/no_atomic.rs 2022-11-23 07:36:50.575639725 +0000
-@@ -38,6 +38,7 @@
- "mipsisa32r6-unknown-linux-gnu",
- "mipsisa32r6el-unknown-linux-gnu",
- "msp430-none-elf",
-+ "powerpc-foxkit-linux-musl",
- "powerpc-unknown-freebsd",
- "powerpc-unknown-linux-gnu",
- "powerpc-unknown-linux-gnuspe",
---- rustc-1.60.0-src/vendor/crossbeam-utils/.cargo-checksum.json.old 2022-04-04 11:10:55.000000000 +0000
-+++ rustc-1.60.0-src/vendor/crossbeam-utils/.cargo-checksum.json 2022-11-23 07:38:29.424982814 +0000
-@@ -1 +1 @@
--{"files":{"CHANGELOG.md":"9cdf15c82899552034ec244963b75f3cad47814f6c9be2a86f14636d5350fd44","Cargo.toml":"1c13cefe3cda7dce177a000d253bd60bcc1dc0ef077811585625772711f87cb9","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"5734ed989dfca1f625b40281ee9f4530f91b2411ec01cb748223e7eb87e201ab","README.md":"dfa9fbed47c344c134a63c84b7c0e4651baeac1554b7b3266d0e38643743fc33","benches/atomic_cell.rs":"c927eb3cd1e5ecc4b91adbc3bde98af15ffab4086190792ba64d5cde0e24df3d","build.rs":"7e74dc72343ff57e83d0a84a9fbdd9ff1645894165909999b4c3d2fba94bc96c","no_atomic.rs":"e9050fceb20d62c608ff58e96f0324ad35e52137007115b03ba11011a5f673b5","src/atomic/atomic_cell.rs":"dc1913fb0fdbf953c917131ecb74c81518b5f33754bd4565012f1f7d6a977718","src/atomic/consume.rs":"7a7736fcd64f6473dfea7653559ffc5e1a2a234df43835f8aa8734862145ac15","src/atomic/mod.rs":"7f6afd5bd0da1f7b51765ab04da4e5f683588ac2d23506e61bf7007bb1e61ba2","src/atomic/seq_lock.rs":"27182e6b87a9db73c5f6831759f8625f9fcdec3c2828204c444aef04f427735a","src/atomic/seq_lock_wide.rs":"9888dd03116bb89ca36d4ab8d5a0b5032107a2983a7eb8024454263b09080088","src/backoff.rs":"7cc7754e15f69b52e92a70d4f49d1bc274693455a0933a2d7eb0605806566af3","src/cache_padded.rs":"6a512698115ad0d5a5b163dbd7a83247e1f1c146c4a30f3fc74b952e3b767b59","src/lib.rs":"6f1bcf157abe06ad8458a53e865bf8efab9fad4a9424790147cee8fefb3795d8","src/sync/mod.rs":"59986f559a8f170a4b3247ab2eea2460b09809d87c8110ed88e4e7103d3519dc","src/sync/parker.rs":"3f997f5b41fec286ccedcf3d36f801d741387badb574820b8e3456117ecd9154","src/sync/sharded_lock.rs":"14be659744918d0b27db24c56b41c618b0f0484b6761da46561023d96c4c120f","src/sync/wait_group.rs":"32e946a7581c55f8aa9904527b92b177c538fa0cf7cbcfa1d1f25990582cb6ea","src/thread.rs":"6a7676fd4e50af63aec6f655121a10cd6e8c704f4677125388186ba58dc5842d","tests/atomic_cell.rs":"d64faa1ca8896373468308031220940d988aa3a1679ea25d2291a7a7d22bc51a","tests/cache_padded.rs":"1bfaff8354c8184e1ee1f902881ca9400b60effb273b0d3f752801a483d2b66d","tests/parker.rs":"6def4721287d9d70b1cfd63ebb34e1c83fbb3376edbad2bc8aac6ef69dd99d20","tests/sharded_lock.rs":"eb6c5b59f007e0d290dd0f58758e8ccb5cacd38af34e3341368ced815f0c41be","tests/thread.rs":"9a7d7d3028c552fd834c68598b04a1cc252a816bc20ab62cec060d6cd09cab10","tests/wait_group.rs":"ad8f0cdfed31f9594a2e0737234d418f8b924d784a4db8d7e469deab8c95f5f8"},"package":"b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6"}
-\ No newline at end of file
-+{"files":{"CHANGELOG.md":"9cdf15c82899552034ec244963b75f3cad47814f6c9be2a86f14636d5350fd44","Cargo.toml":"1c13cefe3cda7dce177a000d253bd60bcc1dc0ef077811585625772711f87cb9","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"5734ed989dfca1f625b40281ee9f4530f91b2411ec01cb748223e7eb87e201ab","README.md":"dfa9fbed47c344c134a63c84b7c0e4651baeac1554b7b3266d0e38643743fc33","benches/atomic_cell.rs":"c927eb3cd1e5ecc4b91adbc3bde98af15ffab4086190792ba64d5cde0e24df3d","build.rs":"7e74dc72343ff57e83d0a84a9fbdd9ff1645894165909999b4c3d2fba94bc96c","no_atomic.rs":"946da1976a3d8606f0fe4b573163d57636f82e2d8d1b73330675e23c606d954f","src/atomic/atomic_cell.rs":"dc1913fb0fdbf953c917131ecb74c81518b5f33754bd4565012f1f7d6a977718","src/atomic/consume.rs":"7a7736fcd64f6473dfea7653559ffc5e1a2a234df43835f8aa8734862145ac15","src/atomic/mod.rs":"7f6afd5bd0da1f7b51765ab04da4e5f683588ac2d23506e61bf7007bb1e61ba2","src/atomic/seq_lock.rs":"27182e6b87a9db73c5f6831759f8625f9fcdec3c2828204c444aef04f427735a","src/atomic/seq_lock_wide.rs":"9888dd03116bb89ca36d4ab8d5a0b5032107a2983a7eb8024454263b09080088","src/backoff.rs":"7cc7754e15f69b52e92a70d4f49d1bc274693455a0933a2d7eb0605806566af3","src/cache_padded.rs":"6a512698115ad0d5a5b163dbd7a83247e1f1c146c4a30f3fc74b952e3b767b59","src/lib.rs":"6f1bcf157abe06ad8458a53e865bf8efab9fad4a9424790147cee8fefb3795d8","src/sync/mod.rs":"59986f559a8f170a4b3247ab2eea2460b09809d87c8110ed88e4e7103d3519dc","src/sync/parker.rs":"3f997f5b41fec286ccedcf3d36f801d741387badb574820b8e3456117ecd9154","src/sync/sharded_lock.rs":"14be659744918d0b27db24c56b41c618b0f0484b6761da46561023d96c4c120f","src/sync/wait_group.rs":"32e946a7581c55f8aa9904527b92b177c538fa0cf7cbcfa1d1f25990582cb6ea","src/thread.rs":"6a7676fd4e50af63aec6f655121a10cd6e8c704f4677125388186ba58dc5842d","tests/atomic_cell.rs":"d64faa1ca8896373468308031220940d988aa3a1679ea25d2291a7a7d22bc51a","tests/cache_padded.rs":"1bfaff8354c8184e1ee1f902881ca9400b60effb273b0d3f752801a483d2b66d","tests/parker.rs":"6def4721287d9d70b1cfd63ebb34e1c83fbb3376edbad2bc8aac6ef69dd99d20","tests/sharded_lock.rs":"eb6c5b59f007e0d290dd0f58758e8ccb5cacd38af34e3341368ced815f0c41be","tests/thread.rs":"9a7d7d3028c552fd834c68598b04a1cc252a816bc20ab62cec060d6cd09cab10","tests/wait_group.rs":"ad8f0cdfed31f9594a2e0737234d418f8b924d784a4db8d7e469deab8c95f5f8"},"package":"b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6"}
diff --git a/user/rust/ppc64-abi.patch b/user/rust/ppc64-abi.patch
new file mode 100644
index 000000000..763ebdec5
--- /dev/null
+++ b/user/rust/ppc64-abi.patch
@@ -0,0 +1,251 @@
+From dd2fc075aa673d06dff5f90a44b0162649dac52b Mon Sep 17 00:00:00 2001
+From: beetrees <b@beetr.ee>
+Date: Sun, 4 Aug 2024 15:01:58 +0100
+Subject: [PATCH] Refactor `powerpc64` call ABI handling
+
+---
+ .../rustc_target/src/abi/call/powerpc64.rs | 67 ++-------
+ tests/assembly/powerpc64-struct-abi.rs | 130 ++++++++++++++++++
+ 2 files changed, 142 insertions(+), 55 deletions(-)
+ create mode 100644 tests/assembly/powerpc64-struct-abi.rs
+
+diff --git a/compiler/rustc_target/src/abi/call/powerpc64.rs b/compiler/rustc_target/src/abi/call/powerpc64.rs
+index 11a6cb52babc9..749eea0ef6350 100644
+--- a/compiler/rustc_target/src/abi/call/powerpc64.rs
++++ b/compiler/rustc_target/src/abi/call/powerpc64.rs
+@@ -41,64 +41,23 @@ where
+ })
+ }
+
+-fn classify_ret<'a, Ty, C>(cx: &C, ret: &mut ArgAbi<'a, Ty>, abi: ABI)
++fn classify<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>, abi: ABI, is_ret: bool)
+ where
+ Ty: TyAbiInterface<'a, C> + Copy,
+ C: HasDataLayout,
+ {
+- if !ret.layout.is_sized() {
++ if arg.is_ignore() || !arg.layout.is_sized() {
+ // Not touching this...
+ return;
+ }
+- if !ret.layout.is_aggregate() {
+- ret.extend_integer_width_to(64);
++ if !arg.layout.is_aggregate() {
++ arg.extend_integer_width_to(64);
+ return;
+ }
+
+ // The ELFv1 ABI doesn't return aggregates in registers
+- if abi == ELFv1 {
+- ret.make_indirect();
+- return;
+- }
+-
+- if let Some(uniform) = is_homogeneous_aggregate(cx, ret, abi) {
+- ret.cast_to(uniform);
+- return;
+- }
+-
+- let size = ret.layout.size;
+- let bits = size.bits();
+- if bits <= 128 {
+- let unit = if cx.data_layout().endian == Endian::Big {
+- Reg { kind: RegKind::Integer, size }
+- } else if bits <= 8 {
+- Reg::i8()
+- } else if bits <= 16 {
+- Reg::i16()
+- } else if bits <= 32 {
+- Reg::i32()
+- } else {
+- Reg::i64()
+- };
+-
+- ret.cast_to(Uniform::new(unit, size));
+- return;
+- }
+-
+- ret.make_indirect();
+-}
+-
+-fn classify_arg<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>, abi: ABI)
+-where
+- Ty: TyAbiInterface<'a, C> + Copy,
+- C: HasDataLayout,
+-{
+- if !arg.layout.is_sized() {
+- // Not touching this...
+- return;
+- }
+- if !arg.layout.is_aggregate() {
+- arg.extend_integer_width_to(64);
++ if is_ret && abi == ELFv1 {
++ arg.make_indirect();
+ return;
+ }
+
+@@ -108,7 +67,10 @@ where
+ }
+
+ let size = arg.layout.size;
+- if size.bits() <= 64 {
++ if is_ret && size.bits() > 128 {
++ // Non-homogeneous aggregates larger than two doublewords are returned indirectly.
++ arg.make_indirect();
++ } else if size.bits() <= 64 {
+ // Aggregates smaller than a doubleword should appear in
+ // the least-significant bits of the parameter doubleword.
+ arg.cast_to(Reg { kind: RegKind::Integer, size })
+@@ -138,14 +100,9 @@ where
+ }
+ };
+
+- if !fn_abi.ret.is_ignore() {
+- classify_ret(cx, &mut fn_abi.ret, abi);
+- }
++ classify(cx, &mut fn_abi.ret, abi, true);
+
+ for arg in fn_abi.args.iter_mut() {
+- if arg.is_ignore() {
+- continue;
+- }
+- classify_arg(cx, arg, abi);
++ classify(cx, arg, abi, false);
+ }
+ }
+diff --git a/tests/assembly/powerpc64-struct-abi.rs b/tests/assembly/powerpc64-struct-abi.rs
+new file mode 100644
+index 0000000000000..c36e3f2b62251
+--- /dev/null
++++ b/tests/assembly/powerpc64-struct-abi.rs
+@@ -0,0 +1,130 @@
++//@ revisions: elfv1-be elfv2-be elfv2-le
++//@ assembly-output: emit-asm
++//@[elfv1-be] compile-flags: --target powerpc64-unknown-linux-gnu
++//@[elfv1-be] needs-llvm-components: powerpc
++//@[elfv2-be] compile-flags: --target powerpc64-unknown-linux-musl
++//@[elfv2-be] needs-llvm-components: powerpc
++//@[elfv2-le] compile-flags: --target powerpc64le-unknown-linux-gnu
++//@[elfv2-le] needs-llvm-components: powerpc
++//@[elfv1-be] filecheck-flags: --check-prefix be
++//@[elfv2-be] filecheck-flags: --check-prefix be
++
++#![feature(no_core, lang_items)]
++#![no_std]
++#![no_core]
++#![crate_type = "lib"]
++
++#[lang = "sized"]
++trait Sized {}
++
++#[lang = "copy"]
++trait Copy {}
++
++#[lang = "freeze"]
++trait Freeze {}
++
++#[lang = "unpin"]
++trait Unpin {}
++
++impl Copy for u8 {}
++impl Copy for u16 {}
++impl Copy for u32 {}
++impl Copy for FiveU32s {}
++impl Copy for FiveU16s {}
++impl Copy for ThreeU8s {}
++
++#[repr(C)]
++struct FiveU32s(u32, u32, u32, u32, u32);
++
++#[repr(C)]
++struct FiveU16s(u16, u16, u16, u16, u16);
++
++#[repr(C)]
++struct ThreeU8s(u8, u8, u8);
++
++// CHECK-LABEL: read_large
++// be: lwz [[REG1:.*]], 16(4)
++// be-NEXT: stw [[REG1]], 16(3)
++// be-NEXT: ld [[REG2:.*]], 8(4)
++// be-NEXT: ld [[REG3:.*]], 0(4)
++// be-NEXT: std [[REG2]], 8(3)
++// be-NEXT: std [[REG3]], 0(3)
++// elfv2-le: lxvd2x [[REG1:.*]], 0, 4
++// elfv2-le-NEXT: lwz [[REG2:.*]], 16(4)
++// elfv2-le-NEXT: stw [[REG2]], 16(3)
++// elfv2-le-NEXT: stxvd2x [[REG1]], 0, 3
++// CHECK-NEXT: blr
++#[no_mangle]
++extern "C" fn read_large(x: &FiveU32s) -> FiveU32s {
++ *x
++}
++
++// CHECK-LABEL: read_medium
++// elfv1-be: lhz [[REG1:.*]], 8(4)
++// elfv1-be-NEXT: ld [[REG2:.*]], 0(4)
++// elfv1-be-NEXT: sth [[REG1]], 8(3)
++// elfv1-be-NEXT: std [[REG2]], 0(3)
++// elfv2-be: lhz [[REG1:.*]], 8(3)
++// elfv2-be-NEXT: ld 3, 0(3)
++// elfv2-be-NEXT: sldi 4, [[REG1]], 48
++// elfv2-le: ld [[REG1:.*]], 0(3)
++// elfv2-le-NEXT: lhz 4, 8(3)
++// elfv2-le-NEXT: mr 3, [[REG1]]
++// CHECK-NEXT: blr
++#[no_mangle]
++extern "C" fn read_medium(x: &FiveU16s) -> FiveU16s {
++ *x
++}
++
++// CHECK-LABEL: read_small
++// elfv1-be: lbz [[REG1:.*]], 2(4)
++// elfv1-be-NEXT: lhz [[REG2:.*]], 0(4)
++// elfv1-be-NEXT: stb [[REG1]], 2(3)
++// elfv1-be-NEXT: sth [[REG2]], 0(3)
++// elfv2-be: lhz [[REG1:.*]], 0(3)
++// elfv2-be-NEXT: lbz 3, 2(3)
++// elfv2-be-NEXT: rldimi 3, [[REG1]], 8, 0
++// elfv2-le: lbz [[REG1:.*]], 2(3)
++// elfv2-le-NEXT: lhz 3, 0(3)
++// elfv2-le-NEXT: rldimi 3, [[REG1]], 16, 0
++// CHECK-NEXT: blr
++#[no_mangle]
++extern "C" fn read_small(x: &ThreeU8s) -> ThreeU8s {
++ *x
++}
++
++// CHECK-LABEL: write_large
++// CHECK: std 3, 0(6)
++// be-NEXT: rldicl [[REG1:.*]], 5, 32, 32
++// CHECK-NEXT: std 4, 8(6)
++// be-NEXT: stw [[REG1]], 16(6)
++// elfv2-le-NEXT: stw 5, 16(6)
++// CHECK-NEXT: blr
++#[no_mangle]
++extern "C" fn write_large(x: FiveU32s, dest: &mut FiveU32s) {
++ *dest = x;
++}
++
++// CHECK-LABEL: write_medium
++// CHECK: std 3, 0(5)
++// be-NEXT: rldicl [[REG1:.*]], 4, 16, 48
++// be-NEXT: sth [[REG1]], 8(5)
++// elfv2-le-NEXT: sth 4, 8(5)
++// CHECK-NEXT: blr
++#[no_mangle]
++extern "C" fn write_medium(x: FiveU16s, dest: &mut FiveU16s) {
++ *dest = x;
++}
++
++// CHECK-LABEL: write_small
++// be: stb 3, 2(4)
++// be-NEXT: srwi [[REG1:.*]], 3, 8
++// be-NEXT: sth [[REG1]], 0(4)
++// elfv2-le: sth 3, 0(4)
++// elfv2-le-NEXT: srwi [[REG1:.*]], 3, 16
++// elfv2-le-NEXT: stb [[REG1]], 2(4)
++// CHECK-NEXT: blr
++#[no_mangle]
++extern "C" fn write_small(x: ThreeU8s, dest: &mut ThreeU8s) {
++ *dest = x;
++}
diff --git a/user/rust/stdarch-ppc.patch b/user/rust/stdarch-ppc.patch
new file mode 100644
index 000000000..eabe0d416
--- /dev/null
+++ b/user/rust/stdarch-ppc.patch
@@ -0,0 +1,116 @@
+Upstream: https://github.com/rust-lang/stdarch/pull/1582
+
+From 7ac103f60d54362a752361dee3e63e23b98a342a Mon Sep 17 00:00:00 2001
+From: Luca Barbato <lu_zero@gentoo.org>
+Date: Tue, 11 Jun 2024 09:49:16 +0000
+Subject: [PATCH] Use longer associated types in the Altivec traits
+
+---
+ crates/core_arch/src/powerpc/altivec.rs | 34 ++++++++++++-------------
+ 1 file changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/crates/core_arch/src/powerpc/altivec.rs b/crates/core_arch/src/powerpc/altivec.rs
+index 627809c6bc..29cdc41017 100644
+--- a/library/stdarch/crates/core_arch/src/powerpc/altivec.rs
++++ b/library/stdarch/crates/core_arch/src/powerpc/altivec.rs
+@@ -410,8 +410,8 @@ mod sealed {
+
+ #[unstable(feature = "stdarch_powerpc", issue = "111145")]
+ pub trait VectorInsert {
+- type S;
+- unsafe fn vec_insert<const IDX: u32>(self, s: Self::S) -> Self;
++ type Scalar;
++ unsafe fn vec_insert<const IDX: u32>(self, s: Self::Scalar) -> Self;
+ }
+
+ const fn idx_in_vec<T, const IDX: u32>() -> u32 {
+@@ -422,11 +422,11 @@ mod sealed {
+ ($ty:ident) => {
+ #[unstable(feature = "stdarch_powerpc", issue = "111145")]
+ impl VectorInsert for t_t_l!($ty) {
+- type S = $ty;
++ type Scalar = $ty;
+ #[inline]
+ #[target_feature(enable = "altivec")]
+- unsafe fn vec_insert<const IDX: u32>(self, s: Self::S) -> Self {
+- simd_insert(self, const { idx_in_vec::<Self::S, IDX>() }, s)
++ unsafe fn vec_insert<const IDX: u32>(self, s: Self::Scalar) -> Self {
++ simd_insert(self, const { idx_in_vec::<Self::Scalar, IDX>() }, s)
+ }
+ }
+ };
+@@ -442,19 +442,19 @@ mod sealed {
+
+ #[unstable(feature = "stdarch_powerpc", issue = "111145")]
+ pub trait VectorExtract {
+- type S;
+- unsafe fn vec_extract<const IDX: u32>(self) -> Self::S;
++ type Scalar;
++ unsafe fn vec_extract<const IDX: u32>(self) -> Self::Scalar;
+ }
+
+ macro_rules! impl_vec_extract {
+ ($ty:ident) => {
+ #[unstable(feature = "stdarch_powerpc", issue = "111145")]
+ impl VectorExtract for t_t_l!($ty) {
+- type S = $ty;
++ type Scalar = $ty;
+ #[inline]
+ #[target_feature(enable = "altivec")]
+- unsafe fn vec_extract<const IDX: u32>(self) -> Self::S {
+- simd_extract(self, const { idx_in_vec::<Self::S, IDX>() })
++ unsafe fn vec_extract<const IDX: u32>(self) -> Self::Scalar {
++ simd_extract(self, const { idx_in_vec::<Self::Scalar, IDX>() })
+ }
+ }
+ };
+@@ -3233,18 +3233,18 @@ mod sealed {
+
+ #[unstable(feature = "stdarch_powerpc", issue = "111145")]
+ pub trait VectorRl {
+- type B;
+- unsafe fn vec_rl(self, b: Self::B) -> Self;
++ type Shift;
++ unsafe fn vec_rl(self, b: Self::Shift) -> Self;
+ }
+
+ macro_rules! impl_vec_rl {
+ ($fun:ident ($a:ident)) => {
+ #[unstable(feature = "stdarch_powerpc", issue = "111145")]
+ impl VectorRl for $a {
+- type B = t_u!($a);
++ type Shift = t_u!($a);
+ #[inline]
+ #[target_feature(enable = "altivec")]
+- unsafe fn vec_rl(self, b: Self::B) -> Self {
++ unsafe fn vec_rl(self, b: Self::Shift) -> Self {
+ transmute($fun(transmute(self), b))
+ }
+ }
+@@ -3292,7 +3292,7 @@ mod sealed {
+ #[inline]
+ #[target_feature(enable = "altivec")]
+ #[unstable(feature = "stdarch_powerpc", issue = "111145")]
+-pub unsafe fn vec_insert<T, const IDX: u32>(a: T, b: <T as sealed::VectorInsert>::S) -> T
++pub unsafe fn vec_insert<T, const IDX: u32>(a: T, b: <T as sealed::VectorInsert>::Scalar) -> T
+ where
+ T: sealed::VectorInsert,
+ {
+@@ -3310,7 +3310,7 @@ where
+ #[inline]
+ #[target_feature(enable = "altivec")]
+ #[unstable(feature = "stdarch_powerpc", issue = "111145")]
+-pub unsafe fn vec_extract<T, const IDX: u32>(a: T) -> <T as sealed::VectorExtract>::S
++pub unsafe fn vec_extract<T, const IDX: u32>(a: T) -> <T as sealed::VectorExtract>::Scalar
+ where
+ T: sealed::VectorExtract,
+ {
+@@ -3949,7 +3949,7 @@ where
+ #[inline]
+ #[target_feature(enable = "altivec")]
+ #[unstable(feature = "stdarch_powerpc", issue = "111145")]
+-pub unsafe fn vec_rl<T>(a: T, b: <T as sealed::VectorRl>::B) -> T
++pub unsafe fn vec_rl<T>(a: T, b: <T as sealed::VectorRl>::Shift) -> T
+ where
+ T: sealed::VectorRl,
+ {
diff --git a/user/rust/test-be.patch b/user/rust/test-be.patch
new file mode 100644
index 000000000..774f2887c
--- /dev/null
+++ b/user/rust/test-be.patch
@@ -0,0 +1,49 @@
+From 26fa5c2c300f3c3a3ee3109c009bd4a6803a2a4c Mon Sep 17 00:00:00 2001
+From: Nikita Popov <npopov@redhat.com>
+Date: Tue, 11 Jun 2024 10:13:07 +0200
+Subject: [PATCH] Make issue-122805.rs big endian compatible
+
+Instead of not generating the function at all on big endian (which
+makes the CHECK lines fail), instead use to_le() on big endian,
+so that we essentially perform a bswap for both endiannesses.
+---
+ tests/codegen/issues/issue-122805.rs | 21 ++++++++++++---------
+ 1 file changed, 12 insertions(+), 9 deletions(-)
+
+diff --git a/tests/codegen/issues/issue-122805.rs b/tests/codegen/issues/issue-122805.rs
+index 6d108ada6dd..8e03c6c8884 100644
+--- a/tests/codegen/issues/issue-122805.rs
++++ b/tests/codegen/issues/issue-122805.rs
+@@ -39,17 +39,20 @@
+ // OPT3WINX64-NEXT: store <8 x i16>
+ // CHECK-NEXT: ret void
+ #[no_mangle]
+-#[cfg(target_endian = "little")]
+ pub fn convert(value: [u16; 8]) -> [u8; 16] {
++ #[cfg(target_endian = "little")]
++ let bswap = u16::to_be;
++ #[cfg(target_endian = "big")]
++ let bswap = u16::to_le;
+ let addr16 = [
+- value[0].to_be(),
+- value[1].to_be(),
+- value[2].to_be(),
+- value[3].to_be(),
+- value[4].to_be(),
+- value[5].to_be(),
+- value[6].to_be(),
+- value[7].to_be(),
++ bswap(value[0]),
++ bswap(value[1]),
++ bswap(value[2]),
++ bswap(value[3]),
++ bswap(value[4]),
++ bswap(value[5]),
++ bswap(value[6]),
++ bswap(value[7]),
+ ];
+ unsafe { core::mem::transmute::<_, [u8; 16]>(addr16) }
+ }
+--
+2.40.0
+
diff --git a/user/rust/ui-test-strings.patch b/user/rust/ui-test-strings.patch
new file mode 100644
index 000000000..182a233b0
--- /dev/null
+++ b/user/rust/ui-test-strings.patch
@@ -0,0 +1,25 @@
+check-cfg/well-known-values: We add our own vendor, so we need to include it.
+
+codegen/duplicated-path-in-error: musl's ldso error doesn't match glibc's.
+
+diff --git a/tests/ui/check-cfg/well-known-values.stderr b/tests/ui/check-cfg/well-known-values.stderr
+index 00abb5f5e5c..84648541fb7 100644
+--- a/tests/ui/check-cfg/well-known-values.stderr
++++ b/tests/ui/check-cfg/well-known-values.stderr
+@@ -230,7 +230,7 @@ warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+ LL | target_vendor = "_UNEXPECTED_VALUE",
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+- = note: expected values for `target_vendor` are: `apple`, `espressif`, `fortanix`, `ibm`, `kmc`, `nintendo`, `nvidia`, `pc`, `risc0`, `sony`, `sun`, `unikraft`, `unknown`, `uwp`, `win7`, and `wrs`
++ = note: expected values for `target_vendor` are: `apple`, `espressif`, `fortanix`, `foxkit`, `ibm`, `kmc`, `nintendo`, `nvidia`, `pc`, `risc0`, `sony`, `sun`, `unikraft`, `unknown`, `uwp`, `win7`, and `wrs`
+ = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
+
+ warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
+diff --git a/tests/ui/codegen/duplicated-path-in-error.stderr b/tests/ui/codegen/duplicated-path-in-error.stderr
+index d0d34e2f934..2892ebffdde 100644
+--- a/tests/ui/codegen/duplicated-path-in-error.stderr
++++ b/tests/ui/codegen/duplicated-path-in-error.stderr
+@@ -1,2 +1,2 @@
+-error: couldn't load codegen backend /non-existing-one.so: cannot open shared object file: No such file or directory
++error: couldn't load codegen backend /non-existing-one.so: Error loading shared library /non-existing-one.so: No such file or directory
+