summaryrefslogtreecommitdiff
path: root/user/rust
diff options
context:
space:
mode:
Diffstat (limited to 'user/rust')
-rw-r--r--user/rust/0001-Don-t-pass-CFLAGS-to-the-C-compiler.patch26
-rw-r--r--user/rust/0001-Fix-LLVM-build.patch22
-rw-r--r--user/rust/0002-Fix-LLVM-build.patch26
-rw-r--r--user/rust/0002-Fix-linking-to-zlib-when-cross-compiling.patch34
-rw-r--r--user/rust/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch45
-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.patch526
-rw-r--r--user/rust/0004-Require-static-native-libraries-when-linking-static-.patch56
-rw-r--r--user/rust/0005-Prefer-libgcc_eh-over-libunwind-for-musl.patch25
-rw-r--r--user/rust/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch392
-rw-r--r--user/rust/0006-Link-libssp_nonshared.a-on-all-musl-targets.patch28
-rw-r--r--user/rust/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch24
-rw-r--r--user/rust/0007-Fix-C-aggregate-passing-ABI-on-powerpc.patch93
-rw-r--r--user/rust/0007-test-failed-doctest-output-Fix-normalization.patch33
-rw-r--r--user/rust/0008-Fix-zero-sized-aggregate-ABI-on-powerpc.patch62
-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-compiletest-Match-suffixed-environments.patch48
-rw-r--r--user/rust/0010-Link-stage-2-tools-dynamically-to-libstd.patch22
-rw-r--r--user/rust/0010-test-c-variadic-Fix-patterns-on-powerpc64.patch73
-rw-r--r--user/rust/0011-Move-debugger-scripts-to-usr-share-rust.patch66
-rw-r--r--user/rust/0011-test-use-extern-for-plugins-Don-t-assume-multilib.patch30
-rw-r--r--user/rust/0012-Add-foxkit-target-specs.patch206
-rw-r--r--user/rust/0012-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch25
-rw-r--r--user/rust/0013-Ignore-broken-and-non-applicable-tests.patch118
-rw-r--r--user/rust/0014-Link-stage-2-tools-dynamically-to-libstd.patch27
-rw-r--r--user/rust/0015-Move-debugger-scripts-to-usr-share-rust.patch53
-rw-r--r--user/rust/0016-Add-foxkit-target-specs.patch148
-rw-r--r--user/rust/0030-libc-linkage.patch33
-rw-r--r--user/rust/0031-typenum-pmmx.patch33
-rw-r--r--user/rust/0040-rls-atomics.patch58
-rw-r--r--user/rust/APKBUILD217
-rw-r--r--user/rust/mir-opt-tests-endianness.patch1564
-rw-r--r--user/rust/powerpc-atomics.patch16
-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
38 files changed, 3203 insertions, 1493 deletions
diff --git a/user/rust/0001-Don-t-pass-CFLAGS-to-the-C-compiler.patch b/user/rust/0001-Don-t-pass-CFLAGS-to-the-C-compiler.patch
deleted file mode 100644
index 492dbf7ec..000000000
--- a/user/rust/0001-Don-t-pass-CFLAGS-to-the-C-compiler.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From c5fd39c8da01cdb0fea0e323937abcf4895b7511 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Wed, 10 Jan 2018 13:36:41 -0600
-Subject: [PATCH 01/16] Don't pass CFLAGS to the C++ compiler
-
----
- src/bootstrap/builder.rs | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index 2e9df48d000..f5ced5b16ed 100644
---- a/src/bootstrap/builder.rs
-+++ b/src/bootstrap/builder.rs
-@@ -1138,8 +1138,7 @@ impl<'a> Builder<'a> {
- if let Ok(cxx) = self.cxx(target) {
- let cxx = ccacheify(&cxx);
- cargo
-- .env(format!("CXX_{}", target), &cxx)
-- .env(format!("CXXFLAGS_{}", target), cflags);
-+ .env(format!("CXX_{}", target), &cxx);
- }
- }
-
---
-2.21.0
-
diff --git a/user/rust/0001-Fix-LLVM-build.patch b/user/rust/0001-Fix-LLVM-build.patch
new file mode 100644
index 000000000..67ad9dbf8
--- /dev/null
+++ b/user/rust/0001-Fix-LLVM-build.patch
@@ -0,0 +1,22 @@
+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/12] Fix LLVM build
+
+---
+ src/bootstrap/src/lib.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+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())
+- .filter(|s| !s.starts_with("-O") && !s.starts_with("/O"))
++ .filter(|s| !s.starts_with("-O") && !s.starts_with("/O") && !s.starts_with("-static"))
+ .collect::<Vec<String>>();
+
+ // If we're compiling C++ on macOS then we add a flag indicating that
diff --git a/user/rust/0002-Fix-LLVM-build.patch b/user/rust/0002-Fix-LLVM-build.patch
deleted file mode 100644
index 83091f46b..000000000
--- a/user/rust/0002-Fix-LLVM-build.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 0a19456e2445def4cfe99dd02cf8292c1db5d4d4 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Fri, 8 Sep 2017 00:04:29 -0500
-Subject: [PATCH 02/16] Fix LLVM build
-
----
- src/bootstrap/lib.rs | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index 4d297fa918a..867df81d972 100644
---- a/src/bootstrap/lib.rs
-+++ b/src/bootstrap/lib.rs
-@@ -769,7 +769,8 @@ impl Build {
- // cc-rs because the build scripts will determine that for themselves.
- let mut base = self.cc[&target].args().iter()
- .map(|s| s.to_string_lossy().into_owned())
-- .filter(|s| !s.starts_with("-O") && !s.starts_with("/O"))
-+ .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.21.0
-
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
new file mode 100644
index 000000000..d7c5fc1dc
--- /dev/null
+++ b/user/rust/0002-Fix-linking-to-zlib-when-cross-compiling.patch
@@ -0,0 +1,34 @@
+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/12] Fix linking to zlib when cross-compiling
+
+---
+ 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 4b0c1229da134..2d61b834c784b 100644
+--- a/compiler/rustc_llvm/build.rs
++++ b/compiler/rustc_llvm/build.rs
+@@ -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);
+
+ // 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") {
diff --git a/user/rust/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch b/user/rust/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch
deleted file mode 100644
index cf07c76d2..000000000
--- a/user/rust/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 2200debf48b6ef4c87e258cf8a968a89903f8723 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/16] Allow rustdoc to work 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(-)
-
-diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
-index 1c9f6e1ab28..7e90be8d8cc 100644
---- a/src/bootstrap/bin/rustdoc.rs
-+++ b/src/bootstrap/bin/rustdoc.rs
-@@ -23,9 +23,6 @@ fn main() {
- Err(_) => 0,
- };
-
-- let mut dylib_path = bootstrap::util::dylib_path();
-- dylib_path.insert(0, PathBuf::from(libdir.clone()));
--
- //FIXME(misdreavus): once stdsimd uses cfg(rustdoc) instead of cfg(dox), remove the `--cfg dox`
- //arguments here
- let mut cmd = Command::new(rustdoc);
-@@ -37,7 +34,7 @@ fn main() {
- .arg("--sysroot")
- .arg(&sysroot)
- .env(bootstrap::util::dylib_path_var(),
-- env::join_paths(&dylib_path).unwrap());
-+ 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
-@@ -86,7 +83,7 @@ fn main() {
- eprintln!(
- "rustdoc command: {:?}={:?} {:?}",
- bootstrap::util::dylib_path_var(),
-- env::join_paths(&dylib_path).unwrap(),
-+ PathBuf::from(libdir.clone()),
- cmd,
- );
- eprintln!("sysroot: {:?}", sysroot);
---
-2.21.0
-
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
new file mode 100644
index 000000000..cfcc2ad83
--- /dev/null
+++ b/user/rust/0003-Fix-rustdoc-when-cross-compiling-on-musl.patch
@@ -0,0 +1,57 @@
+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/12] Fix rustdoc when cross-compiling on musl
+
+musl can't handle foreign-architecture libraries in LD_LIBRARY_PATH.
+---
+ src/bootstrap/src/bin/rustdoc.rs | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+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);
+
+ 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
+@@ -68,7 +66,7 @@ fn main() {
+ eprintln!(
+ "rustdoc command: {:?}={:?} {:?}",
+ dylib_path_var(),
+- env::join_paths(&dylib_path).unwrap(),
++ PathBuf::from(libdir.clone()),
+ cmd,
+ );
+ eprintln!("sysroot: {sysroot:?}");
diff --git a/user/rust/0004-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch b/user/rust/0004-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch
new file mode 100644
index 000000000..56dfc19d4
--- /dev/null
+++ b/user/rust/0004-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch
@@ -0,0 +1,526 @@
+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 04/12] Remove musl_root and CRT fallback from musl targets
+
+---
+ compiler/rustc_codegen_ssa/src/back/link.rs | 6 +--
+ .../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 | 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 -
+ 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 f5e8d5fc92a91..b65999ec7230f 100644
+--- a/compiler/rustc_codegen_ssa/src/back/link.rs
++++ b/compiler/rustc_codegen_ssa/src/back/link.rs
+@@ -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 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();
+
+ 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 53f710b8f9e14..2a4eec15f2027 100644
+--- a/compiler/rustc_target/src/spec/crt_objects.rs
++++ b/compiler/rustc_target/src/spec/crt_objects.rs
+@@ -61,28 +61,6 @@ pub(super) fn all(obj: &'static str) -> 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"]),
+- (LinkOutputKind::StaticNoPicExe, &["crt1.o", "crti.o", "crtbegin.o"]),
+- (LinkOutputKind::StaticPicExe, &["rcrt1.o", "crti.o", "crtbeginS.o"]),
+- (LinkOutputKind::DynamicDylib, &["crti.o", "crtbeginS.o"]),
+- (LinkOutputKind::StaticDylib, &["crti.o", "crtbeginS.o"]),
+- ])
+-}
+-
+-pub(super) fn post_musl_self_contained() -> CrtObjects {
+- new(&[
+- (LinkOutputKind::DynamicNoPicExe, &["crtend.o", "crtn.o"]),
+- (LinkOutputKind::DynamicPicExe, &["crtendS.o", "crtn.o"]),
+- (LinkOutputKind::StaticNoPicExe, &["crtend.o", "crtn.o"]),
+- (LinkOutputKind::StaticPicExe, &["crtendS.o", "crtn.o"]),
+- (LinkOutputKind::DynamicDylib, &["crtendS.o", "crtn.o"]),
+- (LinkOutputKind::StaticDylib, &["crtendS.o", "crtn.o"]),
+- ])
+-}
+-
+ pub(super) fn pre_mingw_self_contained() -> CrtObjects {
+ new(&[
+ (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
+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,
+
+@@ -568,7 +565,6 @@ impl FromStr for LinkSelfContainedDefault {
+ Ok(match s {
+ "false" => LinkSelfContainedDefault::False,
+ "true" | "wasm" => LinkSelfContainedDefault::True,
+- "musl" => LinkSelfContainedDefault::InferredForMusl,
+ "mingw" => LinkSelfContainedDefault::InferredForMingw,
+ _ => return Err(()),
+ })
+@@ -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/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
+-# that this option only makes sense for musl targets that produce statically
+-# linked binaries.
+-#
+-# Defaults to /usr on musl hosts. Has no default otherwise.
+-#musl-root = <platform specific> (path)
+-
+ # 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
+@@ -835,15 +827,6 @@
+ # only use static libraries. If unset, the target's default linkage is used.
+ #crt-static = <platform-specific> (bool)
+
+-# The root location of the musl installation directory. The library directory
+-# will also need to contain libunwind.a for an unwinding implementation. Note
+-# that this option only makes sense for musl targets that produce statically
+-# linked binaries.
+-#musl-root = build.musl-root (path)
+-
+-# The full path to the musl libdir.
+-#musl-libdir = musl-root/lib
+-
+ # 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.
+ //
+- // rustc historically provides a more self-contained installation for musl targets
+- // not requiring the presence of a native musl toolchain. For example, it can fall back
+- // 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") && !target.contains("unikraft") {
+- let srcdir = builder.musl_libdir(target).unwrap_or_else(|| {
+- panic!("Target {:?} does not have a \"musl-libdir\" key", target.triple)
+- });
+- for &obj in &["libc.a", "crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
+- copy_and_stamp(
+- builder,
+- &libdir_self_contained,
+- &srcdir,
+- obj,
+- &mut target_deps,
+- DependencyType::TargetSelfContained,
+- );
+- }
+- 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_link(&src, &target);
+- target_deps.push((target, DependencyType::TargetSelfContained));
+- }
+-
+- if !target.starts_with("s390x") {
+- let libunwind_path = copy_llvm_libunwind(builder, target, &libdir_self_contained);
+- target_deps.push((libunwind_path, DependencyType::TargetSelfContained));
+- }
+- } 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/sysroot/Cargo.toml"));
+
+- // Help the libc crate compile by assisting it in finding various
+- // sysroot native libraries.
+- if target.contains("musl") {
+- if let Some(p) = builder.musl_libdir(target) {
+- let root = format!("native={}", p.to_str().unwrap());
+- cargo.rustflag("-L").rustflag(&root);
+- }
+- }
+-
+ 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,
+
+- // Fallback musl-root for all targets
+- pub musl_root: Option<PathBuf>,
+ pub prefix: Option<PathBuf>,
+ pub sysconfdir: Option<PathBuf>,
+ pub datadir: Option<PathBuf>,
+@@ -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 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;
+- target.musl_root = cfg.musl_root.map(PathBuf::from);
+- 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.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;
+ use std::ffi::{OsStr, OsString};
+-use std::fs;
+ use std::path::PathBuf;
+ use std::process::Command;
+
+@@ -323,28 +322,6 @@ than building it.
+ continue;
+ }
+
+- // 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 {
+- let target = build.config.target_config.entry(*target).or_default();
+- target.musl_root = Some("/usr".into());
+- }
+- match build.musl_libdir(*target) {
+- Some(libdir) => {
+- if fs::metadata(libdir.join("libc.a")).is_err() {
+- panic!("couldn't find libc.a in musl libdir: {}", libdir.display());
+- }
+- }
+- None => panic!(
+- "when targeting MUSL either the rust.musl-root \
+- option or the target.$TARGET.musl-root option must \
+- be specified in config.toml"
+- ),
+- }
+- }
+-
+ 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 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
+@@ -58,8 +58,6 @@ COPY scripts/sccache.sh /scripts/
+ RUN sh /scripts/sccache.sh
+
+ ENV RUST_CONFIGURE_ARGS \
+- --musl-root-i586=/musl-i586 \
+- --musl-root-i686=/musl-i686 \
+ --disable-docs
+
+ # 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 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
+@@ -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 \
+ --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 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
+@@ -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 --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
+
+ 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 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
+@@ -35,7 +35,6 @@ RUN sh /scripts/sccache.sh
+ ENV HOSTS=x86_64-unknown-linux-musl
+
+ ENV RUST_CONFIGURE_ARGS \
+- --musl-root-x86_64=/usr/local/x86_64-linux-musl \
+ --enable-extended \
+ --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 944d9aed3190b..b0ffa7c0e316e 100644
+--- a/src/ci/docker/host-x86_64/test-various/Dockerfile
++++ b/src/ci/docker/host-x86_64/test-various/Dockerfile
+@@ -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 rust.lld
+
+ # Some run-make tests have assertions about code size, and enabling debug
diff --git a/user/rust/0004-Require-static-native-libraries-when-linking-static-.patch b/user/rust/0004-Require-static-native-libraries-when-linking-static-.patch
deleted file mode 100644
index 854cd61e6..000000000
--- a/user/rust/0004-Require-static-native-libraries-when-linking-static-.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 10bd267ac2621267e1f537a5a7df34cb87354cd3 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/16] Require 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.
-
-Fixes #54243
----
- src/librustc_codegen_ssa/back/link.rs | 18 ++++++++++++++----
- 1 file changed, 14 insertions(+), 4 deletions(-)
-
-diff --git a/src/librustc_codegen_ssa/back/link.rs b/src/librustc_codegen_ssa/back/link.rs
-index e3d297e7862..974e8c0239b 100644
---- a/src/librustc_codegen_ssa/back/link.rs
-+++ b/src/librustc_codegen_ssa/back/link.rs
-@@ -1571,9 +1571,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(cmd: &mut dyn Linker,
- }
- }
-
--// 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.
-@@ -1616,7 +1614,19 @@ pub fn add_upstream_native_libraries(cmd: &mut dyn Linker,
- continue
- }
- match lib.kind {
-- NativeLibraryKind::NativeUnknown => cmd.link_dylib(&name.as_str()),
-+ NativeLibraryKind::NativeUnknown => {
-+ // 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()
-+ && !sess.target.target.options.crt_static_allows_dylibs
-+ {
-+ cmd.link_staticlib(&name.as_str())
-+ } else {
-+ cmd.link_dylib(&name.as_str())
-+ }
-+ },
- NativeLibraryKind::NativeFramework => cmd.link_framework(&name.as_str()),
- NativeLibraryKind::NativeStaticNobundle => {
- // Link "static-nobundle" native libs only if the crate they originate from
---
-2.21.0
-
diff --git a/user/rust/0005-Prefer-libgcc_eh-over-libunwind-for-musl.patch b/user/rust/0005-Prefer-libgcc_eh-over-libunwind-for-musl.patch
new file mode 100644
index 000000000..cbb22cd45
--- /dev/null
+++ b/user/rust/0005-Prefer-libgcc_eh-over-libunwind-for-musl.patch
@@ -0,0 +1,25 @@
+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 05/12] Prefer libgcc_eh over libunwind for musl
+
+---
+ library/unwind/src/lib.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+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
+@@ -63,7 +63,7 @@
+ #[link(name = "unwind", cfg(not(target_feature = "crt-static")))]
+ extern "C" {}
+ } else {
+- #[link(name = "unwind", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))]
++ #[link(name = "gcc_eh", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))]
+ #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
+ extern "C" {}
+ }
+--
+2.35.1
+
diff --git a/user/rust/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch b/user/rust/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
deleted file mode 100644
index 2df7a6654..000000000
--- a/user/rust/0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
+++ /dev/null
@@ -1,392 +0,0 @@
-From e8ef432c23ea9fb70b28bea07042b33f1050569b 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/16] Remove -nostdlib and musl_root from musl targets
-
----
- config.toml.example | 6 ----
- src/bootstrap/bin/rustc.rs | 10 -------
- src/bootstrap/cc_detect.rs | 27 ++----------------
- src/bootstrap/compile.rs | 21 +-------------
- src/bootstrap/config.rs | 7 -----
- src/bootstrap/configure.py | 22 ---------------
- src/bootstrap/lib.rs | 8 ------
- src/bootstrap/sanity.rs | 28 -------------------
- .../dist-i586-gnu-i586-i686-musl/Dockerfile | 2 --
- src/ci/docker/dist-various-1/Dockerfile | 7 -----
- src/ci/docker/dist-x86_64-musl/Dockerfile | 1 -
- src/ci/docker/test-various/Dockerfile | 1 -
- src/librustc_target/spec/linux_musl_base.rs | 16 -----------
- 13 files changed, 4 insertions(+), 152 deletions(-)
-
-diff --git a/config.toml.example b/config.toml.example
-index c14adf8ce33..8ec8d2bbbb7 100644
---- a/config.toml.example
-+++ b/config.toml.example
-@@ -479,12 +479,6 @@
- # only use static libraries. If unset, the target's default linkage is used.
- #crt-static = false
-
--# The root location of the MUSL installation directory. The library directory
--# will also need to contain libunwind.a for an unwinding implementation. Note
--# that this option only makes sense for MUSL targets that produce statically
--# linked binaries
--#musl-root = "..."
--
- # The root location of the `wasm32-wasi` sysroot.
- #wasi-root = "..."
-
-diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
-index 595deb07ec8..c077dc1581e 100644
---- a/src/bootstrap/bin/rustc.rs
-+++ b/src/bootstrap/bin/rustc.rs
-@@ -145,16 +145,6 @@ fn main() {
- cmd.arg("-Cprefer-dynamic");
- }
-
-- // Help the libc crate compile by assisting it in finding various
-- // sysroot native libraries.
-- if let Some(s) = env::var_os("MUSL_ROOT") {
-- if target.contains("musl") {
-- let mut root = OsString::from("native=");
-- root.push(&s);
-- root.push("/lib");
-- cmd.arg("-L").arg(&root);
-- }
-- }
- if let Some(s) = env::var_os("WASI_ROOT") {
- let mut root = OsString::from("native=");
- root.push(&s);
-diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index 400375cd201..0394ab7a8a7 100644
---- a/src/bootstrap/cc_detect.rs
-+++ b/src/bootstrap/cc_detect.rs
-@@ -84,7 +84,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();
-@@ -107,7 +107,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 {
- false
-@@ -134,8 +134,7 @@ pub fn find(build: &mut Build) {
- fn set_compiler(cfg: &mut cc::Build,
- compiler: Language,
- target: Interned<String>,
-- config: Option<&Target>,
-- build: &Build) {
-+ config: Option<&Target>) {
- match &*target {
- // When compiling for android we may have the NDK configured in the
- // config.toml in which case we look there. Otherwise the default
-@@ -175,26 +174,6 @@ fn set_compiler(cfg: &mut cc::Build,
- }
- }
-
-- "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 576267e6948..8e5de3907f6 100644
---- a/src/bootstrap/compile.rs
-+++ b/src/bootstrap/compile.rs
-@@ -116,20 +116,7 @@ impl Step for Std {
- fn copy_third_party_objects(builder: &Builder<'_>, compiler: &Compiler, target: Interned<String>) {
- let libdir = builder.sysroot_libdir(*compiler, target);
-
-- // Copies the crt(1,i,n).o startup objects
-- //
-- // Since musl supports fully static linking, we can cross link for it even
-- // with a glibc-targeting toolchain, given we have the appropriate startup
-- // files. As those shipped with glibc won't work, copy the ones provided by
-- // musl so we have them on linux-gnu hosts.
-- if target.contains("musl") {
-- for &obj in &["crt1.o", "crti.o", "crtn.o"] {
-- builder.copy(
-- &builder.musl_root(target).unwrap().join("lib").join(obj),
-- &libdir.join(obj),
-- );
-- }
-- } else if target.ends_with("-wasi") {
-+ if target.ends_with("-wasi") {
- for &obj in &["crt1.o"] {
- builder.copy(
- &builder.wasi_root(target).unwrap().join("lib/wasm32-wasi").join(obj),
-@@ -219,12 +206,6 @@ pub fn std_cargo(builder: &Builder<'_>,
- .arg("--manifest-path")
- .arg(builder.src.join("src/libstd/Cargo.toml"));
-
-- if target.contains("musl") {
-- if let Some(p) = builder.musl_root(target) {
-- cargo.env("MUSL_ROOT", p);
-- }
-- }
--
- if target.ends_with("-wasi") {
- if let Some(p) = builder.wasi_root(target) {
- cargo.env("WASI_ROOT", p);
-diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 66f504ea924..5bb211501b1 100644
---- a/src/bootstrap/config.rs
-+++ b/src/bootstrap/config.rs
-@@ -133,8 +133,6 @@ pub struct Config {
- pub print_step_timings: 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>,
-@@ -169,7 +167,6 @@ pub struct Target {
- pub linker: Option<PathBuf>,
- pub ndk: Option<PathBuf>,
- pub crt_static: Option<bool>,
-- pub musl_root: Option<PathBuf>,
- pub wasi_root: Option<PathBuf>,
- pub qemu_rootfs: Option<PathBuf>,
- pub no_std: bool,
-@@ -307,7 +304,6 @@ struct Rust {
- backtrace: Option<bool>,
- default_linker: Option<String>,
- channel: Option<String>,
-- musl_root: Option<String>,
- rpath: Option<bool>,
- optimize_tests: Option<bool>,
- codegen_tests: Option<bool>,
-@@ -346,7 +342,6 @@ struct TomlTarget {
- linker: Option<String>,
- android_ndk: Option<String>,
- crt_static: Option<bool>,
-- musl_root: Option<String>,
- wasi_root: Option<String>,
- qemu_rootfs: Option<String>,
- }
-@@ -569,7 +564,6 @@ impl 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.clone();
-- config.musl_root = rust.musl_root.clone().map(PathBuf::from);
- config.save_toolstates = rust.save_toolstates.clone().map(PathBuf::from);
- set(&mut config.deny_warnings, rust.deny_warnings.or(flags.warnings));
- set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
-@@ -607,7 +601,6 @@ impl Config {
- target.ranlib = cfg.ranlib.clone().map(PathBuf::from);
- target.linker = cfg.linker.clone().map(PathBuf::from);
- target.crt_static = cfg.crt_static.clone();
-- target.musl_root = cfg.musl_root.clone().map(PathBuf::from);
- target.wasi_root = cfg.wasi_root.clone().map(PathBuf::from);
- target.qemu_rootfs = cfg.qemu_rootfs.clone().map(PathBuf::from);
-
-diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
-index 907983d43ad..e91f6fcbe4b 100755
---- a/src/bootstrap/configure.py
-+++ b/src/bootstrap/configure.py
-@@ -111,28 +111,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-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("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 867df81d972..4fb57aa6db6 100644
---- a/src/bootstrap/lib.rs
-+++ b/src/bootstrap/lib.rs
-@@ -847,14 +847,6 @@ impl Build {
- }
- }
-
-- /// Returns the "musl root" for this `target`, if defined
-- fn musl_root(&self, target: Interned<String>) -> 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 sysroot for the wasi target, if defined
- fn wasi_root(&self, target: Interned<String>) -> Option<&Path> {
- self.config.target_config.get(&target)
-diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index dc65fb9b797..060ba6d9e42 100644
---- a/src/bootstrap/sanity.rs
-+++ b/src/bootstrap/sanity.rs
-@@ -176,34 +176,6 @@ pub fn check(build: &mut Build) {
- }
- }
-
-- // Make sure musl-root is valid
-- if target.contains("musl") {
-- // 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 {
-- let target = build.config.target_config.entry(target.clone())
-- .or_default();
-- target.musl_root = Some("/usr".into());
-- }
-- match build.musl_root(*target) {
-- Some(root) => {
-- if fs::metadata(root.join("lib/libc.a")).is_err() {
-- panic!("couldn't find libc.a in musl dir: {}",
-- root.join("lib").display());
-- }
-- if fs::metadata(root.join("lib/libunwind.a")).is_err() {
-- panic!("couldn't find libunwind.a in musl dir: {}",
-- root.join("lib").display());
-- }
-- }
-- None => {
-- panic!("when targeting MUSL either the rust.musl-root \
-- option or the target.$TARGET.musl-root option must \
-- be specified in config.toml")
-- }
-- }
-- }
--
- if target.contains("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/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile b/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile
-index ba2d32a9296..412c37fdd12 100644
---- a/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile
-+++ b/src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile
-@@ -30,8 +30,6 @@ COPY scripts/sccache.sh /scripts/
- RUN sh /scripts/sccache.sh
-
- ENV RUST_CONFIGURE_ARGS \
-- --musl-root-i586=/musl-i586 \
-- --musl-root-i686=/musl-i686 \
- --enable-extended \
- --disable-docs
-
-diff --git a/src/ci/docker/dist-various-1/Dockerfile b/src/ci/docker/dist-various-1/Dockerfile
-index 5ab4be328a9..f3b622e6037 100644
---- a/src/ci/docker/dist-various-1/Dockerfile
-+++ b/src/ci/docker/dist-various-1/Dockerfile
-@@ -131,13 +131,6 @@ ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
- CXX_thumbv7neon_unknown_linux_gnueabihf=arm-linux-gnueabihf-g++
-
- ENV RUST_CONFIGURE_ARGS \
-- --musl-root-armv5te=/musl-armv5te \
-- --musl-root-arm=/musl-arm \
-- --musl-root-armhf=/musl-armhf \
-- --musl-root-armv7=/musl-armv7 \
-- --musl-root-aarch64=/musl-aarch64 \
-- --musl-root-mips=/musl-mips \
-- --musl-root-mipsel=/musl-mipsel \
- --enable-emscripten \
- --disable-docs
-
-diff --git a/src/ci/docker/dist-x86_64-musl/Dockerfile b/src/ci/docker/dist-x86_64-musl/Dockerfile
-index 385eefde846..81d4f7737e8 100644
---- a/src/ci/docker/dist-x86_64-musl/Dockerfile
-+++ b/src/ci/docker/dist-x86_64-musl/Dockerfile
-@@ -31,7 +31,6 @@ RUN sh /scripts/sccache.sh
- ENV HOSTS=x86_64-unknown-linux-musl
-
- ENV RUST_CONFIGURE_ARGS \
-- --musl-root-x86_64=/usr/local/x86_64-linux-musl \
- --enable-extended \
- --disable-docs \
- --set target.x86_64-unknown-linux-musl.crt-static=false \
-diff --git a/src/ci/docker/test-various/Dockerfile b/src/ci/docker/test-various/Dockerfile
-index c45b1a9a0f1..440796ff3ec 100644
---- a/src/ci/docker/test-various/Dockerfile
-+++ b/src/ci/docker/test-various/Dockerfile
-@@ -27,7 +27,6 @@ COPY scripts/sccache.sh /scripts/
- RUN sh /scripts/sccache.sh
-
- ENV RUST_CONFIGURE_ARGS \
-- --musl-root-x86_64=/usr/local/x86_64-linux-musl \
- --set build.nodejs=/node-v9.2.0-linux-x64/bin/node \
- --set rust.lld
-
-diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/spec/linux_musl_base.rs
-index e294e63982d..58ae91a96aa 100644
---- a/src/librustc_target/spec/linux_musl_base.rs
-+++ b/src/librustc_target/spec/linux_musl_base.rs
-@@ -3,28 +3,12 @@ use crate::spec::{LinkerFlavor, TargetOptions};
- pub fn opts() -> TargetOptions {
- let mut base = super::linux_base::opts();
-
-- // Make sure that the linker/gcc really don't pull in anything, including
-- // default objects, libs, etc.
-- base.pre_link_args_crt.insert(LinkerFlavor::Gcc, Vec::new());
-- base.pre_link_args_crt.get_mut(&LinkerFlavor::Gcc).unwrap().push("-nostdlib".to_string());
--
- // At least when this was tested, the linker would not add the
- // `GNU_EH_FRAME` program header to executables generated, which is required
- // when unwinding to locate the unwinding information. I'm not sure why this
- // argument is *not* necessary for normal builds, but it can't hurt!
- base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,--eh-frame-hdr".to_string());
-
-- // When generating a statically linked executable there's generally some
-- // small setup needed which is listed in these files. These are provided by
-- // a musl toolchain and are linked by default by the `musl-gcc` script. Note
-- // that `gcc` also does this by default, it just uses some different files.
-- //
-- // Each target directory for musl has these object files included in it so
-- // they'll be included from there.
-- base.pre_link_objects_exe_crt.push("crt1.o".to_string());
-- base.pre_link_objects_exe_crt.push("crti.o".to_string());
-- base.post_link_objects_crt.push("crtn.o".to_string());
--
- // These targets statically link libc by default
- base.crt_static_default = true;
- // These targets allow the user to choose between static and dynamic linking.
---
-2.21.0
-
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/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch b/user/rust/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
deleted file mode 100644
index 2f1094448..000000000
--- a/user/rust/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 1eb558f246269606c6d8d73824ef6b44fa10764e 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/16] Prefer libgcc_eh over libunwind for musl
-
----
- src/libunwind/lib.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs
-index 9182e349b19..0377fbb58fc 100644
---- a/src/libunwind/lib.rs
-+++ b/src/libunwind/lib.rs
-@@ -23,6 +23,6 @@ cfg_if::cfg_if! {
- }
-
- #[cfg(target_env = "musl")]
--#[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
-+#[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
- #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
- extern {}
---
-2.21.0
-
diff --git a/user/rust/0007-Fix-C-aggregate-passing-ABI-on-powerpc.patch b/user/rust/0007-Fix-C-aggregate-passing-ABI-on-powerpc.patch
deleted file mode 100644
index 05b91456f..000000000
--- a/user/rust/0007-Fix-C-aggregate-passing-ABI-on-powerpc.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From c9a914f48652de22832a40ef9639ff8d57c57f31 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Wed, 4 Sep 2019 20:40:18 -0500
-Subject: [PATCH 07/16] Fix C aggregate-passing ABI on powerpc
-
-The existing code (which looks like it was copied from MIPS) passes
-aggregates by value in registers. This is wrong. According to the SVR4
-powerpc psABI, all aggregates are passed indirectly.
----
- src/librustc_target/abi/call/mod.rs | 2 +-
- src/librustc_target/abi/call/powerpc.rs | 41 ++++++-------------------
- 2 files changed, 11 insertions(+), 32 deletions(-)
-
-diff --git a/src/librustc_target/abi/call/mod.rs b/src/librustc_target/abi/call/mod.rs
-index fbbd120f934..f4d98177072 100644
---- a/src/librustc_target/abi/call/mod.rs
-+++ b/src/librustc_target/abi/call/mod.rs
-@@ -562,7 +562,7 @@ impl<'a, Ty> FnType<'a, Ty> {
- "arm" => arm::compute_abi_info(cx, self),
- "mips" => mips::compute_abi_info(cx, self),
- "mips64" => mips64::compute_abi_info(cx, self),
-- "powerpc" => powerpc::compute_abi_info(cx, self),
-+ "powerpc" => powerpc::compute_abi_info(self),
- "powerpc64" => powerpc64::compute_abi_info(cx, self),
- "s390x" => s390x::compute_abi_info(cx, self),
- "asmjs" => asmjs::compute_abi_info(cx, self),
-diff --git a/src/librustc_target/abi/call/powerpc.rs b/src/librustc_target/abi/call/powerpc.rs
-index d496abf8e8b..f20defd6f5b 100644
---- a/src/librustc_target/abi/call/powerpc.rs
-+++ b/src/librustc_target/abi/call/powerpc.rs
-@@ -1,49 +1,28 @@
--use crate::abi::call::{ArgType, FnType, Reg, Uniform};
--use crate::abi::{HasDataLayout, LayoutOf, Size, TyLayoutMethods};
-+use crate::abi::call::{ArgType, FnType};
-
--fn classify_ret_ty<'a, Ty, C>(cx: &C, ret: &mut ArgType<'_, Ty>, offset: &mut Size)
-- where Ty: TyLayoutMethods<'a, C>, C: LayoutOf<Ty = Ty> + HasDataLayout
--{
-- if !ret.layout.is_aggregate() {
-- ret.extend_integer_width_to(32);
-- } else {
-+fn classify_ret_ty<Ty>(ret: &mut ArgType<'_, Ty>) {
-+ if ret.layout.is_aggregate() {
- ret.make_indirect();
-- *offset += cx.data_layout().pointer_size;
-+ } else {
-+ ret.extend_integer_width_to(32);
- }
- }
-
--fn classify_arg_ty<'a, Ty, C>(cx: &C, arg: &mut ArgType<'_, Ty>, offset: &mut Size)
-- where Ty: TyLayoutMethods<'a, C>, C: LayoutOf<Ty = Ty> + HasDataLayout
--{
-- let dl = cx.data_layout();
-- let size = arg.layout.size;
-- let align = arg.layout.align.max(dl.i32_align).min(dl.i64_align).abi;
--
-+fn classify_arg_ty<Ty>(arg: &mut ArgType<'_, Ty>) {
- if arg.layout.is_aggregate() {
-- arg.cast_to(Uniform {
-- unit: Reg::i32(),
-- total: size
-- });
-- if !offset.is_aligned(align) {
-- arg.pad_with(Reg::i32());
-- }
-+ arg.make_indirect();
- } else {
- arg.extend_integer_width_to(32);
- }
--
-- *offset = offset.align_to(align) + size.align_to(align);
- }
-
--pub fn compute_abi_info<'a, Ty, C>(cx: &C, fty: &mut FnType<'_, Ty>)
-- where Ty: TyLayoutMethods<'a, C>, C: LayoutOf<Ty = Ty> + HasDataLayout
--{
-- let mut offset = Size::ZERO;
-+pub fn compute_abi_info<Ty>(fty: &mut FnType<'_, Ty>) {
- if !fty.ret.is_ignore() {
-- classify_ret_ty(cx, &mut fty.ret, &mut offset);
-+ classify_ret_ty(&mut fty.ret);
- }
-
- for arg in &mut fty.args {
- if arg.is_ignore() { continue; }
-- classify_arg_ty(cx, arg, &mut offset);
-+ classify_arg_ty(arg);
- }
- }
---
-2.21.0
-
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-Fix-zero-sized-aggregate-ABI-on-powerpc.patch b/user/rust/0008-Fix-zero-sized-aggregate-ABI-on-powerpc.patch
deleted file mode 100644
index c3da394a7..000000000
--- a/user/rust/0008-Fix-zero-sized-aggregate-ABI-on-powerpc.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From f67f0ab40f1328e04916512b9af858ca1b7faa24 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Wed, 4 Sep 2019 20:44:30 -0500
-Subject: [PATCH 08/16] Fix zero-sized aggregate ABI on powerpc
-
-For targets that pass zero-sized aggregates indirectly (generally
-those that pass all aggregates indirectly), we must allocate a register
-for passing the address of the ZST. Clean up the existing cases and add
-powerpc, which requires this as well.
-
-While there are not currently musl targets for s390x or sparc64, they
-would have the same ABI as gnu targets, so remove the env == "gnu" check
-in the Linux case.
-
-Ideally, since it is a property of the C ABI, the `!rust_abi` case would
-be handled entirely in `adjust_c_abi`. However, that would require
-updating each implementation of `compute_abi_info` to handle ZSTs.
----
- src/librustc/ty/layout.rs | 20 +++++++++-----------
- 1 file changed, 9 insertions(+), 11 deletions(-)
-
-diff --git a/src/librustc/ty/layout.rs b/src/librustc/ty/layout.rs
-index 4af26e19b37..163db9778e5 100644
---- a/src/librustc/ty/layout.rs
-+++ b/src/librustc/ty/layout.rs
-@@ -2667,12 +2667,11 @@ where
- };
-
- let target = &cx.tcx().sess.target.target;
-- let win_x64_gnu =
-- target.target_os == "windows" && target.arch == "x86_64" && target.target_env == "gnu";
-- let linux_s390x =
-- target.target_os == "linux" && target.arch == "s390x" && target.target_env == "gnu";
-- let linux_sparc64 =
-- target.target_os == "linux" && target.arch == "sparc64" && target.target_env == "gnu";
-+ let indirect_zst = match target.arch.as_ref() {
-+ "powerpc" | "s390x" | "sparc64" => true,
-+ "x86_64" => target.target_os == "windows" && target.target_env == "gnu",
-+ _ => false,
-+ };
- let rust_abi = match sig.abi {
- RustIntrinsic | PlatformIntrinsic | Rust | RustCall => true,
- _ => false,
-@@ -2742,11 +2741,10 @@ where
- let is_return = arg_idx.is_none();
- let mut arg = mk_arg_type(ty, arg_idx);
- if arg.layout.is_zst() {
-- // For some forsaken reason, x86_64-pc-windows-gnu
-- // doesn't ignore zero-sized struct arguments.
-- // The same is true for s390x-unknown-linux-gnu
-- // and sparc64-unknown-linux-gnu.
-- if is_return || rust_abi || (!win_x64_gnu && !linux_s390x && !linux_sparc64) {
-+ // FIXME: The C ABI case should be handled in adjust_for_cabi.
-+ // Zero-sized struct arguments cannot be ignored in the C ABI
-+ // if they are passed indirectly.
-+ if is_return || rust_abi || !indirect_zst {
- arg.mode = PassMode::Ignore(IgnoreMode::Zst);
- }
- }
---
-2.21.0
-
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-compiletest-Match-suffixed-environments.patch b/user/rust/0009-compiletest-Match-suffixed-environments.patch
deleted file mode 100644
index 9ca4d9900..000000000
--- a/user/rust/0009-compiletest-Match-suffixed-environments.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 0b28aa018f3f64913101495ce9806d356230856e Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 2 Sep 2019 22:10:10 -0500
-Subject: [PATCH 09/16] compiletest: Match suffixed environments
-
----
- src/tools/compiletest/src/header.rs | 2 +-
- src/tools/compiletest/src/util.rs | 8 ++++++--
- 2 files changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs
-index 52f777db2da..4bf3c1a8527 100644
---- a/src/tools/compiletest/src/header.rs
-+++ b/src/tools/compiletest/src/header.rs
-@@ -820,10 +820,10 @@ impl Config {
-
- if name == "test" ||
- util::matches_os(&self.target, name) || // target
-+ util::matches_env(&self.target, name) || // env
- name == util::get_arch(&self.target) || // architecture
- name == util::get_pointer_width(&self.target) || // pointer width
- name == self.stage_id.split('-').next().unwrap() || // stage
-- Some(name) == util::get_env(&self.target) || // env
- (self.target != self.host && name == "cross-compile") ||
- match self.compare_mode {
- Some(CompareMode::Nll) => name == "compare-mode-nll",
-diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
-index 8caf5ca00f5..d23f4edc55d 100644
---- a/src/tools/compiletest/src/util.rs
-+++ b/src/tools/compiletest/src/util.rs
-@@ -101,8 +101,12 @@ pub fn get_arch(triple: &str) -> &'static str {
- panic!("Cannot determine Architecture from triple");
- }
-
--pub fn get_env(triple: &str) -> Option<&str> {
-- triple.split('-').nth(3)
-+pub fn matches_env(triple: &str, name: &str) -> bool {
-+ if let Some(env) = triple.split('-').nth(3) {
-+ env.starts_with(name)
-+ } else {
-+ false
-+ }
- }
-
- pub fn get_pointer_width(triple: &str) -> &'static str {
---
-2.21.0
-
diff --git a/user/rust/0010-Link-stage-2-tools-dynamically-to-libstd.patch b/user/rust/0010-Link-stage-2-tools-dynamically-to-libstd.patch
new file mode 100644
index 000000000..4a83e137f
--- /dev/null
+++ b/user/rust/0010-Link-stage-2-tools-dynamically-to-libstd.patch
@@ -0,0 +1,22 @@
+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 10/12] Link stage 2 tools dynamically to libstd
+
+---
+ src/bootstrap/src/core/builder.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+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.
+- if matches!(mode, Mode::Std | Mode::Rustc) {
++ if matches!(mode, Mode::Std | Mode::Rustc | Mode::ToolRustc) {
+ rustflags.arg("-Cprefer-dynamic");
+ }
+
diff --git a/user/rust/0010-test-c-variadic-Fix-patterns-on-powerpc64.patch b/user/rust/0010-test-c-variadic-Fix-patterns-on-powerpc64.patch
deleted file mode 100644
index 2e2111edb..000000000
--- a/user/rust/0010-test-c-variadic-Fix-patterns-on-powerpc64.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From e6a01c436377109808cac2d49ec30968a02b561d Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 2 Sep 2019 22:09:15 -0500
-Subject: [PATCH 10/16] test/c-variadic: Fix patterns on powerpc64
-
----
- src/test/codegen/c-variadic.rs | 22 +++++++++++-----------
- 1 file changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/src/test/codegen/c-variadic.rs b/src/test/codegen/c-variadic.rs
-index bb90a9653f5..6ef77ca483f 100644
---- a/src/test/codegen/c-variadic.rs
-+++ b/src/test/codegen/c-variadic.rs
-@@ -14,13 +14,13 @@ extern "C" {
- #[unwind(aborts)] // FIXME(#58794)
- pub unsafe extern "C" fn use_foreign_c_variadic_0() {
- // Ensure that we correctly call foreign C-variadic functions.
-- // CHECK: invoke void (i32, ...) @foreign_c_variadic_0(i32 0)
-+ // CHECK: invoke void (i32, ...) @foreign_c_variadic_0([[PARAM:i32( signext)?]] 0)
- foreign_c_variadic_0(0);
-- // CHECK: invoke void (i32, ...) @foreign_c_variadic_0(i32 0, i32 42)
-+ // CHECK: invoke void (i32, ...) @foreign_c_variadic_0([[PARAM]] 0, [[PARAM]] 42)
- foreign_c_variadic_0(0, 42i32);
-- // CHECK: invoke void (i32, ...) @foreign_c_variadic_0(i32 0, i32 42, i32 1024)
-+ // CHECK: invoke void (i32, ...) @foreign_c_variadic_0([[PARAM]] 0, [[PARAM]] 42, [[PARAM]] 1024)
- foreign_c_variadic_0(0, 42i32, 1024i32);
-- // CHECK: invoke void (i32, ...) @foreign_c_variadic_0(i32 0, i32 42, i32 1024, i32 0)
-+ // CHECK: invoke void (i32, ...) @foreign_c_variadic_0([[PARAM]] 0, [[PARAM]] 42, [[PARAM]] 1024, [[PARAM]] 0)
- foreign_c_variadic_0(0, 42i32, 1024i32, 0i32);
- }
-
-@@ -34,18 +34,18 @@ pub unsafe extern "C" fn use_foreign_c_variadic_1_0(ap: VaList) {
-
- #[unwind(aborts)] // FIXME(#58794)
- pub unsafe extern "C" fn use_foreign_c_variadic_1_1(ap: VaList) {
-- // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, i32 42)
-+ // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, [[PARAM]] 42)
- foreign_c_variadic_1(ap, 42i32);
- }
- #[unwind(aborts)] // FIXME(#58794)
- pub unsafe extern "C" fn use_foreign_c_variadic_1_2(ap: VaList) {
-- // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, i32 2, i32 42)
-+ // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, [[PARAM]] 2, [[PARAM]] 42)
- foreign_c_variadic_1(ap, 2i32, 42i32);
- }
-
- #[unwind(aborts)] // FIXME(#58794)
- pub unsafe extern "C" fn use_foreign_c_variadic_1_3(ap: VaList) {
-- // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, i32 2, i32 42, i32 0)
-+ // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, [[PARAM]] 2, [[PARAM]] 42, [[PARAM]] 0)
- foreign_c_variadic_1(ap, 2i32, 42i32, 0i32);
- }
-
-@@ -64,12 +64,12 @@ pub unsafe extern "C" fn c_variadic(n: i32, mut ap: ...) -> i32 {
- // Ensure that we generate the correct `call` signature when calling a Rust
- // defined C-variadic.
- pub unsafe fn test_c_variadic_call() {
-- // CHECK: call i32 (i32, ...) @c_variadic(i32 0)
-+ // CHECK: call [[RET:(signext )?i32]] (i32, ...) @c_variadic([[PARAM]] 0)
- c_variadic(0);
-- // CHECK: call i32 (i32, ...) @c_variadic(i32 0, i32 42)
-+ // CHECK: call [[RET]] (i32, ...) @c_variadic([[PARAM]] 0, [[PARAM]] 42)
- c_variadic(0, 42i32);
-- // CHECK: call i32 (i32, ...) @c_variadic(i32 0, i32 42, i32 1024)
-+ // CHECK: call [[RET]] (i32, ...) @c_variadic([[PARAM]] 0, [[PARAM]] 42, [[PARAM]] 1024)
- c_variadic(0, 42i32, 1024i32);
-- // CHECK: call i32 (i32, ...) @c_variadic(i32 0, i32 42, i32 1024, i32 0)
-+ // CHECK: call [[RET]] (i32, ...) @c_variadic([[PARAM]] 0, [[PARAM]] 42, [[PARAM]] 1024, [[PARAM]] 0)
- c_variadic(0, 42i32, 1024i32, 0i32);
- }
---
-2.21.0
-
diff --git a/user/rust/0011-Move-debugger-scripts-to-usr-share-rust.patch b/user/rust/0011-Move-debugger-scripts-to-usr-share-rust.patch
new file mode 100644
index 000000000..604e223e8
--- /dev/null
+++ b/user/rust/0011-Move-debugger-scripts-to-usr-share-rust.patch
@@ -0,0 +1,66 @@
+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 11/12] Move debugger scripts to /usr/share/rust
+
+---
+ src/bootstrap/dist.rs | 2 +-
+ src/etc/rust-gdb | 2 +-
+ src/etc/rust-gdbgui | 2 +-
+ src/etc/rust-lldb | 4 ++--
+ 4 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
+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;
+- let dst = sysroot.join("lib/rustlib/etc");
++ let dst = sysroot.join("share/rust");
+ t!(fs::create_dir_all(&dst));
+ 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 9abed30ea6f73..4c7f953edfa46 100755
+--- a/src/etc/rust-gdb
++++ b/src/etc/rust-gdb
+@@ -12,7 +12,7 @@ fi
+
+ # Find out where the pretty printer Python module is
+ 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')"
+
+diff --git a/src/etc/rust-gdbgui b/src/etc/rust-gdbgui
+index 913269316bd4c..f444fbc4b104e 100755
+--- a/src/etc/rust-gdbgui
++++ b/src/etc/rust-gdbgui
+@@ -41,7 +41,7 @@ fi
+
+ # Find out where the pretty printer Python module is
+ 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')"
+
+diff --git a/src/etc/rust-lldb b/src/etc/rust-lldb
+index bce72f1bad698..8abb012452787 100755
+--- a/src/etc/rust-lldb
++++ b/src/etc/rust-lldb
+@@ -30,8 +30,8 @@ EOF
+ fi
+ fi
+
+-script_import="command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_lookup.py\""
+-commands_file="$RUSTC_SYSROOT/lib/rustlib/etc/lldb_commands"
++script_import="command script import \"$RUSTC_SYSROOT/share/rust/lldb_lookup.py\""
++commands_file="$RUSTC_SYSROOT/share/rust/lldb_commands"
+
+ # Call LLDB with the commands added to the argument list
+ exec "$lldb" --one-line-before-file "$script_import" --source-before-file "$commands_file" "$@"
diff --git a/user/rust/0011-test-use-extern-for-plugins-Don-t-assume-multilib.patch b/user/rust/0011-test-use-extern-for-plugins-Don-t-assume-multilib.patch
deleted file mode 100644
index 002d84024..000000000
--- a/user/rust/0011-test-use-extern-for-plugins-Don-t-assume-multilib.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From f0fce1130ffe6b5a7666979aedd956becc4d7c25 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sat, 6 Oct 2018 04:01:48 +0000
-Subject: [PATCH 11/16] 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.21.0
-
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/0012-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch b/user/rust/0012-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
deleted file mode 100644
index 6123af837..000000000
--- a/user/rust/0012-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 93835653d45142c17adcf3087d2a8e512053bccf Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 17 Sep 2018 01:32:20 +0000
-Subject: [PATCH 12/16] 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 a35174b3c2a..9e770706857 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:
-- python2.7 test.py
-+ env '$(HOST_RPATH_ENV)' python2.7 test.py
---
-2.21.0
-
diff --git a/user/rust/0013-Ignore-broken-and-non-applicable-tests.patch b/user/rust/0013-Ignore-broken-and-non-applicable-tests.patch
deleted file mode 100644
index dc0f7adb3..000000000
--- a/user/rust/0013-Ignore-broken-and-non-applicable-tests.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-From 8eb87a7b794e649003bc8f4bed6c6d6739f65e43 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 16 Sep 2018 16:38:48 +0000
-Subject: [PATCH 13/16] 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)
-simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
-simd-intrinsic-generic-select.rs: broken on BE, #59356
-sparc-struct-abi: no sparc target
-sysroot-crates-are-unstable: can't run rustc without RPATH
----
- src/test/codegen/sparc-struct-abi.rs | 1 +
- src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile | 2 ++
- src/test/run-make-fulldeps/linker-output-non-utf8/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/run-pass/env-funky-keys.rs | 1 +
- src/test/run-pass/simd/simd-intrinsic-generic-bitmask.rs | 2 ++
- src/test/run-pass/simd/simd-intrinsic-generic-select.rs | 2 ++
- 8 files changed, 14 insertions(+)
-
-diff --git a/src/test/codegen/sparc-struct-abi.rs b/src/test/codegen/sparc-struct-abi.rs
-index 78e5b14a212..6f93e93286b 100644
---- a/src/test/codegen/sparc-struct-abi.rs
-+++ b/src/test/codegen/sparc-struct-abi.rs
-@@ -4,6 +4,7 @@
-
- // only-sparc64
- // compile-flags: -O --target=sparc64-unknown-linux-gnu --crate-type=rlib
-+// ignore-test
- #![feature(no_core, lang_items)]
- #![no_core]
-
-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/linker-output-non-utf8/Makefile b/src/test/run-make-fulldeps/linker-output-non-utf8/Makefile
-index b47ce17ec8b..59c44fcf438 100644
---- a/src/test/run-make-fulldeps/linker-output-non-utf8/Makefile
-+++ b/src/test/run-make-fulldeps/linker-output-non-utf8/Makefile
-@@ -13,6 +13,8 @@
- # This also does not work on Apple APFS due to the filesystem requiring
- # valid UTF-8 paths.
-
-+# ignore-musl
-+
- # The zzz it to allow humans to tab complete or glob this thing.
- bad_dir := $(TMPDIR)/zzz$$'\xff'
-
-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 9e770706857..6d92ec5cec8 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/run-pass/env-funky-keys.rs b/src/test/run-pass/env-funky-keys.rs
-index 3b236e2b3af..7284d25de48 100644
---- a/src/test/run-pass/env-funky-keys.rs
-+++ b/src/test/run-pass/env-funky-keys.rs
-@@ -1,5 +1,6 @@
- // Ignore this test on Android, because it segfaults there.
-
-+// ignore-test
- // ignore-android
- // ignore-windows
- // ignore-cloudabi no execve
-diff --git a/src/test/run-pass/simd/simd-intrinsic-generic-bitmask.rs b/src/test/run-pass/simd/simd-intrinsic-generic-bitmask.rs
-index b28f742a92e..3ee4ccce731 100644
---- a/src/test/run-pass/simd/simd-intrinsic-generic-bitmask.rs
-+++ b/src/test/run-pass/simd/simd-intrinsic-generic-bitmask.rs
-@@ -2,6 +2,8 @@
- #![allow(non_camel_case_types)]
-
- // ignore-emscripten
-+// ignore-powerpc
-+// ignore-powerpc64
-
- // Test that the simd_bitmask intrinsic produces correct results.
-
-diff --git a/src/test/run-pass/simd/simd-intrinsic-generic-select.rs b/src/test/run-pass/simd/simd-intrinsic-generic-select.rs
-index f79b140494e..39080c8c90d 100644
---- a/src/test/run-pass/simd/simd-intrinsic-generic-select.rs
-+++ b/src/test/run-pass/simd/simd-intrinsic-generic-select.rs
-@@ -2,6 +2,8 @@
- #![allow(non_camel_case_types)]
-
- // ignore-emscripten
-+// ignore-powerpc
-+// ignore-powerpc64
-
- // Test that the simd_select intrinsics produces correct results.
-
---
-2.21.0
-
diff --git a/user/rust/0014-Link-stage-2-tools-dynamically-to-libstd.patch b/user/rust/0014-Link-stage-2-tools-dynamically-to-libstd.patch
deleted file mode 100644
index 47e9173a9..000000000
--- a/user/rust/0014-Link-stage-2-tools-dynamically-to-libstd.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 8e160daedd1a8c928024db648c2f851cddbbd000 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 24 Sep 2018 23:42:23 +0000
-Subject: [PATCH 14/16] Link stage 2 tools dynamically to libstd
-
----
- src/bootstrap/tool.rs | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
-index bd77f7a91d9..70477b44032 100644
---- a/src/bootstrap/tool.rs
-+++ b/src/bootstrap/tool.rs
-@@ -210,7 +210,9 @@ pub fn prepare_tool_cargo(
-
- // We don't want to build tools dynamically as they'll be running across
- // stages and such and it's just easier if they're not dynamically linked.
-- cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");
-+ if compiler.stage < 2 {
-+ cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");
-+ }
-
- if source_type == SourceType::Submodule {
- cargo.env("RUSTC_EXTERNAL_TOOL", "1");
---
-2.21.0
-
diff --git a/user/rust/0015-Move-debugger-scripts-to-usr-share-rust.patch b/user/rust/0015-Move-debugger-scripts-to-usr-share-rust.patch
deleted file mode 100644
index ed30dfd15..000000000
--- a/user/rust/0015-Move-debugger-scripts-to-usr-share-rust.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 1d81148c7b7c048cb1c586ece96bd326ae0f72ec Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 17 Sep 2018 02:09:10 +0000
-Subject: [PATCH 15/16] Move debugger scripts to /usr/share/rust
-
----
- src/bootstrap/dist.rs | 2 +-
- src/etc/rust-gdb | 2 +-
- src/etc/rust-lldb | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index 45bc77ec97d..9e82352ef65 100644
---- a/src/bootstrap/dist.rs
-+++ b/src/bootstrap/dist.rs
-@@ -593,7 +593,7 @@ impl Step for DebuggerScripts {
- fn run(self, builder: &Builder<'_>) {
- let host = self.host;
- let sysroot = self.sysroot;
-- let dst = sysroot.join("lib/rustlib/etc");
-+ let dst = sysroot.join("share/rust");
- t!(fs::create_dir_all(&dst));
- 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 23ba93da8e5..dc51b16c572 100755
---- a/src/etc/rust-gdb
-+++ b/src/etc/rust-gdb
-@@ -4,7 +4,7 @@ set -e
-
- # Find out where the pretty printer Python module is
- RUSTC_SYSROOT=`rustc --print=sysroot`
--GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
-+GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/share/rust"
-
- # 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-lldb b/src/etc/rust-lldb
-index 0eb99423df5..f069300dafe 100755
---- a/src/etc/rust-lldb
-+++ b/src/etc/rust-lldb
-@@ -26,7 +26,7 @@ display the contents of local variables!"
- fi
-
- # Prepare commands that will be loaded before any file on the command line has been loaded
--script_import="command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_rust_formatters.py\""
-+script_import="command script import \"$RUSTC_SYSROOT/share/rust/lldb_rust_formatters.py\""
- category_definition="type summary add --no-value --python-function lldb_rust_formatters.print_val -x \".*\" --category Rust"
- category_enable="type category enable Rust"
-
---
-2.21.0
-
diff --git a/user/rust/0016-Add-foxkit-target-specs.patch b/user/rust/0016-Add-foxkit-target-specs.patch
deleted file mode 100644
index 2b60ca937..000000000
--- a/user/rust/0016-Add-foxkit-target-specs.patch
+++ /dev/null
@@ -1,148 +0,0 @@
-From e31b3c5f24306f0e643c38692e4679707bea8bb8 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Mon, 17 Sep 2018 02:29:06 +0000
-Subject: [PATCH 16/16] Add foxkit target specs
-
----
- .../spec/aarch64_foxkit_linux_musl.rs | 11 +++++++++++
- .../spec/armv7_foxkit_linux_musleabihf.rs | 11 +++++++++++
- src/librustc_target/spec/i586_foxkit_linux_musl.rs | 13 +++++++++++++
- src/librustc_target/spec/mod.rs | 7 +++++++
- .../spec/powerpc64_foxkit_linux_musl.rs | 11 +++++++++++
- .../spec/powerpc_foxkit_linux_musl.rs | 13 +++++++++++++
- .../spec/x86_64_foxkit_linux_musl.rs | 11 +++++++++++
- 7 files changed, 77 insertions(+)
- create mode 100644 src/librustc_target/spec/aarch64_foxkit_linux_musl.rs
- create mode 100644 src/librustc_target/spec/armv7_foxkit_linux_musleabihf.rs
- create mode 100644 src/librustc_target/spec/i586_foxkit_linux_musl.rs
- create mode 100644 src/librustc_target/spec/powerpc64_foxkit_linux_musl.rs
- create mode 100644 src/librustc_target/spec/powerpc_foxkit_linux_musl.rs
- create mode 100644 src/librustc_target/spec/x86_64_foxkit_linux_musl.rs
-
-diff --git a/src/librustc_target/spec/aarch64_foxkit_linux_musl.rs b/src/librustc_target/spec/aarch64_foxkit_linux_musl.rs
-new file mode 100644
-index 00000000000..9ba8bc1deb8
---- /dev/null
-+++ b/src/librustc_target/spec/aarch64_foxkit_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::TargetResult;
-+
-+pub fn target() -> TargetResult {
-+ let mut base = super::aarch64_unknown_linux_musl::target()?;
-+
-+ base.llvm_target = "aarch64-foxkit-linux-musl".to_string();
-+ base.target_vendor = "foxkit".to_string();
-+ base.options.crt_static_default = false;
-+
-+ Ok(base)
-+}
-diff --git a/src/librustc_target/spec/armv7_foxkit_linux_musleabihf.rs b/src/librustc_target/spec/armv7_foxkit_linux_musleabihf.rs
-new file mode 100644
-index 00000000000..5a88f778968
---- /dev/null
-+++ b/src/librustc_target/spec/armv7_foxkit_linux_musleabihf.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::TargetResult;
-+
-+pub fn target() -> TargetResult {
-+ let mut base = super::armv7_unknown_linux_musleabihf::target()?;
-+
-+ base.llvm_target = "armv7-foxkit-linux-musleabihf".to_string();
-+ base.target_vendor = "foxkit".to_string();
-+ base.options.crt_static_default = false;
-+
-+ Ok(base)
-+}
-diff --git a/src/librustc_target/spec/i586_foxkit_linux_musl.rs b/src/librustc_target/spec/i586_foxkit_linux_musl.rs
-new file mode 100644
-index 00000000000..f0c4ffbf580
---- /dev/null
-+++ b/src/librustc_target/spec/i586_foxkit_linux_musl.rs
-@@ -0,0 +1,13 @@
-+use crate::spec::{LinkerFlavor, TargetResult};
-+
-+pub fn target() -> TargetResult {
-+ let mut base = super::i586_unknown_linux_musl::target()?;
-+
-+ base.llvm_target = "i586-foxkit-linux-musl".to_string();
-+ base.target_vendor = "foxkit".to_string();
-+ base.options.crt_static_default = false;
-+ base.options.post_link_args.insert(LinkerFlavor::Gcc,
-+ vec!["-Wl,--as-needed".to_string(), "-lssp_nonshared".to_string()]);
-+
-+ Ok(base)
-+}
-diff --git a/src/librustc_target/spec/mod.rs b/src/librustc_target/spec/mod.rs
-index 75821aba470..fad73c0fc0e 100644
---- a/src/librustc_target/spec/mod.rs
-+++ b/src/librustc_target/spec/mod.rs
-@@ -328,6 +328,13 @@ macro_rules! supported_targets {
- }
-
- 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/src/librustc_target/spec/powerpc64_foxkit_linux_musl.rs b/src/librustc_target/spec/powerpc64_foxkit_linux_musl.rs
-new file mode 100644
-index 00000000000..b105aa247eb
---- /dev/null
-+++ b/src/librustc_target/spec/powerpc64_foxkit_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::TargetResult;
-+
-+pub fn target() -> TargetResult {
-+ let mut base = super::powerpc64_unknown_linux_musl::target()?;
-+
-+ base.llvm_target = "powerpc64-foxkit-linux-musl".to_string();
-+ base.target_vendor = "foxkit".to_string();
-+ base.options.crt_static_default = false;
-+
-+ Ok(base)
-+}
-diff --git a/src/librustc_target/spec/powerpc_foxkit_linux_musl.rs b/src/librustc_target/spec/powerpc_foxkit_linux_musl.rs
-new file mode 100644
-index 00000000000..a425f472aa0
---- /dev/null
-+++ b/src/librustc_target/spec/powerpc_foxkit_linux_musl.rs
-@@ -0,0 +1,13 @@
-+use crate::spec::{LinkerFlavor, TargetResult};
-+
-+pub fn target() -> TargetResult {
-+ let mut base = super::powerpc_unknown_linux_musl::target()?;
-+
-+ base.llvm_target = "powerpc-foxkit-linux-musl".to_string();
-+ base.target_vendor = "foxkit".to_string();
-+ base.options.crt_static_default = false;
-+ base.options.post_link_args.insert(LinkerFlavor::Gcc,
-+ vec!["-Wl,--as-needed".to_string(), "-lssp_nonshared".to_string()]);
-+
-+ Ok(base)
-+}
-diff --git a/src/librustc_target/spec/x86_64_foxkit_linux_musl.rs b/src/librustc_target/spec/x86_64_foxkit_linux_musl.rs
-new file mode 100644
-index 00000000000..40adbd77b38
---- /dev/null
-+++ b/src/librustc_target/spec/x86_64_foxkit_linux_musl.rs
-@@ -0,0 +1,11 @@
-+use crate::spec::TargetResult;
-+
-+pub fn target() -> TargetResult {
-+ let mut base = super::x86_64_unknown_linux_musl::target()?;
-+
-+ base.llvm_target = "x86_64-foxkit-linux-musl".to_string();
-+ base.target_vendor = "foxkit".to_string();
-+ base.options.crt_static_default = false;
-+
-+ Ok(base)
-+}
---
-2.21.0
-
diff --git a/user/rust/0030-libc-linkage.patch b/user/rust/0030-libc-linkage.patch
deleted file mode 100644
index a54303b8b..000000000
--- a/user/rust/0030-libc-linkage.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- rustc-1.36.0-src/vendor/libc/src/lib.rs
-+++ rustc-1.36.0-src/vendor/libc/src/lib.rs
-@@ -26,6 +26,7 @@
- #![deny(missing_copy_implementations, safe_packed_borrows)]
- #![no_std]
- #![cfg_attr(feature = "rustc-dep-of-std", no_core)]
-+#![cfg_attr(feature = "rustc-dep-of-std", feature(static_nobundle))]
-
- #[macro_use]
- mod macros;
---- rustc-1.36.0-src/vendor/libc/src/unix/mod.rs
-+++ rustc-1.36.0-src/vendor/libc/src/unix/mod.rs
-@@ -307,11 +307,11 @@ cfg_if! {
- // cargo build, don't pull in anything extra as the libstd dep
- // already pulls in all libs.
- } else if #[cfg(target_env = "musl")] {
-+ #[link(name = "c")]
-+ extern {}
- #[cfg_attr(feature = "rustc-dep-of-std",
-- link(name = "c", kind = "static",
-+ link(name = "gcc", kind = "static-nobundle",
- cfg(target_feature = "crt-static")))]
-- #[cfg_attr(feature = "rustc-dep-of-std",
-- link(name = "c", cfg(not(target_feature = "crt-static"))))]
- extern {}
- } else if #[cfg(target_os = "emscripten")] {
- #[link(name = "c")]
---- rustc-1.36.0-src/vendor/libc/.cargo-checksum.json
-+++ rustc-1.36.0-src/vendor/libc/.cargo-checksum.json
-@@ -1 +1 @@
--{"files":{"CONTRIBUTING.md":"abc79e7f6c3eee37e21baca32847b6709c973f4995b32892e80deb56b73c9ac5","Cargo.toml":"4f566bfdc168610f37b79d8671c1f9c6f084e0b6cfd40083eed544273e4ab1af","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"35582cfa483e7676b25ae4a07064a19443f4942f5e60e43b91632fcd6ae95156","build.rs":"e9b7364366a5b4caa9daa436ab8a3469532fe63d5fae4d3b2e5ff59d32ff3f3a","rustfmt.toml":"8a654d5787585ca8f2c20580737336fc327f411a07b0dbd4870adf6e9bdf624f","src/cloudabi/aarch64.rs":"b8550bf1fd7344972aa4db29441486f39f31482d0327534981dbb75959c29114","src/cloudabi/arm.rs":"c197e2781c2839808bd6fcef219a29705b27b992d3ef920e9cf6ac96e2022bbf","src/cloudabi/mod.rs":"037c1a3160ae3bc336f6f7135476704e7f5e834e4039fa02b37f03b507118945","src/cloudabi/x86.rs":"33eb97f272d2201f3838ae74d444583c7de8f67856852ca375293b20bbd05636","src/cloudabi/x86_64.rs":"400d85d4fe39e26cf2e6ece9ee31c75fe9e88c4bcf4d836ca9f765c05c9c5be3","src/fuchsia/aarch64.rs":"40dce617877e606e92353491e1913711b1ecfa510bb983156f4a8460f490419e","src/fuchsia/align.rs":"9ca6271f2cbb0e6ca3b48ff6898ecee31c89b3c8388ae20be63e457aabad13a5","src/fuchsia/mod.rs":"db1936ed9e5ac6bd1c04329cbf12feb6842e2a00ca528ff8ccaf7c3b0a5ebe52","src/fuchsia/no_align.rs":"56868534e4ed3f94a27ed39c42f01210c8ecfdbafd4e27679860fbc65a2ae8de","src/fuchsia/x86_64.rs":"911d1249370cf1b0b7b38960cae28af1276f0f614cfcbf5174dbaa38be3dff1d","src/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/hermit/mod.rs":"9d764e53df81416a5182b71a26402d2071fc0c15160103b6670b6b268fc356da","src/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/lib.rs":"c9a1ddaaae192d0a40eea37b8402eb506a895711bcf493a7af5a9dfc88fac733","src/macros.rs":"8232e284068d34336713535595fad3c910093346be32e72bde3d3d03327ec6b8","src/redox/align.rs":"2cdc7c826ef7ae61f5171c5ae8c445a743d86f1a7f2d9d7e4ceeec56d6874f65","src/redox/mod.rs":"34f132e794dc25bbb0e3c08b7f87e4508ce62e0aac00acf39dcdb0f246d7dfc0","src/redox/net.rs":"351960c3a3ad9b296fe43533cac429434e0872c8cca5ad5047dce79d82e009ee","src/redox/no_align.rs":"c06e95373b9088266e0b14bba0954eef95f93fb2b01d951855e382d22de78e53","src/sgx.rs":"7ff2fbf3e5ad1c880014d68e012f4381a9b9140d13089193b9fba07a7f27c352","src/switch.rs":"fe1414ca053b73cf8a5f54448e807abe81c776c6ac0dfe47ea7772c8140f50b6","src/unix/align.rs":"2cdc7c826ef7ae61f5171c5ae8c445a743d86f1a7f2d9d7e4ceeec56d6874f65","src/unix/bsd/apple/b32.rs":"0095a17e49fa423cab8644c722a375b88f5c0cf56fa456b549738d98131bb2f9","src/unix/bsd/apple/b64.rs":"99fbd3e6d2c969080631e23f58deffa51cb3f42b7a08395b49556f19bb40d4e1","src/unix/bsd/apple/mod.rs":"d67234bd36d2d2ab84716f597af4245cb01fc92fee362a331ae4e0a4eb723faa","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"2cb0a5d10a3c5721d10209ad7ddc59f6756b2c1d4bc89450988053efad788eb6","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"4dcd712c0dd5470171746071a176391f937de7865dd0792173284992d9e3f2c7","src/unix/bsd/freebsdlike/freebsd/arm.rs":"84cf36223f0229cb383036563a4902731543e89b37e4dfe2f450cced566d8545","src/unix/bsd/freebsdlike/freebsd/mod.rs":"0752dc1097fd5e94aabfe7b6d4ead2b94e5c0540e2cd3c8efee883bba13e1a0c","src/unix/bsd/freebsdlike/freebsd/powerpc64.rs":"9873f41843cbf066f6ffab8eeb63115095f81ce9fa8f337b95ec871e40c6565d","src/unix/bsd/freebsdlike/freebsd/x86.rs":"716cb67cd0aea66d4a8e40470d32b55cbfafddf75edd34a90f70d518c8c75457","src/unix/bsd/freebsdlike/freebsd/x86_64.rs":"dd3d8a546730f09b1ef0dfeeb20244eef01d1b4028799b28b3a0c33ae05d5002","src/unix/bsd/freebsdlike/mod.rs":"96a4baa8d7145ff29a9269437ce1fd538a18683488d85a677da78e17e070efc0","src/unix/bsd/mod.rs":"c59685127d6f238b9e9c967424c29da51668ab240e4a88962ab058e4498766b3","src/unix/bsd/netbsdlike/mod.rs":"3b32758ba7a5a133b045521c88e74f51d3718e9051f15ed66122d29267a51138","src/unix/bsd/netbsdlike/netbsd/aarch64.rs":"b38fc046f9a40fea28bd26328b96629f4d5d63d7524936bd6af1865d401a8716","src/unix/bsd/netbsdlike/netbsd/arm.rs":"58cdbb70b0d6f536551f0f3bb3725d2d75c4690db12c26c034e7d6ec4a924452","src/unix/bsd/netbsdlike/netbsd/mod.rs":"75adb8d6ee202d50487913c245e1a880447582f45e1ef6339743305a13fb5719","src/unix/bsd/netbsdlike/netbsd/powerpc.rs":"ee7ff5d89d0ed22f531237b5059aa669df93a3b5c489fa641465ace8d405bf41","src/unix/bsd/netbsdlike/netbsd/sparc64.rs":"9489f4b3e4566f43bb12dfb92238960613dac7f6a45cc13068a8d152b902d7d9","src/unix/bsd/netbsdlike/netbsd/x86.rs":"20692320e36bfe028d1a34d16fe12ca77aa909cb02bda167376f98f1a09aefe7","src/unix/bsd/netbsdlike/netbsd/x86_64.rs":"135509edeaf3fb3f102d89d51ff1a8f82323497336a8dc7e1f0f23b5c2434b73","src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs":"51dd68ca3c3eab0f1fe496b0dc12ad8b85f8cf964af0c2c95ab9834ad03938a8","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs":"6e6f15e81597d85d83ca0eeb154e4f8b8e7f9cbb6a9cfa176601f78642ef94f9","src/unix/bsd/netbsdlike/openbsdlike/mod.rs":"c8d18b725c62c2f1a3c5e42d875e1a3b167c13a1bd6ae3d35f35a6ec29402f81","src/unix/bsd/netbsdlike/openbsdlike/openbsd/aarch64.rs":"ee0057fb97a5e16e46e0f8e4a215f6141b68ea75dd6cb5d53166bee2431082e2","src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs":"a3fb2cfc0e100c860dff1674a90693d57e66b7f12861155ceb42c2de372454bd","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs":"1201371a662cb3515ebb42676cdca9199da7bf4d7c8f90b56f00db03a9fc61f7","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86_64.rs":"26ef6f50740fad5bb722e0f30025c369c287b2204489682319f7b24fce6de98d","src/unix/haiku/b32.rs":"69ae47fc52c6880e85416b4744500d5655c9ec6131cb737f3b649fceaadce15a","src/unix/haiku/b64.rs":"73e64db09275a8da8d50a13cce2cfa2b136036ddf3a930d2939f337fc995900b","src/unix/haiku/mod.rs":"f3edcb2c6c0f8c68daebb1a17490684eae64a488570d1140bee1c2b384e25677","src/unix/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/unix/hermit/mod.rs":"d97797fe66dd43c61f6f895596f6a57145b4c9ef61edd93c8ff9b497a2d28411","src/unix/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/unix/mod.rs":"22a5ba8f3d954d4e0c51fde9369ff5e43db891771681d4d6a7b5b640244e2ed5","src/unix/newlib/aarch64/mod.rs":"c408a990f22fb4292a824f38367e9b517e6e6f8623328397ee631cc88b3d1f7d","src/unix/newlib/align.rs":"04e9b1ac6ca4af24fe5170385249fd64039ebf7f4817c5ceed3a303f3bc8a4aa","src/unix/newlib/arm/mod.rs":"2b6dba2e697ab9b4f4bc4dd5f28057249e9b596d1cb395a9322ec87605c4a5c4","src/unix/newlib/mod.rs":"fb1c25abbcbc82fbb4842e442c9ead2710ccc597f1cce65ac12ad6f4d1f64856","src/unix/newlib/no_align.rs":"7123dcec13604a11b7765c380ff3a4d0da19c39f4b03919de7857723c0cf1502","src/unix/no_align.rs":"c06e95373b9088266e0b14bba0954eef95f93fb2b01d951855e382d22de78e53","src/unix/notbsd/android/b32/arm.rs":"3625a32c7e58cfe683a53486fbe3d42d4e28f00bea31e19cb46ed2bb0b6a140b","src/unix/notbsd/android/b32/mod.rs":"05a714a785fa94a5131af3d59612ce1e9a5823b3327eb2a23de8ad0ce125c377","src/unix/notbsd/android/b32/x86.rs":"ae2b7f1d6278caddc007749bb1d09ca33f7593478a0fd7fe98b457dae86c7814","src/unix/notbsd/android/b64/aarch64.rs":"63d65629d79371814910f691672ef593d20244ee09be26f1ebe07ee6212d0163","src/unix/notbsd/android/b64/mod.rs":"d3bcb20e70d29a450577c09706bb520fab09d0cb3102755736867bf8a957319c","src/unix/notbsd/android/b64/x86_64.rs":"5547aef8dcbaa5a932559f34606fd8d89f6c9c15173d2b1412c12d39b3c1045f","src/unix/notbsd/android/mod.rs":"220b041d7142abb9e54004b8a5468be9afe8ad87c87e1d76f0a05f9671697bca","src/unix/notbsd/emscripten/align.rs":"dee06bccb5f1a58bd498468f204b8f1d8f2c2a536c595d31e730330a79af7ea5","src/unix/notbsd/emscripten/mod.rs":"42947782f571b56cc1b1c1f4364bb35519bcc44ab8aca53bb13bfd46904de1e0","src/unix/notbsd/emscripten/no_align.rs":"f3960b1d6ede1f8f9d51407a3de5337d44dd5d954e1a4c2bf0ea11e76f2629da","src/unix/notbsd/linux/align.rs":"f2520d03b411519161eaaf043f1948b3279509a3f272b2958bca1d1aeda0434d","src/unix/notbsd/linux/mips/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/notbsd/linux/mips/mips32.rs":"96153abc38b10309e64cb49b1a1e4107be70dbc40bc54ba0372a4573b098b514","src/unix/notbsd/linux/mips/mips64.rs":"9bd96aa81cb0f536c3607d0a2906f4be7a44c3f89e40d5955a898835f04f0e15","src/unix/notbsd/linux/mips/mod.rs":"9a67a2f4043907a50a43569c06ffb4890aefa8db1c26a8737c6bb4bd3e39d90e","src/unix/notbsd/linux/mips/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/notbsd/linux/mod.rs":"e3531ef28589e4dfd9861f5bd0ba175200dedb69d48f20842baeb129fd8761e1","src/unix/notbsd/linux/musl/b32/arm.rs":"fdf170e03812072785ec531f1ae810d0c4feb9b29d0c316681b9f7affe1262c0","src/unix/notbsd/linux/musl/b32/mips.rs":"afa4981d93f29b3fb0083a73ce1323f7dce1392f90d5cf1966b1fae10d510033","src/unix/notbsd/linux/musl/b32/mod.rs":"540928f168f145c136f9dd729ffa12b9d1838d9fe664fc642365d17d7fae648f","src/unix/notbsd/linux/musl/b32/powerpc.rs":"16c615770a96f155540511f58b5a8070c9c7a43e12bdfed83996690e7558bcb5","src/unix/notbsd/linux/musl/b32/x86.rs":"adf8bb67b47995760aab14f04ae671ebd8ecca5579e90314612f46cb79b30cc2","src/unix/notbsd/linux/musl/b64/aarch64.rs":"d98643408c2837387988f78adc95c90ad21196a6f8f879e3d33d7e8ccf612640","src/unix/notbsd/linux/musl/b64/mod.rs":"d9285cd705e2e92552a08c9aa69b810e7e1bd0e9da6edf069c678af285579661","src/unix/notbsd/linux/musl/b64/powerpc64.rs":"544d8a7f6d6d84143df8a4c3537c9a3a36bf3d338d7a1c15689b94492498d8d7","src/unix/notbsd/linux/musl/b64/x86_64.rs":"19197260a6d06ee521a5aa40a1860b7be33176d0f52bc92d56165fc42729cbd5","src/unix/notbsd/linux/musl/mod.rs":"13d766411fa206b987567e7c802dfe7585e6b7f002fe13ec0fbc810e522b7e2d","src/unix/notbsd/linux/no_align.rs":"7a1cc536b26c22019d7dab6b6db3a8c9edbb753d3f37a7985c30d8894c2c6b06","src/unix/notbsd/linux/other/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/notbsd/linux/other/b32/arm.rs":"d9892f7350b2978335f734f1cd2d7fed60f0f2e66aa05bee3f69549c031f8b14","src/unix/notbsd/linux/other/b32/mod.rs":"26211878c6481861e11393625620edaa0700cac41f55f0118c0f0bd42c1b7520","src/unix/notbsd/linux/other/b32/powerpc.rs":"253fcd2f9978525285be1903cc08f3fec2dc3b12d1660a33e2995b4f6b810d1c","src/unix/notbsd/linux/other/b32/x86.rs":"fea38039a1908ddeb90672b8ef246c743eec6758663a79aea401e21ef40a736d","src/unix/notbsd/linux/other/b64/aarch64.rs":"1124ab5e974718b94fa40ae0f1772fb1c537910ef3e018b7c6c94a38b83dd742","src/unix/notbsd/linux/other/b64/mod.rs":"63e1a3fdf5f4d1b9820934ab344c91aed5e458e7e05908535d2e942d51a08bf8","src/unix/notbsd/linux/other/b64/not_x32.rs":"fa8636fb93eab230ed53bdec0a06f5b81d6d982cc0800103563c8c1eefcdb2d9","src/unix/notbsd/linux/other/b64/powerpc64.rs":"a771d982ed8a9458e1f2f039f959b5075b22443159875ba5612eebba96661c24","src/unix/notbsd/linux/other/b64/sparc64.rs":"0caffe5924886f3aed187531dfe78189b3df40adb96782ec4b471647ff83e9b1","src/unix/notbsd/linux/other/b64/x32.rs":"06a26c5120ced30fc015c220799b67c4401be2f13fc6c7361bebd3d37ff4982d","src/unix/notbsd/linux/other/b64/x86_64.rs":"017cb7cf2810bc633e21879a8951a2c10031c500648e5eb4accc6c88b58ecaa3","src/unix/notbsd/linux/other/mod.rs":"86d6c4f5a01b4da8cf9bbfa7f6fedbeda1c9b1c0528244ce9033a647cd0567d5","src/unix/notbsd/linux/other/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/notbsd/linux/s390x/align.rs":"a7bdcb18a37a2d91e64d5fad83ea3edc78f5412adb28f77ab077dbb26dd08b2d","src/unix/notbsd/linux/s390x/mod.rs":"b01d158eefce4c31f377b63964d253f9934f7468af35a24474a163ad3725796a","src/unix/notbsd/linux/s390x/no_align.rs":"4a18e3875698c85229599225ac3401a2a40da87e77b2ad4ef47c6fcd5a24ed30","src/unix/notbsd/mod.rs":"8aa3fc4d3879b6897871c55c4cb70ff7a63c399d2409a729cc788f21f987452e","src/unix/solarish/compat.rs":"8db2a43eafbd3504e9eb9e8f18416c57d947798871bd45be3e2fb9946e292610","src/unix/solarish/mod.rs":"0c6d148d84f2fa9feb86b464d30af9c52322553bf321ae4fe27184d274ccbe21","src/unix/uclibc/align.rs":"5607180357a9e3d87163e478116b45c7ece391d8366d65ff856cdf3e849452d7","src/unix/uclibc/arm/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/uclibc/arm/mod.rs":"66d54a7028a422fe331028441d1b1f18cf34bb2deff2a9e5220384b6e10dcc40","src/unix/uclibc/arm/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/uclibc/mips/mips32/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/uclibc/mips/mips32/mod.rs":"d1a1af63b583b170d5c94b46a04589a11b9d4f8dc658ab8c74302bae656d0e85","src/unix/uclibc/mips/mips32/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/uclibc/mips/mips64/align.rs":"a7bdcb18a37a2d91e64d5fad83ea3edc78f5412adb28f77ab077dbb26dd08b2d","src/unix/uclibc/mips/mips64/mod.rs":"03f3bad1c681e6fde4a8ed999ce1d38313166c17d35eded66bd6b4f8387efeb7","src/unix/uclibc/mips/mips64/no_align.rs":"bf11b59caa173a6d94d86f42a8de9c5682f798647fba3a17169214b59ab467fe","src/unix/uclibc/mips/mod.rs":"2d76e6cfeb2b7f7c59231a6e099f1aed811a45659e62153aaf00c220b9488a9d","src/unix/uclibc/mod.rs":"d7c2b44735fe8a892fb05ab888de8311fc1f7a86f3aef818b7ff04fae70447fa","src/unix/uclibc/no_align.rs":"3f28637046524618adaa1012e26cb7ffe94b9396e6b518cccdc69d59f274d709","src/unix/uclibc/x86_64/align.rs":"26e48fc79dbdeee4408ae8e071aa90e1be34ccdf0c135689b805aa4abd568e5e","src/unix/uclibc/x86_64/l4re.rs":"bb31053d6403091e11f95ac2203982f279f8b984a19adf30796878c45fdd8c25","src/unix/uclibc/x86_64/mod.rs":"df78de7e0234192c0559b9820c0034a24d72a0820d361f9aad05a9eac36e80ff","src/unix/uclibc/x86_64/no_align.rs":"b308f7b110caf7405b57186882cfc4804caae49a8287f8ab612ec8548467f2f4","src/unix/uclibc/x86_64/other.rs":"42c3f71e58cabba373f6a55a623f3c31b85049eb64824c09c2b082b3b2d6a0a8","src/wasi.rs":"e322bdc14bf7f8c34de8fc4ea52fd6279bbc9d6c205efa8b9b8925e8b12c4b6c","src/windows/gnu.rs":"4d9033162cc6f7d245256c7b165c1ec18a741771fd9b99a55b421e8d14978599","src/windows/mod.rs":"2761f3f80c8af5c04e685af8ac3a2bc8c7d6de91cbad9b96a3a6dae67457a891","src/windows/msvc.rs":"8f46cf66883c794175609a3b2bafaa094d0ba63eb6720ef1b84b175603f1074f"},"package":"c6785aa7dd976f5fbf3b71cfd9cd49d7f783c1ff565a858d71031c6c313aa5c6"}
-\ No newline at end of file
-+{"files":{"CONTRIBUTING.md":"abc79e7f6c3eee37e21baca32847b6709c973f4995b32892e80deb56b73c9ac5","Cargo.toml":"4f566bfdc168610f37b79d8671c1f9c6f084e0b6cfd40083eed544273e4ab1af","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"35582cfa483e7676b25ae4a07064a19443f4942f5e60e43b91632fcd6ae95156","build.rs":"e9b7364366a5b4caa9daa436ab8a3469532fe63d5fae4d3b2e5ff59d32ff3f3a","rustfmt.toml":"8a654d5787585ca8f2c20580737336fc327f411a07b0dbd4870adf6e9bdf624f","src/cloudabi/aarch64.rs":"b8550bf1fd7344972aa4db29441486f39f31482d0327534981dbb75959c29114","src/cloudabi/arm.rs":"c197e2781c2839808bd6fcef219a29705b27b992d3ef920e9cf6ac96e2022bbf","src/cloudabi/mod.rs":"037c1a3160ae3bc336f6f7135476704e7f5e834e4039fa02b37f03b507118945","src/cloudabi/x86.rs":"33eb97f272d2201f3838ae74d444583c7de8f67856852ca375293b20bbd05636","src/cloudabi/x86_64.rs":"400d85d4fe39e26cf2e6ece9ee31c75fe9e88c4bcf4d836ca9f765c05c9c5be3","src/fuchsia/aarch64.rs":"40dce617877e606e92353491e1913711b1ecfa510bb983156f4a8460f490419e","src/fuchsia/align.rs":"9ca6271f2cbb0e6ca3b48ff6898ecee31c89b3c8388ae20be63e457aabad13a5","src/fuchsia/mod.rs":"db1936ed9e5ac6bd1c04329cbf12feb6842e2a00ca528ff8ccaf7c3b0a5ebe52","src/fuchsia/no_align.rs":"56868534e4ed3f94a27ed39c42f01210c8ecfdbafd4e27679860fbc65a2ae8de","src/fuchsia/x86_64.rs":"911d1249370cf1b0b7b38960cae28af1276f0f614cfcbf5174dbaa38be3dff1d","src/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/hermit/mod.rs":"9d764e53df81416a5182b71a26402d2071fc0c15160103b6670b6b268fc356da","src/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/lib.rs":"07bb3130ec198a6413db4dd3da2d3e5d1ab69584c274bc151302707e255c4386","src/macros.rs":"8232e284068d34336713535595fad3c910093346be32e72bde3d3d03327ec6b8","src/redox/align.rs":"2cdc7c826ef7ae61f5171c5ae8c445a743d86f1a7f2d9d7e4ceeec56d6874f65","src/redox/mod.rs":"34f132e794dc25bbb0e3c08b7f87e4508ce62e0aac00acf39dcdb0f246d7dfc0","src/redox/net.rs":"351960c3a3ad9b296fe43533cac429434e0872c8cca5ad5047dce79d82e009ee","src/redox/no_align.rs":"c06e95373b9088266e0b14bba0954eef95f93fb2b01d951855e382d22de78e53","src/sgx.rs":"7ff2fbf3e5ad1c880014d68e012f4381a9b9140d13089193b9fba07a7f27c352","src/switch.rs":"fe1414ca053b73cf8a5f54448e807abe81c776c6ac0dfe47ea7772c8140f50b6","src/unix/align.rs":"2cdc7c826ef7ae61f5171c5ae8c445a743d86f1a7f2d9d7e4ceeec56d6874f65","src/unix/bsd/apple/b32.rs":"0095a17e49fa423cab8644c722a375b88f5c0cf56fa456b549738d98131bb2f9","src/unix/bsd/apple/b64.rs":"99fbd3e6d2c969080631e23f58deffa51cb3f42b7a08395b49556f19bb40d4e1","src/unix/bsd/apple/mod.rs":"d67234bd36d2d2ab84716f597af4245cb01fc92fee362a331ae4e0a4eb723faa","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"2cb0a5d10a3c5721d10209ad7ddc59f6756b2c1d4bc89450988053efad788eb6","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"4dcd712c0dd5470171746071a176391f937de7865dd0792173284992d9e3f2c7","src/unix/bsd/freebsdlike/freebsd/arm.rs":"84cf36223f0229cb383036563a4902731543e89b37e4dfe2f450cced566d8545","src/unix/bsd/freebsdlike/freebsd/mod.rs":"0752dc1097fd5e94aabfe7b6d4ead2b94e5c0540e2cd3c8efee883bba13e1a0c","src/unix/bsd/freebsdlike/freebsd/powerpc64.rs":"9873f41843cbf066f6ffab8eeb63115095f81ce9fa8f337b95ec871e40c6565d","src/unix/bsd/freebsdlike/freebsd/x86.rs":"716cb67cd0aea66d4a8e40470d32b55cbfafddf75edd34a90f70d518c8c75457","src/unix/bsd/freebsdlike/freebsd/x86_64.rs":"dd3d8a546730f09b1ef0dfeeb20244eef01d1b4028799b28b3a0c33ae05d5002","src/unix/bsd/freebsdlike/mod.rs":"96a4baa8d7145ff29a9269437ce1fd538a18683488d85a677da78e17e070efc0","src/unix/bsd/mod.rs":"c59685127d6f238b9e9c967424c29da51668ab240e4a88962ab058e4498766b3","src/unix/bsd/netbsdlike/mod.rs":"3b32758ba7a5a133b045521c88e74f51d3718e9051f15ed66122d29267a51138","src/unix/bsd/netbsdlike/netbsd/aarch64.rs":"b38fc046f9a40fea28bd26328b96629f4d5d63d7524936bd6af1865d401a8716","src/unix/bsd/netbsdlike/netbsd/arm.rs":"58cdbb70b0d6f536551f0f3bb3725d2d75c4690db12c26c034e7d6ec4a924452","src/unix/bsd/netbsdlike/netbsd/mod.rs":"75adb8d6ee202d50487913c245e1a880447582f45e1ef6339743305a13fb5719","src/unix/bsd/netbsdlike/netbsd/powerpc.rs":"ee7ff5d89d0ed22f531237b5059aa669df93a3b5c489fa641465ace8d405bf41","src/unix/bsd/netbsdlike/netbsd/sparc64.rs":"9489f4b3e4566f43bb12dfb92238960613dac7f6a45cc13068a8d152b902d7d9","src/unix/bsd/netbsdlike/netbsd/x86.rs":"20692320e36bfe028d1a34d16fe12ca77aa909cb02bda167376f98f1a09aefe7","src/unix/bsd/netbsdlike/netbsd/x86_64.rs":"135509edeaf3fb3f102d89d51ff1a8f82323497336a8dc7e1f0f23b5c2434b73","src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs":"51dd68ca3c3eab0f1fe496b0dc12ad8b85f8cf964af0c2c95ab9834ad03938a8","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs":"6e6f15e81597d85d83ca0eeb154e4f8b8e7f9cbb6a9cfa176601f78642ef94f9","src/unix/bsd/netbsdlike/openbsdlike/mod.rs":"c8d18b725c62c2f1a3c5e42d875e1a3b167c13a1bd6ae3d35f35a6ec29402f81","src/unix/bsd/netbsdlike/openbsdlike/openbsd/aarch64.rs":"ee0057fb97a5e16e46e0f8e4a215f6141b68ea75dd6cb5d53166bee2431082e2","src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs":"a3fb2cfc0e100c860dff1674a90693d57e66b7f12861155ceb42c2de372454bd","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs":"1201371a662cb3515ebb42676cdca9199da7bf4d7c8f90b56f00db03a9fc61f7","src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86_64.rs":"26ef6f50740fad5bb722e0f30025c369c287b2204489682319f7b24fce6de98d","src/unix/haiku/b32.rs":"69ae47fc52c6880e85416b4744500d5655c9ec6131cb737f3b649fceaadce15a","src/unix/haiku/b64.rs":"73e64db09275a8da8d50a13cce2cfa2b136036ddf3a930d2939f337fc995900b","src/unix/haiku/mod.rs":"f3edcb2c6c0f8c68daebb1a17490684eae64a488570d1140bee1c2b384e25677","src/unix/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/unix/hermit/mod.rs":"d97797fe66dd43c61f6f895596f6a57145b4c9ef61edd93c8ff9b497a2d28411","src/unix/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/unix/mod.rs":"7229044b53c8a5cb1500a9ee4df550e97c6a9a04b680d1cccc1ca3009040699c","src/unix/newlib/aarch64/mod.rs":"c408a990f22fb4292a824f38367e9b517e6e6f8623328397ee631cc88b3d1f7d","src/unix/newlib/align.rs":"04e9b1ac6ca4af24fe5170385249fd64039ebf7f4817c5ceed3a303f3bc8a4aa","src/unix/newlib/arm/mod.rs":"2b6dba2e697ab9b4f4bc4dd5f28057249e9b596d1cb395a9322ec87605c4a5c4","src/unix/newlib/mod.rs":"fb1c25abbcbc82fbb4842e442c9ead2710ccc597f1cce65ac12ad6f4d1f64856","src/unix/newlib/no_align.rs":"7123dcec13604a11b7765c380ff3a4d0da19c39f4b03919de7857723c0cf1502","src/unix/no_align.rs":"c06e95373b9088266e0b14bba0954eef95f93fb2b01d951855e382d22de78e53","src/unix/notbsd/android/b32/arm.rs":"3625a32c7e58cfe683a53486fbe3d42d4e28f00bea31e19cb46ed2bb0b6a140b","src/unix/notbsd/android/b32/mod.rs":"05a714a785fa94a5131af3d59612ce1e9a5823b3327eb2a23de8ad0ce125c377","src/unix/notbsd/android/b32/x86.rs":"ae2b7f1d6278caddc007749bb1d09ca33f7593478a0fd7fe98b457dae86c7814","src/unix/notbsd/android/b64/aarch64.rs":"63d65629d79371814910f691672ef593d20244ee09be26f1ebe07ee6212d0163","src/unix/notbsd/android/b64/mod.rs":"d3bcb20e70d29a450577c09706bb520fab09d0cb3102755736867bf8a957319c","src/unix/notbsd/android/b64/x86_64.rs":"5547aef8dcbaa5a932559f34606fd8d89f6c9c15173d2b1412c12d39b3c1045f","src/unix/notbsd/android/mod.rs":"220b041d7142abb9e54004b8a5468be9afe8ad87c87e1d76f0a05f9671697bca","src/unix/notbsd/emscripten/align.rs":"dee06bccb5f1a58bd498468f204b8f1d8f2c2a536c595d31e730330a79af7ea5","src/unix/notbsd/emscripten/mod.rs":"42947782f571b56cc1b1c1f4364bb35519bcc44ab8aca53bb13bfd46904de1e0","src/unix/notbsd/emscripten/no_align.rs":"f3960b1d6ede1f8f9d51407a3de5337d44dd5d954e1a4c2bf0ea11e76f2629da","src/unix/notbsd/linux/align.rs":"f2520d03b411519161eaaf043f1948b3279509a3f272b2958bca1d1aeda0434d","src/unix/notbsd/linux/mips/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/notbsd/linux/mips/mips32.rs":"96153abc38b10309e64cb49b1a1e4107be70dbc40bc54ba0372a4573b098b514","src/unix/notbsd/linux/mips/mips64.rs":"9bd96aa81cb0f536c3607d0a2906f4be7a44c3f89e40d5955a898835f04f0e15","src/unix/notbsd/linux/mips/mod.rs":"9a67a2f4043907a50a43569c06ffb4890aefa8db1c26a8737c6bb4bd3e39d90e","src/unix/notbsd/linux/mips/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/notbsd/linux/mod.rs":"e3531ef28589e4dfd9861f5bd0ba175200dedb69d48f20842baeb129fd8761e1","src/unix/notbsd/linux/musl/b32/arm.rs":"fdf170e03812072785ec531f1ae810d0c4feb9b29d0c316681b9f7affe1262c0","src/unix/notbsd/linux/musl/b32/mips.rs":"afa4981d93f29b3fb0083a73ce1323f7dce1392f90d5cf1966b1fae10d510033","src/unix/notbsd/linux/musl/b32/mod.rs":"540928f168f145c136f9dd729ffa12b9d1838d9fe664fc642365d17d7fae648f","src/unix/notbsd/linux/musl/b32/powerpc.rs":"16c615770a96f155540511f58b5a8070c9c7a43e12bdfed83996690e7558bcb5","src/unix/notbsd/linux/musl/b32/x86.rs":"adf8bb67b47995760aab14f04ae671ebd8ecca5579e90314612f46cb79b30cc2","src/unix/notbsd/linux/musl/b64/aarch64.rs":"d98643408c2837387988f78adc95c90ad21196a6f8f879e3d33d7e8ccf612640","src/unix/notbsd/linux/musl/b64/mod.rs":"d9285cd705e2e92552a08c9aa69b810e7e1bd0e9da6edf069c678af285579661","src/unix/notbsd/linux/musl/b64/powerpc64.rs":"544d8a7f6d6d84143df8a4c3537c9a3a36bf3d338d7a1c15689b94492498d8d7","src/unix/notbsd/linux/musl/b64/x86_64.rs":"19197260a6d06ee521a5aa40a1860b7be33176d0f52bc92d56165fc42729cbd5","src/unix/notbsd/linux/musl/mod.rs":"13d766411fa206b987567e7c802dfe7585e6b7f002fe13ec0fbc810e522b7e2d","src/unix/notbsd/linux/no_align.rs":"7a1cc536b26c22019d7dab6b6db3a8c9edbb753d3f37a7985c30d8894c2c6b06","src/unix/notbsd/linux/other/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/notbsd/linux/other/b32/arm.rs":"d9892f7350b2978335f734f1cd2d7fed60f0f2e66aa05bee3f69549c031f8b14","src/unix/notbsd/linux/other/b32/mod.rs":"26211878c6481861e11393625620edaa0700cac41f55f0118c0f0bd42c1b7520","src/unix/notbsd/linux/other/b32/powerpc.rs":"253fcd2f9978525285be1903cc08f3fec2dc3b12d1660a33e2995b4f6b810d1c","src/unix/notbsd/linux/other/b32/x86.rs":"fea38039a1908ddeb90672b8ef246c743eec6758663a79aea401e21ef40a736d","src/unix/notbsd/linux/other/b64/aarch64.rs":"1124ab5e974718b94fa40ae0f1772fb1c537910ef3e018b7c6c94a38b83dd742","src/unix/notbsd/linux/other/b64/mod.rs":"63e1a3fdf5f4d1b9820934ab344c91aed5e458e7e05908535d2e942d51a08bf8","src/unix/notbsd/linux/other/b64/not_x32.rs":"fa8636fb93eab230ed53bdec0a06f5b81d6d982cc0800103563c8c1eefcdb2d9","src/unix/notbsd/linux/other/b64/powerpc64.rs":"a771d982ed8a9458e1f2f039f959b5075b22443159875ba5612eebba96661c24","src/unix/notbsd/linux/other/b64/sparc64.rs":"0caffe5924886f3aed187531dfe78189b3df40adb96782ec4b471647ff83e9b1","src/unix/notbsd/linux/other/b64/x32.rs":"06a26c5120ced30fc015c220799b67c4401be2f13fc6c7361bebd3d37ff4982d","src/unix/notbsd/linux/other/b64/x86_64.rs":"017cb7cf2810bc633e21879a8951a2c10031c500648e5eb4accc6c88b58ecaa3","src/unix/notbsd/linux/other/mod.rs":"86d6c4f5a01b4da8cf9bbfa7f6fedbeda1c9b1c0528244ce9033a647cd0567d5","src/unix/notbsd/linux/other/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/notbsd/linux/s390x/align.rs":"a7bdcb18a37a2d91e64d5fad83ea3edc78f5412adb28f77ab077dbb26dd08b2d","src/unix/notbsd/linux/s390x/mod.rs":"b01d158eefce4c31f377b63964d253f9934f7468af35a24474a163ad3725796a","src/unix/notbsd/linux/s390x/no_align.rs":"4a18e3875698c85229599225ac3401a2a40da87e77b2ad4ef47c6fcd5a24ed30","src/unix/notbsd/mod.rs":"8aa3fc4d3879b6897871c55c4cb70ff7a63c399d2409a729cc788f21f987452e","src/unix/solarish/compat.rs":"8db2a43eafbd3504e9eb9e8f18416c57d947798871bd45be3e2fb9946e292610","src/unix/solarish/mod.rs":"0c6d148d84f2fa9feb86b464d30af9c52322553bf321ae4fe27184d274ccbe21","src/unix/uclibc/align.rs":"5607180357a9e3d87163e478116b45c7ece391d8366d65ff856cdf3e849452d7","src/unix/uclibc/arm/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/uclibc/arm/mod.rs":"66d54a7028a422fe331028441d1b1f18cf34bb2deff2a9e5220384b6e10dcc40","src/unix/uclibc/arm/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/uclibc/mips/mips32/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/uclibc/mips/mips32/mod.rs":"d1a1af63b583b170d5c94b46a04589a11b9d4f8dc658ab8c74302bae656d0e85","src/unix/uclibc/mips/mips32/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/uclibc/mips/mips64/align.rs":"a7bdcb18a37a2d91e64d5fad83ea3edc78f5412adb28f77ab077dbb26dd08b2d","src/unix/uclibc/mips/mips64/mod.rs":"03f3bad1c681e6fde4a8ed999ce1d38313166c17d35eded66bd6b4f8387efeb7","src/unix/uclibc/mips/mips64/no_align.rs":"bf11b59caa173a6d94d86f42a8de9c5682f798647fba3a17169214b59ab467fe","src/unix/uclibc/mips/mod.rs":"2d76e6cfeb2b7f7c59231a6e099f1aed811a45659e62153aaf00c220b9488a9d","src/unix/uclibc/mod.rs":"d7c2b44735fe8a892fb05ab888de8311fc1f7a86f3aef818b7ff04fae70447fa","src/unix/uclibc/no_align.rs":"3f28637046524618adaa1012e26cb7ffe94b9396e6b518cccdc69d59f274d709","src/unix/uclibc/x86_64/align.rs":"26e48fc79dbdeee4408ae8e071aa90e1be34ccdf0c135689b805aa4abd568e5e","src/unix/uclibc/x86_64/l4re.rs":"bb31053d6403091e11f95ac2203982f279f8b984a19adf30796878c45fdd8c25","src/unix/uclibc/x86_64/mod.rs":"df78de7e0234192c0559b9820c0034a24d72a0820d361f9aad05a9eac36e80ff","src/unix/uclibc/x86_64/no_align.rs":"b308f7b110caf7405b57186882cfc4804caae49a8287f8ab612ec8548467f2f4","src/unix/uclibc/x86_64/other.rs":"42c3f71e58cabba373f6a55a623f3c31b85049eb64824c09c2b082b3b2d6a0a8","src/wasi.rs":"e322bdc14bf7f8c34de8fc4ea52fd6279bbc9d6c205efa8b9b8925e8b12c4b6c","src/windows/gnu.rs":"4d9033162cc6f7d245256c7b165c1ec18a741771fd9b99a55b421e8d14978599","src/windows/mod.rs":"2761f3f80c8af5c04e685af8ac3a2bc8c7d6de91cbad9b96a3a6dae67457a891","src/windows/msvc.rs":"8f46cf66883c794175609a3b2bafaa094d0ba63eb6720ef1b84b175603f1074f"},"package":"c6785aa7dd976f5fbf3b71cfd9cd49d7f783c1ff565a858d71031c6c313aa5c6"}
diff --git a/user/rust/0031-typenum-pmmx.patch b/user/rust/0031-typenum-pmmx.patch
deleted file mode 100644
index 6b3c5df57..000000000
--- a/user/rust/0031-typenum-pmmx.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 0d5196feadafa77c727f517d747ffcf3fd0e8ba9 Mon Sep 17 00:00:00 2001
-From: Michael Hudson-Doyle <michael.hudson@canonical.com>
-Date: Wed, 13 Mar 2019 15:55:30 +1300
-Subject: [PATCH] round result of (highest as f64).log(2.0)
-
-Even though (1024f64).log(2.0) has an exact, representable, value, with
-rustc 1.32 on i386 it comes out as +9.999999999999999985 with
-optimization enabled. And the rustc doesn't like having two defintions
-for U1024 etc.
-
----
- build/main.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git rustc-1.35.0-src/vendor/typenum/build/main.rs rustc-1.35.0-src/vendor/typenum/build/main.rs
-index 16b0ffe2f..b7939f993 100644
---- rustc-1.35.0-src/vendor/typenum/build/main.rs
-+++ rustc-1.35.0-src/vendor/typenum/build/main.rs
-@@ -81,7 +81,7 @@ pub fn no_std() {}
- fn main() {
- let highest: u64 = 1024;
-
-- let first2: u32 = (highest as f64).log(2.0) as u32 + 1;
-+ let first2: u32 = (highest as f64).log(2.0).round() as u32 + 1;
- let first10: u32 = (highest as f64).log(10.0) as u32 + 1;
- let uints = (0..(highest + 1))
- .chain((first2..64).map(|i| 2u64.pow(i)))
---- rustc-1.35.0-src/vendor/typenum/.cargo-checksum.json
-+++ rustc-1.35.0-src/vendor/typenum/.cargo-checksum.json
-@@ -1 +1 @@
--{"files":{"CHANGELOG.md":"caf37574d41c38570e892c4fed38cbc2fd22794ec512949c1f0faad1d866fced","Cargo.toml":"58822547c70a09449e6a069e6c197423a9e471d993ebf4ea20101e042781edf7","LICENSE":"a825bd853ab71619a4923d7b4311221427848070ff44d990da39b0b274c1683f","README.md":"7a19a1fb2f219fbc270535e0fee2caa96968b976cd74d33d12e2f2ef436d0895","build/main.rs":"44d33ee79a76a90a769096547ba4c7a5d3822afffeed025dfbcc5bb755227d52","build/op.rs":"a393b6818384a50688db8cb923891f86ccce39a9dccbf7c684efb9bef83b4acf","build/tests.rs":"a04fd3185ea8b19c36cb939178e5fedf16b4b36c2df0a2e79593339d998bd1ce","src/array.rs":"7243dbe44f3818c852c67bd0c3af14d57473fb9c3efda2c0d98251b3fe8b4d57","src/bit.rs":"023f9f6768331ac17de72b6248c6a9d6a7b856842f56067c9c1e04b729ed9e04","src/int.rs":"de4c49717a7a40572e579fad2380f29698c5571844ff1462e368531072dba55e","src/lib.rs":"2a58ff8553851eb6b9d7fa70315d688431dd0573f8491e53cfe799a092347b96","src/marker_traits.rs":"abf73f3930b5129d01aaa64c51275c4ca4ce0ef8961f7a9e744ee731d6308200","src/operator_aliases.rs":"43eb6a29dc0387ec329df5d9af0b4479a1301b3a9b2304c3b7b7d8c03e01ff5d","src/private.rs":"48c572aa27bd444062eadb4bd3f5ca38c1e6efb66bc074f38555499b33f0dcaf","src/type_operators.rs":"df9ef3ae2a69d56258db41f8166342a65f6e4085581709140719d1b7e3916bb9","src/uint.rs":"df4fdad3110a7e08fdc21e49f7e82fd525d6a78fcf904a766729aa47c0200727","tests/test.rs":"1e559fadf0af1a38d7049caef26e3a162c58ea5e024aa637299376d776986549"},"package":"612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169"}
-\ No newline at end of file
-+{"files":{"CHANGELOG.md":"caf37574d41c38570e892c4fed38cbc2fd22794ec512949c1f0faad1d866fced","Cargo.toml":"58822547c70a09449e6a069e6c197423a9e471d993ebf4ea20101e042781edf7","LICENSE":"a825bd853ab71619a4923d7b4311221427848070ff44d990da39b0b274c1683f","README.md":"7a19a1fb2f219fbc270535e0fee2caa96968b976cd74d33d12e2f2ef436d0895","build/main.rs":"38a90c85068bb6bba1d21e9d5976e693b9b868ed0c16b26986332d2ca1c01047","build/op.rs":"a393b6818384a50688db8cb923891f86ccce39a9dccbf7c684efb9bef83b4acf","build/tests.rs":"a04fd3185ea8b19c36cb939178e5fedf16b4b36c2df0a2e79593339d998bd1ce","src/array.rs":"7243dbe44f3818c852c67bd0c3af14d57473fb9c3efda2c0d98251b3fe8b4d57","src/bit.rs":"023f9f6768331ac17de72b6248c6a9d6a7b856842f56067c9c1e04b729ed9e04","src/int.rs":"de4c49717a7a40572e579fad2380f29698c5571844ff1462e368531072dba55e","src/lib.rs":"2a58ff8553851eb6b9d7fa70315d688431dd0573f8491e53cfe799a092347b96","src/marker_traits.rs":"abf73f3930b5129d01aaa64c51275c4ca4ce0ef8961f7a9e744ee731d6308200","src/operator_aliases.rs":"43eb6a29dc0387ec329df5d9af0b4479a1301b3a9b2304c3b7b7d8c03e01ff5d","src/private.rs":"48c572aa27bd444062eadb4bd3f5ca38c1e6efb66bc074f38555499b33f0dcaf","src/type_operators.rs":"df9ef3ae2a69d56258db41f8166342a65f6e4085581709140719d1b7e3916bb9","src/uint.rs":"df4fdad3110a7e08fdc21e49f7e82fd525d6a78fcf904a766729aa47c0200727","tests/test.rs":"1e559fadf0af1a38d7049caef26e3a162c58ea5e024aa637299376d776986549"},"package":"612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169"}
diff --git a/user/rust/0040-rls-atomics.patch b/user/rust/0040-rls-atomics.patch
deleted file mode 100644
index d9aedb9af..000000000
--- a/user/rust/0040-rls-atomics.patch
+++ /dev/null
@@ -1,58 +0,0 @@
---- rustc-1.35.0-src/src/tools/rls/rls/src/cmd.rs
-+++ rustc-1.35.0-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,
-@@ -313,8 +313,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.35.0-src/src/tools/rls/rls/src/server/io.rs
-+++ rustc-1.35.0-src/src/tools/rls/rls/src/server/io.rs
-@@ -7,7 +7,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};
-@@ -171,13 +171,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()) }
- }
- }
-
-@@ -194,7 +194,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 50608079b..ede75b2d8 100644
--- a/user/rust/APKBUILD
+++ b/user/rust/APKBUILD
@@ -1,32 +1,33 @@
-# Contributor: Jakub Jirutka <jakub@jirutka.cz>
-# Contributor: Shiz <hi@shiz.me>
-# Contributor: Jeizsm <jeizsm@gmail.com>
# Maintainer: Samuel Holland <samuel@sholland.org>
pkgname=rust
-pkgver=1.37.0
-_bootcargover=0.37.0
-_bootver=1.36.0
-_llvmver=8
+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.
license="(Apache-2.0 OR MIT) AND (NCSA OR MIT) AND BSD-2-Clause AND BSD-3-Clause"
-depends="$pkgname-stdlib=$pkgver-r$pkgrel gcc musl-dev"
+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
- libgit2-dev
- libssh2-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"
subpackages="
$pkgname-dbg
- $pkgname-stdlib
+ $pkgname-std
$pkgname-analysis
$pkgname-doc
$pkgname-gdb::noarch
@@ -38,149 +39,138 @@ subpackages="
cargo-doc:_cargo_doc:noarch
cargo-bash-completion:_cargo_bashcomp:noarch
cargo-zsh-completion:_cargo_zshcomp:noarch
- miri
- rls
rustfmt
"
source="https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.xz
- https://distfiles.adelielinux.org/source/rust/cargo-$_bootcargover-$CBUILD.tar.xz
- https://distfiles.adelielinux.org/source/rust/rust-std-$_bootver-$CBUILD.tar.xz
- https://distfiles.adelielinux.org/source/rust/rustc-$_bootver-$CBUILD.tar.xz
- 0001-Don-t-pass-CFLAGS-to-the-C-compiler.patch
- 0002-Fix-LLVM-build.patch
- 0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch
- 0004-Require-static-native-libraries-when-linking-static-.patch
- 0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
- 0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
- 0007-Fix-C-aggregate-passing-ABI-on-powerpc.patch
- 0008-Fix-zero-sized-aggregate-ABI-on-powerpc.patch
- 0009-compiletest-Match-suffixed-environments.patch
- 0010-test-c-variadic-Fix-patterns-on-powerpc64.patch
- 0011-test-use-extern-for-plugins-Don-t-assume-multilib.patch
- 0012-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
- 0013-Ignore-broken-and-non-applicable-tests.patch
- 0014-Link-stage-2-tools-dynamically-to-libstd.patch
- 0015-Move-debugger-scripts-to-usr-share-rust.patch
- 0016-Add-foxkit-target-specs.patch
- 0030-libc-linkage.patch
- 0031-typenum-pmmx.patch
- 0040-rls-atomics.patch
+ 0001-Fix-LLVM-build.patch
+ 0002-Fix-linking-to-zlib-when-cross-compiling.patch
+ 0003-Fix-rustdoc-when-cross-compiling-on-musl.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
"
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-$_bootcargover-$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
[build]
+ doc-stage = 2
+ build-stage = 2
+ test-stage = 2
build = "$CBUILD"
host = [ "$CHOST" ]
target = [ "$CTARGET" ]
- cargo = "$srcdir/prebuilt/bin/cargo"
- rustc = "$srcdir/prebuilt/bin/rustc"
+ cargo = "/usr/bin/cargo"
+ rustc = "/usr/bin/rustc"
+ rustfmt = "/usr/bin/rustfmt"
+ docs = true
+ compiler-docs = false
submodules = false
python = "python3"
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
+ cargo-native-static = false
[install]
prefix = "/usr"
[rust]
+ optimize = true
+ debug = false
codegen-units = 1
- codegen-units-std = 1
- debug-assertions = false
- debuginfo-level = 2
+ debuginfo-level = 1
debuginfo-level-rustc = 0
debuginfo-level-tests = 0
backtrace = true
incremental = false
parallel-compiler = false
channel = "stable"
+ description = "Adelie ${pkgver}-r${pkgrel}"
rpath = false
verbose-tests = true
+ optimize-tests = true
+ codegen-tests = true
dist-src = false
+ lld = false
+ use-lld = false
+ llvm-tools = false
+ backtrace-on-ice = true
+ remap-debuginfo = false
jemalloc = false
- llvm-libunwind = false
+ llvm-libunwind = "no"
+ new-symbol-mangling = true
[target.$CTARGET]
cc = "$CTARGET-gcc"
cxx = "$CTARGET-g++"
+ ar = "ar"
+ ranlib = "ranlib"
linker = "$CTARGET-gcc"
llvm-config = "/usr/lib/llvm$_llvmver/bin/llvm-config"
crt-static = false
[dist]
src-tarball = false
+ compression-formats = [ "xz" ]
EOF
- LIBGIT2_SYS_USE_PKG_CONFIG=1 \
LLVM_LINK_SHARED=1 \
RUST_BACKTRACE=1 \
python3 x.py dist -j ${JOBS:-2}
}
check() {
- LIBGIT2_SYS_USE_PKG_CONFIG=1 \
LLVM_LINK_SHARED=1 \
- RUST_BACKTRACE=1 \
- python3 x.py test -j ${JOBS:-2} --no-doc --no-fail-fast \
- src/test/codegen \
- src/test/codegen-units \
- src/test/compile-fail \
- src/test/incremental \
- src/test/mir-opt \
- src/test/pretty \
- src/test/run-fail \
- src/test/run-fail/pretty \
- src/test/run-make \
- src/test/run-make-fulldeps \
- src/test/run-pass \
- src/test/run-pass/pretty \
- src/test/run-pass-fulldeps \
- src/test/run-pass-fulldeps/pretty \
- src/test/ui \
- src/test/ui-fulldeps
+ python3 x.py test -j ${JOBS:-2} --no-doc tests/ui
}
package() {
cd "$builddir"/build/dist
- tar xf rust-$pkgver-$CTARGET.tar.gz
+ tar xf rust-$pkgver-$CTARGET.tar.xz
rust-$pkgver-$CTARGET/install.sh \
--destdir="$pkgdir" \
--prefix=/usr \
--sysconfdir="$pkgdir"/etc \
--disable-ldconfig
- tar xf rust-src-$pkgver.tar.gz
+ tar xf rust-src-$pkgver.tar.xz
rust-src-$pkgver/install.sh \
--destdir="$pkgdir" \
--prefix=/usr \
--disable-ldconfig
- rm "$pkgdir"/usr/lib/*.so \
- "$pkgdir"/usr/lib/rustlib/components \
+ rm "$pkgdir"/usr/lib/rustlib/components \
"$pkgdir"/usr/lib/rustlib/install.log \
"$pkgdir"/usr/lib/rustlib/manifest-* \
"$pkgdir"/usr/lib/rustlib/rust-installer-version \
"$pkgdir"/usr/lib/rustlib/uninstall.sh
}
-stdlib() {
+std() {
pkgdesc="Standard library for Rust"
depends="musl-utils"
@@ -192,7 +182,7 @@ stdlib() {
analysis() {
pkgdesc="Compiler analysis data for the Rust standard library"
- depends="$pkgname=$pkgver-r$pkgrel $pkgname-stdlib=$pkgver-r$pkgrel"
+ depends="$pkgname=$pkgver-r$pkgrel $pkgname-std=$pkgver-r$pkgrel"
_mv "$pkgdir"${_rlibdir%/*}/analysis "$subpkgdir"${_rlibdir%/*}
}
@@ -232,14 +222,14 @@ src() {
cargo() {
pkgdesc="The Rust package manager"
provides="cargo-bootstrap=$pkgver-r$pkgrel"
- depends="$pkgname-stdlib=$pkgver-r$pkgrel $pkgname"
+ depends="$pkgname-std=$pkgver-r$pkgrel $pkgname"
_mv "$pkgdir"/usr/bin/cargo "$subpkgdir"/usr/bin
}
_cargo_clippy() {
pkgdesc="A collection of Rust lints (cargo plugin)"
- depends="$pkgname-stdlib=$pkgver-r$pkgrel cargo"
+ depends="$pkgname-std=$pkgver-r$pkgrel cargo"
_mv "$pkgdir"/usr/bin/cargo-clippy \
"$pkgdir"/usr/bin/clippy-driver \
@@ -248,7 +238,7 @@ _cargo_clippy() {
_cargo_fmt() {
pkgdesc="Format Rust code (cargo plugin)"
- depends="$pkgname-stdlib=$pkgver-r$pkgrel cargo rustfmt"
+ depends="$pkgname-std=$pkgver-r$pkgrel cargo rustfmt"
install_if="cargo=$pkgver-r$pkgrel rustfmt=$pkgver-r$pkgrel"
_mv "$pkgdir"/usr/bin/cargo-fmt "$subpkgdir"/usr/bin
@@ -287,25 +277,10 @@ _cargo_doc() {
"$subpkgdir"/usr/share/man/man1
}
-miri() {
- pkgdesc="An interpreter for Rust's mid-level intermediate representation"
- license="Apache-2.0 OR MIT"
- depends="$pkgname-stdlib=$pkgver-r$pkgrel"
-
- _mv "$pkgdir"/usr/bin/miri "$subpkgdir"/usr/bin
-}
-
-rls() {
- pkgdesc="The Rust language server"
- license="Apache-2.0 OR MIT"
- depends="$pkgname-stdlib=$pkgver-r$pkgrel"
-
- _mv "$pkgdir"/usr/bin/rls "$subpkgdir"/usr/bin
-}
-
rustfmt() {
pkgdesc="Format Rust code"
- depends="$pkgname-stdlib=$pkgver-r$pkgrel"
+ provides="rustfmt-bootstrap=$pkgver-r$pkgrel"
+ depends="$pkgname-std=$pkgver-r$pkgrel"
_mv "$pkgdir"/usr/bin/rustfmt "$subpkgdir"/usr/bin
}
@@ -316,26 +291,22 @@ _mv() {
mv "$@"
}
-sha512sums="bfee43f578e6d44ead950b870b9fd31087e1bd3f917611f5dce7ad56504b83185edf43e297e8d1304e9e97b9a580d1e6adf6608ab8ed6dee0dc8c5153cdbc5d4 rustc-1.37.0-src.tar.xz
-ab0711dafeae76d9718a0c6aaf118f512d295c66191d96198acc3591f5412d4ee6c50ad5cc56df8f1f32a2be3c4d9bb5ead798c6b9f4089c0a624e09825dd6be cargo-0.37.0-powerpc-foxkit-linux-musl.tar.xz
-aa97abeccf03d3368b60731845d23ff74fb962818b7d1e6ada2e9a647b442a1b824541402f3a883c9be6e1f8db94ca98244fc4009ff0386403c57f999bd6d263 rust-std-1.36.0-powerpc-foxkit-linux-musl.tar.xz
-5078bdd341b145119ba3396892cd8f63c65fafb1b041674e350b2cc02376fd2c32799baca85e916522c34c416a6c67d9d92bf8f44abb575a1ae1fedc4726516e rustc-1.36.0-powerpc-foxkit-linux-musl.tar.xz
-5b765a47a49cbab26e5093ebf6dce5b8e3463ebdb0e404b9c952fef7993fd57e9a0d9f7d301c97b76b8bd35e4ea8b72c8768aa384cd215c2a12ddd45727343f8 0001-Don-t-pass-CFLAGS-to-the-C-compiler.patch
-9b711ee16eed20a0293c1ca6d96c48db3fae5f2f60fdcb04ae2d1acfdc8036fa3b41ca799717aa14279fd7b7db0090861bceddeafd8d41f70433039e4983d9c8 0002-Fix-LLVM-build.patch
-7f61bdc7c754379e1675d2f102f1f60f4c29ca2a2293d70741db46a0f29d61008d067166c7576cd0e5fa3c26e811e711e851b22f7df69974a7b53fa316c33777 0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch
-0f1989e4db3a48fe8718002a58aaecf359bc65bf5a6dae327c062fce0b8a3176a6b70c80c72118d5fcabbc16b67b986ce67ab1fda13ca52899ca320716f3e606 0004-Require-static-native-libraries-when-linking-static-.patch
-b27045eb7809438db988979843f68ddfee46a6f889b0fbaaed401b249d6e224940e9d15143e55f8b2df911a8fa24dfec81da0f064b47a86f3ed24010aee309e3 0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch
-4662f036e037b99178bb24c32524211eb5fc10ac711d16f13ddb933db84811eab3149cbe943521536d00c765eade1c1df01ca7e8f4fee69fca540546c0fbe806 0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
-8742ff1c442dc2c7baad528fd6c51e202d091f24fbd7ac1350241a729a20f6f90818b76bb4de0b36b09afdeaad89b54843f08fb474e2232854cb68cd3d6a57b5 0007-Fix-C-aggregate-passing-ABI-on-powerpc.patch
-8eb5c08701cfcdc14ece1c40fa2276e760283ce9228c96ff1dedb5256dcec307c3705a8e27ac1bd767184d0acfc835b9b0b4f02d5fa7ec24a75f04014e67ec61 0008-Fix-zero-sized-aggregate-ABI-on-powerpc.patch
-20f794339f7a9c048dad2f39b5a3dad9293b07ba0b130354c0e74ec71088d2f2c24f6630543e8e5a41b244c8c1013249403ce8acf1fc2c2b4ab5065049f7f04e 0009-compiletest-Match-suffixed-environments.patch
-d3d3250d762b482c93679cbc7a1d5ccf2eb803e271b840a5d426cf77d58d2cb53fd76baf46bfbaf7674c5ef9f18133cf0b48be08864c002171f3547aaa377bd6 0010-test-c-variadic-Fix-patterns-on-powerpc64.patch
-d01d27d6f344fd30f75e7acd8f1b967eda382f7ee6387f8b0c52aa1ab083d5d86fa9d8d424c3e2b792502e75df03bacc58bd24ed4e448cfefe6bbfbb57586b06 0011-test-use-extern-for-plugins-Don-t-assume-multilib.patch
-e25a4ba32b3b6fbc774c341bb3bda481a9f86917204e7c9bd69f34e2a72b4b3e58256d0619a94ce1d0f4cc17913d7216974b86fe96a776ba4260d0a01dcacaa9 0012-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch
-68f7b35980c7b4b7088e28a7350c847656d4ffecbcec125ac6790a057a8a735563739f0ade8a7cf0283844cd1655114fa7ad6be106993e34b66e520aed34dd6d 0013-Ignore-broken-and-non-applicable-tests.patch
-b6d4ce58e540373da797c89ed2ca3b23a8504511ee6bb6d0c52bd04273498aab10c99baf6f4633bb5a246c2612a7a538cbfed494bf901afdc6688f937234b4ac 0014-Link-stage-2-tools-dynamically-to-libstd.patch
-fc10130544f7ceda378a9e7fb03a0dc4ea32a6d031061eada60af2d1c688d94f38ab31aad74f8f11b8aec2614415befa2c5e9789eeaf73b998f39b9677886155 0015-Move-debugger-scripts-to-usr-share-rust.patch
-2c11c4bee3c6d10de6c2a9937bf3901f4c60dd1d9c50fcf57daa182a9b4d7b40d27632d3ef31ef083ae7903fcd49fdd41413ab8de1021f7d857884b9ac53c724 0016-Add-foxkit-target-specs.patch
-7642e95d7f5e5d167a2f3e1300fc63f7bf34b6c0667b4e43e7c2378acd8c293f82d7c5651dfb75b03d717c0c5c369911f595dc641a629024e615d443244e6da1 0030-libc-linkage.patch
-0cb12e9165d198c1e04b258454dbaf5459e192ad24d64c9fa132ebe0f1bcd5da3550eae8dfdaa792fa809b505af62964ecf0219dc4373420ee8ad3e111539a09 0031-typenum-pmmx.patch
-ab35bacf45ef5e46be110a8d27867fd4d5deb23cd5cbe8dc7f1da2177469945f9254f2a7915ee4fc430468a4421623429f0a01eb9eba14e047384efe3d3ec152 0040-rls-atomics.patch"
+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/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
new file mode 100644
index 000000000..1a7d4dbea
--- /dev/null
+++ b/user/rust/powerpc-atomics.patch
@@ -0,0 +1,16 @@
+--- 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",
+ "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/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"}
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
+