Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Update Rust toolchain to 1.63.0
@ 2022-08-14  0:46 jcgruenhage
  2022-08-14  0:48 ` [PR PATCH] [Updated] " jcgruenhage
                   ` (23 more replies)
  0 siblings, 24 replies; 25+ messages in thread
From: jcgruenhage @ 2022-08-14  0:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1291 bytes --]

There is a new pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages rust-1.63
https://github.com/void-linux/void-packages/pull/38662

Update Rust toolchain to 1.63.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

`cargo-crev` requires 1.62 at least, so I thought I'd gave updating Rust a go, and it worked out just fine tbh. The new `cargo-crev` release compiled fine on this toolchain and works properly.
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, x86\_64-gnu


A patch file from https://github.com/void-linux/void-packages/pull/38662.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rust-1.63-38662.patch --]
[-- Type: text/x-diff, Size: 53746 bytes --]

From 3d10f50ba6893ff64782d5a164ae0d7173524091 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:01 +0200
Subject: [PATCH 1/4] rust-bootstrap: update to 1.63.0.

---
 srcpkgs/rust-bootstrap/template | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/rust-bootstrap/template b/srcpkgs/rust-bootstrap/template
index 66d04d634638..401dd7c93612 100644
--- a/srcpkgs/rust-bootstrap/template
+++ b/srcpkgs/rust-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'rust-bootstrap'
 pkgname=rust-bootstrap
-version=1.61.0
+version=1.63.0
 revision=1
 create_wrksrc=yes
 short_desc="Rust programming language bootstrap toolchain"
@@ -29,23 +29,23 @@ distfiles="
 case "$XBPS_TARGET_MACHINE" in
 	i686)
 		checksum="
-		 8af0ec3eb470e7e28439fedf9ebdadf90df8c58da544cc643033e6fc0ccf0bea
-		 ab223fcec35183bc0fe630403537cd7dae55c403103df29b25077db4882cb88e"
+		 11d3729f0343a069e9e59531745170cb0b6ce68f73848699564ea0bbcbf2c02f
+		 3177d3a159b4fcd54bca93d09ff1a903689a64ed4037699de372e685d12d4335"
 		;;
 	x86_64)
 		checksum="
-		 21c4613f389ed130fbaaf88f1e984319f72b5fc10734569a5ba19e22ebb03abd
-		 270b07aa5f2de52255a117e1e587138d77375ce0d09a1d7fead085f29b3977e9"
+		 bdab9d9afa5c329c40f9ba568364815237fab8426477c12bfabad35ffc484ab5
+		 993c2c17bf76ac626bfb5b17bddce65fbdfc14f70d183f33773de0cd12df46d2"
 		;;
 	x86_64-musl)
 		checksum="
-		 89cb72cbc493cb5cd8e43830009b4a1a5bfd472246ae184157868c9b0607bf6c
-		 1f4f2e4c5dd0f9b0dac7c8888f4a49ef16a6fe8992f39895823d2a442f0fe408"
+		 b6566a9b1dafe03cf4a01b58b2db0e14a0044ae5773736827882bd549108277e
+		 6fcfa4f9a51d35bf2c5c92ac15c688baa8c98d9fded05ab6abfdae85cb5aed8c"
 		;;
 	ppc64le)
 		checksum="
-		 dc54893d747e4f3330515caa75e404f78c6c5475a1216d1428f5e7ce1c2e9602
-		 36c0ccff14c80419507561db050f9533f0abd43fc50f3ddb859c10df74b1c351"
+		 b3dc2c082e76b5effe0b158aac3831830168a1a6980b39347c355e49be63fcca
+		 3ae0b74ba428c569fcecebbb09060ad0bd434a5f1fc9ffd1329b56941a897b6e"
 		;;
 	ppc64le-musl)
 		checksum="
@@ -59,8 +59,8 @@ case "$XBPS_TARGET_MACHINE" in
 		;;
 	ppc)
 		checksum="
-		 f28a8c2986fce5015c67823e39ad4b53e2db06603b6ea4a1217ac961cbbfb073
-		 7d2f7f900c8c05616fba8e99ab041d847af3653c259b99445edd788acddf878c"
+		 7a99dd6a7f30b8a8f85d95f47fa77084a48c7ebc94092978daa3563268a4b15b
+		 a25719c0ad2a5e7f52eed87b75cb76c4a52b8dc6e24b4bef16ed7fb9133e5b42"
 		;;
 	*) broken="rust bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac
@@ -79,3 +79,4 @@ do_install() {
 	rm -rf ${DESTDIR}/usr/share/doc/rust
 	rm -f ${DESTDIR}/usr/lib/rustlib/${RUST_TARGET}/bin/rust-ll*
 }
+

From 9cb678a9b742b2a11ae49edefa1d35dabaf5b597 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:24 +0200
Subject: [PATCH 2/4] cargo-bootstrap: update to 1.63.0.

---
 srcpkgs/cargo-bootstrap/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/cargo-bootstrap/template b/srcpkgs/cargo-bootstrap/template
index 0fdaac840a3c..23793d85ea9a 100644
--- a/srcpkgs/cargo-bootstrap/template
+++ b/srcpkgs/cargo-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo-bootstrap'
 pkgname=cargo-bootstrap
-version=1.61.0
+version=1.63.0
 revision=1
 short_desc="Bootstrap binaries of Rust package manager"
 maintainer="q66 <daniel@octaforge.org>"
@@ -26,16 +26,16 @@ distfiles="${_bootstrap_url}/cargo-${version}-${RUST_TARGET}.tar.xz"
 
 case "$XBPS_TARGET_MACHINE" in
 	i686)
-		checksum="fe258b85ef0644ff08c2095e329399dd4de0e1b2e51f4f4e90cb956d40dc61de"
+		checksum="6f2c109fc38ed8ccadcdcccf51d11505651ca9e12c396ab46ac1dbb55265b792"
 		;;
 	x86_64)
-		checksum="9461727d754f865ef2a87479d40bbe4c5176f80963b7c50b7797bc8940d7a0a0"
+		checksum="f370d12e4c11f0c835becb738bcf00d363f29b76f8b424b4dcb005abcf15fc9a"
 		;;
 	x86_64-musl)
-		checksum="db4b4423c2843b6e27737664cf8085afcba670374110ca24b9c8d341045e748c"
+		checksum="6f6ce044832a2433c250f4f27a61f69081e2b0f7e4e1f141492c2ce99ee8511e"
 		;;
 	ppc64le)
-		checksum="09817011ff1ef4b7006387c7cabb6a059731792a9372533dec7d87e7f014444b"
+		checksum="a4cdc00a42fd767bf5a296f7126d9db22a0a609cd956bbf0cb3eae882add1be7"
 		;;
 	ppc64le-musl)
 		checksum="39215cba9b1bda63209cac0edbda583e0c822f88a50fdbf33255c8c5386e4868"

From 6d056eab1bafd38f7aead4144feda4240a4f032c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:31 +0200
Subject: [PATCH 3/4] rust: update to 1.63.0.

---
 .../rust/patches/0001-Fix-LLVM-build.patch    |  8 +--
 ...lib-and-musl_root-from-musl-targets.patch} | 65 ++++++++++++-------
 ...e-debugger-scripts-to-usr-share-rust.patch | 10 +--
 ...4-fix-shebang-on-install-template.sh.patch |  6 +-
 ...fer-libgcc_eh-over-libunwind-on-musl.patch | 24 -------
 ...ot-install-libunwind-source-removed.patch} | 10 +--
 ...06-fix-rustdoc-when-cross-compiling.patch} | 25 +++----
 ...stage-2-tools-dynamically-to-libstd.patch} | 10 +--
 ...against-host-target-LLVM-in-cross-s.patch} | 16 ++++-
 .../0009-do-not-export-LD_LIBRARY_PATH.patch  | 29 +++++++++
 ...age-of-musl-libc-for-the-libc-crate.patch} | 14 ++--
 .../0010-do-not-export-LD_LIBRARY_PATH.patch  | 23 -------
 ...-ELFv2-ABI-on-all-powerpc64-targets.patch} | 22 +++----
 ...e-initial-exec-TLS-model-on-powerpc.patch} | 11 ++--
 ...g-native-sysroot-to-use-for-linkage.patch} | 40 ++++++++----
 ...-of-need-ssp_nonshared.patch-from-al.patch | 28 ++++++++
 ...le.patch => 0015-initial-ppcle-port.patch} | 55 +++++++++++++---
 ...e16f055aa7925194fd2c360105a6d55f10f6.patch | 33 ----------
 .../need-ssp-nonshared-and-execinfo.patch     | 13 ----
 srcpkgs/rust/template                         |  4 +-
 20 files changed, 248 insertions(+), 198 deletions(-)
 rename srcpkgs/rust/patches/{0001-musl-void-setup.patch => 0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch} (89%)
 delete mode 100644 srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
 rename srcpkgs/rust/patches/{0006-do-not-install-libunwind-source-removed.patch => 0005-do-not-install-libunwind-source-removed.patch} (73%)
 rename srcpkgs/rust/patches/{0007-fix-rustdoc-when-cross-compiling.patch => 0006-fix-rustdoc-when-cross-compiling.patch} (67%)
 rename srcpkgs/rust/patches/{0008-link-stage-2-tools-dynamically-to-libstd.patch => 0007-link-stage-2-tools-dynamically-to-libstd.patch} (78%)
 rename srcpkgs/rust/patches/{0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch => 0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch} (71%)
 create mode 100644 srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
 rename srcpkgs/rust/patches/{0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch => 0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch} (74%)
 delete mode 100644 srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
 rename srcpkgs/rust/patches/{0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch => 0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch} (74%)
 rename srcpkgs/rust/patches/{fix-ppc32.patch => 0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch} (78%)
 rename srcpkgs/rust/patches/{native-sysroot.patch => 0013-allow-specifying-native-sysroot-to-use-for-linkage.patch} (69%)
 create mode 100644 srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
 rename srcpkgs/rust/patches/{xxx-ppcle.patch => 0015-initial-ppcle-port.patch} (85%)
 delete mode 100644 srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
 delete mode 100644 srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch

diff --git a/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch b/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
index 0da829af1da9..6cf9c3a755a9 100644
--- a/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
+++ b/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
@@ -1,4 +1,4 @@
-From 4443eca0d6b3ba599832b2f73a5350fdd0c90d10 Mon Sep 17 00:00:00 2001
+From 99a046adc7d1c7b2da3a31e077722ea69f84eeb6 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/15] Fix LLVM build
@@ -8,10 +8,10 @@ Subject: [PATCH 01/15] Fix LLVM build
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index a476d25f..c7e63990 100644
+index 4ac857b47..b603ae90a 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -768,7 +768,8 @@ impl Build {
+@@ -1050,7 +1050,8 @@ impl Build {
              .args()
              .iter()
              .map(|s| s.to_string_lossy().into_owned())
@@ -22,5 +22,5 @@ index a476d25f..c7e63990 100644
  
          // If we're compiling on macOS then we add a few unconditional flags
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0001-musl-void-setup.patch b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
similarity index 89%
rename from srcpkgs/rust/patches/0001-musl-void-setup.patch
rename to srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
index c13cb1730986..c156945b8111 100644
--- a/srcpkgs/rust/patches/0001-musl-void-setup.patch
+++ b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
@@ -1,5 +1,23 @@
+From 7219ba1c9accbad9b530d312fd9a9f69330c93da Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 3 May 2020 17:53:33 +0200
+Subject: [PATCH 02/15] Remove -nostdlib and musl_root from musl targets
+
+extended by various void contributors to match our musl setup
+---
+ compiler/rustc_target/src/spec/crt_objects.rs | 22 ----------
+ .../rustc_target/src/spec/linux_musl_base.rs  |  7 ---
+ config.toml.example                           |  8 ----
+ src/bootstrap/cc_detect.rs                    | 25 +----------
+ src/bootstrap/compile.rs                      | 43 +------------------
+ src/bootstrap/config.rs                       |  9 ----
+ src/bootstrap/configure.py                    | 28 ------------
+ src/bootstrap/lib.rs                          | 19 --------
+ src/bootstrap/sanity.rs                       | 23 ----------
+ 9 files changed, 3 insertions(+), 181 deletions(-)
+
 diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
-index 51f392a6..62560658 100644
+index 52ac3622e..f35e5b9d8 100644
 --- a/compiler/rustc_target/src/spec/crt_objects.rs
 +++ b/compiler/rustc_target/src/spec/crt_objects.rs
 @@ -63,28 +63,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects {
@@ -32,7 +50,7 @@ index 51f392a6..62560658 100644
      new(&[
          (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
 diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs
-index 207a87ab..88f807a5 100644
+index 207a87ab0..88f807a58 100644
 --- a/compiler/rustc_target/src/spec/linux_musl_base.rs
 +++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
 @@ -1,16 +1,9 @@
@@ -53,10 +71,10 @@ index 207a87ab..88f807a5 100644
      base
  }
 diff --git a/config.toml.example b/config.toml.example
-index 6e53d9b4..74980d2c 100644
+index b3284050f..62ac07f87 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -511,14 +511,6 @@ changelog-seen = 2
+@@ -523,14 +523,6 @@ changelog-seen = 2
  # supplementary build information, like distro-specific package versions.
  #description = <none> (string)
  
@@ -72,7 +90,7 @@ index 6e53d9b4..74980d2c 100644
  # 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
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index 7ce44687..4e7507ae 100644
+index dca782c29..8eb35ea43 100644
 --- a/src/bootstrap/cc_detect.rs
 +++ b/src/bootstrap/cc_detect.rs
 @@ -97,7 +97,7 @@ pub fn find(build: &mut Build) {
@@ -93,7 +111,7 @@ index 7ce44687..4e7507ae 100644
              true
          } else {
              // Use an auto-detected compiler (or one configured via `CXX_target_triple` env vars).
-@@ -157,7 +157,6 @@ fn set_compiler(
+@@ -161,7 +161,6 @@ fn set_compiler(
      compiler: Language,
      target: TargetSelection,
      config: Option<&Target>,
@@ -101,7 +119,7 @@ index 7ce44687..4e7507ae 100644
  ) {
      match &*target.triple {
          // When compiling for android we may have the NDK configured in the
-@@ -200,26 +199,6 @@ fn set_compiler(
+@@ -204,26 +203,6 @@ fn set_compiler(
              }
          }
  
@@ -129,10 +147,10 @@ index 7ce44687..4e7507ae 100644
      }
  }
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index afc333b5..9d67ab56 100644
+index b4807d1ab..ce483bf6b 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -197,39 +197,7 @@ fn copy_self_contained_objects(
+@@ -200,39 +200,7 @@ fn copy_self_contained_objects(
      let mut target_deps = vec![];
  
      // Copies the libc and CRT objects.
@@ -173,7 +191,7 @@ index afc333b5..9d67ab56 100644
          let srcdir = builder
              .wasi_root(target)
              .unwrap_or_else(|| {
-@@ -313,15 +281,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+@@ -316,15 +284,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
              .arg("--manifest-path")
              .arg(builder.src.join("library/test/Cargo.toml"));
  
@@ -190,10 +208,10 @@ index afc333b5..9d67ab56 100644
              if let Some(p) = builder.wasi_root(target) {
                  let root = format!("native={}/lib/wasm32-wasi", p.to_str().unwrap());
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 9534cc5f..642a5c24 100644
+index 146077419..18a764689 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -172,7 +172,6 @@ pub struct Config {
+@@ -186,7 +186,6 @@ pub struct Config {
      pub missing_tools: bool,
  
      // Fallback musl-root for all targets
@@ -201,7 +219,7 @@ index 9534cc5f..642a5c24 100644
      pub prefix: Option<PathBuf>,
      pub sysconfdir: Option<PathBuf>,
      pub datadir: Option<PathBuf>,
-@@ -299,8 +298,6 @@ pub struct Target {
+@@ -400,8 +399,6 @@ pub struct Target {
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
      pub crt_static: Option<bool>,
@@ -210,7 +228,7 @@ index 9534cc5f..642a5c24 100644
      pub wasi_root: Option<PathBuf>,
      pub qemu_rootfs: Option<PathBuf>,
      pub no_std: bool,
-@@ -587,7 +584,6 @@ struct Rust {
+@@ -689,7 +686,6 @@ define_config! {
          default_linker: Option<String> = "default-linker",
          channel: Option<String> = "channel",
          description: Option<String> = "description",
@@ -218,7 +236,7 @@ index 9534cc5f..642a5c24 100644
          rpath: Option<bool> = "rpath",
          verbose_tests: Option<bool> = "verbose-tests",
          optimize_tests: Option<bool> = "optimize-tests",
-@@ -631,8 +627,6 @@ struct TomlTarget {
+@@ -734,8 +730,6 @@ define_config! {
          sanitizers: Option<bool> = "sanitizers",
          profiler: Option<bool> = "profiler",
          crt_static: Option<bool> = "crt-static",
@@ -227,7 +245,7 @@ index 9534cc5f..642a5c24 100644
          wasi_root: Option<String> = "wasi-root",
          qemu_rootfs: Option<String> = "qemu-rootfs",
          no_std: Option<bool> = "no-std",
-@@ -1013,7 +1007,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1107,7 +1101,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;
@@ -235,7 +253,7 @@ index 9534cc5f..642a5c24 100644
              config.save_toolstates = rust.save_toolstates.map(PathBuf::from);
              set(&mut config.deny_warnings, flags.deny_warnings.or(rust.deny_warnings));
              set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
-@@ -1059,8 +1052,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1164,8 +1157,6 @@ impl Config {
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
                  target.crt_static = cfg.crt_static;
@@ -245,7 +263,7 @@ index 9534cc5f..642a5c24 100644
                  target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
                  target.sanitizers = cfg.sanitizers;
 diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
-index 87a130a0..bd4c9197 100755
+index 2fc036082..91737e0ea 100755
 --- a/src/bootstrap/configure.py
 +++ b/src/bootstrap/configure.py
 @@ -114,34 +114,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
@@ -284,10 +302,10 @@ index 87a130a0..bd4c9197 100755
    "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 570a6174..f3d5f308 100644
+index b603ae90a..0a7012dbd 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1125,25 +1125,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1153,25 +1153,6 @@ impl Build {
          }
      }
  
@@ -314,7 +332,7 @@ index 570a6174..f3d5f308 100644
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
          self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
 diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index 8c2899c1..dda15d76 100644
+index 64c5dd7ae..b8f9104ea 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
 @@ -11,7 +11,6 @@
@@ -325,7 +343,7 @@ index 8c2899c1..dda15d76 100644
  use std::path::PathBuf;
  use std::process::Command;
  
-@@ -177,28 +176,6 @@ pub fn check(build: &mut Build) {
+@@ -190,28 +189,6 @@ than building it.
              }
          }
  
@@ -354,3 +372,6 @@ index 8c2899c1..dda15d76 100644
          if need_cmake && target.contains("msvc") {
              // There are three builds of cmake on windows: MSVC, MinGW, and
              // Cygwin. The Cygwin build does not have generators for Visual
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch b/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
index 3c4e1cb96475..bc7053800945 100644
--- a/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
+++ b/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
@@ -1,7 +1,7 @@
-From f9a680688a685ec47ee5ec001574d9b91b4ba35e Mon Sep 17 00:00:00 2001
+From 8938b002edbec432be46de7b6f1b9d0a6912873a Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 00:45:35 +0100
-Subject: [PATCH 3/9] move debugger scripts to /usr/share/rust
+Subject: [PATCH 03/15] move debugger scripts to /usr/share/rust
 
 ---
  src/bootstrap/dist.rs | 2 +-
@@ -11,10 +11,10 @@ Subject: [PATCH 3/9] move debugger scripts to /usr/share/rust
  4 files changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index d4875cfe1..e8b61b8a2 100644
+index b1fae356d..e7a077134 100644
 --- a/src/bootstrap/dist.rs
 +++ b/src/bootstrap/dist.rs
-@@ -499,7 +499,7 @@ impl Step for DebuggerScripts {
+@@ -460,7 +460,7 @@ impl Step for DebuggerScripts {
      fn run(self, builder: &Builder<'_>) {
          let host = self.host;
          let sysroot = self.sysroot;
@@ -65,5 +65,5 @@ index bce72f1ba..8abb01245 100755
  # Call LLDB with the commands added to the argument list
  exec "$lldb" --one-line-before-file "$script_import" --source-before-file "$commands_file" "$@"
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch b/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
index 2e9cd93fdfb9..2ca7ffeaf73f 100644
--- a/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
+++ b/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
@@ -1,7 +1,7 @@
-From d5a6a431024790c911d04fd54381c515fb05819e Mon Sep 17 00:00:00 2001
+From d7d7fc24d1744a3db70a9fb010c31daa14a46df7 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 00:55:18 +0100
-Subject: [PATCH 4/9] fix shebang on install-template.sh
+Subject: [PATCH 04/15] fix shebang on install-template.sh
 
 ---
  src/tools/rust-installer/install-template.sh | 2 +-
@@ -18,5 +18,5 @@ index e68be8911..beaa90f7b 100644
  # file at the top-level directory of this distribution and at
  # http://rust-lang.org/COPYRIGHT.
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch b/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
deleted file mode 100644
index 30cb66fc24b1..000000000000
--- a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Additions for build.rs by q66, necessary for our musl setup.
-
-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/library/unwind/src/lib.rs
-+++ b/library/unwind/src/lib.rs
-@@ -51,7 +51,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", cfg(target_feature = "crt-static"))]
-         #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
-         extern "C" {}
-     }
diff --git a/srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch b/srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
similarity index 73%
rename from srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch
rename to srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
index 0128b8fc61f2..92e0021ab6f4 100644
--- a/srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch
+++ b/srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
@@ -1,17 +1,17 @@
-From fc69414484327e4dbff138dd0834fc3bde626008 Mon Sep 17 00:00:00 2001
+From 1335a445327a6605c5f933d9647b97e771089abd Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:44:54 +0100
-Subject: [PATCH 6/9] do not install libunwind source (removed)
+Subject: [PATCH 05/15] do not install libunwind source (removed)
 
 ---
  src/bootstrap/dist.rs | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index e8b61b8a2..02d24a77d 100644
+index e7a077134..74e75df4b 100644
 --- a/src/bootstrap/dist.rs
 +++ b/src/bootstrap/dist.rs
-@@ -849,7 +849,7 @@ impl Step for Src {
+@@ -804,7 +804,7 @@ impl Step for Src {
          copy_src_dirs(
              builder,
              &builder.src,
@@ -21,5 +21,5 @@ index e8b61b8a2..02d24a77d 100644
                  // not needed and contains symlinks which rustup currently
                  // chokes on when unpacking.
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch b/srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
similarity index 67%
rename from srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
rename to srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
index 2cc1f6b900d3..88eaf65de8b7 100644
--- a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
+++ b/srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
@@ -1,17 +1,17 @@
-From 81ba387384e8ce0aa9bb9b4bd76014d922d85de8 Mon Sep 17 00:00:00 2001
+From 50075907c3dd2f06d471b3375d7c0ee850263eb2 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:48:14 +0100
-Subject: [PATCH 7/9] fix rustdoc when cross-compiling
+Subject: [PATCH 06/15] fix rustdoc when cross-compiling
 
 ---
  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 e4396d530..cb2312028 100644
+index 5f85fc5aa..01e81fc39 100644
 --- a/src/bootstrap/bin/rustdoc.rs
 +++ b/src/bootstrap/bin/rustdoc.rs
-@@ -22,14 +22,11 @@ fn main() {
+@@ -26,9 +26,6 @@ fn main() {
          Err(_) => 0,
      };
  
@@ -19,15 +19,18 @@ index e4396d530..cb2312028 100644
 -    dylib_path.insert(0, PathBuf::from(libdir.clone()));
 -
      let mut cmd = Command::new(rustdoc);
-     cmd.args(&args)
-         .arg("--sysroot")
-         .arg(&sysroot)
--        .env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
-+        .env(dylib_path_var(), PathBuf::from(libdir.clone()));
+ 
+     // cfg(bootstrap)
+@@ -43,7 +40,7 @@ fn main() {
+     }
+ 
+     cmd.args(&args);
+-    cmd.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
++    cmd.env(dylib_path_var(), PathBuf::from(libdir.clone()));
  
      // Force all crates compiled by this compiler to (a) be unstable and (b)
      // allow the `rustc_private` feature to link to other unstable crates
-@@ -62,7 +59,7 @@ fn main() {
+@@ -69,7 +66,7 @@ fn main() {
          eprintln!(
              "rustdoc command: {:?}={:?} {:?}",
              dylib_path_var(),
@@ -37,5 +40,5 @@ index e4396d530..cb2312028 100644
          );
          eprintln!("sysroot: {:?}", sysroot);
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch b/srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
similarity index 78%
rename from srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch
rename to srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
index f6793d8a3202..198e4fcc7a6a 100644
--- a/srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch
+++ b/srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
@@ -1,7 +1,7 @@
-From 1c4a66621a5fa34c78fc020084e4166f3af7cbb5 Mon Sep 17 00:00:00 2001
+From c2de45cbdaee1a8c81b2d65f6bced1439a738e00 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:48:49 +0100
-Subject: [PATCH 8/9] link stage 2 tools dynamically to libstd
+Subject: [PATCH 07/15] link stage 2 tools dynamically to libstd
 
 stage 2 tools are the ones that are distributed, and we distribute
 them together with the rust libs so there is no need to worry
@@ -11,10 +11,10 @@ about unstable ABI
  1 file changed, 2 insertions(+)
 
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index 6750f7a54..de771280e 100644
+index 62b5416ce..554dd4188 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1520,6 +1520,8 @@ impl<'a> Builder<'a> {
+@@ -2066,6 +2066,8 @@ impl<'a> Builder<'a> {
          // linking all deps statically into the dylib.
          if matches!(mode, Mode::Std | Mode::Rustc) {
              rustflags.arg("-Cprefer-dynamic");
@@ -24,5 +24,5 @@ index 6750f7a54..de771280e 100644
  
          // When building incrementally we default to a lower ThinLTO import limit
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch b/srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
similarity index 71%
rename from srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch
rename to srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
index 3b2e388c014e..3edba737f923 100644
--- a/srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch
+++ b/srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
@@ -1,8 +1,18 @@
+From f229c2bbd32deab98978d8453d0f44f23849fa09 Mon Sep 17 00:00:00 2001
+From: q66 <daniel@octaforge.org>
+Date: Sun, 3 May 2020 18:05:22 +0200
+Subject: [PATCH 08/15] Void: fix linkage against host/target LLVM in cross
+ setups
+
+---
+ compiler/rustc_llvm/build.rs | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
 diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs
-index 36a6d2cc3..af4e1219f 100644
+index 7729ec6be..66b8a4215 100644
 --- a/compiler/rustc_llvm/build.rs
 +++ b/compiler/rustc_llvm/build.rs
-@@ -230,9 +230,11 @@ fn main() {
+@@ -291,9 +291,11 @@ fn main() {
      for lib in output(&mut cmd).split_whitespace() {
          if is_crossed {
              if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
@@ -17,5 +27,5 @@ index 36a6d2cc3..af4e1219f 100644
          } else if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
              println!("cargo:rustc-link-search=native={}", stripped);
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch b/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
new file mode 100644
index 000000000000..f66766270a12
--- /dev/null
+++ b/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
@@ -0,0 +1,29 @@
+From 5e9e5fa2b2aefefbdc00547d7f10ee92d9b3356a Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Tue, 21 Dec 2021 00:48:29 +0100
+Subject: [PATCH 09/15] do not export LD_LIBRARY_PATH
+
+---
+ src/bootstrap/bootstrap.py | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
+index 40d478a17..3501fd901 100644
+--- a/src/bootstrap/bootstrap.py
++++ b/src/bootstrap/bootstrap.py
+@@ -756,12 +756,6 @@ class RustBuild(object):
+             del env["CARGO_BUILD_TARGET"]
+         env["CARGO_TARGET_DIR"] = build_dir
+         env["RUSTC"] = self.rustc()
+-        env["LD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+-            (os.pathsep + env["LD_LIBRARY_PATH"]) \
+-            if "LD_LIBRARY_PATH" in env else ""
+-        env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+-            (os.pathsep + env["DYLD_LIBRARY_PATH"]) \
+-            if "DYLD_LIBRARY_PATH" in env else ""
+         env["LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+             (os.pathsep + env["LIBRARY_PATH"]) \
+             if "LIBRARY_PATH" in env else ""
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch b/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
similarity index 74%
rename from srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
rename to srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
index 8a18e414e209..0f679a486f38 100644
--- a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
+++ b/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
@@ -1,18 +1,17 @@
-From e363a0e0ff7ffc8bd83f72ec1a20d289996b6370 Mon Sep 17 00:00:00 2001
+From 2596eaf95d538ca586de342d6dbc21c7e2820768 Mon Sep 17 00:00:00 2001
 From: q66 <daniel@octaforge.org>
 Date: Sun, 3 May 2020 18:02:03 +0200
-Subject: [PATCH 12/15] Fix dynamic linkage of musl libc for the libc crate
+Subject: [PATCH 10/15] Fix dynamic linkage of musl libc for the libc crate
 
 ---
- vendor/libc/src/lib.rs      | 1 +
  vendor/libc/src/unix/mod.rs | 6 +++---
- 2 files changed, 4 insertions(+), 3 deletions(-)
+ 1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs
-index 238da24b..ffb05ee7 100644
+index ecee44411..c254a2f01 100644
 --- a/vendor/libc/src/unix/mod.rs
 +++ b/vendor/libc/src/unix/mod.rs
-@@ -329,11 +329,11 @@ cfg_if! {
+@@ -337,11 +337,11 @@ cfg_if! {
          #[link(name = "c", cfg(not(target_feature = "crt-static")))]
          extern {}
      } else if #[cfg(target_env = "musl")] {
@@ -27,7 +26,6 @@ index 238da24b..ffb05ee7 100644
          extern {}
      } else if #[cfg(target_os = "emscripten")] {
          #[link(name = "c")]
-index 0b1496af..7f7e85a7 100644
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch b/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
deleted file mode 100644
index d7714d5ee4fd..000000000000
--- a/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-commit 798e44e67c0bac6509b7915767450b0381c94017
-Author: Daniel Kolesa <daniel@octaforge.org>
-Date:   Tue Dec 21 00:48:29 2021 +0100
-
-    do not export LD_LIBRARY_PATH
-
-diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 0170be967..f7a9ec785 100644
---- a/src/bootstrap/bootstrap.py
-+++ b/src/bootstrap/bootstrap.py
-@@ -924,12 +924,6 @@ class RustBuild(object):
-             del env["CARGO_BUILD_TARGET"]
-         env["CARGO_TARGET_DIR"] = build_dir
-         env["RUSTC"] = self.rustc(True)
--        env["LD_LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
--            (os.pathsep + env["LD_LIBRARY_PATH"]) \
--            if "LD_LIBRARY_PATH" in env else ""
--        env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
--            (os.pathsep + env["DYLD_LIBRARY_PATH"]) \
--            if "DYLD_LIBRARY_PATH" in env else ""
-         env["LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
-             (os.pathsep + env["LIBRARY_PATH"]) \
-             if "LIBRARY_PATH" in env else ""
diff --git a/srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
similarity index 74%
rename from srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
rename to srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
index 3f3bd3212bb9..fec6bfce00db 100644
--- a/srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
+++ b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
@@ -1,24 +1,24 @@
-From c6b54a373e74a1e4ce64f349b5b69105f2bc1a49 Mon Sep 17 00:00:00 2001
+From 5df5ca7c068e516ea4fdaab507d850f98d38d924 Mon Sep 17 00:00:00 2001
 From: q66 <daniel@octaforge.org>
 Date: Sun, 3 May 2020 18:08:09 +0200
-Subject: [PATCH 15/15] Use ELFv2 ABI on all powerpc64 targets
+Subject: [PATCH 11/15] Use ELFv2 ABI on all powerpc64 targets
 
 This patches librustc_target so that ELFv2 is used everywhere, matching our
 LLVM. While this is not perfect (it does not allow rustc to compile legacy
 binaries), rustc never requests specific ABI from llvm in the first place,
 so at least match the environment we have.
 ---
- src/librustc_target/abi/call/powerpc64.rs               | 9 +--------
- src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs | 6 +-----
+ compiler/rustc_target/src/abi/call/powerpc64.rs          | 9 +--------
+ .../rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs | 6 +-----
  2 files changed, 2 insertions(+), 13 deletions(-)
 
 diff --git a/compiler/rustc_target/src/abi/call/powerpc64.rs b/compiler/rustc_target/src/abi/call/powerpc64.rs
-index 8c2a9d09a..2dcbf2c09 100644
+index c22ef9c8f..932172b2f 100644
 --- a/compiler/rustc_target/src/abi/call/powerpc64.rs
 +++ b/compiler/rustc_target/src/abi/call/powerpc64.rs
 @@ -119,14 +119,7 @@ where
-     Ty: TyAndLayoutMethods<'a, C> + Copy,
-     C: LayoutOf<Ty = Ty, TyAndLayout = TyAndLayout<'a, Ty>> + HasDataLayout + HasTargetSpec,
+     Ty: TyAbiInterface<'a, C> + Copy,
+     C: HasDataLayout + HasTargetSpec,
  {
 -    let abi = if cx.target_spec().env == "musl" {
 -        ELFv2
@@ -33,7 +33,7 @@ index 8c2a9d09a..2dcbf2c09 100644
      if !fn_abi.ret.is_ignore() {
          classify_ret(cx, &mut fn_abi.ret, abi);
 diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
-index 751022c12..c4d55a62e 100644
+index 24d5d187e..aa594b02e 100644
 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
 +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
 @@ -1,5 +1,5 @@
@@ -44,7 +44,7 @@ index 751022c12..c4d55a62e 100644
  pub fn target() -> Target {
      let mut base = super::linux_gnu_base::opts();
 @@ -7,10 +7,6 @@ pub fn target() -> Target {
-     base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
+     base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m64".into());
      base.max_atomic_width = Some(64);
  
 -    // ld.so in at least RHEL6 on ppc64 has a bug related to BIND_NOW, so only enable partial RELRO
@@ -52,8 +52,8 @@ index 751022c12..c4d55a62e 100644
 -    base.relro_level = RelroLevel::Partial;
 -
      Target {
-         llvm_target: "powerpc64-unknown-linux-gnu".to_string(),
+         llvm_target: "powerpc64-unknown-linux-gnu".into(),
          pointer_width: 64,
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/fix-ppc32.patch b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
similarity index 78%
rename from srcpkgs/rust/patches/fix-ppc32.patch
rename to srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
index 739ce4bce7f0..18307b53553e 100644
--- a/srcpkgs/rust/patches/fix-ppc32.patch
+++ b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
@@ -1,7 +1,7 @@
-From 283619cf5ca25272b294525273ec42e9c7820edb Mon Sep 17 00:00:00 2001
+From e8f06c15e1073da598d0592254dd082f0a49a219 Mon Sep 17 00:00:00 2001
 From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
 Date: Sat, 29 May 2021 12:38:46 +0000
-Subject: [PATCH] bootstrap: Disable initial-exec TLS model on powerpc
+Subject: [PATCH 12/15] bootstrap: Disable initial-exec TLS model on powerpc
 
 Fixes #81334.
 ---
@@ -9,10 +9,10 @@ Fixes #81334.
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index 6750f7a549d..6032a685776 100644
+index 554dd4188..6a02a225c 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1299,7 +1299,7 @@ pub fn cargo(
+@@ -1844,7 +1844,7 @@ impl<'a> Builder<'a> {
          // efficient initial-exec TLS model. This doesn't work with `dlopen`,
          // so we can't use it by default in general, but we can use it for tools
          // and our own internal libraries.
@@ -21,3 +21,6 @@ index 6750f7a549d..6032a685776 100644
              rustflags.arg("-Ztls-model=initial-exec");
          }
  
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/native-sysroot.patch b/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
similarity index 69%
rename from srcpkgs/rust/patches/native-sysroot.patch
rename to srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
index 6826b114b6b7..e6be77e7b409 100644
--- a/srcpkgs/rust/patches/native-sysroot.patch
+++ b/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
@@ -1,8 +1,21 @@
+From 12091237bd215901a9977085bc07178362b5655c Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Tue, 21 Dec 2021 02:46:30 +0100
+Subject: [PATCH 13/15] allow specifying native sysroot to use for linkage
+
+This allows us to get around the linker attempting to use
+incompatible libs.
+---
+ src/bootstrap/builder.rs | 4 ++++
+ src/bootstrap/config.rs  | 3 +++
+ src/bootstrap/lib.rs     | 4 ++++
+ 3 files changed, 11 insertions(+)
+
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index e816f9b4..a2668fa9 100644
+index 6a02a225c..483aa8818 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1313,6 +1313,10 @@ pub fn cargo(
+@@ -1708,6 +1708,10 @@ impl<'a> Builder<'a> {
              }
          }
  
@@ -14,10 +27,10 @@ index e816f9b4..a2668fa9 100644
              cargo.env("RUSTC_HOST_LINKER", host_linker);
          }
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 642a5c24..0dd4f879 100644
+index 18a764689..f8b9bbd96 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -294,6 +294,7 @@ pub struct Target {
+@@ -395,6 +395,7 @@ pub struct Target {
      pub ranlib: Option<PathBuf>,
      pub default_linker: Option<PathBuf>,
      pub linker: Option<PathBuf>,
@@ -25,15 +38,15 @@ index 642a5c24..0dd4f879 100644
      pub ndk: Option<PathBuf>,
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
-@@ -621,6 +622,7 @@ struct TomlTarget {
+@@ -723,6 +724,7 @@ define_config! {
          ranlib: Option<String> = "ranlib",
          default_linker: Option<PathBuf> = "default-linker",
          linker: Option<String> = "linker",
 +        sysroot: Option<String> = "sysroot",
          llvm_config: Option<String> = "llvm-config",
          llvm_filecheck: Option<String> = "llvm-filecheck",
-         android_ndk: Option<String> = "android-ndk",
-@@ -1051,6 +1053,7 @@ pub fn parse(args: &[String]) -> Config {
+         llvm_libunwind: Option<String> = "llvm-libunwind",
+@@ -1156,6 +1158,7 @@ impl Config {
                  target.ar = cfg.ar.map(PathBuf::from);
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
@@ -42,17 +55,20 @@ index 642a5c24..0dd4f879 100644
                  target.wasi_root = cfg.wasi_root.map(PathBuf::from);
                  target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
 diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index f3d5f308..7f8b9b27 100644
+index 0a7012dbd..cded50d20 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1125,6 +1125,10 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1152,6 +1152,10 @@ impl Build {
+             self.config.target_config.get(&target).and_then(|t| t.crt_static)
          }
      }
- 
++    
 +    fn native_sysroot(&self, target: TargetSelection) -> Option<&Path> {
 +        self.config.target_config.get(&target).and_then(|c| c.sysroot.as_ref()).map(|p| &**p)
 +    }
-+
+ 
      /// Returns the sysroot for the wasi target, if defined
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
-         self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch b/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
new file mode 100644
index 000000000000..36c090fde1ac
--- /dev/null
+++ b/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
@@ -0,0 +1,28 @@
+From 8424aa370a366929d4870fd1eafb2659ae075ea4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
+Date: Fri, 16 Apr 2021 03:34:16 -0300
+Subject: [PATCH 14/15] copy new version of need-ssp_nonshared.patch from
+ alpine
+
+---
+ library/std/src/sys/unix/mod.rs | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/library/std/src/sys/unix/mod.rs b/library/std/src/sys/unix/mod.rs
+index 34a023b02..934a87570 100644
+--- a/library/std/src/sys/unix/mod.rs
++++ b/library/std/src/sys/unix/mod.rs
+@@ -297,6 +297,10 @@ cfg_if::cfg_if! {
+         #[link(name = "dl")]
+         #[link(name = "log")]
+         extern "C" {}
++    } else if #[cfg(all(target_os = "linux", target_env = "musl"))] {
++	    #[link(name = "ssp_nonshared")]
++        #[link(name = "execinfo")]
++	    extern "C" {}
+     } else if #[cfg(target_os = "freebsd")] {
+         #[link(name = "execinfo")]
+         #[link(name = "pthread")]
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/xxx-ppcle.patch b/srcpkgs/rust/patches/0015-initial-ppcle-port.patch
similarity index 85%
rename from srcpkgs/rust/patches/xxx-ppcle.patch
rename to srcpkgs/rust/patches/0015-initial-ppcle-port.patch
index c0522f0eaafc..988d8bf2e45b 100644
--- a/srcpkgs/rust/patches/xxx-ppcle.patch
+++ b/srcpkgs/rust/patches/0015-initial-ppcle-port.patch
@@ -1,8 +1,40 @@
+From ec48305560be828efc23fe2be3c04a93252ac0ac Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Sat, 3 Jul 2021 21:02:03 +0200
+Subject: [PATCH 15/15] initial ppcle port
+
+---
+ compiler/rustc_middle/src/ty/layout.rs            |  5 ++++-
+ compiler/rustc_target/src/spec/mod.rs             |  2 ++
+ .../src/spec/powerpcle_unknown_linux_gnu.rs       | 15 +++++++++++++++
+ .../src/spec/powerpcle_unknown_linux_musl.rs      | 15 +++++++++++++++
+ src/bootstrap/bootstrap.py                        |  2 ++
+ .../codegen/abi-main-signature-16bit-c-int.rs     |  1 +
+ src/test/codegen/global_asm.rs                    |  1 +
+ src/test/codegen/global_asm_include.rs            |  1 +
+ src/test/codegen/global_asm_x2.rs                 |  1 +
+ src/test/codegen/repr-transparent-aggregates-1.rs |  1 +
+ src/test/codegen/repr-transparent-aggregates-2.rs |  1 +
+ src/test/codegen/stack-probes.rs                  |  1 +
+ .../run-make-fulldeps/atomic-lock-free/Makefile   |  2 ++
+ src/test/ui/abi/stack-probes-lto.rs               |  1 +
+ src/test/ui/abi/stack-probes.rs                   |  1 +
+ src/test/ui/target-feature/gate.rs                |  1 +
+ src/test/ui/target-feature/invalid-attribute.rs   |  1 +
+ src/tools/compiletest/src/util.rs                 |  1 +
+ vendor/cc/src/lib.rs                              |  1 +
+ vendor/target-lexicon/src/targets.rs              |  7 +++++++
+ vendor/tikv-jemallocator/benches/roundtrip.rs     |  3 ++-
+ vendor/tikv-jemallocator/src/lib.rs               |  3 ++-
+ 22 files changed, 64 insertions(+), 3 deletions(-)
+ create mode 100644 compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
+ create mode 100644 compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
+
 diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs
-index 0c1ab67cc..8d4e5f3cb 100644
+index 3b05e42a5..66420f507 100644
 --- a/compiler/rustc_middle/src/ty/layout.rs
 +++ b/compiler/rustc_middle/src/ty/layout.rs
-@@ -3057,6 +3057,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
+@@ -3205,6 +3205,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
              target.os == "linux" && target.arch == "sparc64" && target_env_gnu_like;
          let linux_powerpc_gnu_like =
              target.os == "linux" && target.arch == "powerpc" && target_env_gnu_like;
@@ -11,7 +43,7 @@ index 0c1ab67cc..8d4e5f3cb 100644
          use SpecAbi::*;
          let rust_abi = matches!(sig.abi, RustIntrinsic | PlatformIntrinsic | Rust | RustCall);
  
-@@ -3165,7 +3167,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
+@@ -3311,7 +3313,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
                      || (!win_x64_gnu
                          && !linux_s390x_gnu_like
                          && !linux_sparc64_gnu_like
@@ -22,10 +54,10 @@ index 0c1ab67cc..8d4e5f3cb 100644
                      arg.mode = PassMode::Ignore;
                  }
 diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
-index bd5b712c1..f60be010c 100644
+index da0589cdd..2db403913 100644
 --- a/compiler/rustc_target/src/spec/mod.rs
 +++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -824,6 +824,8 @@ supported_targets! {
+@@ -831,6 +831,8 @@ supported_targets! {
      ("powerpc-unknown-linux-gnu", powerpc_unknown_linux_gnu),
      ("powerpc-unknown-linux-gnuspe", powerpc_unknown_linux_gnuspe),
      ("powerpc-unknown-linux-musl", powerpc_unknown_linux_musl),
@@ -77,10 +109,10 @@ index 000000000..a826b6e47
 +    }
 +}
 diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 71b8f3c45..1505c12e4 100644
+index 3501fd901..a28f456d3 100644
 --- a/src/bootstrap/bootstrap.py
 +++ b/src/bootstrap/bootstrap.py
-@@ -320,9 +320,11 @@ def default_build_triple(verbose):
+@@ -339,9 +339,11 @@ def default_build_triple(verbose):
          'i786': 'i686',
          'm68k': 'm68k',
          'powerpc': 'powerpc',
@@ -141,7 +173,7 @@ index bdcf0ea84..1e2ff8b8d 100644
  // ignore-amdgcn
  // ignore-sparc
 diff --git a/src/test/codegen/repr-transparent-aggregates-1.rs b/src/test/codegen/repr-transparent-aggregates-1.rs
-index 4ad3642c0..fca31c0c6 100644
+index 9d18c5f03..8e69d2afd 100644
 --- a/src/test/codegen/repr-transparent-aggregates-1.rs
 +++ b/src/test/codegen/repr-transparent-aggregates-1.rs
 @@ -6,6 +6,7 @@
@@ -238,10 +270,10 @@ index ad1b6e96b..122d59a57 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
-index bed509d77..8bc817897 100644
+index 215af347f..a1c7e4c6a 100644
 --- a/src/tools/compiletest/src/util.rs
 +++ b/src/tools/compiletest/src/util.rs
-@@ -70,6 +70,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
+@@ -71,6 +71,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
      ("msp430", "msp430"),
      ("nvptx64", "nvptx64"),
      ("powerpc", "powerpc"),
@@ -342,3 +374,6 @@ index 4a9397331..4cf47c05d 100644
  )))]
  const ALIGNOF_MAX_ALIGN_T: usize = 8;
  #[cfg(all(any(
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch b/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
deleted file mode 100644
index d9a7ae68b6e0..000000000000
--- a/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From beb4e16f055aa7925194fd2c360105a6d55f10f6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Lo=C3=AFc=20BRANSTETT?= <lolo.branstett@numericable.fr>
-Date: Wed, 27 Apr 2022 19:11:56 +0200
-Subject: [PATCH] Add missing `target_feature` to the list of well known cfg
- names
-
----
- compiler/rustc_session/src/config.rs | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
-index 12c5c4445d46f..330201dd8fef6 100644
---- a/compiler/rustc_session/src/config.rs
-+++ b/compiler/rustc_session/src/config.rs
-@@ -1038,6 +1038,7 @@ impl CrateCheckConfig {
-             sym::target_has_atomic_load_store,
-             sym::target_has_atomic,
-             sym::target_has_atomic_equal_alignment,
-+            sym::target_feature,
-             sym::panic,
-             sym::sanitize,
-             sym::debug_assertions,
-@@ -1081,6 +1082,10 @@ impl CrateCheckConfig {
-             .into_iter()
-             .map(|sanitizer| Symbol::intern(sanitizer.as_str().unwrap()));
- 
-+        // Unknown possible values:
-+        //  - `feature`
-+        //  - `target_feature`
-+
-         // No-values
-         for name in [
-             sym::doc,
diff --git a/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch b/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch
deleted file mode 100644
index fe0377dbc381..000000000000
--- a/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/library/std/src/sys/unix/mod.rs
-+++ b/library/std/src/sys/unix/mod.rs
-@@ -212,6 +212,10 @@ cfg_if::cfg_if! {
-         #[link(name = "log")]
-         #[link(name = "gcc")]
-         extern "C" {}
-+    } else if #[cfg(all(target_os = "linux", target_env = "musl"))] {
-+	#[link(name = "ssp_nonshared")]
-+  #[link(name = "execinfo")]
-+	extern "C" {}
-     } else if #[cfg(target_os = "freebsd")] {
-         #[link(name = "execinfo")]
-         #[link(name = "pthread")]
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index da3ca779e7c6..be79d82b0840 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -8,7 +8,7 @@
 # uploaded to https://repo-default.voidlinux.org/distfiles/
 #
 pkgname=rust
-version=1.61.0
+version=1.63.0
 revision=1
 wrksrc="rustc-${version}-src"
 hostmakedepends="cmake curl pkg-config python3 tar cargo-bootstrap"
@@ -19,7 +19,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://www.rust-lang.org/"
 distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
-checksum=ad0b4351675aa9abdf4c7e066613bd274c4391c5506db152983426376101daed
+checksum=1f9580295642ef5da7e475a8da2397d65153d3f2cb92849dbd08ed0effca99d0
 lib32disabled=yes
 make_check=no # CBA for now
 

From cbb287a447f50742d39424fc0fe3b1b0227ffdf2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:35 +0200
Subject: [PATCH 4/4] cargo: update to 1.63.0.

---
 srcpkgs/cargo/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index e3c30f625acd..9f653c39fd43 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo'
 pkgname=cargo
-version=1.61.0
+version=1.63.0
 revision=1
 wrksrc="cargo-rust-${version}"
 build_helper=rust
@@ -13,7 +13,7 @@ license="MIT, Apache-2.0"
 homepage="https://crates.io/"
 distfiles="https://github.com/rust-lang/cargo/archive/rust-${version}.tar.gz
  https://github.com/crossbeam-rs/crossbeam/archive/refs/tags/crossbeam-utils-0.8.8.tar.gz"
-checksum="6261b51441f50abe08a2992a349b22a2385846bfc9cb288ae9a3a609b904099e
+checksum="b1f50e4957a0453c1513cabe98c7fd94e715cd0ca70138b1945cef338e1abf35
  52c451910203cd9002cc4b85cff95f45c6ba245392801e80d7898ca5c3c3ab29"
 replaces="cargo-tree>=0"
 

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PR PATCH] [Updated] Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
@ 2022-08-14  0:48 ` jcgruenhage
  2022-08-14  0:51 ` jcgruenhage
                   ` (22 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jcgruenhage @ 2022-08-14  0:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1296 bytes --]

There is an updated pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages rust-1.63
https://github.com/void-linux/void-packages/pull/38662

Update Rust toolchain to 1.63.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

`cargo-crev` requires 1.62 at least, so I thought I'd gave updating Rust a go, and it worked out just fine tbh. The new `cargo-crev` release compiled fine on this toolchain and works properly.
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, x86\_64-gnu


A patch file from https://github.com/void-linux/void-packages/pull/38662.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rust-1.63-38662.patch --]
[-- Type: text/x-diff, Size: 53605 bytes --]

From ebc1d198755759c68f865ed3e8a1283bebccd2e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:01 +0200
Subject: [PATCH 1/4] rust-bootstrap: update to 1.63.0.

---
 srcpkgs/rust-bootstrap/template | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/rust-bootstrap/template b/srcpkgs/rust-bootstrap/template
index 66d04d634638..a53516dd5958 100644
--- a/srcpkgs/rust-bootstrap/template
+++ b/srcpkgs/rust-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'rust-bootstrap'
 pkgname=rust-bootstrap
-version=1.61.0
+version=1.63.0
 revision=1
 create_wrksrc=yes
 short_desc="Rust programming language bootstrap toolchain"
@@ -29,23 +29,23 @@ distfiles="
 case "$XBPS_TARGET_MACHINE" in
 	i686)
 		checksum="
-		 8af0ec3eb470e7e28439fedf9ebdadf90df8c58da544cc643033e6fc0ccf0bea
-		 ab223fcec35183bc0fe630403537cd7dae55c403103df29b25077db4882cb88e"
+		 11d3729f0343a069e9e59531745170cb0b6ce68f73848699564ea0bbcbf2c02f
+		 3177d3a159b4fcd54bca93d09ff1a903689a64ed4037699de372e685d12d4335"
 		;;
 	x86_64)
 		checksum="
-		 21c4613f389ed130fbaaf88f1e984319f72b5fc10734569a5ba19e22ebb03abd
-		 270b07aa5f2de52255a117e1e587138d77375ce0d09a1d7fead085f29b3977e9"
+		 bdab9d9afa5c329c40f9ba568364815237fab8426477c12bfabad35ffc484ab5
+		 993c2c17bf76ac626bfb5b17bddce65fbdfc14f70d183f33773de0cd12df46d2"
 		;;
 	x86_64-musl)
 		checksum="
-		 89cb72cbc493cb5cd8e43830009b4a1a5bfd472246ae184157868c9b0607bf6c
-		 1f4f2e4c5dd0f9b0dac7c8888f4a49ef16a6fe8992f39895823d2a442f0fe408"
+		 b6566a9b1dafe03cf4a01b58b2db0e14a0044ae5773736827882bd549108277e
+		 6fcfa4f9a51d35bf2c5c92ac15c688baa8c98d9fded05ab6abfdae85cb5aed8c"
 		;;
 	ppc64le)
 		checksum="
-		 dc54893d747e4f3330515caa75e404f78c6c5475a1216d1428f5e7ce1c2e9602
-		 36c0ccff14c80419507561db050f9533f0abd43fc50f3ddb859c10df74b1c351"
+		 b3dc2c082e76b5effe0b158aac3831830168a1a6980b39347c355e49be63fcca
+		 3ae0b74ba428c569fcecebbb09060ad0bd434a5f1fc9ffd1329b56941a897b6e"
 		;;
 	ppc64le-musl)
 		checksum="
@@ -59,8 +59,8 @@ case "$XBPS_TARGET_MACHINE" in
 		;;
 	ppc)
 		checksum="
-		 f28a8c2986fce5015c67823e39ad4b53e2db06603b6ea4a1217ac961cbbfb073
-		 7d2f7f900c8c05616fba8e99ab041d847af3653c259b99445edd788acddf878c"
+		 7a99dd6a7f30b8a8f85d95f47fa77084a48c7ebc94092978daa3563268a4b15b
+		 a25719c0ad2a5e7f52eed87b75cb76c4a52b8dc6e24b4bef16ed7fb9133e5b42"
 		;;
 	*) broken="rust bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac

From 7294583183e9ae6dd393b7481facb813778c58c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:24 +0200
Subject: [PATCH 2/4] cargo-bootstrap: update to 1.63.0.

---
 srcpkgs/cargo-bootstrap/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/cargo-bootstrap/template b/srcpkgs/cargo-bootstrap/template
index 0fdaac840a3c..23793d85ea9a 100644
--- a/srcpkgs/cargo-bootstrap/template
+++ b/srcpkgs/cargo-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo-bootstrap'
 pkgname=cargo-bootstrap
-version=1.61.0
+version=1.63.0
 revision=1
 short_desc="Bootstrap binaries of Rust package manager"
 maintainer="q66 <daniel@octaforge.org>"
@@ -26,16 +26,16 @@ distfiles="${_bootstrap_url}/cargo-${version}-${RUST_TARGET}.tar.xz"
 
 case "$XBPS_TARGET_MACHINE" in
 	i686)
-		checksum="fe258b85ef0644ff08c2095e329399dd4de0e1b2e51f4f4e90cb956d40dc61de"
+		checksum="6f2c109fc38ed8ccadcdcccf51d11505651ca9e12c396ab46ac1dbb55265b792"
 		;;
 	x86_64)
-		checksum="9461727d754f865ef2a87479d40bbe4c5176f80963b7c50b7797bc8940d7a0a0"
+		checksum="f370d12e4c11f0c835becb738bcf00d363f29b76f8b424b4dcb005abcf15fc9a"
 		;;
 	x86_64-musl)
-		checksum="db4b4423c2843b6e27737664cf8085afcba670374110ca24b9c8d341045e748c"
+		checksum="6f6ce044832a2433c250f4f27a61f69081e2b0f7e4e1f141492c2ce99ee8511e"
 		;;
 	ppc64le)
-		checksum="09817011ff1ef4b7006387c7cabb6a059731792a9372533dec7d87e7f014444b"
+		checksum="a4cdc00a42fd767bf5a296f7126d9db22a0a609cd956bbf0cb3eae882add1be7"
 		;;
 	ppc64le-musl)
 		checksum="39215cba9b1bda63209cac0edbda583e0c822f88a50fdbf33255c8c5386e4868"

From 82d54e1d91e7b5897ff77a068b1f1ef0f6cf4eb6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:31 +0200
Subject: [PATCH 3/4] rust: update to 1.63.0.

---
 .../rust/patches/0001-Fix-LLVM-build.patch    |  8 +--
 ...lib-and-musl_root-from-musl-targets.patch} | 65 ++++++++++++-------
 ...e-debugger-scripts-to-usr-share-rust.patch | 10 +--
 ...4-fix-shebang-on-install-template.sh.patch |  6 +-
 ...fer-libgcc_eh-over-libunwind-on-musl.patch | 24 -------
 ...ot-install-libunwind-source-removed.patch} | 10 +--
 ...06-fix-rustdoc-when-cross-compiling.patch} | 25 +++----
 ...stage-2-tools-dynamically-to-libstd.patch} | 10 +--
 ...against-host-target-LLVM-in-cross-s.patch} | 16 ++++-
 .../0009-do-not-export-LD_LIBRARY_PATH.patch  | 29 +++++++++
 ...age-of-musl-libc-for-the-libc-crate.patch} | 14 ++--
 .../0010-do-not-export-LD_LIBRARY_PATH.patch  | 23 -------
 ...-ELFv2-ABI-on-all-powerpc64-targets.patch} | 22 +++----
 ...e-initial-exec-TLS-model-on-powerpc.patch} | 11 ++--
 ...g-native-sysroot-to-use-for-linkage.patch} | 40 ++++++++----
 ...-of-need-ssp_nonshared.patch-from-al.patch | 28 ++++++++
 ...le.patch => 0015-initial-ppcle-port.patch} | 55 +++++++++++++---
 ...e16f055aa7925194fd2c360105a6d55f10f6.patch | 33 ----------
 .../need-ssp-nonshared-and-execinfo.patch     | 13 ----
 srcpkgs/rust/template                         |  4 +-
 20 files changed, 248 insertions(+), 198 deletions(-)
 rename srcpkgs/rust/patches/{0001-musl-void-setup.patch => 0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch} (89%)
 delete mode 100644 srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
 rename srcpkgs/rust/patches/{0006-do-not-install-libunwind-source-removed.patch => 0005-do-not-install-libunwind-source-removed.patch} (73%)
 rename srcpkgs/rust/patches/{0007-fix-rustdoc-when-cross-compiling.patch => 0006-fix-rustdoc-when-cross-compiling.patch} (67%)
 rename srcpkgs/rust/patches/{0008-link-stage-2-tools-dynamically-to-libstd.patch => 0007-link-stage-2-tools-dynamically-to-libstd.patch} (78%)
 rename srcpkgs/rust/patches/{0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch => 0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch} (71%)
 create mode 100644 srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
 rename srcpkgs/rust/patches/{0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch => 0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch} (74%)
 delete mode 100644 srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
 rename srcpkgs/rust/patches/{0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch => 0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch} (74%)
 rename srcpkgs/rust/patches/{fix-ppc32.patch => 0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch} (78%)
 rename srcpkgs/rust/patches/{native-sysroot.patch => 0013-allow-specifying-native-sysroot-to-use-for-linkage.patch} (69%)
 create mode 100644 srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
 rename srcpkgs/rust/patches/{xxx-ppcle.patch => 0015-initial-ppcle-port.patch} (85%)
 delete mode 100644 srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
 delete mode 100644 srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch

diff --git a/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch b/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
index 0da829af1da9..6cf9c3a755a9 100644
--- a/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
+++ b/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
@@ -1,4 +1,4 @@
-From 4443eca0d6b3ba599832b2f73a5350fdd0c90d10 Mon Sep 17 00:00:00 2001
+From 99a046adc7d1c7b2da3a31e077722ea69f84eeb6 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/15] Fix LLVM build
@@ -8,10 +8,10 @@ Subject: [PATCH 01/15] Fix LLVM build
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index a476d25f..c7e63990 100644
+index 4ac857b47..b603ae90a 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -768,7 +768,8 @@ impl Build {
+@@ -1050,7 +1050,8 @@ impl Build {
              .args()
              .iter()
              .map(|s| s.to_string_lossy().into_owned())
@@ -22,5 +22,5 @@ index a476d25f..c7e63990 100644
  
          // If we're compiling on macOS then we add a few unconditional flags
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0001-musl-void-setup.patch b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
similarity index 89%
rename from srcpkgs/rust/patches/0001-musl-void-setup.patch
rename to srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
index c13cb1730986..c156945b8111 100644
--- a/srcpkgs/rust/patches/0001-musl-void-setup.patch
+++ b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
@@ -1,5 +1,23 @@
+From 7219ba1c9accbad9b530d312fd9a9f69330c93da Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 3 May 2020 17:53:33 +0200
+Subject: [PATCH 02/15] Remove -nostdlib and musl_root from musl targets
+
+extended by various void contributors to match our musl setup
+---
+ compiler/rustc_target/src/spec/crt_objects.rs | 22 ----------
+ .../rustc_target/src/spec/linux_musl_base.rs  |  7 ---
+ config.toml.example                           |  8 ----
+ src/bootstrap/cc_detect.rs                    | 25 +----------
+ src/bootstrap/compile.rs                      | 43 +------------------
+ src/bootstrap/config.rs                       |  9 ----
+ src/bootstrap/configure.py                    | 28 ------------
+ src/bootstrap/lib.rs                          | 19 --------
+ src/bootstrap/sanity.rs                       | 23 ----------
+ 9 files changed, 3 insertions(+), 181 deletions(-)
+
 diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
-index 51f392a6..62560658 100644
+index 52ac3622e..f35e5b9d8 100644
 --- a/compiler/rustc_target/src/spec/crt_objects.rs
 +++ b/compiler/rustc_target/src/spec/crt_objects.rs
 @@ -63,28 +63,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects {
@@ -32,7 +50,7 @@ index 51f392a6..62560658 100644
      new(&[
          (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
 diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs
-index 207a87ab..88f807a5 100644
+index 207a87ab0..88f807a58 100644
 --- a/compiler/rustc_target/src/spec/linux_musl_base.rs
 +++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
 @@ -1,16 +1,9 @@
@@ -53,10 +71,10 @@ index 207a87ab..88f807a5 100644
      base
  }
 diff --git a/config.toml.example b/config.toml.example
-index 6e53d9b4..74980d2c 100644
+index b3284050f..62ac07f87 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -511,14 +511,6 @@ changelog-seen = 2
+@@ -523,14 +523,6 @@ changelog-seen = 2
  # supplementary build information, like distro-specific package versions.
  #description = <none> (string)
  
@@ -72,7 +90,7 @@ index 6e53d9b4..74980d2c 100644
  # 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
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index 7ce44687..4e7507ae 100644
+index dca782c29..8eb35ea43 100644
 --- a/src/bootstrap/cc_detect.rs
 +++ b/src/bootstrap/cc_detect.rs
 @@ -97,7 +97,7 @@ pub fn find(build: &mut Build) {
@@ -93,7 +111,7 @@ index 7ce44687..4e7507ae 100644
              true
          } else {
              // Use an auto-detected compiler (or one configured via `CXX_target_triple` env vars).
-@@ -157,7 +157,6 @@ fn set_compiler(
+@@ -161,7 +161,6 @@ fn set_compiler(
      compiler: Language,
      target: TargetSelection,
      config: Option<&Target>,
@@ -101,7 +119,7 @@ index 7ce44687..4e7507ae 100644
  ) {
      match &*target.triple {
          // When compiling for android we may have the NDK configured in the
-@@ -200,26 +199,6 @@ fn set_compiler(
+@@ -204,26 +203,6 @@ fn set_compiler(
              }
          }
  
@@ -129,10 +147,10 @@ index 7ce44687..4e7507ae 100644
      }
  }
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index afc333b5..9d67ab56 100644
+index b4807d1ab..ce483bf6b 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -197,39 +197,7 @@ fn copy_self_contained_objects(
+@@ -200,39 +200,7 @@ fn copy_self_contained_objects(
      let mut target_deps = vec![];
  
      // Copies the libc and CRT objects.
@@ -173,7 +191,7 @@ index afc333b5..9d67ab56 100644
          let srcdir = builder
              .wasi_root(target)
              .unwrap_or_else(|| {
-@@ -313,15 +281,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+@@ -316,15 +284,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
              .arg("--manifest-path")
              .arg(builder.src.join("library/test/Cargo.toml"));
  
@@ -190,10 +208,10 @@ index afc333b5..9d67ab56 100644
              if let Some(p) = builder.wasi_root(target) {
                  let root = format!("native={}/lib/wasm32-wasi", p.to_str().unwrap());
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 9534cc5f..642a5c24 100644
+index 146077419..18a764689 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -172,7 +172,6 @@ pub struct Config {
+@@ -186,7 +186,6 @@ pub struct Config {
      pub missing_tools: bool,
  
      // Fallback musl-root for all targets
@@ -201,7 +219,7 @@ index 9534cc5f..642a5c24 100644
      pub prefix: Option<PathBuf>,
      pub sysconfdir: Option<PathBuf>,
      pub datadir: Option<PathBuf>,
-@@ -299,8 +298,6 @@ pub struct Target {
+@@ -400,8 +399,6 @@ pub struct Target {
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
      pub crt_static: Option<bool>,
@@ -210,7 +228,7 @@ index 9534cc5f..642a5c24 100644
      pub wasi_root: Option<PathBuf>,
      pub qemu_rootfs: Option<PathBuf>,
      pub no_std: bool,
-@@ -587,7 +584,6 @@ struct Rust {
+@@ -689,7 +686,6 @@ define_config! {
          default_linker: Option<String> = "default-linker",
          channel: Option<String> = "channel",
          description: Option<String> = "description",
@@ -218,7 +236,7 @@ index 9534cc5f..642a5c24 100644
          rpath: Option<bool> = "rpath",
          verbose_tests: Option<bool> = "verbose-tests",
          optimize_tests: Option<bool> = "optimize-tests",
-@@ -631,8 +627,6 @@ struct TomlTarget {
+@@ -734,8 +730,6 @@ define_config! {
          sanitizers: Option<bool> = "sanitizers",
          profiler: Option<bool> = "profiler",
          crt_static: Option<bool> = "crt-static",
@@ -227,7 +245,7 @@ index 9534cc5f..642a5c24 100644
          wasi_root: Option<String> = "wasi-root",
          qemu_rootfs: Option<String> = "qemu-rootfs",
          no_std: Option<bool> = "no-std",
-@@ -1013,7 +1007,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1107,7 +1101,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;
@@ -235,7 +253,7 @@ index 9534cc5f..642a5c24 100644
              config.save_toolstates = rust.save_toolstates.map(PathBuf::from);
              set(&mut config.deny_warnings, flags.deny_warnings.or(rust.deny_warnings));
              set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
-@@ -1059,8 +1052,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1164,8 +1157,6 @@ impl Config {
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
                  target.crt_static = cfg.crt_static;
@@ -245,7 +263,7 @@ index 9534cc5f..642a5c24 100644
                  target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
                  target.sanitizers = cfg.sanitizers;
 diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
-index 87a130a0..bd4c9197 100755
+index 2fc036082..91737e0ea 100755
 --- a/src/bootstrap/configure.py
 +++ b/src/bootstrap/configure.py
 @@ -114,34 +114,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
@@ -284,10 +302,10 @@ index 87a130a0..bd4c9197 100755
    "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 570a6174..f3d5f308 100644
+index b603ae90a..0a7012dbd 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1125,25 +1125,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1153,25 +1153,6 @@ impl Build {
          }
      }
  
@@ -314,7 +332,7 @@ index 570a6174..f3d5f308 100644
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
          self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
 diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index 8c2899c1..dda15d76 100644
+index 64c5dd7ae..b8f9104ea 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
 @@ -11,7 +11,6 @@
@@ -325,7 +343,7 @@ index 8c2899c1..dda15d76 100644
  use std::path::PathBuf;
  use std::process::Command;
  
-@@ -177,28 +176,6 @@ pub fn check(build: &mut Build) {
+@@ -190,28 +189,6 @@ than building it.
              }
          }
  
@@ -354,3 +372,6 @@ index 8c2899c1..dda15d76 100644
          if need_cmake && target.contains("msvc") {
              // There are three builds of cmake on windows: MSVC, MinGW, and
              // Cygwin. The Cygwin build does not have generators for Visual
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch b/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
index 3c4e1cb96475..bc7053800945 100644
--- a/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
+++ b/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
@@ -1,7 +1,7 @@
-From f9a680688a685ec47ee5ec001574d9b91b4ba35e Mon Sep 17 00:00:00 2001
+From 8938b002edbec432be46de7b6f1b9d0a6912873a Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 00:45:35 +0100
-Subject: [PATCH 3/9] move debugger scripts to /usr/share/rust
+Subject: [PATCH 03/15] move debugger scripts to /usr/share/rust
 
 ---
  src/bootstrap/dist.rs | 2 +-
@@ -11,10 +11,10 @@ Subject: [PATCH 3/9] move debugger scripts to /usr/share/rust
  4 files changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index d4875cfe1..e8b61b8a2 100644
+index b1fae356d..e7a077134 100644
 --- a/src/bootstrap/dist.rs
 +++ b/src/bootstrap/dist.rs
-@@ -499,7 +499,7 @@ impl Step for DebuggerScripts {
+@@ -460,7 +460,7 @@ impl Step for DebuggerScripts {
      fn run(self, builder: &Builder<'_>) {
          let host = self.host;
          let sysroot = self.sysroot;
@@ -65,5 +65,5 @@ index bce72f1ba..8abb01245 100755
  # Call LLDB with the commands added to the argument list
  exec "$lldb" --one-line-before-file "$script_import" --source-before-file "$commands_file" "$@"
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch b/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
index 2e9cd93fdfb9..2ca7ffeaf73f 100644
--- a/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
+++ b/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
@@ -1,7 +1,7 @@
-From d5a6a431024790c911d04fd54381c515fb05819e Mon Sep 17 00:00:00 2001
+From d7d7fc24d1744a3db70a9fb010c31daa14a46df7 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 00:55:18 +0100
-Subject: [PATCH 4/9] fix shebang on install-template.sh
+Subject: [PATCH 04/15] fix shebang on install-template.sh
 
 ---
  src/tools/rust-installer/install-template.sh | 2 +-
@@ -18,5 +18,5 @@ index e68be8911..beaa90f7b 100644
  # file at the top-level directory of this distribution and at
  # http://rust-lang.org/COPYRIGHT.
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch b/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
deleted file mode 100644
index 30cb66fc24b1..000000000000
--- a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Additions for build.rs by q66, necessary for our musl setup.
-
-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/library/unwind/src/lib.rs
-+++ b/library/unwind/src/lib.rs
-@@ -51,7 +51,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", cfg(target_feature = "crt-static"))]
-         #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
-         extern "C" {}
-     }
diff --git a/srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch b/srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
similarity index 73%
rename from srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch
rename to srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
index 0128b8fc61f2..92e0021ab6f4 100644
--- a/srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch
+++ b/srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
@@ -1,17 +1,17 @@
-From fc69414484327e4dbff138dd0834fc3bde626008 Mon Sep 17 00:00:00 2001
+From 1335a445327a6605c5f933d9647b97e771089abd Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:44:54 +0100
-Subject: [PATCH 6/9] do not install libunwind source (removed)
+Subject: [PATCH 05/15] do not install libunwind source (removed)
 
 ---
  src/bootstrap/dist.rs | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index e8b61b8a2..02d24a77d 100644
+index e7a077134..74e75df4b 100644
 --- a/src/bootstrap/dist.rs
 +++ b/src/bootstrap/dist.rs
-@@ -849,7 +849,7 @@ impl Step for Src {
+@@ -804,7 +804,7 @@ impl Step for Src {
          copy_src_dirs(
              builder,
              &builder.src,
@@ -21,5 +21,5 @@ index e8b61b8a2..02d24a77d 100644
                  // not needed and contains symlinks which rustup currently
                  // chokes on when unpacking.
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch b/srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
similarity index 67%
rename from srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
rename to srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
index 2cc1f6b900d3..88eaf65de8b7 100644
--- a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
+++ b/srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
@@ -1,17 +1,17 @@
-From 81ba387384e8ce0aa9bb9b4bd76014d922d85de8 Mon Sep 17 00:00:00 2001
+From 50075907c3dd2f06d471b3375d7c0ee850263eb2 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:48:14 +0100
-Subject: [PATCH 7/9] fix rustdoc when cross-compiling
+Subject: [PATCH 06/15] fix rustdoc when cross-compiling
 
 ---
  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 e4396d530..cb2312028 100644
+index 5f85fc5aa..01e81fc39 100644
 --- a/src/bootstrap/bin/rustdoc.rs
 +++ b/src/bootstrap/bin/rustdoc.rs
-@@ -22,14 +22,11 @@ fn main() {
+@@ -26,9 +26,6 @@ fn main() {
          Err(_) => 0,
      };
  
@@ -19,15 +19,18 @@ index e4396d530..cb2312028 100644
 -    dylib_path.insert(0, PathBuf::from(libdir.clone()));
 -
      let mut cmd = Command::new(rustdoc);
-     cmd.args(&args)
-         .arg("--sysroot")
-         .arg(&sysroot)
--        .env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
-+        .env(dylib_path_var(), PathBuf::from(libdir.clone()));
+ 
+     // cfg(bootstrap)
+@@ -43,7 +40,7 @@ fn main() {
+     }
+ 
+     cmd.args(&args);
+-    cmd.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
++    cmd.env(dylib_path_var(), PathBuf::from(libdir.clone()));
  
      // Force all crates compiled by this compiler to (a) be unstable and (b)
      // allow the `rustc_private` feature to link to other unstable crates
-@@ -62,7 +59,7 @@ fn main() {
+@@ -69,7 +66,7 @@ fn main() {
          eprintln!(
              "rustdoc command: {:?}={:?} {:?}",
              dylib_path_var(),
@@ -37,5 +40,5 @@ index e4396d530..cb2312028 100644
          );
          eprintln!("sysroot: {:?}", sysroot);
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch b/srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
similarity index 78%
rename from srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch
rename to srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
index f6793d8a3202..198e4fcc7a6a 100644
--- a/srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch
+++ b/srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
@@ -1,7 +1,7 @@
-From 1c4a66621a5fa34c78fc020084e4166f3af7cbb5 Mon Sep 17 00:00:00 2001
+From c2de45cbdaee1a8c81b2d65f6bced1439a738e00 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:48:49 +0100
-Subject: [PATCH 8/9] link stage 2 tools dynamically to libstd
+Subject: [PATCH 07/15] link stage 2 tools dynamically to libstd
 
 stage 2 tools are the ones that are distributed, and we distribute
 them together with the rust libs so there is no need to worry
@@ -11,10 +11,10 @@ about unstable ABI
  1 file changed, 2 insertions(+)
 
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index 6750f7a54..de771280e 100644
+index 62b5416ce..554dd4188 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1520,6 +1520,8 @@ impl<'a> Builder<'a> {
+@@ -2066,6 +2066,8 @@ impl<'a> Builder<'a> {
          // linking all deps statically into the dylib.
          if matches!(mode, Mode::Std | Mode::Rustc) {
              rustflags.arg("-Cprefer-dynamic");
@@ -24,5 +24,5 @@ index 6750f7a54..de771280e 100644
  
          // When building incrementally we default to a lower ThinLTO import limit
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch b/srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
similarity index 71%
rename from srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch
rename to srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
index 3b2e388c014e..3edba737f923 100644
--- a/srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch
+++ b/srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
@@ -1,8 +1,18 @@
+From f229c2bbd32deab98978d8453d0f44f23849fa09 Mon Sep 17 00:00:00 2001
+From: q66 <daniel@octaforge.org>
+Date: Sun, 3 May 2020 18:05:22 +0200
+Subject: [PATCH 08/15] Void: fix linkage against host/target LLVM in cross
+ setups
+
+---
+ compiler/rustc_llvm/build.rs | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
 diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs
-index 36a6d2cc3..af4e1219f 100644
+index 7729ec6be..66b8a4215 100644
 --- a/compiler/rustc_llvm/build.rs
 +++ b/compiler/rustc_llvm/build.rs
-@@ -230,9 +230,11 @@ fn main() {
+@@ -291,9 +291,11 @@ fn main() {
      for lib in output(&mut cmd).split_whitespace() {
          if is_crossed {
              if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
@@ -17,5 +27,5 @@ index 36a6d2cc3..af4e1219f 100644
          } else if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
              println!("cargo:rustc-link-search=native={}", stripped);
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch b/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
new file mode 100644
index 000000000000..f66766270a12
--- /dev/null
+++ b/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
@@ -0,0 +1,29 @@
+From 5e9e5fa2b2aefefbdc00547d7f10ee92d9b3356a Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Tue, 21 Dec 2021 00:48:29 +0100
+Subject: [PATCH 09/15] do not export LD_LIBRARY_PATH
+
+---
+ src/bootstrap/bootstrap.py | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
+index 40d478a17..3501fd901 100644
+--- a/src/bootstrap/bootstrap.py
++++ b/src/bootstrap/bootstrap.py
+@@ -756,12 +756,6 @@ class RustBuild(object):
+             del env["CARGO_BUILD_TARGET"]
+         env["CARGO_TARGET_DIR"] = build_dir
+         env["RUSTC"] = self.rustc()
+-        env["LD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+-            (os.pathsep + env["LD_LIBRARY_PATH"]) \
+-            if "LD_LIBRARY_PATH" in env else ""
+-        env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+-            (os.pathsep + env["DYLD_LIBRARY_PATH"]) \
+-            if "DYLD_LIBRARY_PATH" in env else ""
+         env["LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+             (os.pathsep + env["LIBRARY_PATH"]) \
+             if "LIBRARY_PATH" in env else ""
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch b/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
similarity index 74%
rename from srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
rename to srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
index 8a18e414e209..0f679a486f38 100644
--- a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
+++ b/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
@@ -1,18 +1,17 @@
-From e363a0e0ff7ffc8bd83f72ec1a20d289996b6370 Mon Sep 17 00:00:00 2001
+From 2596eaf95d538ca586de342d6dbc21c7e2820768 Mon Sep 17 00:00:00 2001
 From: q66 <daniel@octaforge.org>
 Date: Sun, 3 May 2020 18:02:03 +0200
-Subject: [PATCH 12/15] Fix dynamic linkage of musl libc for the libc crate
+Subject: [PATCH 10/15] Fix dynamic linkage of musl libc for the libc crate
 
 ---
- vendor/libc/src/lib.rs      | 1 +
  vendor/libc/src/unix/mod.rs | 6 +++---
- 2 files changed, 4 insertions(+), 3 deletions(-)
+ 1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs
-index 238da24b..ffb05ee7 100644
+index ecee44411..c254a2f01 100644
 --- a/vendor/libc/src/unix/mod.rs
 +++ b/vendor/libc/src/unix/mod.rs
-@@ -329,11 +329,11 @@ cfg_if! {
+@@ -337,11 +337,11 @@ cfg_if! {
          #[link(name = "c", cfg(not(target_feature = "crt-static")))]
          extern {}
      } else if #[cfg(target_env = "musl")] {
@@ -27,7 +26,6 @@ index 238da24b..ffb05ee7 100644
          extern {}
      } else if #[cfg(target_os = "emscripten")] {
          #[link(name = "c")]
-index 0b1496af..7f7e85a7 100644
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch b/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
deleted file mode 100644
index d7714d5ee4fd..000000000000
--- a/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-commit 798e44e67c0bac6509b7915767450b0381c94017
-Author: Daniel Kolesa <daniel@octaforge.org>
-Date:   Tue Dec 21 00:48:29 2021 +0100
-
-    do not export LD_LIBRARY_PATH
-
-diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 0170be967..f7a9ec785 100644
---- a/src/bootstrap/bootstrap.py
-+++ b/src/bootstrap/bootstrap.py
-@@ -924,12 +924,6 @@ class RustBuild(object):
-             del env["CARGO_BUILD_TARGET"]
-         env["CARGO_TARGET_DIR"] = build_dir
-         env["RUSTC"] = self.rustc(True)
--        env["LD_LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
--            (os.pathsep + env["LD_LIBRARY_PATH"]) \
--            if "LD_LIBRARY_PATH" in env else ""
--        env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
--            (os.pathsep + env["DYLD_LIBRARY_PATH"]) \
--            if "DYLD_LIBRARY_PATH" in env else ""
-         env["LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
-             (os.pathsep + env["LIBRARY_PATH"]) \
-             if "LIBRARY_PATH" in env else ""
diff --git a/srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
similarity index 74%
rename from srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
rename to srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
index 3f3bd3212bb9..fec6bfce00db 100644
--- a/srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
+++ b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
@@ -1,24 +1,24 @@
-From c6b54a373e74a1e4ce64f349b5b69105f2bc1a49 Mon Sep 17 00:00:00 2001
+From 5df5ca7c068e516ea4fdaab507d850f98d38d924 Mon Sep 17 00:00:00 2001
 From: q66 <daniel@octaforge.org>
 Date: Sun, 3 May 2020 18:08:09 +0200
-Subject: [PATCH 15/15] Use ELFv2 ABI on all powerpc64 targets
+Subject: [PATCH 11/15] Use ELFv2 ABI on all powerpc64 targets
 
 This patches librustc_target so that ELFv2 is used everywhere, matching our
 LLVM. While this is not perfect (it does not allow rustc to compile legacy
 binaries), rustc never requests specific ABI from llvm in the first place,
 so at least match the environment we have.
 ---
- src/librustc_target/abi/call/powerpc64.rs               | 9 +--------
- src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs | 6 +-----
+ compiler/rustc_target/src/abi/call/powerpc64.rs          | 9 +--------
+ .../rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs | 6 +-----
  2 files changed, 2 insertions(+), 13 deletions(-)
 
 diff --git a/compiler/rustc_target/src/abi/call/powerpc64.rs b/compiler/rustc_target/src/abi/call/powerpc64.rs
-index 8c2a9d09a..2dcbf2c09 100644
+index c22ef9c8f..932172b2f 100644
 --- a/compiler/rustc_target/src/abi/call/powerpc64.rs
 +++ b/compiler/rustc_target/src/abi/call/powerpc64.rs
 @@ -119,14 +119,7 @@ where
-     Ty: TyAndLayoutMethods<'a, C> + Copy,
-     C: LayoutOf<Ty = Ty, TyAndLayout = TyAndLayout<'a, Ty>> + HasDataLayout + HasTargetSpec,
+     Ty: TyAbiInterface<'a, C> + Copy,
+     C: HasDataLayout + HasTargetSpec,
  {
 -    let abi = if cx.target_spec().env == "musl" {
 -        ELFv2
@@ -33,7 +33,7 @@ index 8c2a9d09a..2dcbf2c09 100644
      if !fn_abi.ret.is_ignore() {
          classify_ret(cx, &mut fn_abi.ret, abi);
 diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
-index 751022c12..c4d55a62e 100644
+index 24d5d187e..aa594b02e 100644
 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
 +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
 @@ -1,5 +1,5 @@
@@ -44,7 +44,7 @@ index 751022c12..c4d55a62e 100644
  pub fn target() -> Target {
      let mut base = super::linux_gnu_base::opts();
 @@ -7,10 +7,6 @@ pub fn target() -> Target {
-     base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
+     base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m64".into());
      base.max_atomic_width = Some(64);
  
 -    // ld.so in at least RHEL6 on ppc64 has a bug related to BIND_NOW, so only enable partial RELRO
@@ -52,8 +52,8 @@ index 751022c12..c4d55a62e 100644
 -    base.relro_level = RelroLevel::Partial;
 -
      Target {
-         llvm_target: "powerpc64-unknown-linux-gnu".to_string(),
+         llvm_target: "powerpc64-unknown-linux-gnu".into(),
          pointer_width: 64,
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/fix-ppc32.patch b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
similarity index 78%
rename from srcpkgs/rust/patches/fix-ppc32.patch
rename to srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
index 739ce4bce7f0..18307b53553e 100644
--- a/srcpkgs/rust/patches/fix-ppc32.patch
+++ b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
@@ -1,7 +1,7 @@
-From 283619cf5ca25272b294525273ec42e9c7820edb Mon Sep 17 00:00:00 2001
+From e8f06c15e1073da598d0592254dd082f0a49a219 Mon Sep 17 00:00:00 2001
 From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
 Date: Sat, 29 May 2021 12:38:46 +0000
-Subject: [PATCH] bootstrap: Disable initial-exec TLS model on powerpc
+Subject: [PATCH 12/15] bootstrap: Disable initial-exec TLS model on powerpc
 
 Fixes #81334.
 ---
@@ -9,10 +9,10 @@ Fixes #81334.
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index 6750f7a549d..6032a685776 100644
+index 554dd4188..6a02a225c 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1299,7 +1299,7 @@ pub fn cargo(
+@@ -1844,7 +1844,7 @@ impl<'a> Builder<'a> {
          // efficient initial-exec TLS model. This doesn't work with `dlopen`,
          // so we can't use it by default in general, but we can use it for tools
          // and our own internal libraries.
@@ -21,3 +21,6 @@ index 6750f7a549d..6032a685776 100644
              rustflags.arg("-Ztls-model=initial-exec");
          }
  
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/native-sysroot.patch b/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
similarity index 69%
rename from srcpkgs/rust/patches/native-sysroot.patch
rename to srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
index 6826b114b6b7..e6be77e7b409 100644
--- a/srcpkgs/rust/patches/native-sysroot.patch
+++ b/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
@@ -1,8 +1,21 @@
+From 12091237bd215901a9977085bc07178362b5655c Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Tue, 21 Dec 2021 02:46:30 +0100
+Subject: [PATCH 13/15] allow specifying native sysroot to use for linkage
+
+This allows us to get around the linker attempting to use
+incompatible libs.
+---
+ src/bootstrap/builder.rs | 4 ++++
+ src/bootstrap/config.rs  | 3 +++
+ src/bootstrap/lib.rs     | 4 ++++
+ 3 files changed, 11 insertions(+)
+
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index e816f9b4..a2668fa9 100644
+index 6a02a225c..483aa8818 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1313,6 +1313,10 @@ pub fn cargo(
+@@ -1708,6 +1708,10 @@ impl<'a> Builder<'a> {
              }
          }
  
@@ -14,10 +27,10 @@ index e816f9b4..a2668fa9 100644
              cargo.env("RUSTC_HOST_LINKER", host_linker);
          }
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 642a5c24..0dd4f879 100644
+index 18a764689..f8b9bbd96 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -294,6 +294,7 @@ pub struct Target {
+@@ -395,6 +395,7 @@ pub struct Target {
      pub ranlib: Option<PathBuf>,
      pub default_linker: Option<PathBuf>,
      pub linker: Option<PathBuf>,
@@ -25,15 +38,15 @@ index 642a5c24..0dd4f879 100644
      pub ndk: Option<PathBuf>,
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
-@@ -621,6 +622,7 @@ struct TomlTarget {
+@@ -723,6 +724,7 @@ define_config! {
          ranlib: Option<String> = "ranlib",
          default_linker: Option<PathBuf> = "default-linker",
          linker: Option<String> = "linker",
 +        sysroot: Option<String> = "sysroot",
          llvm_config: Option<String> = "llvm-config",
          llvm_filecheck: Option<String> = "llvm-filecheck",
-         android_ndk: Option<String> = "android-ndk",
-@@ -1051,6 +1053,7 @@ pub fn parse(args: &[String]) -> Config {
+         llvm_libunwind: Option<String> = "llvm-libunwind",
+@@ -1156,6 +1158,7 @@ impl Config {
                  target.ar = cfg.ar.map(PathBuf::from);
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
@@ -42,17 +55,20 @@ index 642a5c24..0dd4f879 100644
                  target.wasi_root = cfg.wasi_root.map(PathBuf::from);
                  target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
 diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index f3d5f308..7f8b9b27 100644
+index 0a7012dbd..cded50d20 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1125,6 +1125,10 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1152,6 +1152,10 @@ impl Build {
+             self.config.target_config.get(&target).and_then(|t| t.crt_static)
          }
      }
- 
++    
 +    fn native_sysroot(&self, target: TargetSelection) -> Option<&Path> {
 +        self.config.target_config.get(&target).and_then(|c| c.sysroot.as_ref()).map(|p| &**p)
 +    }
-+
+ 
      /// Returns the sysroot for the wasi target, if defined
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
-         self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch b/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
new file mode 100644
index 000000000000..36c090fde1ac
--- /dev/null
+++ b/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
@@ -0,0 +1,28 @@
+From 8424aa370a366929d4870fd1eafb2659ae075ea4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
+Date: Fri, 16 Apr 2021 03:34:16 -0300
+Subject: [PATCH 14/15] copy new version of need-ssp_nonshared.patch from
+ alpine
+
+---
+ library/std/src/sys/unix/mod.rs | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/library/std/src/sys/unix/mod.rs b/library/std/src/sys/unix/mod.rs
+index 34a023b02..934a87570 100644
+--- a/library/std/src/sys/unix/mod.rs
++++ b/library/std/src/sys/unix/mod.rs
+@@ -297,6 +297,10 @@ cfg_if::cfg_if! {
+         #[link(name = "dl")]
+         #[link(name = "log")]
+         extern "C" {}
++    } else if #[cfg(all(target_os = "linux", target_env = "musl"))] {
++	    #[link(name = "ssp_nonshared")]
++        #[link(name = "execinfo")]
++	    extern "C" {}
+     } else if #[cfg(target_os = "freebsd")] {
+         #[link(name = "execinfo")]
+         #[link(name = "pthread")]
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/xxx-ppcle.patch b/srcpkgs/rust/patches/0015-initial-ppcle-port.patch
similarity index 85%
rename from srcpkgs/rust/patches/xxx-ppcle.patch
rename to srcpkgs/rust/patches/0015-initial-ppcle-port.patch
index c0522f0eaafc..988d8bf2e45b 100644
--- a/srcpkgs/rust/patches/xxx-ppcle.patch
+++ b/srcpkgs/rust/patches/0015-initial-ppcle-port.patch
@@ -1,8 +1,40 @@
+From ec48305560be828efc23fe2be3c04a93252ac0ac Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Sat, 3 Jul 2021 21:02:03 +0200
+Subject: [PATCH 15/15] initial ppcle port
+
+---
+ compiler/rustc_middle/src/ty/layout.rs            |  5 ++++-
+ compiler/rustc_target/src/spec/mod.rs             |  2 ++
+ .../src/spec/powerpcle_unknown_linux_gnu.rs       | 15 +++++++++++++++
+ .../src/spec/powerpcle_unknown_linux_musl.rs      | 15 +++++++++++++++
+ src/bootstrap/bootstrap.py                        |  2 ++
+ .../codegen/abi-main-signature-16bit-c-int.rs     |  1 +
+ src/test/codegen/global_asm.rs                    |  1 +
+ src/test/codegen/global_asm_include.rs            |  1 +
+ src/test/codegen/global_asm_x2.rs                 |  1 +
+ src/test/codegen/repr-transparent-aggregates-1.rs |  1 +
+ src/test/codegen/repr-transparent-aggregates-2.rs |  1 +
+ src/test/codegen/stack-probes.rs                  |  1 +
+ .../run-make-fulldeps/atomic-lock-free/Makefile   |  2 ++
+ src/test/ui/abi/stack-probes-lto.rs               |  1 +
+ src/test/ui/abi/stack-probes.rs                   |  1 +
+ src/test/ui/target-feature/gate.rs                |  1 +
+ src/test/ui/target-feature/invalid-attribute.rs   |  1 +
+ src/tools/compiletest/src/util.rs                 |  1 +
+ vendor/cc/src/lib.rs                              |  1 +
+ vendor/target-lexicon/src/targets.rs              |  7 +++++++
+ vendor/tikv-jemallocator/benches/roundtrip.rs     |  3 ++-
+ vendor/tikv-jemallocator/src/lib.rs               |  3 ++-
+ 22 files changed, 64 insertions(+), 3 deletions(-)
+ create mode 100644 compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
+ create mode 100644 compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
+
 diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs
-index 0c1ab67cc..8d4e5f3cb 100644
+index 3b05e42a5..66420f507 100644
 --- a/compiler/rustc_middle/src/ty/layout.rs
 +++ b/compiler/rustc_middle/src/ty/layout.rs
-@@ -3057,6 +3057,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
+@@ -3205,6 +3205,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
              target.os == "linux" && target.arch == "sparc64" && target_env_gnu_like;
          let linux_powerpc_gnu_like =
              target.os == "linux" && target.arch == "powerpc" && target_env_gnu_like;
@@ -11,7 +43,7 @@ index 0c1ab67cc..8d4e5f3cb 100644
          use SpecAbi::*;
          let rust_abi = matches!(sig.abi, RustIntrinsic | PlatformIntrinsic | Rust | RustCall);
  
-@@ -3165,7 +3167,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
+@@ -3311,7 +3313,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
                      || (!win_x64_gnu
                          && !linux_s390x_gnu_like
                          && !linux_sparc64_gnu_like
@@ -22,10 +54,10 @@ index 0c1ab67cc..8d4e5f3cb 100644
                      arg.mode = PassMode::Ignore;
                  }
 diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
-index bd5b712c1..f60be010c 100644
+index da0589cdd..2db403913 100644
 --- a/compiler/rustc_target/src/spec/mod.rs
 +++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -824,6 +824,8 @@ supported_targets! {
+@@ -831,6 +831,8 @@ supported_targets! {
      ("powerpc-unknown-linux-gnu", powerpc_unknown_linux_gnu),
      ("powerpc-unknown-linux-gnuspe", powerpc_unknown_linux_gnuspe),
      ("powerpc-unknown-linux-musl", powerpc_unknown_linux_musl),
@@ -77,10 +109,10 @@ index 000000000..a826b6e47
 +    }
 +}
 diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 71b8f3c45..1505c12e4 100644
+index 3501fd901..a28f456d3 100644
 --- a/src/bootstrap/bootstrap.py
 +++ b/src/bootstrap/bootstrap.py
-@@ -320,9 +320,11 @@ def default_build_triple(verbose):
+@@ -339,9 +339,11 @@ def default_build_triple(verbose):
          'i786': 'i686',
          'm68k': 'm68k',
          'powerpc': 'powerpc',
@@ -141,7 +173,7 @@ index bdcf0ea84..1e2ff8b8d 100644
  // ignore-amdgcn
  // ignore-sparc
 diff --git a/src/test/codegen/repr-transparent-aggregates-1.rs b/src/test/codegen/repr-transparent-aggregates-1.rs
-index 4ad3642c0..fca31c0c6 100644
+index 9d18c5f03..8e69d2afd 100644
 --- a/src/test/codegen/repr-transparent-aggregates-1.rs
 +++ b/src/test/codegen/repr-transparent-aggregates-1.rs
 @@ -6,6 +6,7 @@
@@ -238,10 +270,10 @@ index ad1b6e96b..122d59a57 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
-index bed509d77..8bc817897 100644
+index 215af347f..a1c7e4c6a 100644
 --- a/src/tools/compiletest/src/util.rs
 +++ b/src/tools/compiletest/src/util.rs
-@@ -70,6 +70,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
+@@ -71,6 +71,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
      ("msp430", "msp430"),
      ("nvptx64", "nvptx64"),
      ("powerpc", "powerpc"),
@@ -342,3 +374,6 @@ index 4a9397331..4cf47c05d 100644
  )))]
  const ALIGNOF_MAX_ALIGN_T: usize = 8;
  #[cfg(all(any(
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch b/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
deleted file mode 100644
index d9a7ae68b6e0..000000000000
--- a/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From beb4e16f055aa7925194fd2c360105a6d55f10f6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Lo=C3=AFc=20BRANSTETT?= <lolo.branstett@numericable.fr>
-Date: Wed, 27 Apr 2022 19:11:56 +0200
-Subject: [PATCH] Add missing `target_feature` to the list of well known cfg
- names
-
----
- compiler/rustc_session/src/config.rs | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
-index 12c5c4445d46f..330201dd8fef6 100644
---- a/compiler/rustc_session/src/config.rs
-+++ b/compiler/rustc_session/src/config.rs
-@@ -1038,6 +1038,7 @@ impl CrateCheckConfig {
-             sym::target_has_atomic_load_store,
-             sym::target_has_atomic,
-             sym::target_has_atomic_equal_alignment,
-+            sym::target_feature,
-             sym::panic,
-             sym::sanitize,
-             sym::debug_assertions,
-@@ -1081,6 +1082,10 @@ impl CrateCheckConfig {
-             .into_iter()
-             .map(|sanitizer| Symbol::intern(sanitizer.as_str().unwrap()));
- 
-+        // Unknown possible values:
-+        //  - `feature`
-+        //  - `target_feature`
-+
-         // No-values
-         for name in [
-             sym::doc,
diff --git a/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch b/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch
deleted file mode 100644
index fe0377dbc381..000000000000
--- a/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/library/std/src/sys/unix/mod.rs
-+++ b/library/std/src/sys/unix/mod.rs
-@@ -212,6 +212,10 @@ cfg_if::cfg_if! {
-         #[link(name = "log")]
-         #[link(name = "gcc")]
-         extern "C" {}
-+    } else if #[cfg(all(target_os = "linux", target_env = "musl"))] {
-+	#[link(name = "ssp_nonshared")]
-+  #[link(name = "execinfo")]
-+	extern "C" {}
-     } else if #[cfg(target_os = "freebsd")] {
-         #[link(name = "execinfo")]
-         #[link(name = "pthread")]
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index da3ca779e7c6..be79d82b0840 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -8,7 +8,7 @@
 # uploaded to https://repo-default.voidlinux.org/distfiles/
 #
 pkgname=rust
-version=1.61.0
+version=1.63.0
 revision=1
 wrksrc="rustc-${version}-src"
 hostmakedepends="cmake curl pkg-config python3 tar cargo-bootstrap"
@@ -19,7 +19,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://www.rust-lang.org/"
 distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
-checksum=ad0b4351675aa9abdf4c7e066613bd274c4391c5506db152983426376101daed
+checksum=1f9580295642ef5da7e475a8da2397d65153d3f2cb92849dbd08ed0effca99d0
 lib32disabled=yes
 make_check=no # CBA for now
 

From ce1c3c80d58a55e0e3cfd20a8a03a3ea92a1f595 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:35 +0200
Subject: [PATCH 4/4] cargo: update to 1.63.0.

---
 srcpkgs/cargo/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index e3c30f625acd..9f653c39fd43 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo'
 pkgname=cargo
-version=1.61.0
+version=1.63.0
 revision=1
 wrksrc="cargo-rust-${version}"
 build_helper=rust
@@ -13,7 +13,7 @@ license="MIT, Apache-2.0"
 homepage="https://crates.io/"
 distfiles="https://github.com/rust-lang/cargo/archive/rust-${version}.tar.gz
  https://github.com/crossbeam-rs/crossbeam/archive/refs/tags/crossbeam-utils-0.8.8.tar.gz"
-checksum="6261b51441f50abe08a2992a349b22a2385846bfc9cb288ae9a3a609b904099e
+checksum="b1f50e4957a0453c1513cabe98c7fd94e715cd0ca70138b1945cef338e1abf35
  52c451910203cd9002cc4b85cff95f45c6ba245392801e80d7898ca5c3c3ab29"
 replaces="cargo-tree>=0"
 

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
  2022-08-14  0:48 ` [PR PATCH] [Updated] " jcgruenhage
@ 2022-08-14  0:51 ` jcgruenhage
  2022-08-14  9:00 ` jcgruenhage
                   ` (21 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jcgruenhage @ 2022-08-14  0:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 234 bytes --]

New comment by jcgruenhage on void-packages repository

https://github.com/void-linux/void-packages/pull/38662#issuecomment-1214258574

Comment:
@q66 Could You generate the various ppc distfiles for rust and cargo for the new update?

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
  2022-08-14  0:48 ` [PR PATCH] [Updated] " jcgruenhage
  2022-08-14  0:51 ` jcgruenhage
@ 2022-08-14  9:00 ` jcgruenhage
  2022-08-14  9:32 ` [PR PATCH] [Updated] " jcgruenhage
                   ` (20 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jcgruenhage @ 2022-08-14  9:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 274 bytes --]

New comment by jcgruenhage on void-packages repository

https://github.com/void-linux/void-packages/pull/38662#issuecomment-1214258574

Comment:
<del>@q66 Could You generate the various ppc distfiles for rust and cargo for the new update?</del> I'll crossbuild them myself.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PR PATCH] [Updated] Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
                   ` (2 preceding siblings ...)
  2022-08-14  9:00 ` jcgruenhage
@ 2022-08-14  9:32 ` jcgruenhage
  2022-08-14  9:33 ` jcgruenhage
                   ` (19 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jcgruenhage @ 2022-08-14  9:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 814 bytes --]

There is an updated pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages rust-1.63
https://github.com/void-linux/void-packages/pull/38662

Update Rust toolchain to 1.63.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

[ci skip]

`cargo-crev` requires 1.62 at least, so I thought I'd gave updating Rust a go, and it worked out just fine tbh. The new `cargo-crev` release compiled fine on this toolchain and works properly.

#### Local build testing
- I built this PR locally for my native architecture, x86_64, with both glibc and musl


A patch file from https://github.com/void-linux/void-packages/pull/38662.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rust-1.63-38662.patch --]
[-- Type: text/x-diff, Size: 59356 bytes --]

From ebc1d198755759c68f865ed3e8a1283bebccd2e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:01 +0200
Subject: [PATCH 1/5] rust-bootstrap: update to 1.63.0.

---
 srcpkgs/rust-bootstrap/template | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/rust-bootstrap/template b/srcpkgs/rust-bootstrap/template
index 66d04d634638..a53516dd5958 100644
--- a/srcpkgs/rust-bootstrap/template
+++ b/srcpkgs/rust-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'rust-bootstrap'
 pkgname=rust-bootstrap
-version=1.61.0
+version=1.63.0
 revision=1
 create_wrksrc=yes
 short_desc="Rust programming language bootstrap toolchain"
@@ -29,23 +29,23 @@ distfiles="
 case "$XBPS_TARGET_MACHINE" in
 	i686)
 		checksum="
-		 8af0ec3eb470e7e28439fedf9ebdadf90df8c58da544cc643033e6fc0ccf0bea
-		 ab223fcec35183bc0fe630403537cd7dae55c403103df29b25077db4882cb88e"
+		 11d3729f0343a069e9e59531745170cb0b6ce68f73848699564ea0bbcbf2c02f
+		 3177d3a159b4fcd54bca93d09ff1a903689a64ed4037699de372e685d12d4335"
 		;;
 	x86_64)
 		checksum="
-		 21c4613f389ed130fbaaf88f1e984319f72b5fc10734569a5ba19e22ebb03abd
-		 270b07aa5f2de52255a117e1e587138d77375ce0d09a1d7fead085f29b3977e9"
+		 bdab9d9afa5c329c40f9ba568364815237fab8426477c12bfabad35ffc484ab5
+		 993c2c17bf76ac626bfb5b17bddce65fbdfc14f70d183f33773de0cd12df46d2"
 		;;
 	x86_64-musl)
 		checksum="
-		 89cb72cbc493cb5cd8e43830009b4a1a5bfd472246ae184157868c9b0607bf6c
-		 1f4f2e4c5dd0f9b0dac7c8888f4a49ef16a6fe8992f39895823d2a442f0fe408"
+		 b6566a9b1dafe03cf4a01b58b2db0e14a0044ae5773736827882bd549108277e
+		 6fcfa4f9a51d35bf2c5c92ac15c688baa8c98d9fded05ab6abfdae85cb5aed8c"
 		;;
 	ppc64le)
 		checksum="
-		 dc54893d747e4f3330515caa75e404f78c6c5475a1216d1428f5e7ce1c2e9602
-		 36c0ccff14c80419507561db050f9533f0abd43fc50f3ddb859c10df74b1c351"
+		 b3dc2c082e76b5effe0b158aac3831830168a1a6980b39347c355e49be63fcca
+		 3ae0b74ba428c569fcecebbb09060ad0bd434a5f1fc9ffd1329b56941a897b6e"
 		;;
 	ppc64le-musl)
 		checksum="
@@ -59,8 +59,8 @@ case "$XBPS_TARGET_MACHINE" in
 		;;
 	ppc)
 		checksum="
-		 f28a8c2986fce5015c67823e39ad4b53e2db06603b6ea4a1217ac961cbbfb073
-		 7d2f7f900c8c05616fba8e99ab041d847af3653c259b99445edd788acddf878c"
+		 7a99dd6a7f30b8a8f85d95f47fa77084a48c7ebc94092978daa3563268a4b15b
+		 a25719c0ad2a5e7f52eed87b75cb76c4a52b8dc6e24b4bef16ed7fb9133e5b42"
 		;;
 	*) broken="rust bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac

From 7294583183e9ae6dd393b7481facb813778c58c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:24 +0200
Subject: [PATCH 2/5] cargo-bootstrap: update to 1.63.0.

---
 srcpkgs/cargo-bootstrap/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/cargo-bootstrap/template b/srcpkgs/cargo-bootstrap/template
index 0fdaac840a3c..23793d85ea9a 100644
--- a/srcpkgs/cargo-bootstrap/template
+++ b/srcpkgs/cargo-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo-bootstrap'
 pkgname=cargo-bootstrap
-version=1.61.0
+version=1.63.0
 revision=1
 short_desc="Bootstrap binaries of Rust package manager"
 maintainer="q66 <daniel@octaforge.org>"
@@ -26,16 +26,16 @@ distfiles="${_bootstrap_url}/cargo-${version}-${RUST_TARGET}.tar.xz"
 
 case "$XBPS_TARGET_MACHINE" in
 	i686)
-		checksum="fe258b85ef0644ff08c2095e329399dd4de0e1b2e51f4f4e90cb956d40dc61de"
+		checksum="6f2c109fc38ed8ccadcdcccf51d11505651ca9e12c396ab46ac1dbb55265b792"
 		;;
 	x86_64)
-		checksum="9461727d754f865ef2a87479d40bbe4c5176f80963b7c50b7797bc8940d7a0a0"
+		checksum="f370d12e4c11f0c835becb738bcf00d363f29b76f8b424b4dcb005abcf15fc9a"
 		;;
 	x86_64-musl)
-		checksum="db4b4423c2843b6e27737664cf8085afcba670374110ca24b9c8d341045e748c"
+		checksum="6f6ce044832a2433c250f4f27a61f69081e2b0f7e4e1f141492c2ce99ee8511e"
 		;;
 	ppc64le)
-		checksum="09817011ff1ef4b7006387c7cabb6a059731792a9372533dec7d87e7f014444b"
+		checksum="a4cdc00a42fd767bf5a296f7126d9db22a0a609cd956bbf0cb3eae882add1be7"
 		;;
 	ppc64le-musl)
 		checksum="39215cba9b1bda63209cac0edbda583e0c822f88a50fdbf33255c8c5386e4868"

From 82d54e1d91e7b5897ff77a068b1f1ef0f6cf4eb6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:31 +0200
Subject: [PATCH 3/5] rust: update to 1.63.0.

---
 .../rust/patches/0001-Fix-LLVM-build.patch    |  8 +--
 ...lib-and-musl_root-from-musl-targets.patch} | 65 ++++++++++++-------
 ...e-debugger-scripts-to-usr-share-rust.patch | 10 +--
 ...4-fix-shebang-on-install-template.sh.patch |  6 +-
 ...fer-libgcc_eh-over-libunwind-on-musl.patch | 24 -------
 ...ot-install-libunwind-source-removed.patch} | 10 +--
 ...06-fix-rustdoc-when-cross-compiling.patch} | 25 +++----
 ...stage-2-tools-dynamically-to-libstd.patch} | 10 +--
 ...against-host-target-LLVM-in-cross-s.patch} | 16 ++++-
 .../0009-do-not-export-LD_LIBRARY_PATH.patch  | 29 +++++++++
 ...age-of-musl-libc-for-the-libc-crate.patch} | 14 ++--
 .../0010-do-not-export-LD_LIBRARY_PATH.patch  | 23 -------
 ...-ELFv2-ABI-on-all-powerpc64-targets.patch} | 22 +++----
 ...e-initial-exec-TLS-model-on-powerpc.patch} | 11 ++--
 ...g-native-sysroot-to-use-for-linkage.patch} | 40 ++++++++----
 ...-of-need-ssp_nonshared.patch-from-al.patch | 28 ++++++++
 ...le.patch => 0015-initial-ppcle-port.patch} | 55 +++++++++++++---
 ...e16f055aa7925194fd2c360105a6d55f10f6.patch | 33 ----------
 .../need-ssp-nonshared-and-execinfo.patch     | 13 ----
 srcpkgs/rust/template                         |  4 +-
 20 files changed, 248 insertions(+), 198 deletions(-)
 rename srcpkgs/rust/patches/{0001-musl-void-setup.patch => 0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch} (89%)
 delete mode 100644 srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
 rename srcpkgs/rust/patches/{0006-do-not-install-libunwind-source-removed.patch => 0005-do-not-install-libunwind-source-removed.patch} (73%)
 rename srcpkgs/rust/patches/{0007-fix-rustdoc-when-cross-compiling.patch => 0006-fix-rustdoc-when-cross-compiling.patch} (67%)
 rename srcpkgs/rust/patches/{0008-link-stage-2-tools-dynamically-to-libstd.patch => 0007-link-stage-2-tools-dynamically-to-libstd.patch} (78%)
 rename srcpkgs/rust/patches/{0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch => 0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch} (71%)
 create mode 100644 srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
 rename srcpkgs/rust/patches/{0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch => 0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch} (74%)
 delete mode 100644 srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
 rename srcpkgs/rust/patches/{0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch => 0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch} (74%)
 rename srcpkgs/rust/patches/{fix-ppc32.patch => 0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch} (78%)
 rename srcpkgs/rust/patches/{native-sysroot.patch => 0013-allow-specifying-native-sysroot-to-use-for-linkage.patch} (69%)
 create mode 100644 srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
 rename srcpkgs/rust/patches/{xxx-ppcle.patch => 0015-initial-ppcle-port.patch} (85%)
 delete mode 100644 srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
 delete mode 100644 srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch

diff --git a/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch b/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
index 0da829af1da9..6cf9c3a755a9 100644
--- a/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
+++ b/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
@@ -1,4 +1,4 @@
-From 4443eca0d6b3ba599832b2f73a5350fdd0c90d10 Mon Sep 17 00:00:00 2001
+From 99a046adc7d1c7b2da3a31e077722ea69f84eeb6 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/15] Fix LLVM build
@@ -8,10 +8,10 @@ Subject: [PATCH 01/15] Fix LLVM build
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index a476d25f..c7e63990 100644
+index 4ac857b47..b603ae90a 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -768,7 +768,8 @@ impl Build {
+@@ -1050,7 +1050,8 @@ impl Build {
              .args()
              .iter()
              .map(|s| s.to_string_lossy().into_owned())
@@ -22,5 +22,5 @@ index a476d25f..c7e63990 100644
  
          // If we're compiling on macOS then we add a few unconditional flags
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0001-musl-void-setup.patch b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
similarity index 89%
rename from srcpkgs/rust/patches/0001-musl-void-setup.patch
rename to srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
index c13cb1730986..c156945b8111 100644
--- a/srcpkgs/rust/patches/0001-musl-void-setup.patch
+++ b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
@@ -1,5 +1,23 @@
+From 7219ba1c9accbad9b530d312fd9a9f69330c93da Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 3 May 2020 17:53:33 +0200
+Subject: [PATCH 02/15] Remove -nostdlib and musl_root from musl targets
+
+extended by various void contributors to match our musl setup
+---
+ compiler/rustc_target/src/spec/crt_objects.rs | 22 ----------
+ .../rustc_target/src/spec/linux_musl_base.rs  |  7 ---
+ config.toml.example                           |  8 ----
+ src/bootstrap/cc_detect.rs                    | 25 +----------
+ src/bootstrap/compile.rs                      | 43 +------------------
+ src/bootstrap/config.rs                       |  9 ----
+ src/bootstrap/configure.py                    | 28 ------------
+ src/bootstrap/lib.rs                          | 19 --------
+ src/bootstrap/sanity.rs                       | 23 ----------
+ 9 files changed, 3 insertions(+), 181 deletions(-)
+
 diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
-index 51f392a6..62560658 100644
+index 52ac3622e..f35e5b9d8 100644
 --- a/compiler/rustc_target/src/spec/crt_objects.rs
 +++ b/compiler/rustc_target/src/spec/crt_objects.rs
 @@ -63,28 +63,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects {
@@ -32,7 +50,7 @@ index 51f392a6..62560658 100644
      new(&[
          (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
 diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs
-index 207a87ab..88f807a5 100644
+index 207a87ab0..88f807a58 100644
 --- a/compiler/rustc_target/src/spec/linux_musl_base.rs
 +++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
 @@ -1,16 +1,9 @@
@@ -53,10 +71,10 @@ index 207a87ab..88f807a5 100644
      base
  }
 diff --git a/config.toml.example b/config.toml.example
-index 6e53d9b4..74980d2c 100644
+index b3284050f..62ac07f87 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -511,14 +511,6 @@ changelog-seen = 2
+@@ -523,14 +523,6 @@ changelog-seen = 2
  # supplementary build information, like distro-specific package versions.
  #description = <none> (string)
  
@@ -72,7 +90,7 @@ index 6e53d9b4..74980d2c 100644
  # 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
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index 7ce44687..4e7507ae 100644
+index dca782c29..8eb35ea43 100644
 --- a/src/bootstrap/cc_detect.rs
 +++ b/src/bootstrap/cc_detect.rs
 @@ -97,7 +97,7 @@ pub fn find(build: &mut Build) {
@@ -93,7 +111,7 @@ index 7ce44687..4e7507ae 100644
              true
          } else {
              // Use an auto-detected compiler (or one configured via `CXX_target_triple` env vars).
-@@ -157,7 +157,6 @@ fn set_compiler(
+@@ -161,7 +161,6 @@ fn set_compiler(
      compiler: Language,
      target: TargetSelection,
      config: Option<&Target>,
@@ -101,7 +119,7 @@ index 7ce44687..4e7507ae 100644
  ) {
      match &*target.triple {
          // When compiling for android we may have the NDK configured in the
-@@ -200,26 +199,6 @@ fn set_compiler(
+@@ -204,26 +203,6 @@ fn set_compiler(
              }
          }
  
@@ -129,10 +147,10 @@ index 7ce44687..4e7507ae 100644
      }
  }
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index afc333b5..9d67ab56 100644
+index b4807d1ab..ce483bf6b 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -197,39 +197,7 @@ fn copy_self_contained_objects(
+@@ -200,39 +200,7 @@ fn copy_self_contained_objects(
      let mut target_deps = vec![];
  
      // Copies the libc and CRT objects.
@@ -173,7 +191,7 @@ index afc333b5..9d67ab56 100644
          let srcdir = builder
              .wasi_root(target)
              .unwrap_or_else(|| {
-@@ -313,15 +281,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+@@ -316,15 +284,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
              .arg("--manifest-path")
              .arg(builder.src.join("library/test/Cargo.toml"));
  
@@ -190,10 +208,10 @@ index afc333b5..9d67ab56 100644
              if let Some(p) = builder.wasi_root(target) {
                  let root = format!("native={}/lib/wasm32-wasi", p.to_str().unwrap());
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 9534cc5f..642a5c24 100644
+index 146077419..18a764689 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -172,7 +172,6 @@ pub struct Config {
+@@ -186,7 +186,6 @@ pub struct Config {
      pub missing_tools: bool,
  
      // Fallback musl-root for all targets
@@ -201,7 +219,7 @@ index 9534cc5f..642a5c24 100644
      pub prefix: Option<PathBuf>,
      pub sysconfdir: Option<PathBuf>,
      pub datadir: Option<PathBuf>,
-@@ -299,8 +298,6 @@ pub struct Target {
+@@ -400,8 +399,6 @@ pub struct Target {
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
      pub crt_static: Option<bool>,
@@ -210,7 +228,7 @@ index 9534cc5f..642a5c24 100644
      pub wasi_root: Option<PathBuf>,
      pub qemu_rootfs: Option<PathBuf>,
      pub no_std: bool,
-@@ -587,7 +584,6 @@ struct Rust {
+@@ -689,7 +686,6 @@ define_config! {
          default_linker: Option<String> = "default-linker",
          channel: Option<String> = "channel",
          description: Option<String> = "description",
@@ -218,7 +236,7 @@ index 9534cc5f..642a5c24 100644
          rpath: Option<bool> = "rpath",
          verbose_tests: Option<bool> = "verbose-tests",
          optimize_tests: Option<bool> = "optimize-tests",
-@@ -631,8 +627,6 @@ struct TomlTarget {
+@@ -734,8 +730,6 @@ define_config! {
          sanitizers: Option<bool> = "sanitizers",
          profiler: Option<bool> = "profiler",
          crt_static: Option<bool> = "crt-static",
@@ -227,7 +245,7 @@ index 9534cc5f..642a5c24 100644
          wasi_root: Option<String> = "wasi-root",
          qemu_rootfs: Option<String> = "qemu-rootfs",
          no_std: Option<bool> = "no-std",
-@@ -1013,7 +1007,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1107,7 +1101,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;
@@ -235,7 +253,7 @@ index 9534cc5f..642a5c24 100644
              config.save_toolstates = rust.save_toolstates.map(PathBuf::from);
              set(&mut config.deny_warnings, flags.deny_warnings.or(rust.deny_warnings));
              set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
-@@ -1059,8 +1052,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1164,8 +1157,6 @@ impl Config {
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
                  target.crt_static = cfg.crt_static;
@@ -245,7 +263,7 @@ index 9534cc5f..642a5c24 100644
                  target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
                  target.sanitizers = cfg.sanitizers;
 diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
-index 87a130a0..bd4c9197 100755
+index 2fc036082..91737e0ea 100755
 --- a/src/bootstrap/configure.py
 +++ b/src/bootstrap/configure.py
 @@ -114,34 +114,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
@@ -284,10 +302,10 @@ index 87a130a0..bd4c9197 100755
    "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 570a6174..f3d5f308 100644
+index b603ae90a..0a7012dbd 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1125,25 +1125,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1153,25 +1153,6 @@ impl Build {
          }
      }
  
@@ -314,7 +332,7 @@ index 570a6174..f3d5f308 100644
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
          self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
 diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index 8c2899c1..dda15d76 100644
+index 64c5dd7ae..b8f9104ea 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
 @@ -11,7 +11,6 @@
@@ -325,7 +343,7 @@ index 8c2899c1..dda15d76 100644
  use std::path::PathBuf;
  use std::process::Command;
  
-@@ -177,28 +176,6 @@ pub fn check(build: &mut Build) {
+@@ -190,28 +189,6 @@ than building it.
              }
          }
  
@@ -354,3 +372,6 @@ index 8c2899c1..dda15d76 100644
          if need_cmake && target.contains("msvc") {
              // There are three builds of cmake on windows: MSVC, MinGW, and
              // Cygwin. The Cygwin build does not have generators for Visual
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch b/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
index 3c4e1cb96475..bc7053800945 100644
--- a/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
+++ b/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
@@ -1,7 +1,7 @@
-From f9a680688a685ec47ee5ec001574d9b91b4ba35e Mon Sep 17 00:00:00 2001
+From 8938b002edbec432be46de7b6f1b9d0a6912873a Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 00:45:35 +0100
-Subject: [PATCH 3/9] move debugger scripts to /usr/share/rust
+Subject: [PATCH 03/15] move debugger scripts to /usr/share/rust
 
 ---
  src/bootstrap/dist.rs | 2 +-
@@ -11,10 +11,10 @@ Subject: [PATCH 3/9] move debugger scripts to /usr/share/rust
  4 files changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index d4875cfe1..e8b61b8a2 100644
+index b1fae356d..e7a077134 100644
 --- a/src/bootstrap/dist.rs
 +++ b/src/bootstrap/dist.rs
-@@ -499,7 +499,7 @@ impl Step for DebuggerScripts {
+@@ -460,7 +460,7 @@ impl Step for DebuggerScripts {
      fn run(self, builder: &Builder<'_>) {
          let host = self.host;
          let sysroot = self.sysroot;
@@ -65,5 +65,5 @@ index bce72f1ba..8abb01245 100755
  # Call LLDB with the commands added to the argument list
  exec "$lldb" --one-line-before-file "$script_import" --source-before-file "$commands_file" "$@"
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch b/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
index 2e9cd93fdfb9..2ca7ffeaf73f 100644
--- a/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
+++ b/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
@@ -1,7 +1,7 @@
-From d5a6a431024790c911d04fd54381c515fb05819e Mon Sep 17 00:00:00 2001
+From d7d7fc24d1744a3db70a9fb010c31daa14a46df7 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 00:55:18 +0100
-Subject: [PATCH 4/9] fix shebang on install-template.sh
+Subject: [PATCH 04/15] fix shebang on install-template.sh
 
 ---
  src/tools/rust-installer/install-template.sh | 2 +-
@@ -18,5 +18,5 @@ index e68be8911..beaa90f7b 100644
  # file at the top-level directory of this distribution and at
  # http://rust-lang.org/COPYRIGHT.
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch b/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
deleted file mode 100644
index 30cb66fc24b1..000000000000
--- a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Additions for build.rs by q66, necessary for our musl setup.
-
-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/library/unwind/src/lib.rs
-+++ b/library/unwind/src/lib.rs
-@@ -51,7 +51,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", cfg(target_feature = "crt-static"))]
-         #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
-         extern "C" {}
-     }
diff --git a/srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch b/srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
similarity index 73%
rename from srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch
rename to srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
index 0128b8fc61f2..92e0021ab6f4 100644
--- a/srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch
+++ b/srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
@@ -1,17 +1,17 @@
-From fc69414484327e4dbff138dd0834fc3bde626008 Mon Sep 17 00:00:00 2001
+From 1335a445327a6605c5f933d9647b97e771089abd Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:44:54 +0100
-Subject: [PATCH 6/9] do not install libunwind source (removed)
+Subject: [PATCH 05/15] do not install libunwind source (removed)
 
 ---
  src/bootstrap/dist.rs | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index e8b61b8a2..02d24a77d 100644
+index e7a077134..74e75df4b 100644
 --- a/src/bootstrap/dist.rs
 +++ b/src/bootstrap/dist.rs
-@@ -849,7 +849,7 @@ impl Step for Src {
+@@ -804,7 +804,7 @@ impl Step for Src {
          copy_src_dirs(
              builder,
              &builder.src,
@@ -21,5 +21,5 @@ index e8b61b8a2..02d24a77d 100644
                  // not needed and contains symlinks which rustup currently
                  // chokes on when unpacking.
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch b/srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
similarity index 67%
rename from srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
rename to srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
index 2cc1f6b900d3..88eaf65de8b7 100644
--- a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
+++ b/srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
@@ -1,17 +1,17 @@
-From 81ba387384e8ce0aa9bb9b4bd76014d922d85de8 Mon Sep 17 00:00:00 2001
+From 50075907c3dd2f06d471b3375d7c0ee850263eb2 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:48:14 +0100
-Subject: [PATCH 7/9] fix rustdoc when cross-compiling
+Subject: [PATCH 06/15] fix rustdoc when cross-compiling
 
 ---
  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 e4396d530..cb2312028 100644
+index 5f85fc5aa..01e81fc39 100644
 --- a/src/bootstrap/bin/rustdoc.rs
 +++ b/src/bootstrap/bin/rustdoc.rs
-@@ -22,14 +22,11 @@ fn main() {
+@@ -26,9 +26,6 @@ fn main() {
          Err(_) => 0,
      };
  
@@ -19,15 +19,18 @@ index e4396d530..cb2312028 100644
 -    dylib_path.insert(0, PathBuf::from(libdir.clone()));
 -
      let mut cmd = Command::new(rustdoc);
-     cmd.args(&args)
-         .arg("--sysroot")
-         .arg(&sysroot)
--        .env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
-+        .env(dylib_path_var(), PathBuf::from(libdir.clone()));
+ 
+     // cfg(bootstrap)
+@@ -43,7 +40,7 @@ fn main() {
+     }
+ 
+     cmd.args(&args);
+-    cmd.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
++    cmd.env(dylib_path_var(), PathBuf::from(libdir.clone()));
  
      // Force all crates compiled by this compiler to (a) be unstable and (b)
      // allow the `rustc_private` feature to link to other unstable crates
-@@ -62,7 +59,7 @@ fn main() {
+@@ -69,7 +66,7 @@ fn main() {
          eprintln!(
              "rustdoc command: {:?}={:?} {:?}",
              dylib_path_var(),
@@ -37,5 +40,5 @@ index e4396d530..cb2312028 100644
          );
          eprintln!("sysroot: {:?}", sysroot);
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch b/srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
similarity index 78%
rename from srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch
rename to srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
index f6793d8a3202..198e4fcc7a6a 100644
--- a/srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch
+++ b/srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
@@ -1,7 +1,7 @@
-From 1c4a66621a5fa34c78fc020084e4166f3af7cbb5 Mon Sep 17 00:00:00 2001
+From c2de45cbdaee1a8c81b2d65f6bced1439a738e00 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:48:49 +0100
-Subject: [PATCH 8/9] link stage 2 tools dynamically to libstd
+Subject: [PATCH 07/15] link stage 2 tools dynamically to libstd
 
 stage 2 tools are the ones that are distributed, and we distribute
 them together with the rust libs so there is no need to worry
@@ -11,10 +11,10 @@ about unstable ABI
  1 file changed, 2 insertions(+)
 
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index 6750f7a54..de771280e 100644
+index 62b5416ce..554dd4188 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1520,6 +1520,8 @@ impl<'a> Builder<'a> {
+@@ -2066,6 +2066,8 @@ impl<'a> Builder<'a> {
          // linking all deps statically into the dylib.
          if matches!(mode, Mode::Std | Mode::Rustc) {
              rustflags.arg("-Cprefer-dynamic");
@@ -24,5 +24,5 @@ index 6750f7a54..de771280e 100644
  
          // When building incrementally we default to a lower ThinLTO import limit
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch b/srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
similarity index 71%
rename from srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch
rename to srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
index 3b2e388c014e..3edba737f923 100644
--- a/srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch
+++ b/srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
@@ -1,8 +1,18 @@
+From f229c2bbd32deab98978d8453d0f44f23849fa09 Mon Sep 17 00:00:00 2001
+From: q66 <daniel@octaforge.org>
+Date: Sun, 3 May 2020 18:05:22 +0200
+Subject: [PATCH 08/15] Void: fix linkage against host/target LLVM in cross
+ setups
+
+---
+ compiler/rustc_llvm/build.rs | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
 diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs
-index 36a6d2cc3..af4e1219f 100644
+index 7729ec6be..66b8a4215 100644
 --- a/compiler/rustc_llvm/build.rs
 +++ b/compiler/rustc_llvm/build.rs
-@@ -230,9 +230,11 @@ fn main() {
+@@ -291,9 +291,11 @@ fn main() {
      for lib in output(&mut cmd).split_whitespace() {
          if is_crossed {
              if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
@@ -17,5 +27,5 @@ index 36a6d2cc3..af4e1219f 100644
          } else if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
              println!("cargo:rustc-link-search=native={}", stripped);
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch b/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
new file mode 100644
index 000000000000..f66766270a12
--- /dev/null
+++ b/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
@@ -0,0 +1,29 @@
+From 5e9e5fa2b2aefefbdc00547d7f10ee92d9b3356a Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Tue, 21 Dec 2021 00:48:29 +0100
+Subject: [PATCH 09/15] do not export LD_LIBRARY_PATH
+
+---
+ src/bootstrap/bootstrap.py | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
+index 40d478a17..3501fd901 100644
+--- a/src/bootstrap/bootstrap.py
++++ b/src/bootstrap/bootstrap.py
+@@ -756,12 +756,6 @@ class RustBuild(object):
+             del env["CARGO_BUILD_TARGET"]
+         env["CARGO_TARGET_DIR"] = build_dir
+         env["RUSTC"] = self.rustc()
+-        env["LD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+-            (os.pathsep + env["LD_LIBRARY_PATH"]) \
+-            if "LD_LIBRARY_PATH" in env else ""
+-        env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+-            (os.pathsep + env["DYLD_LIBRARY_PATH"]) \
+-            if "DYLD_LIBRARY_PATH" in env else ""
+         env["LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+             (os.pathsep + env["LIBRARY_PATH"]) \
+             if "LIBRARY_PATH" in env else ""
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch b/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
similarity index 74%
rename from srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
rename to srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
index 8a18e414e209..0f679a486f38 100644
--- a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
+++ b/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
@@ -1,18 +1,17 @@
-From e363a0e0ff7ffc8bd83f72ec1a20d289996b6370 Mon Sep 17 00:00:00 2001
+From 2596eaf95d538ca586de342d6dbc21c7e2820768 Mon Sep 17 00:00:00 2001
 From: q66 <daniel@octaforge.org>
 Date: Sun, 3 May 2020 18:02:03 +0200
-Subject: [PATCH 12/15] Fix dynamic linkage of musl libc for the libc crate
+Subject: [PATCH 10/15] Fix dynamic linkage of musl libc for the libc crate
 
 ---
- vendor/libc/src/lib.rs      | 1 +
  vendor/libc/src/unix/mod.rs | 6 +++---
- 2 files changed, 4 insertions(+), 3 deletions(-)
+ 1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs
-index 238da24b..ffb05ee7 100644
+index ecee44411..c254a2f01 100644
 --- a/vendor/libc/src/unix/mod.rs
 +++ b/vendor/libc/src/unix/mod.rs
-@@ -329,11 +329,11 @@ cfg_if! {
+@@ -337,11 +337,11 @@ cfg_if! {
          #[link(name = "c", cfg(not(target_feature = "crt-static")))]
          extern {}
      } else if #[cfg(target_env = "musl")] {
@@ -27,7 +26,6 @@ index 238da24b..ffb05ee7 100644
          extern {}
      } else if #[cfg(target_os = "emscripten")] {
          #[link(name = "c")]
-index 0b1496af..7f7e85a7 100644
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch b/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
deleted file mode 100644
index d7714d5ee4fd..000000000000
--- a/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-commit 798e44e67c0bac6509b7915767450b0381c94017
-Author: Daniel Kolesa <daniel@octaforge.org>
-Date:   Tue Dec 21 00:48:29 2021 +0100
-
-    do not export LD_LIBRARY_PATH
-
-diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 0170be967..f7a9ec785 100644
---- a/src/bootstrap/bootstrap.py
-+++ b/src/bootstrap/bootstrap.py
-@@ -924,12 +924,6 @@ class RustBuild(object):
-             del env["CARGO_BUILD_TARGET"]
-         env["CARGO_TARGET_DIR"] = build_dir
-         env["RUSTC"] = self.rustc(True)
--        env["LD_LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
--            (os.pathsep + env["LD_LIBRARY_PATH"]) \
--            if "LD_LIBRARY_PATH" in env else ""
--        env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
--            (os.pathsep + env["DYLD_LIBRARY_PATH"]) \
--            if "DYLD_LIBRARY_PATH" in env else ""
-         env["LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
-             (os.pathsep + env["LIBRARY_PATH"]) \
-             if "LIBRARY_PATH" in env else ""
diff --git a/srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
similarity index 74%
rename from srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
rename to srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
index 3f3bd3212bb9..fec6bfce00db 100644
--- a/srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
+++ b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
@@ -1,24 +1,24 @@
-From c6b54a373e74a1e4ce64f349b5b69105f2bc1a49 Mon Sep 17 00:00:00 2001
+From 5df5ca7c068e516ea4fdaab507d850f98d38d924 Mon Sep 17 00:00:00 2001
 From: q66 <daniel@octaforge.org>
 Date: Sun, 3 May 2020 18:08:09 +0200
-Subject: [PATCH 15/15] Use ELFv2 ABI on all powerpc64 targets
+Subject: [PATCH 11/15] Use ELFv2 ABI on all powerpc64 targets
 
 This patches librustc_target so that ELFv2 is used everywhere, matching our
 LLVM. While this is not perfect (it does not allow rustc to compile legacy
 binaries), rustc never requests specific ABI from llvm in the first place,
 so at least match the environment we have.
 ---
- src/librustc_target/abi/call/powerpc64.rs               | 9 +--------
- src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs | 6 +-----
+ compiler/rustc_target/src/abi/call/powerpc64.rs          | 9 +--------
+ .../rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs | 6 +-----
  2 files changed, 2 insertions(+), 13 deletions(-)
 
 diff --git a/compiler/rustc_target/src/abi/call/powerpc64.rs b/compiler/rustc_target/src/abi/call/powerpc64.rs
-index 8c2a9d09a..2dcbf2c09 100644
+index c22ef9c8f..932172b2f 100644
 --- a/compiler/rustc_target/src/abi/call/powerpc64.rs
 +++ b/compiler/rustc_target/src/abi/call/powerpc64.rs
 @@ -119,14 +119,7 @@ where
-     Ty: TyAndLayoutMethods<'a, C> + Copy,
-     C: LayoutOf<Ty = Ty, TyAndLayout = TyAndLayout<'a, Ty>> + HasDataLayout + HasTargetSpec,
+     Ty: TyAbiInterface<'a, C> + Copy,
+     C: HasDataLayout + HasTargetSpec,
  {
 -    let abi = if cx.target_spec().env == "musl" {
 -        ELFv2
@@ -33,7 +33,7 @@ index 8c2a9d09a..2dcbf2c09 100644
      if !fn_abi.ret.is_ignore() {
          classify_ret(cx, &mut fn_abi.ret, abi);
 diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
-index 751022c12..c4d55a62e 100644
+index 24d5d187e..aa594b02e 100644
 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
 +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
 @@ -1,5 +1,5 @@
@@ -44,7 +44,7 @@ index 751022c12..c4d55a62e 100644
  pub fn target() -> Target {
      let mut base = super::linux_gnu_base::opts();
 @@ -7,10 +7,6 @@ pub fn target() -> Target {
-     base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
+     base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m64".into());
      base.max_atomic_width = Some(64);
  
 -    // ld.so in at least RHEL6 on ppc64 has a bug related to BIND_NOW, so only enable partial RELRO
@@ -52,8 +52,8 @@ index 751022c12..c4d55a62e 100644
 -    base.relro_level = RelroLevel::Partial;
 -
      Target {
-         llvm_target: "powerpc64-unknown-linux-gnu".to_string(),
+         llvm_target: "powerpc64-unknown-linux-gnu".into(),
          pointer_width: 64,
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/fix-ppc32.patch b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
similarity index 78%
rename from srcpkgs/rust/patches/fix-ppc32.patch
rename to srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
index 739ce4bce7f0..18307b53553e 100644
--- a/srcpkgs/rust/patches/fix-ppc32.patch
+++ b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
@@ -1,7 +1,7 @@
-From 283619cf5ca25272b294525273ec42e9c7820edb Mon Sep 17 00:00:00 2001
+From e8f06c15e1073da598d0592254dd082f0a49a219 Mon Sep 17 00:00:00 2001
 From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
 Date: Sat, 29 May 2021 12:38:46 +0000
-Subject: [PATCH] bootstrap: Disable initial-exec TLS model on powerpc
+Subject: [PATCH 12/15] bootstrap: Disable initial-exec TLS model on powerpc
 
 Fixes #81334.
 ---
@@ -9,10 +9,10 @@ Fixes #81334.
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index 6750f7a549d..6032a685776 100644
+index 554dd4188..6a02a225c 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1299,7 +1299,7 @@ pub fn cargo(
+@@ -1844,7 +1844,7 @@ impl<'a> Builder<'a> {
          // efficient initial-exec TLS model. This doesn't work with `dlopen`,
          // so we can't use it by default in general, but we can use it for tools
          // and our own internal libraries.
@@ -21,3 +21,6 @@ index 6750f7a549d..6032a685776 100644
              rustflags.arg("-Ztls-model=initial-exec");
          }
  
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/native-sysroot.patch b/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
similarity index 69%
rename from srcpkgs/rust/patches/native-sysroot.patch
rename to srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
index 6826b114b6b7..e6be77e7b409 100644
--- a/srcpkgs/rust/patches/native-sysroot.patch
+++ b/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
@@ -1,8 +1,21 @@
+From 12091237bd215901a9977085bc07178362b5655c Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Tue, 21 Dec 2021 02:46:30 +0100
+Subject: [PATCH 13/15] allow specifying native sysroot to use for linkage
+
+This allows us to get around the linker attempting to use
+incompatible libs.
+---
+ src/bootstrap/builder.rs | 4 ++++
+ src/bootstrap/config.rs  | 3 +++
+ src/bootstrap/lib.rs     | 4 ++++
+ 3 files changed, 11 insertions(+)
+
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index e816f9b4..a2668fa9 100644
+index 6a02a225c..483aa8818 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1313,6 +1313,10 @@ pub fn cargo(
+@@ -1708,6 +1708,10 @@ impl<'a> Builder<'a> {
              }
          }
  
@@ -14,10 +27,10 @@ index e816f9b4..a2668fa9 100644
              cargo.env("RUSTC_HOST_LINKER", host_linker);
          }
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 642a5c24..0dd4f879 100644
+index 18a764689..f8b9bbd96 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -294,6 +294,7 @@ pub struct Target {
+@@ -395,6 +395,7 @@ pub struct Target {
      pub ranlib: Option<PathBuf>,
      pub default_linker: Option<PathBuf>,
      pub linker: Option<PathBuf>,
@@ -25,15 +38,15 @@ index 642a5c24..0dd4f879 100644
      pub ndk: Option<PathBuf>,
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
-@@ -621,6 +622,7 @@ struct TomlTarget {
+@@ -723,6 +724,7 @@ define_config! {
          ranlib: Option<String> = "ranlib",
          default_linker: Option<PathBuf> = "default-linker",
          linker: Option<String> = "linker",
 +        sysroot: Option<String> = "sysroot",
          llvm_config: Option<String> = "llvm-config",
          llvm_filecheck: Option<String> = "llvm-filecheck",
-         android_ndk: Option<String> = "android-ndk",
-@@ -1051,6 +1053,7 @@ pub fn parse(args: &[String]) -> Config {
+         llvm_libunwind: Option<String> = "llvm-libunwind",
+@@ -1156,6 +1158,7 @@ impl Config {
                  target.ar = cfg.ar.map(PathBuf::from);
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
@@ -42,17 +55,20 @@ index 642a5c24..0dd4f879 100644
                  target.wasi_root = cfg.wasi_root.map(PathBuf::from);
                  target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
 diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index f3d5f308..7f8b9b27 100644
+index 0a7012dbd..cded50d20 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1125,6 +1125,10 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1152,6 +1152,10 @@ impl Build {
+             self.config.target_config.get(&target).and_then(|t| t.crt_static)
          }
      }
- 
++    
 +    fn native_sysroot(&self, target: TargetSelection) -> Option<&Path> {
 +        self.config.target_config.get(&target).and_then(|c| c.sysroot.as_ref()).map(|p| &**p)
 +    }
-+
+ 
      /// Returns the sysroot for the wasi target, if defined
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
-         self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch b/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
new file mode 100644
index 000000000000..36c090fde1ac
--- /dev/null
+++ b/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
@@ -0,0 +1,28 @@
+From 8424aa370a366929d4870fd1eafb2659ae075ea4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
+Date: Fri, 16 Apr 2021 03:34:16 -0300
+Subject: [PATCH 14/15] copy new version of need-ssp_nonshared.patch from
+ alpine
+
+---
+ library/std/src/sys/unix/mod.rs | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/library/std/src/sys/unix/mod.rs b/library/std/src/sys/unix/mod.rs
+index 34a023b02..934a87570 100644
+--- a/library/std/src/sys/unix/mod.rs
++++ b/library/std/src/sys/unix/mod.rs
+@@ -297,6 +297,10 @@ cfg_if::cfg_if! {
+         #[link(name = "dl")]
+         #[link(name = "log")]
+         extern "C" {}
++    } else if #[cfg(all(target_os = "linux", target_env = "musl"))] {
++	    #[link(name = "ssp_nonshared")]
++        #[link(name = "execinfo")]
++	    extern "C" {}
+     } else if #[cfg(target_os = "freebsd")] {
+         #[link(name = "execinfo")]
+         #[link(name = "pthread")]
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/xxx-ppcle.patch b/srcpkgs/rust/patches/0015-initial-ppcle-port.patch
similarity index 85%
rename from srcpkgs/rust/patches/xxx-ppcle.patch
rename to srcpkgs/rust/patches/0015-initial-ppcle-port.patch
index c0522f0eaafc..988d8bf2e45b 100644
--- a/srcpkgs/rust/patches/xxx-ppcle.patch
+++ b/srcpkgs/rust/patches/0015-initial-ppcle-port.patch
@@ -1,8 +1,40 @@
+From ec48305560be828efc23fe2be3c04a93252ac0ac Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Sat, 3 Jul 2021 21:02:03 +0200
+Subject: [PATCH 15/15] initial ppcle port
+
+---
+ compiler/rustc_middle/src/ty/layout.rs            |  5 ++++-
+ compiler/rustc_target/src/spec/mod.rs             |  2 ++
+ .../src/spec/powerpcle_unknown_linux_gnu.rs       | 15 +++++++++++++++
+ .../src/spec/powerpcle_unknown_linux_musl.rs      | 15 +++++++++++++++
+ src/bootstrap/bootstrap.py                        |  2 ++
+ .../codegen/abi-main-signature-16bit-c-int.rs     |  1 +
+ src/test/codegen/global_asm.rs                    |  1 +
+ src/test/codegen/global_asm_include.rs            |  1 +
+ src/test/codegen/global_asm_x2.rs                 |  1 +
+ src/test/codegen/repr-transparent-aggregates-1.rs |  1 +
+ src/test/codegen/repr-transparent-aggregates-2.rs |  1 +
+ src/test/codegen/stack-probes.rs                  |  1 +
+ .../run-make-fulldeps/atomic-lock-free/Makefile   |  2 ++
+ src/test/ui/abi/stack-probes-lto.rs               |  1 +
+ src/test/ui/abi/stack-probes.rs                   |  1 +
+ src/test/ui/target-feature/gate.rs                |  1 +
+ src/test/ui/target-feature/invalid-attribute.rs   |  1 +
+ src/tools/compiletest/src/util.rs                 |  1 +
+ vendor/cc/src/lib.rs                              |  1 +
+ vendor/target-lexicon/src/targets.rs              |  7 +++++++
+ vendor/tikv-jemallocator/benches/roundtrip.rs     |  3 ++-
+ vendor/tikv-jemallocator/src/lib.rs               |  3 ++-
+ 22 files changed, 64 insertions(+), 3 deletions(-)
+ create mode 100644 compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
+ create mode 100644 compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
+
 diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs
-index 0c1ab67cc..8d4e5f3cb 100644
+index 3b05e42a5..66420f507 100644
 --- a/compiler/rustc_middle/src/ty/layout.rs
 +++ b/compiler/rustc_middle/src/ty/layout.rs
-@@ -3057,6 +3057,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
+@@ -3205,6 +3205,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
              target.os == "linux" && target.arch == "sparc64" && target_env_gnu_like;
          let linux_powerpc_gnu_like =
              target.os == "linux" && target.arch == "powerpc" && target_env_gnu_like;
@@ -11,7 +43,7 @@ index 0c1ab67cc..8d4e5f3cb 100644
          use SpecAbi::*;
          let rust_abi = matches!(sig.abi, RustIntrinsic | PlatformIntrinsic | Rust | RustCall);
  
-@@ -3165,7 +3167,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
+@@ -3311,7 +3313,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
                      || (!win_x64_gnu
                          && !linux_s390x_gnu_like
                          && !linux_sparc64_gnu_like
@@ -22,10 +54,10 @@ index 0c1ab67cc..8d4e5f3cb 100644
                      arg.mode = PassMode::Ignore;
                  }
 diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
-index bd5b712c1..f60be010c 100644
+index da0589cdd..2db403913 100644
 --- a/compiler/rustc_target/src/spec/mod.rs
 +++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -824,6 +824,8 @@ supported_targets! {
+@@ -831,6 +831,8 @@ supported_targets! {
      ("powerpc-unknown-linux-gnu", powerpc_unknown_linux_gnu),
      ("powerpc-unknown-linux-gnuspe", powerpc_unknown_linux_gnuspe),
      ("powerpc-unknown-linux-musl", powerpc_unknown_linux_musl),
@@ -77,10 +109,10 @@ index 000000000..a826b6e47
 +    }
 +}
 diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 71b8f3c45..1505c12e4 100644
+index 3501fd901..a28f456d3 100644
 --- a/src/bootstrap/bootstrap.py
 +++ b/src/bootstrap/bootstrap.py
-@@ -320,9 +320,11 @@ def default_build_triple(verbose):
+@@ -339,9 +339,11 @@ def default_build_triple(verbose):
          'i786': 'i686',
          'm68k': 'm68k',
          'powerpc': 'powerpc',
@@ -141,7 +173,7 @@ index bdcf0ea84..1e2ff8b8d 100644
  // ignore-amdgcn
  // ignore-sparc
 diff --git a/src/test/codegen/repr-transparent-aggregates-1.rs b/src/test/codegen/repr-transparent-aggregates-1.rs
-index 4ad3642c0..fca31c0c6 100644
+index 9d18c5f03..8e69d2afd 100644
 --- a/src/test/codegen/repr-transparent-aggregates-1.rs
 +++ b/src/test/codegen/repr-transparent-aggregates-1.rs
 @@ -6,6 +6,7 @@
@@ -238,10 +270,10 @@ index ad1b6e96b..122d59a57 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
-index bed509d77..8bc817897 100644
+index 215af347f..a1c7e4c6a 100644
 --- a/src/tools/compiletest/src/util.rs
 +++ b/src/tools/compiletest/src/util.rs
-@@ -70,6 +70,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
+@@ -71,6 +71,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
      ("msp430", "msp430"),
      ("nvptx64", "nvptx64"),
      ("powerpc", "powerpc"),
@@ -342,3 +374,6 @@ index 4a9397331..4cf47c05d 100644
  )))]
  const ALIGNOF_MAX_ALIGN_T: usize = 8;
  #[cfg(all(any(
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch b/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
deleted file mode 100644
index d9a7ae68b6e0..000000000000
--- a/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From beb4e16f055aa7925194fd2c360105a6d55f10f6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Lo=C3=AFc=20BRANSTETT?= <lolo.branstett@numericable.fr>
-Date: Wed, 27 Apr 2022 19:11:56 +0200
-Subject: [PATCH] Add missing `target_feature` to the list of well known cfg
- names
-
----
- compiler/rustc_session/src/config.rs | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
-index 12c5c4445d46f..330201dd8fef6 100644
---- a/compiler/rustc_session/src/config.rs
-+++ b/compiler/rustc_session/src/config.rs
-@@ -1038,6 +1038,7 @@ impl CrateCheckConfig {
-             sym::target_has_atomic_load_store,
-             sym::target_has_atomic,
-             sym::target_has_atomic_equal_alignment,
-+            sym::target_feature,
-             sym::panic,
-             sym::sanitize,
-             sym::debug_assertions,
-@@ -1081,6 +1082,10 @@ impl CrateCheckConfig {
-             .into_iter()
-             .map(|sanitizer| Symbol::intern(sanitizer.as_str().unwrap()));
- 
-+        // Unknown possible values:
-+        //  - `feature`
-+        //  - `target_feature`
-+
-         // No-values
-         for name in [
-             sym::doc,
diff --git a/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch b/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch
deleted file mode 100644
index fe0377dbc381..000000000000
--- a/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/library/std/src/sys/unix/mod.rs
-+++ b/library/std/src/sys/unix/mod.rs
-@@ -212,6 +212,10 @@ cfg_if::cfg_if! {
-         #[link(name = "log")]
-         #[link(name = "gcc")]
-         extern "C" {}
-+    } else if #[cfg(all(target_os = "linux", target_env = "musl"))] {
-+	#[link(name = "ssp_nonshared")]
-+  #[link(name = "execinfo")]
-+	extern "C" {}
-     } else if #[cfg(target_os = "freebsd")] {
-         #[link(name = "execinfo")]
-         #[link(name = "pthread")]
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index da3ca779e7c6..be79d82b0840 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -8,7 +8,7 @@
 # uploaded to https://repo-default.voidlinux.org/distfiles/
 #
 pkgname=rust
-version=1.61.0
+version=1.63.0
 revision=1
 wrksrc="rustc-${version}-src"
 hostmakedepends="cmake curl pkg-config python3 tar cargo-bootstrap"
@@ -19,7 +19,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://www.rust-lang.org/"
 distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
-checksum=ad0b4351675aa9abdf4c7e066613bd274c4391c5506db152983426376101daed
+checksum=1f9580295642ef5da7e475a8da2397d65153d3f2cb92849dbd08ed0effca99d0
 lib32disabled=yes
 make_check=no # CBA for now
 

From ce1c3c80d58a55e0e3cfd20a8a03a3ea92a1f595 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:35 +0200
Subject: [PATCH 4/5] cargo: update to 1.63.0.

---
 srcpkgs/cargo/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index e3c30f625acd..9f653c39fd43 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo'
 pkgname=cargo
-version=1.61.0
+version=1.63.0
 revision=1
 wrksrc="cargo-rust-${version}"
 build_helper=rust
@@ -13,7 +13,7 @@ license="MIT, Apache-2.0"
 homepage="https://crates.io/"
 distfiles="https://github.com/rust-lang/cargo/archive/rust-${version}.tar.gz
  https://github.com/crossbeam-rs/crossbeam/archive/refs/tags/crossbeam-utils-0.8.8.tar.gz"
-checksum="6261b51441f50abe08a2992a349b22a2385846bfc9cb288ae9a3a609b904099e
+checksum="b1f50e4957a0453c1513cabe98c7fd94e715cd0ca70138b1945cef338e1abf35
  52c451910203cd9002cc4b85cff95f45c6ba245392801e80d7898ca5c3c3ab29"
 replaces="cargo-tree>=0"
 

From 2a22b3577b318bc0a8ff549ae12345fdcf1d8068 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 10:19:00 +0200
Subject: [PATCH 5/5] rust: update to 1.63.0.

---
 ...ix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch | 6 +++---
 .../0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch       | 2 +-
 ...ootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch | 2 +-
 ...allow-specifying-native-sysroot-to-use-for-linkage.patch | 2 +-
 ...py-new-version-of-need-ssp_nonshared.patch-from-al.patch | 2 +-
 srcpkgs/rust/patches/0015-initial-ppcle-port.patch          | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch b/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
index 0f679a486f38..f2780ae08dfb 100644
--- a/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
+++ b/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
@@ -1,4 +1,4 @@
-From 2596eaf95d538ca586de342d6dbc21c7e2820768 Mon Sep 17 00:00:00 2001
+From 7e100ca9dad23efa1aafccd8faf86ec5fa85c351 Mon Sep 17 00:00:00 2001
 From: q66 <daniel@octaforge.org>
 Date: Sun, 3 May 2020 18:02:03 +0200
 Subject: [PATCH 10/15] Fix dynamic linkage of musl libc for the libc crate
@@ -8,7 +8,7 @@ Subject: [PATCH 10/15] Fix dynamic linkage of musl libc for the libc crate
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs
-index ecee44411..c254a2f01 100644
+index ecee44411..7ae05f24e 100644
 --- a/vendor/libc/src/unix/mod.rs
 +++ b/vendor/libc/src/unix/mod.rs
 @@ -337,11 +337,11 @@ cfg_if! {
@@ -19,7 +19,7 @@ index ecee44411..c254a2f01 100644
 +        extern {}
          #[cfg_attr(feature = "rustc-dep-of-std",
 -                   link(name = "c", kind = "static", modifiers = "-bundle",
-+                   link(name = "gcc", kind = "static-nobundle",
++                   link(name = "gcc", kind = "static", modifiers = "-bundle",
                          cfg(target_feature = "crt-static")))]
 -        #[cfg_attr(feature = "rustc-dep-of-std",
 -                   link(name = "c", cfg(not(target_feature = "crt-static"))))]
diff --git a/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
index fec6bfce00db..347ee613983d 100644
--- a/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
+++ b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
@@ -1,4 +1,4 @@
-From 5df5ca7c068e516ea4fdaab507d850f98d38d924 Mon Sep 17 00:00:00 2001
+From de93abe8a0d9dc7878a48f61b9e3ae4a923020f6 Mon Sep 17 00:00:00 2001
 From: q66 <daniel@octaforge.org>
 Date: Sun, 3 May 2020 18:08:09 +0200
 Subject: [PATCH 11/15] Use ELFv2 ABI on all powerpc64 targets
diff --git a/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
index 18307b53553e..7b1ba46b1f2b 100644
--- a/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
+++ b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
@@ -1,4 +1,4 @@
-From e8f06c15e1073da598d0592254dd082f0a49a219 Mon Sep 17 00:00:00 2001
+From 4b803b211f765f6c6b18223e23670dbf754a980f Mon Sep 17 00:00:00 2001
 From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
 Date: Sat, 29 May 2021 12:38:46 +0000
 Subject: [PATCH 12/15] bootstrap: Disable initial-exec TLS model on powerpc
diff --git a/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch b/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
index e6be77e7b409..2414d72380b6 100644
--- a/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
+++ b/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
@@ -1,4 +1,4 @@
-From 12091237bd215901a9977085bc07178362b5655c Mon Sep 17 00:00:00 2001
+From 236c0272667d69380d03984cfa8bad44b033fd69 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Tue, 21 Dec 2021 02:46:30 +0100
 Subject: [PATCH 13/15] allow specifying native sysroot to use for linkage
diff --git a/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch b/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
index 36c090fde1ac..ec26d9c26ae0 100644
--- a/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
+++ b/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
@@ -1,4 +1,4 @@
-From 8424aa370a366929d4870fd1eafb2659ae075ea4 Mon Sep 17 00:00:00 2001
+From 0b057b456a5b24ce5cf898e47eddb7cbc7448fe2 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
 Date: Fri, 16 Apr 2021 03:34:16 -0300
 Subject: [PATCH 14/15] copy new version of need-ssp_nonshared.patch from
diff --git a/srcpkgs/rust/patches/0015-initial-ppcle-port.patch b/srcpkgs/rust/patches/0015-initial-ppcle-port.patch
index 988d8bf2e45b..dd6b72e21bcb 100644
--- a/srcpkgs/rust/patches/0015-initial-ppcle-port.patch
+++ b/srcpkgs/rust/patches/0015-initial-ppcle-port.patch
@@ -1,4 +1,4 @@
-From ec48305560be828efc23fe2be3c04a93252ac0ac Mon Sep 17 00:00:00 2001
+From 2b3b4a11dd75ff43e0f1f12de395d0ce29f8555f Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Sat, 3 Jul 2021 21:02:03 +0200
 Subject: [PATCH 15/15] initial ppcle port

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PR PATCH] [Updated] Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
                   ` (3 preceding siblings ...)
  2022-08-14  9:32 ` [PR PATCH] [Updated] " jcgruenhage
@ 2022-08-14  9:33 ` jcgruenhage
  2022-08-14 13:06 ` jcgruenhage
                   ` (18 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jcgruenhage @ 2022-08-14  9:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 814 bytes --]

There is an updated pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages rust-1.63
https://github.com/void-linux/void-packages/pull/38662

Update Rust toolchain to 1.63.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

[ci skip]

`cargo-crev` requires 1.62 at least, so I thought I'd gave updating Rust a go, and it worked out just fine tbh. The new `cargo-crev` release compiled fine on this toolchain and works properly.

#### Local build testing
- I built this PR locally for my native architecture, x86_64, with both glibc and musl


A patch file from https://github.com/void-linux/void-packages/pull/38662.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rust-1.63-38662.patch --]
[-- Type: text/x-diff, Size: 54099 bytes --]

From ebc1d198755759c68f865ed3e8a1283bebccd2e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:01 +0200
Subject: [PATCH 1/4] rust-bootstrap: update to 1.63.0.

---
 srcpkgs/rust-bootstrap/template | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/rust-bootstrap/template b/srcpkgs/rust-bootstrap/template
index 66d04d634638..a53516dd5958 100644
--- a/srcpkgs/rust-bootstrap/template
+++ b/srcpkgs/rust-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'rust-bootstrap'
 pkgname=rust-bootstrap
-version=1.61.0
+version=1.63.0
 revision=1
 create_wrksrc=yes
 short_desc="Rust programming language bootstrap toolchain"
@@ -29,23 +29,23 @@ distfiles="
 case "$XBPS_TARGET_MACHINE" in
 	i686)
 		checksum="
-		 8af0ec3eb470e7e28439fedf9ebdadf90df8c58da544cc643033e6fc0ccf0bea
-		 ab223fcec35183bc0fe630403537cd7dae55c403103df29b25077db4882cb88e"
+		 11d3729f0343a069e9e59531745170cb0b6ce68f73848699564ea0bbcbf2c02f
+		 3177d3a159b4fcd54bca93d09ff1a903689a64ed4037699de372e685d12d4335"
 		;;
 	x86_64)
 		checksum="
-		 21c4613f389ed130fbaaf88f1e984319f72b5fc10734569a5ba19e22ebb03abd
-		 270b07aa5f2de52255a117e1e587138d77375ce0d09a1d7fead085f29b3977e9"
+		 bdab9d9afa5c329c40f9ba568364815237fab8426477c12bfabad35ffc484ab5
+		 993c2c17bf76ac626bfb5b17bddce65fbdfc14f70d183f33773de0cd12df46d2"
 		;;
 	x86_64-musl)
 		checksum="
-		 89cb72cbc493cb5cd8e43830009b4a1a5bfd472246ae184157868c9b0607bf6c
-		 1f4f2e4c5dd0f9b0dac7c8888f4a49ef16a6fe8992f39895823d2a442f0fe408"
+		 b6566a9b1dafe03cf4a01b58b2db0e14a0044ae5773736827882bd549108277e
+		 6fcfa4f9a51d35bf2c5c92ac15c688baa8c98d9fded05ab6abfdae85cb5aed8c"
 		;;
 	ppc64le)
 		checksum="
-		 dc54893d747e4f3330515caa75e404f78c6c5475a1216d1428f5e7ce1c2e9602
-		 36c0ccff14c80419507561db050f9533f0abd43fc50f3ddb859c10df74b1c351"
+		 b3dc2c082e76b5effe0b158aac3831830168a1a6980b39347c355e49be63fcca
+		 3ae0b74ba428c569fcecebbb09060ad0bd434a5f1fc9ffd1329b56941a897b6e"
 		;;
 	ppc64le-musl)
 		checksum="
@@ -59,8 +59,8 @@ case "$XBPS_TARGET_MACHINE" in
 		;;
 	ppc)
 		checksum="
-		 f28a8c2986fce5015c67823e39ad4b53e2db06603b6ea4a1217ac961cbbfb073
-		 7d2f7f900c8c05616fba8e99ab041d847af3653c259b99445edd788acddf878c"
+		 7a99dd6a7f30b8a8f85d95f47fa77084a48c7ebc94092978daa3563268a4b15b
+		 a25719c0ad2a5e7f52eed87b75cb76c4a52b8dc6e24b4bef16ed7fb9133e5b42"
 		;;
 	*) broken="rust bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac

From 7294583183e9ae6dd393b7481facb813778c58c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:24 +0200
Subject: [PATCH 2/4] cargo-bootstrap: update to 1.63.0.

---
 srcpkgs/cargo-bootstrap/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/cargo-bootstrap/template b/srcpkgs/cargo-bootstrap/template
index 0fdaac840a3c..23793d85ea9a 100644
--- a/srcpkgs/cargo-bootstrap/template
+++ b/srcpkgs/cargo-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo-bootstrap'
 pkgname=cargo-bootstrap
-version=1.61.0
+version=1.63.0
 revision=1
 short_desc="Bootstrap binaries of Rust package manager"
 maintainer="q66 <daniel@octaforge.org>"
@@ -26,16 +26,16 @@ distfiles="${_bootstrap_url}/cargo-${version}-${RUST_TARGET}.tar.xz"
 
 case "$XBPS_TARGET_MACHINE" in
 	i686)
-		checksum="fe258b85ef0644ff08c2095e329399dd4de0e1b2e51f4f4e90cb956d40dc61de"
+		checksum="6f2c109fc38ed8ccadcdcccf51d11505651ca9e12c396ab46ac1dbb55265b792"
 		;;
 	x86_64)
-		checksum="9461727d754f865ef2a87479d40bbe4c5176f80963b7c50b7797bc8940d7a0a0"
+		checksum="f370d12e4c11f0c835becb738bcf00d363f29b76f8b424b4dcb005abcf15fc9a"
 		;;
 	x86_64-musl)
-		checksum="db4b4423c2843b6e27737664cf8085afcba670374110ca24b9c8d341045e748c"
+		checksum="6f6ce044832a2433c250f4f27a61f69081e2b0f7e4e1f141492c2ce99ee8511e"
 		;;
 	ppc64le)
-		checksum="09817011ff1ef4b7006387c7cabb6a059731792a9372533dec7d87e7f014444b"
+		checksum="a4cdc00a42fd767bf5a296f7126d9db22a0a609cd956bbf0cb3eae882add1be7"
 		;;
 	ppc64le-musl)
 		checksum="39215cba9b1bda63209cac0edbda583e0c822f88a50fdbf33255c8c5386e4868"

From 976a3d19bf12f4048aff7b3ffa49808a5b637e2c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:31 +0200
Subject: [PATCH 3/4] rust: update to 1.63.0.

---
 .../rust/patches/0001-Fix-LLVM-build.patch    |  8 +--
 ...lib-and-musl_root-from-musl-targets.patch} | 65 ++++++++++++-------
 ...e-debugger-scripts-to-usr-share-rust.patch | 10 +--
 ...4-fix-shebang-on-install-template.sh.patch |  6 +-
 ...fer-libgcc_eh-over-libunwind-on-musl.patch | 24 -------
 ...ot-install-libunwind-source-removed.patch} | 10 +--
 ...06-fix-rustdoc-when-cross-compiling.patch} | 25 +++----
 ...stage-2-tools-dynamically-to-libstd.patch} | 10 +--
 ...against-host-target-LLVM-in-cross-s.patch} | 16 ++++-
 .../0009-do-not-export-LD_LIBRARY_PATH.patch  | 29 +++++++++
 ...age-of-musl-libc-for-the-libc-crate.patch} | 16 ++---
 .../0010-do-not-export-LD_LIBRARY_PATH.patch  | 23 -------
 ...-ELFv2-ABI-on-all-powerpc64-targets.patch} | 22 +++----
 ...e-initial-exec-TLS-model-on-powerpc.patch} | 11 ++--
 ...g-native-sysroot-to-use-for-linkage.patch} | 40 ++++++++----
 ...-of-need-ssp_nonshared.patch-from-al.patch | 28 ++++++++
 ...le.patch => 0015-initial-ppcle-port.patch} | 55 +++++++++++++---
 ...e16f055aa7925194fd2c360105a6d55f10f6.patch | 33 ----------
 .../need-ssp-nonshared-and-execinfo.patch     | 13 ----
 srcpkgs/rust/template                         |  4 +-
 20 files changed, 249 insertions(+), 199 deletions(-)
 rename srcpkgs/rust/patches/{0001-musl-void-setup.patch => 0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch} (89%)
 delete mode 100644 srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
 rename srcpkgs/rust/patches/{0006-do-not-install-libunwind-source-removed.patch => 0005-do-not-install-libunwind-source-removed.patch} (73%)
 rename srcpkgs/rust/patches/{0007-fix-rustdoc-when-cross-compiling.patch => 0006-fix-rustdoc-when-cross-compiling.patch} (67%)
 rename srcpkgs/rust/patches/{0008-link-stage-2-tools-dynamically-to-libstd.patch => 0007-link-stage-2-tools-dynamically-to-libstd.patch} (78%)
 rename srcpkgs/rust/patches/{0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch => 0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch} (71%)
 create mode 100644 srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
 rename srcpkgs/rust/patches/{0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch => 0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch} (69%)
 delete mode 100644 srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
 rename srcpkgs/rust/patches/{0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch => 0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch} (74%)
 rename srcpkgs/rust/patches/{fix-ppc32.patch => 0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch} (78%)
 rename srcpkgs/rust/patches/{native-sysroot.patch => 0013-allow-specifying-native-sysroot-to-use-for-linkage.patch} (69%)
 create mode 100644 srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
 rename srcpkgs/rust/patches/{xxx-ppcle.patch => 0015-initial-ppcle-port.patch} (85%)
 delete mode 100644 srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
 delete mode 100644 srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch

diff --git a/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch b/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
index 0da829af1da9..6cf9c3a755a9 100644
--- a/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
+++ b/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
@@ -1,4 +1,4 @@
-From 4443eca0d6b3ba599832b2f73a5350fdd0c90d10 Mon Sep 17 00:00:00 2001
+From 99a046adc7d1c7b2da3a31e077722ea69f84eeb6 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/15] Fix LLVM build
@@ -8,10 +8,10 @@ Subject: [PATCH 01/15] Fix LLVM build
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index a476d25f..c7e63990 100644
+index 4ac857b47..b603ae90a 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -768,7 +768,8 @@ impl Build {
+@@ -1050,7 +1050,8 @@ impl Build {
              .args()
              .iter()
              .map(|s| s.to_string_lossy().into_owned())
@@ -22,5 +22,5 @@ index a476d25f..c7e63990 100644
  
          // If we're compiling on macOS then we add a few unconditional flags
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0001-musl-void-setup.patch b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
similarity index 89%
rename from srcpkgs/rust/patches/0001-musl-void-setup.patch
rename to srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
index c13cb1730986..c156945b8111 100644
--- a/srcpkgs/rust/patches/0001-musl-void-setup.patch
+++ b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
@@ -1,5 +1,23 @@
+From 7219ba1c9accbad9b530d312fd9a9f69330c93da Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 3 May 2020 17:53:33 +0200
+Subject: [PATCH 02/15] Remove -nostdlib and musl_root from musl targets
+
+extended by various void contributors to match our musl setup
+---
+ compiler/rustc_target/src/spec/crt_objects.rs | 22 ----------
+ .../rustc_target/src/spec/linux_musl_base.rs  |  7 ---
+ config.toml.example                           |  8 ----
+ src/bootstrap/cc_detect.rs                    | 25 +----------
+ src/bootstrap/compile.rs                      | 43 +------------------
+ src/bootstrap/config.rs                       |  9 ----
+ src/bootstrap/configure.py                    | 28 ------------
+ src/bootstrap/lib.rs                          | 19 --------
+ src/bootstrap/sanity.rs                       | 23 ----------
+ 9 files changed, 3 insertions(+), 181 deletions(-)
+
 diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
-index 51f392a6..62560658 100644
+index 52ac3622e..f35e5b9d8 100644
 --- a/compiler/rustc_target/src/spec/crt_objects.rs
 +++ b/compiler/rustc_target/src/spec/crt_objects.rs
 @@ -63,28 +63,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects {
@@ -32,7 +50,7 @@ index 51f392a6..62560658 100644
      new(&[
          (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
 diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs
-index 207a87ab..88f807a5 100644
+index 207a87ab0..88f807a58 100644
 --- a/compiler/rustc_target/src/spec/linux_musl_base.rs
 +++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
 @@ -1,16 +1,9 @@
@@ -53,10 +71,10 @@ index 207a87ab..88f807a5 100644
      base
  }
 diff --git a/config.toml.example b/config.toml.example
-index 6e53d9b4..74980d2c 100644
+index b3284050f..62ac07f87 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -511,14 +511,6 @@ changelog-seen = 2
+@@ -523,14 +523,6 @@ changelog-seen = 2
  # supplementary build information, like distro-specific package versions.
  #description = <none> (string)
  
@@ -72,7 +90,7 @@ index 6e53d9b4..74980d2c 100644
  # 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
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index 7ce44687..4e7507ae 100644
+index dca782c29..8eb35ea43 100644
 --- a/src/bootstrap/cc_detect.rs
 +++ b/src/bootstrap/cc_detect.rs
 @@ -97,7 +97,7 @@ pub fn find(build: &mut Build) {
@@ -93,7 +111,7 @@ index 7ce44687..4e7507ae 100644
              true
          } else {
              // Use an auto-detected compiler (or one configured via `CXX_target_triple` env vars).
-@@ -157,7 +157,6 @@ fn set_compiler(
+@@ -161,7 +161,6 @@ fn set_compiler(
      compiler: Language,
      target: TargetSelection,
      config: Option<&Target>,
@@ -101,7 +119,7 @@ index 7ce44687..4e7507ae 100644
  ) {
      match &*target.triple {
          // When compiling for android we may have the NDK configured in the
-@@ -200,26 +199,6 @@ fn set_compiler(
+@@ -204,26 +203,6 @@ fn set_compiler(
              }
          }
  
@@ -129,10 +147,10 @@ index 7ce44687..4e7507ae 100644
      }
  }
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index afc333b5..9d67ab56 100644
+index b4807d1ab..ce483bf6b 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -197,39 +197,7 @@ fn copy_self_contained_objects(
+@@ -200,39 +200,7 @@ fn copy_self_contained_objects(
      let mut target_deps = vec![];
  
      // Copies the libc and CRT objects.
@@ -173,7 +191,7 @@ index afc333b5..9d67ab56 100644
          let srcdir = builder
              .wasi_root(target)
              .unwrap_or_else(|| {
-@@ -313,15 +281,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+@@ -316,15 +284,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
              .arg("--manifest-path")
              .arg(builder.src.join("library/test/Cargo.toml"));
  
@@ -190,10 +208,10 @@ index afc333b5..9d67ab56 100644
              if let Some(p) = builder.wasi_root(target) {
                  let root = format!("native={}/lib/wasm32-wasi", p.to_str().unwrap());
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 9534cc5f..642a5c24 100644
+index 146077419..18a764689 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -172,7 +172,6 @@ pub struct Config {
+@@ -186,7 +186,6 @@ pub struct Config {
      pub missing_tools: bool,
  
      // Fallback musl-root for all targets
@@ -201,7 +219,7 @@ index 9534cc5f..642a5c24 100644
      pub prefix: Option<PathBuf>,
      pub sysconfdir: Option<PathBuf>,
      pub datadir: Option<PathBuf>,
-@@ -299,8 +298,6 @@ pub struct Target {
+@@ -400,8 +399,6 @@ pub struct Target {
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
      pub crt_static: Option<bool>,
@@ -210,7 +228,7 @@ index 9534cc5f..642a5c24 100644
      pub wasi_root: Option<PathBuf>,
      pub qemu_rootfs: Option<PathBuf>,
      pub no_std: bool,
-@@ -587,7 +584,6 @@ struct Rust {
+@@ -689,7 +686,6 @@ define_config! {
          default_linker: Option<String> = "default-linker",
          channel: Option<String> = "channel",
          description: Option<String> = "description",
@@ -218,7 +236,7 @@ index 9534cc5f..642a5c24 100644
          rpath: Option<bool> = "rpath",
          verbose_tests: Option<bool> = "verbose-tests",
          optimize_tests: Option<bool> = "optimize-tests",
-@@ -631,8 +627,6 @@ struct TomlTarget {
+@@ -734,8 +730,6 @@ define_config! {
          sanitizers: Option<bool> = "sanitizers",
          profiler: Option<bool> = "profiler",
          crt_static: Option<bool> = "crt-static",
@@ -227,7 +245,7 @@ index 9534cc5f..642a5c24 100644
          wasi_root: Option<String> = "wasi-root",
          qemu_rootfs: Option<String> = "qemu-rootfs",
          no_std: Option<bool> = "no-std",
-@@ -1013,7 +1007,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1107,7 +1101,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;
@@ -235,7 +253,7 @@ index 9534cc5f..642a5c24 100644
              config.save_toolstates = rust.save_toolstates.map(PathBuf::from);
              set(&mut config.deny_warnings, flags.deny_warnings.or(rust.deny_warnings));
              set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
-@@ -1059,8 +1052,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1164,8 +1157,6 @@ impl Config {
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
                  target.crt_static = cfg.crt_static;
@@ -245,7 +263,7 @@ index 9534cc5f..642a5c24 100644
                  target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
                  target.sanitizers = cfg.sanitizers;
 diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
-index 87a130a0..bd4c9197 100755
+index 2fc036082..91737e0ea 100755
 --- a/src/bootstrap/configure.py
 +++ b/src/bootstrap/configure.py
 @@ -114,34 +114,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
@@ -284,10 +302,10 @@ index 87a130a0..bd4c9197 100755
    "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 570a6174..f3d5f308 100644
+index b603ae90a..0a7012dbd 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1125,25 +1125,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1153,25 +1153,6 @@ impl Build {
          }
      }
  
@@ -314,7 +332,7 @@ index 570a6174..f3d5f308 100644
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
          self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
 diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index 8c2899c1..dda15d76 100644
+index 64c5dd7ae..b8f9104ea 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
 @@ -11,7 +11,6 @@
@@ -325,7 +343,7 @@ index 8c2899c1..dda15d76 100644
  use std::path::PathBuf;
  use std::process::Command;
  
-@@ -177,28 +176,6 @@ pub fn check(build: &mut Build) {
+@@ -190,28 +189,6 @@ than building it.
              }
          }
  
@@ -354,3 +372,6 @@ index 8c2899c1..dda15d76 100644
          if need_cmake && target.contains("msvc") {
              // There are three builds of cmake on windows: MSVC, MinGW, and
              // Cygwin. The Cygwin build does not have generators for Visual
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch b/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
index 3c4e1cb96475..bc7053800945 100644
--- a/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
+++ b/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
@@ -1,7 +1,7 @@
-From f9a680688a685ec47ee5ec001574d9b91b4ba35e Mon Sep 17 00:00:00 2001
+From 8938b002edbec432be46de7b6f1b9d0a6912873a Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 00:45:35 +0100
-Subject: [PATCH 3/9] move debugger scripts to /usr/share/rust
+Subject: [PATCH 03/15] move debugger scripts to /usr/share/rust
 
 ---
  src/bootstrap/dist.rs | 2 +-
@@ -11,10 +11,10 @@ Subject: [PATCH 3/9] move debugger scripts to /usr/share/rust
  4 files changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index d4875cfe1..e8b61b8a2 100644
+index b1fae356d..e7a077134 100644
 --- a/src/bootstrap/dist.rs
 +++ b/src/bootstrap/dist.rs
-@@ -499,7 +499,7 @@ impl Step for DebuggerScripts {
+@@ -460,7 +460,7 @@ impl Step for DebuggerScripts {
      fn run(self, builder: &Builder<'_>) {
          let host = self.host;
          let sysroot = self.sysroot;
@@ -65,5 +65,5 @@ index bce72f1ba..8abb01245 100755
  # Call LLDB with the commands added to the argument list
  exec "$lldb" --one-line-before-file "$script_import" --source-before-file "$commands_file" "$@"
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch b/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
index 2e9cd93fdfb9..2ca7ffeaf73f 100644
--- a/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
+++ b/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
@@ -1,7 +1,7 @@
-From d5a6a431024790c911d04fd54381c515fb05819e Mon Sep 17 00:00:00 2001
+From d7d7fc24d1744a3db70a9fb010c31daa14a46df7 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 00:55:18 +0100
-Subject: [PATCH 4/9] fix shebang on install-template.sh
+Subject: [PATCH 04/15] fix shebang on install-template.sh
 
 ---
  src/tools/rust-installer/install-template.sh | 2 +-
@@ -18,5 +18,5 @@ index e68be8911..beaa90f7b 100644
  # file at the top-level directory of this distribution and at
  # http://rust-lang.org/COPYRIGHT.
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch b/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
deleted file mode 100644
index 30cb66fc24b1..000000000000
--- a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Additions for build.rs by q66, necessary for our musl setup.
-
-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/library/unwind/src/lib.rs
-+++ b/library/unwind/src/lib.rs
-@@ -51,7 +51,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", cfg(target_feature = "crt-static"))]
-         #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
-         extern "C" {}
-     }
diff --git a/srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch b/srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
similarity index 73%
rename from srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch
rename to srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
index 0128b8fc61f2..92e0021ab6f4 100644
--- a/srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch
+++ b/srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
@@ -1,17 +1,17 @@
-From fc69414484327e4dbff138dd0834fc3bde626008 Mon Sep 17 00:00:00 2001
+From 1335a445327a6605c5f933d9647b97e771089abd Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:44:54 +0100
-Subject: [PATCH 6/9] do not install libunwind source (removed)
+Subject: [PATCH 05/15] do not install libunwind source (removed)
 
 ---
  src/bootstrap/dist.rs | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index e8b61b8a2..02d24a77d 100644
+index e7a077134..74e75df4b 100644
 --- a/src/bootstrap/dist.rs
 +++ b/src/bootstrap/dist.rs
-@@ -849,7 +849,7 @@ impl Step for Src {
+@@ -804,7 +804,7 @@ impl Step for Src {
          copy_src_dirs(
              builder,
              &builder.src,
@@ -21,5 +21,5 @@ index e8b61b8a2..02d24a77d 100644
                  // not needed and contains symlinks which rustup currently
                  // chokes on when unpacking.
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch b/srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
similarity index 67%
rename from srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
rename to srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
index 2cc1f6b900d3..88eaf65de8b7 100644
--- a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
+++ b/srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
@@ -1,17 +1,17 @@
-From 81ba387384e8ce0aa9bb9b4bd76014d922d85de8 Mon Sep 17 00:00:00 2001
+From 50075907c3dd2f06d471b3375d7c0ee850263eb2 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:48:14 +0100
-Subject: [PATCH 7/9] fix rustdoc when cross-compiling
+Subject: [PATCH 06/15] fix rustdoc when cross-compiling
 
 ---
  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 e4396d530..cb2312028 100644
+index 5f85fc5aa..01e81fc39 100644
 --- a/src/bootstrap/bin/rustdoc.rs
 +++ b/src/bootstrap/bin/rustdoc.rs
-@@ -22,14 +22,11 @@ fn main() {
+@@ -26,9 +26,6 @@ fn main() {
          Err(_) => 0,
      };
  
@@ -19,15 +19,18 @@ index e4396d530..cb2312028 100644
 -    dylib_path.insert(0, PathBuf::from(libdir.clone()));
 -
      let mut cmd = Command::new(rustdoc);
-     cmd.args(&args)
-         .arg("--sysroot")
-         .arg(&sysroot)
--        .env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
-+        .env(dylib_path_var(), PathBuf::from(libdir.clone()));
+ 
+     // cfg(bootstrap)
+@@ -43,7 +40,7 @@ fn main() {
+     }
+ 
+     cmd.args(&args);
+-    cmd.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
++    cmd.env(dylib_path_var(), PathBuf::from(libdir.clone()));
  
      // Force all crates compiled by this compiler to (a) be unstable and (b)
      // allow the `rustc_private` feature to link to other unstable crates
-@@ -62,7 +59,7 @@ fn main() {
+@@ -69,7 +66,7 @@ fn main() {
          eprintln!(
              "rustdoc command: {:?}={:?} {:?}",
              dylib_path_var(),
@@ -37,5 +40,5 @@ index e4396d530..cb2312028 100644
          );
          eprintln!("sysroot: {:?}", sysroot);
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch b/srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
similarity index 78%
rename from srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch
rename to srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
index f6793d8a3202..198e4fcc7a6a 100644
--- a/srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch
+++ b/srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
@@ -1,7 +1,7 @@
-From 1c4a66621a5fa34c78fc020084e4166f3af7cbb5 Mon Sep 17 00:00:00 2001
+From c2de45cbdaee1a8c81b2d65f6bced1439a738e00 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:48:49 +0100
-Subject: [PATCH 8/9] link stage 2 tools dynamically to libstd
+Subject: [PATCH 07/15] link stage 2 tools dynamically to libstd
 
 stage 2 tools are the ones that are distributed, and we distribute
 them together with the rust libs so there is no need to worry
@@ -11,10 +11,10 @@ about unstable ABI
  1 file changed, 2 insertions(+)
 
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index 6750f7a54..de771280e 100644
+index 62b5416ce..554dd4188 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1520,6 +1520,8 @@ impl<'a> Builder<'a> {
+@@ -2066,6 +2066,8 @@ impl<'a> Builder<'a> {
          // linking all deps statically into the dylib.
          if matches!(mode, Mode::Std | Mode::Rustc) {
              rustflags.arg("-Cprefer-dynamic");
@@ -24,5 +24,5 @@ index 6750f7a54..de771280e 100644
  
          // When building incrementally we default to a lower ThinLTO import limit
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch b/srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
similarity index 71%
rename from srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch
rename to srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
index 3b2e388c014e..3edba737f923 100644
--- a/srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch
+++ b/srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
@@ -1,8 +1,18 @@
+From f229c2bbd32deab98978d8453d0f44f23849fa09 Mon Sep 17 00:00:00 2001
+From: q66 <daniel@octaforge.org>
+Date: Sun, 3 May 2020 18:05:22 +0200
+Subject: [PATCH 08/15] Void: fix linkage against host/target LLVM in cross
+ setups
+
+---
+ compiler/rustc_llvm/build.rs | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
 diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs
-index 36a6d2cc3..af4e1219f 100644
+index 7729ec6be..66b8a4215 100644
 --- a/compiler/rustc_llvm/build.rs
 +++ b/compiler/rustc_llvm/build.rs
-@@ -230,9 +230,11 @@ fn main() {
+@@ -291,9 +291,11 @@ fn main() {
      for lib in output(&mut cmd).split_whitespace() {
          if is_crossed {
              if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
@@ -17,5 +27,5 @@ index 36a6d2cc3..af4e1219f 100644
          } else if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
              println!("cargo:rustc-link-search=native={}", stripped);
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch b/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
new file mode 100644
index 000000000000..f66766270a12
--- /dev/null
+++ b/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
@@ -0,0 +1,29 @@
+From 5e9e5fa2b2aefefbdc00547d7f10ee92d9b3356a Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Tue, 21 Dec 2021 00:48:29 +0100
+Subject: [PATCH 09/15] do not export LD_LIBRARY_PATH
+
+---
+ src/bootstrap/bootstrap.py | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
+index 40d478a17..3501fd901 100644
+--- a/src/bootstrap/bootstrap.py
++++ b/src/bootstrap/bootstrap.py
+@@ -756,12 +756,6 @@ class RustBuild(object):
+             del env["CARGO_BUILD_TARGET"]
+         env["CARGO_TARGET_DIR"] = build_dir
+         env["RUSTC"] = self.rustc()
+-        env["LD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+-            (os.pathsep + env["LD_LIBRARY_PATH"]) \
+-            if "LD_LIBRARY_PATH" in env else ""
+-        env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+-            (os.pathsep + env["DYLD_LIBRARY_PATH"]) \
+-            if "DYLD_LIBRARY_PATH" in env else ""
+         env["LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+             (os.pathsep + env["LIBRARY_PATH"]) \
+             if "LIBRARY_PATH" in env else ""
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch b/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
similarity index 69%
rename from srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
rename to srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
index 8a18e414e209..f2780ae08dfb 100644
--- a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
+++ b/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
@@ -1,18 +1,17 @@
-From e363a0e0ff7ffc8bd83f72ec1a20d289996b6370 Mon Sep 17 00:00:00 2001
+From 7e100ca9dad23efa1aafccd8faf86ec5fa85c351 Mon Sep 17 00:00:00 2001
 From: q66 <daniel@octaforge.org>
 Date: Sun, 3 May 2020 18:02:03 +0200
-Subject: [PATCH 12/15] Fix dynamic linkage of musl libc for the libc crate
+Subject: [PATCH 10/15] Fix dynamic linkage of musl libc for the libc crate
 
 ---
- vendor/libc/src/lib.rs      | 1 +
  vendor/libc/src/unix/mod.rs | 6 +++---
- 2 files changed, 4 insertions(+), 3 deletions(-)
+ 1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs
-index 238da24b..ffb05ee7 100644
+index ecee44411..7ae05f24e 100644
 --- a/vendor/libc/src/unix/mod.rs
 +++ b/vendor/libc/src/unix/mod.rs
-@@ -329,11 +329,11 @@ cfg_if! {
+@@ -337,11 +337,11 @@ cfg_if! {
          #[link(name = "c", cfg(not(target_feature = "crt-static")))]
          extern {}
      } else if #[cfg(target_env = "musl")] {
@@ -20,14 +19,13 @@ index 238da24b..ffb05ee7 100644
 +        extern {}
          #[cfg_attr(feature = "rustc-dep-of-std",
 -                   link(name = "c", kind = "static", modifiers = "-bundle",
-+                   link(name = "gcc", kind = "static-nobundle",
++                   link(name = "gcc", kind = "static", modifiers = "-bundle",
                          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")]
-index 0b1496af..7f7e85a7 100644
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch b/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
deleted file mode 100644
index d7714d5ee4fd..000000000000
--- a/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-commit 798e44e67c0bac6509b7915767450b0381c94017
-Author: Daniel Kolesa <daniel@octaforge.org>
-Date:   Tue Dec 21 00:48:29 2021 +0100
-
-    do not export LD_LIBRARY_PATH
-
-diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 0170be967..f7a9ec785 100644
---- a/src/bootstrap/bootstrap.py
-+++ b/src/bootstrap/bootstrap.py
-@@ -924,12 +924,6 @@ class RustBuild(object):
-             del env["CARGO_BUILD_TARGET"]
-         env["CARGO_TARGET_DIR"] = build_dir
-         env["RUSTC"] = self.rustc(True)
--        env["LD_LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
--            (os.pathsep + env["LD_LIBRARY_PATH"]) \
--            if "LD_LIBRARY_PATH" in env else ""
--        env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
--            (os.pathsep + env["DYLD_LIBRARY_PATH"]) \
--            if "DYLD_LIBRARY_PATH" in env else ""
-         env["LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
-             (os.pathsep + env["LIBRARY_PATH"]) \
-             if "LIBRARY_PATH" in env else ""
diff --git a/srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
similarity index 74%
rename from srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
rename to srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
index 3f3bd3212bb9..347ee613983d 100644
--- a/srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
+++ b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
@@ -1,24 +1,24 @@
-From c6b54a373e74a1e4ce64f349b5b69105f2bc1a49 Mon Sep 17 00:00:00 2001
+From de93abe8a0d9dc7878a48f61b9e3ae4a923020f6 Mon Sep 17 00:00:00 2001
 From: q66 <daniel@octaforge.org>
 Date: Sun, 3 May 2020 18:08:09 +0200
-Subject: [PATCH 15/15] Use ELFv2 ABI on all powerpc64 targets
+Subject: [PATCH 11/15] Use ELFv2 ABI on all powerpc64 targets
 
 This patches librustc_target so that ELFv2 is used everywhere, matching our
 LLVM. While this is not perfect (it does not allow rustc to compile legacy
 binaries), rustc never requests specific ABI from llvm in the first place,
 so at least match the environment we have.
 ---
- src/librustc_target/abi/call/powerpc64.rs               | 9 +--------
- src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs | 6 +-----
+ compiler/rustc_target/src/abi/call/powerpc64.rs          | 9 +--------
+ .../rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs | 6 +-----
  2 files changed, 2 insertions(+), 13 deletions(-)
 
 diff --git a/compiler/rustc_target/src/abi/call/powerpc64.rs b/compiler/rustc_target/src/abi/call/powerpc64.rs
-index 8c2a9d09a..2dcbf2c09 100644
+index c22ef9c8f..932172b2f 100644
 --- a/compiler/rustc_target/src/abi/call/powerpc64.rs
 +++ b/compiler/rustc_target/src/abi/call/powerpc64.rs
 @@ -119,14 +119,7 @@ where
-     Ty: TyAndLayoutMethods<'a, C> + Copy,
-     C: LayoutOf<Ty = Ty, TyAndLayout = TyAndLayout<'a, Ty>> + HasDataLayout + HasTargetSpec,
+     Ty: TyAbiInterface<'a, C> + Copy,
+     C: HasDataLayout + HasTargetSpec,
  {
 -    let abi = if cx.target_spec().env == "musl" {
 -        ELFv2
@@ -33,7 +33,7 @@ index 8c2a9d09a..2dcbf2c09 100644
      if !fn_abi.ret.is_ignore() {
          classify_ret(cx, &mut fn_abi.ret, abi);
 diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
-index 751022c12..c4d55a62e 100644
+index 24d5d187e..aa594b02e 100644
 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
 +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
 @@ -1,5 +1,5 @@
@@ -44,7 +44,7 @@ index 751022c12..c4d55a62e 100644
  pub fn target() -> Target {
      let mut base = super::linux_gnu_base::opts();
 @@ -7,10 +7,6 @@ pub fn target() -> Target {
-     base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
+     base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m64".into());
      base.max_atomic_width = Some(64);
  
 -    // ld.so in at least RHEL6 on ppc64 has a bug related to BIND_NOW, so only enable partial RELRO
@@ -52,8 +52,8 @@ index 751022c12..c4d55a62e 100644
 -    base.relro_level = RelroLevel::Partial;
 -
      Target {
-         llvm_target: "powerpc64-unknown-linux-gnu".to_string(),
+         llvm_target: "powerpc64-unknown-linux-gnu".into(),
          pointer_width: 64,
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/fix-ppc32.patch b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
similarity index 78%
rename from srcpkgs/rust/patches/fix-ppc32.patch
rename to srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
index 739ce4bce7f0..7b1ba46b1f2b 100644
--- a/srcpkgs/rust/patches/fix-ppc32.patch
+++ b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
@@ -1,7 +1,7 @@
-From 283619cf5ca25272b294525273ec42e9c7820edb Mon Sep 17 00:00:00 2001
+From 4b803b211f765f6c6b18223e23670dbf754a980f Mon Sep 17 00:00:00 2001
 From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
 Date: Sat, 29 May 2021 12:38:46 +0000
-Subject: [PATCH] bootstrap: Disable initial-exec TLS model on powerpc
+Subject: [PATCH 12/15] bootstrap: Disable initial-exec TLS model on powerpc
 
 Fixes #81334.
 ---
@@ -9,10 +9,10 @@ Fixes #81334.
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index 6750f7a549d..6032a685776 100644
+index 554dd4188..6a02a225c 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1299,7 +1299,7 @@ pub fn cargo(
+@@ -1844,7 +1844,7 @@ impl<'a> Builder<'a> {
          // efficient initial-exec TLS model. This doesn't work with `dlopen`,
          // so we can't use it by default in general, but we can use it for tools
          // and our own internal libraries.
@@ -21,3 +21,6 @@ index 6750f7a549d..6032a685776 100644
              rustflags.arg("-Ztls-model=initial-exec");
          }
  
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/native-sysroot.patch b/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
similarity index 69%
rename from srcpkgs/rust/patches/native-sysroot.patch
rename to srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
index 6826b114b6b7..2414d72380b6 100644
--- a/srcpkgs/rust/patches/native-sysroot.patch
+++ b/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
@@ -1,8 +1,21 @@
+From 236c0272667d69380d03984cfa8bad44b033fd69 Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Tue, 21 Dec 2021 02:46:30 +0100
+Subject: [PATCH 13/15] allow specifying native sysroot to use for linkage
+
+This allows us to get around the linker attempting to use
+incompatible libs.
+---
+ src/bootstrap/builder.rs | 4 ++++
+ src/bootstrap/config.rs  | 3 +++
+ src/bootstrap/lib.rs     | 4 ++++
+ 3 files changed, 11 insertions(+)
+
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index e816f9b4..a2668fa9 100644
+index 6a02a225c..483aa8818 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1313,6 +1313,10 @@ pub fn cargo(
+@@ -1708,6 +1708,10 @@ impl<'a> Builder<'a> {
              }
          }
  
@@ -14,10 +27,10 @@ index e816f9b4..a2668fa9 100644
              cargo.env("RUSTC_HOST_LINKER", host_linker);
          }
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 642a5c24..0dd4f879 100644
+index 18a764689..f8b9bbd96 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -294,6 +294,7 @@ pub struct Target {
+@@ -395,6 +395,7 @@ pub struct Target {
      pub ranlib: Option<PathBuf>,
      pub default_linker: Option<PathBuf>,
      pub linker: Option<PathBuf>,
@@ -25,15 +38,15 @@ index 642a5c24..0dd4f879 100644
      pub ndk: Option<PathBuf>,
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
-@@ -621,6 +622,7 @@ struct TomlTarget {
+@@ -723,6 +724,7 @@ define_config! {
          ranlib: Option<String> = "ranlib",
          default_linker: Option<PathBuf> = "default-linker",
          linker: Option<String> = "linker",
 +        sysroot: Option<String> = "sysroot",
          llvm_config: Option<String> = "llvm-config",
          llvm_filecheck: Option<String> = "llvm-filecheck",
-         android_ndk: Option<String> = "android-ndk",
-@@ -1051,6 +1053,7 @@ pub fn parse(args: &[String]) -> Config {
+         llvm_libunwind: Option<String> = "llvm-libunwind",
+@@ -1156,6 +1158,7 @@ impl Config {
                  target.ar = cfg.ar.map(PathBuf::from);
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
@@ -42,17 +55,20 @@ index 642a5c24..0dd4f879 100644
                  target.wasi_root = cfg.wasi_root.map(PathBuf::from);
                  target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
 diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index f3d5f308..7f8b9b27 100644
+index 0a7012dbd..cded50d20 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1125,6 +1125,10 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1152,6 +1152,10 @@ impl Build {
+             self.config.target_config.get(&target).and_then(|t| t.crt_static)
          }
      }
- 
++    
 +    fn native_sysroot(&self, target: TargetSelection) -> Option<&Path> {
 +        self.config.target_config.get(&target).and_then(|c| c.sysroot.as_ref()).map(|p| &**p)
 +    }
-+
+ 
      /// Returns the sysroot for the wasi target, if defined
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
-         self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch b/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
new file mode 100644
index 000000000000..ec26d9c26ae0
--- /dev/null
+++ b/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
@@ -0,0 +1,28 @@
+From 0b057b456a5b24ce5cf898e47eddb7cbc7448fe2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
+Date: Fri, 16 Apr 2021 03:34:16 -0300
+Subject: [PATCH 14/15] copy new version of need-ssp_nonshared.patch from
+ alpine
+
+---
+ library/std/src/sys/unix/mod.rs | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/library/std/src/sys/unix/mod.rs b/library/std/src/sys/unix/mod.rs
+index 34a023b02..934a87570 100644
+--- a/library/std/src/sys/unix/mod.rs
++++ b/library/std/src/sys/unix/mod.rs
+@@ -297,6 +297,10 @@ cfg_if::cfg_if! {
+         #[link(name = "dl")]
+         #[link(name = "log")]
+         extern "C" {}
++    } else if #[cfg(all(target_os = "linux", target_env = "musl"))] {
++	    #[link(name = "ssp_nonshared")]
++        #[link(name = "execinfo")]
++	    extern "C" {}
+     } else if #[cfg(target_os = "freebsd")] {
+         #[link(name = "execinfo")]
+         #[link(name = "pthread")]
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/xxx-ppcle.patch b/srcpkgs/rust/patches/0015-initial-ppcle-port.patch
similarity index 85%
rename from srcpkgs/rust/patches/xxx-ppcle.patch
rename to srcpkgs/rust/patches/0015-initial-ppcle-port.patch
index c0522f0eaafc..dd6b72e21bcb 100644
--- a/srcpkgs/rust/patches/xxx-ppcle.patch
+++ b/srcpkgs/rust/patches/0015-initial-ppcle-port.patch
@@ -1,8 +1,40 @@
+From 2b3b4a11dd75ff43e0f1f12de395d0ce29f8555f Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Sat, 3 Jul 2021 21:02:03 +0200
+Subject: [PATCH 15/15] initial ppcle port
+
+---
+ compiler/rustc_middle/src/ty/layout.rs            |  5 ++++-
+ compiler/rustc_target/src/spec/mod.rs             |  2 ++
+ .../src/spec/powerpcle_unknown_linux_gnu.rs       | 15 +++++++++++++++
+ .../src/spec/powerpcle_unknown_linux_musl.rs      | 15 +++++++++++++++
+ src/bootstrap/bootstrap.py                        |  2 ++
+ .../codegen/abi-main-signature-16bit-c-int.rs     |  1 +
+ src/test/codegen/global_asm.rs                    |  1 +
+ src/test/codegen/global_asm_include.rs            |  1 +
+ src/test/codegen/global_asm_x2.rs                 |  1 +
+ src/test/codegen/repr-transparent-aggregates-1.rs |  1 +
+ src/test/codegen/repr-transparent-aggregates-2.rs |  1 +
+ src/test/codegen/stack-probes.rs                  |  1 +
+ .../run-make-fulldeps/atomic-lock-free/Makefile   |  2 ++
+ src/test/ui/abi/stack-probes-lto.rs               |  1 +
+ src/test/ui/abi/stack-probes.rs                   |  1 +
+ src/test/ui/target-feature/gate.rs                |  1 +
+ src/test/ui/target-feature/invalid-attribute.rs   |  1 +
+ src/tools/compiletest/src/util.rs                 |  1 +
+ vendor/cc/src/lib.rs                              |  1 +
+ vendor/target-lexicon/src/targets.rs              |  7 +++++++
+ vendor/tikv-jemallocator/benches/roundtrip.rs     |  3 ++-
+ vendor/tikv-jemallocator/src/lib.rs               |  3 ++-
+ 22 files changed, 64 insertions(+), 3 deletions(-)
+ create mode 100644 compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
+ create mode 100644 compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
+
 diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs
-index 0c1ab67cc..8d4e5f3cb 100644
+index 3b05e42a5..66420f507 100644
 --- a/compiler/rustc_middle/src/ty/layout.rs
 +++ b/compiler/rustc_middle/src/ty/layout.rs
-@@ -3057,6 +3057,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
+@@ -3205,6 +3205,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
              target.os == "linux" && target.arch == "sparc64" && target_env_gnu_like;
          let linux_powerpc_gnu_like =
              target.os == "linux" && target.arch == "powerpc" && target_env_gnu_like;
@@ -11,7 +43,7 @@ index 0c1ab67cc..8d4e5f3cb 100644
          use SpecAbi::*;
          let rust_abi = matches!(sig.abi, RustIntrinsic | PlatformIntrinsic | Rust | RustCall);
  
-@@ -3165,7 +3167,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
+@@ -3311,7 +3313,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
                      || (!win_x64_gnu
                          && !linux_s390x_gnu_like
                          && !linux_sparc64_gnu_like
@@ -22,10 +54,10 @@ index 0c1ab67cc..8d4e5f3cb 100644
                      arg.mode = PassMode::Ignore;
                  }
 diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
-index bd5b712c1..f60be010c 100644
+index da0589cdd..2db403913 100644
 --- a/compiler/rustc_target/src/spec/mod.rs
 +++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -824,6 +824,8 @@ supported_targets! {
+@@ -831,6 +831,8 @@ supported_targets! {
      ("powerpc-unknown-linux-gnu", powerpc_unknown_linux_gnu),
      ("powerpc-unknown-linux-gnuspe", powerpc_unknown_linux_gnuspe),
      ("powerpc-unknown-linux-musl", powerpc_unknown_linux_musl),
@@ -77,10 +109,10 @@ index 000000000..a826b6e47
 +    }
 +}
 diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 71b8f3c45..1505c12e4 100644
+index 3501fd901..a28f456d3 100644
 --- a/src/bootstrap/bootstrap.py
 +++ b/src/bootstrap/bootstrap.py
-@@ -320,9 +320,11 @@ def default_build_triple(verbose):
+@@ -339,9 +339,11 @@ def default_build_triple(verbose):
          'i786': 'i686',
          'm68k': 'm68k',
          'powerpc': 'powerpc',
@@ -141,7 +173,7 @@ index bdcf0ea84..1e2ff8b8d 100644
  // ignore-amdgcn
  // ignore-sparc
 diff --git a/src/test/codegen/repr-transparent-aggregates-1.rs b/src/test/codegen/repr-transparent-aggregates-1.rs
-index 4ad3642c0..fca31c0c6 100644
+index 9d18c5f03..8e69d2afd 100644
 --- a/src/test/codegen/repr-transparent-aggregates-1.rs
 +++ b/src/test/codegen/repr-transparent-aggregates-1.rs
 @@ -6,6 +6,7 @@
@@ -238,10 +270,10 @@ index ad1b6e96b..122d59a57 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
-index bed509d77..8bc817897 100644
+index 215af347f..a1c7e4c6a 100644
 --- a/src/tools/compiletest/src/util.rs
 +++ b/src/tools/compiletest/src/util.rs
-@@ -70,6 +70,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
+@@ -71,6 +71,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
      ("msp430", "msp430"),
      ("nvptx64", "nvptx64"),
      ("powerpc", "powerpc"),
@@ -342,3 +374,6 @@ index 4a9397331..4cf47c05d 100644
  )))]
  const ALIGNOF_MAX_ALIGN_T: usize = 8;
  #[cfg(all(any(
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch b/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
deleted file mode 100644
index d9a7ae68b6e0..000000000000
--- a/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From beb4e16f055aa7925194fd2c360105a6d55f10f6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Lo=C3=AFc=20BRANSTETT?= <lolo.branstett@numericable.fr>
-Date: Wed, 27 Apr 2022 19:11:56 +0200
-Subject: [PATCH] Add missing `target_feature` to the list of well known cfg
- names
-
----
- compiler/rustc_session/src/config.rs | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
-index 12c5c4445d46f..330201dd8fef6 100644
---- a/compiler/rustc_session/src/config.rs
-+++ b/compiler/rustc_session/src/config.rs
-@@ -1038,6 +1038,7 @@ impl CrateCheckConfig {
-             sym::target_has_atomic_load_store,
-             sym::target_has_atomic,
-             sym::target_has_atomic_equal_alignment,
-+            sym::target_feature,
-             sym::panic,
-             sym::sanitize,
-             sym::debug_assertions,
-@@ -1081,6 +1082,10 @@ impl CrateCheckConfig {
-             .into_iter()
-             .map(|sanitizer| Symbol::intern(sanitizer.as_str().unwrap()));
- 
-+        // Unknown possible values:
-+        //  - `feature`
-+        //  - `target_feature`
-+
-         // No-values
-         for name in [
-             sym::doc,
diff --git a/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch b/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch
deleted file mode 100644
index fe0377dbc381..000000000000
--- a/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/library/std/src/sys/unix/mod.rs
-+++ b/library/std/src/sys/unix/mod.rs
-@@ -212,6 +212,10 @@ cfg_if::cfg_if! {
-         #[link(name = "log")]
-         #[link(name = "gcc")]
-         extern "C" {}
-+    } else if #[cfg(all(target_os = "linux", target_env = "musl"))] {
-+	#[link(name = "ssp_nonshared")]
-+  #[link(name = "execinfo")]
-+	extern "C" {}
-     } else if #[cfg(target_os = "freebsd")] {
-         #[link(name = "execinfo")]
-         #[link(name = "pthread")]
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index da3ca779e7c6..be79d82b0840 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -8,7 +8,7 @@
 # uploaded to https://repo-default.voidlinux.org/distfiles/
 #
 pkgname=rust
-version=1.61.0
+version=1.63.0
 revision=1
 wrksrc="rustc-${version}-src"
 hostmakedepends="cmake curl pkg-config python3 tar cargo-bootstrap"
@@ -19,7 +19,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://www.rust-lang.org/"
 distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
-checksum=ad0b4351675aa9abdf4c7e066613bd274c4391c5506db152983426376101daed
+checksum=1f9580295642ef5da7e475a8da2397d65153d3f2cb92849dbd08ed0effca99d0
 lib32disabled=yes
 make_check=no # CBA for now
 

From e056d07757c67c31de1a70a7510e2d9ce08e21da Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:35 +0200
Subject: [PATCH 4/4] cargo: update to 1.63.0.

---
 srcpkgs/cargo/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index e3c30f625acd..9f653c39fd43 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo'
 pkgname=cargo
-version=1.61.0
+version=1.63.0
 revision=1
 wrksrc="cargo-rust-${version}"
 build_helper=rust
@@ -13,7 +13,7 @@ license="MIT, Apache-2.0"
 homepage="https://crates.io/"
 distfiles="https://github.com/rust-lang/cargo/archive/rust-${version}.tar.gz
  https://github.com/crossbeam-rs/crossbeam/archive/refs/tags/crossbeam-utils-0.8.8.tar.gz"
-checksum="6261b51441f50abe08a2992a349b22a2385846bfc9cb288ae9a3a609b904099e
+checksum="b1f50e4957a0453c1513cabe98c7fd94e715cd0ca70138b1945cef338e1abf35
  52c451910203cd9002cc4b85cff95f45c6ba245392801e80d7898ca5c3c3ab29"
 replaces="cargo-tree>=0"
 

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
                   ` (4 preceding siblings ...)
  2022-08-14  9:33 ` jcgruenhage
@ 2022-08-14 13:06 ` jcgruenhage
  2022-08-14 14:17 ` classabbyamp
                   ` (17 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jcgruenhage @ 2022-08-14 13:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 349 bytes --]

New comment by jcgruenhage on void-packages repository

https://github.com/void-linux/void-packages/pull/38662#issuecomment-1214372193

Comment:
@q66 Actually, how would I crossbuild the bootstrap distfiles for the PPC architectures? Just doing `./xbps-src -a ppc64 pkg -o bindist rust` [doesn't seem to do the trick](https://pastebin.com/DSnDn0vt)

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
                   ` (5 preceding siblings ...)
  2022-08-14 13:06 ` jcgruenhage
@ 2022-08-14 14:17 ` classabbyamp
  2022-08-14 16:09 ` jcgruenhage
                   ` (16 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: classabbyamp @ 2022-08-14 14:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 219 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/38662#issuecomment-1214387385

Comment:
I think you need to add the ppc repos to `etc/xbps.d/repos-remote*.conf`

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
                   ` (6 preceding siblings ...)
  2022-08-14 14:17 ` classabbyamp
@ 2022-08-14 16:09 ` jcgruenhage
  2022-08-15 15:43 ` Zapeth
                   ` (15 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jcgruenhage @ 2022-08-14 16:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 339 bytes --]

New comment by jcgruenhage on void-packages repository

https://github.com/void-linux/void-packages/pull/38662#issuecomment-1214407644

Comment:
I'll try that tomorrow then, thanks for the pointer. I assume the builds are reproducible enough that whatever I generate locally will match the package generated by the void ppc build system?.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
                   ` (7 preceding siblings ...)
  2022-08-14 16:09 ` jcgruenhage
@ 2022-08-15 15:43 ` Zapeth
  2022-08-16 15:18 ` [PR PATCH] [Updated] " jcgruenhage
                   ` (14 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: Zapeth @ 2022-08-15 15:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 389 bytes --]

New comment by Zapeth on void-packages repository

https://github.com/void-linux/void-packages/pull/38662#issuecomment-1215196230

Comment:
I noticed that the `rust.description` field in the config.toml hasn't been set yet ([reference](https://github.com/rust-lang/rust/blob/4916e2b9e6ef8cee6f9c6abb75bd01ba9dc07e5c/config.toml.example#L521-L524)), could you maybe also include that here?

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PR PATCH] [Updated] Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
                   ` (8 preceding siblings ...)
  2022-08-15 15:43 ` Zapeth
@ 2022-08-16 15:18 ` jcgruenhage
  2022-08-17  5:43 ` jcgruenhage
                   ` (13 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jcgruenhage @ 2022-08-16 15:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 864 bytes --]

There is an updated pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages rust-1.63
https://github.com/void-linux/void-packages/pull/38662

Update Rust toolchain to 1.63.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

[ci skip]

`cargo-crev` requires 1.62 at least, so I thought I'd gave updating Rust a go, and it worked out just fine tbh. The new `cargo-crev` release compiled fine on this toolchain and works properly.

#### Local build testing
- I built this PR natively for
  - `x86_64`, `glibc` and `musl`
  - `i686`, `glibc`
- I crossbuilt this PR for
  - `aarch64`, `musl`


A patch file from https://github.com/void-linux/void-packages/pull/38662.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rust-1.63-38662.patch --]
[-- Type: text/x-diff, Size: 54303 bytes --]

From 2601fdd66261edfc51fcc7c942398974cdf7f169 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:01 +0200
Subject: [PATCH 1/4] rust-bootstrap: update to 1.63.0.

---
 srcpkgs/rust-bootstrap/template | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/rust-bootstrap/template b/srcpkgs/rust-bootstrap/template
index 66d04d634638..a53516dd5958 100644
--- a/srcpkgs/rust-bootstrap/template
+++ b/srcpkgs/rust-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'rust-bootstrap'
 pkgname=rust-bootstrap
-version=1.61.0
+version=1.63.0
 revision=1
 create_wrksrc=yes
 short_desc="Rust programming language bootstrap toolchain"
@@ -29,23 +29,23 @@ distfiles="
 case "$XBPS_TARGET_MACHINE" in
 	i686)
 		checksum="
-		 8af0ec3eb470e7e28439fedf9ebdadf90df8c58da544cc643033e6fc0ccf0bea
-		 ab223fcec35183bc0fe630403537cd7dae55c403103df29b25077db4882cb88e"
+		 11d3729f0343a069e9e59531745170cb0b6ce68f73848699564ea0bbcbf2c02f
+		 3177d3a159b4fcd54bca93d09ff1a903689a64ed4037699de372e685d12d4335"
 		;;
 	x86_64)
 		checksum="
-		 21c4613f389ed130fbaaf88f1e984319f72b5fc10734569a5ba19e22ebb03abd
-		 270b07aa5f2de52255a117e1e587138d77375ce0d09a1d7fead085f29b3977e9"
+		 bdab9d9afa5c329c40f9ba568364815237fab8426477c12bfabad35ffc484ab5
+		 993c2c17bf76ac626bfb5b17bddce65fbdfc14f70d183f33773de0cd12df46d2"
 		;;
 	x86_64-musl)
 		checksum="
-		 89cb72cbc493cb5cd8e43830009b4a1a5bfd472246ae184157868c9b0607bf6c
-		 1f4f2e4c5dd0f9b0dac7c8888f4a49ef16a6fe8992f39895823d2a442f0fe408"
+		 b6566a9b1dafe03cf4a01b58b2db0e14a0044ae5773736827882bd549108277e
+		 6fcfa4f9a51d35bf2c5c92ac15c688baa8c98d9fded05ab6abfdae85cb5aed8c"
 		;;
 	ppc64le)
 		checksum="
-		 dc54893d747e4f3330515caa75e404f78c6c5475a1216d1428f5e7ce1c2e9602
-		 36c0ccff14c80419507561db050f9533f0abd43fc50f3ddb859c10df74b1c351"
+		 b3dc2c082e76b5effe0b158aac3831830168a1a6980b39347c355e49be63fcca
+		 3ae0b74ba428c569fcecebbb09060ad0bd434a5f1fc9ffd1329b56941a897b6e"
 		;;
 	ppc64le-musl)
 		checksum="
@@ -59,8 +59,8 @@ case "$XBPS_TARGET_MACHINE" in
 		;;
 	ppc)
 		checksum="
-		 f28a8c2986fce5015c67823e39ad4b53e2db06603b6ea4a1217ac961cbbfb073
-		 7d2f7f900c8c05616fba8e99ab041d847af3653c259b99445edd788acddf878c"
+		 7a99dd6a7f30b8a8f85d95f47fa77084a48c7ebc94092978daa3563268a4b15b
+		 a25719c0ad2a5e7f52eed87b75cb76c4a52b8dc6e24b4bef16ed7fb9133e5b42"
 		;;
 	*) broken="rust bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac

From fc1b612c2ccc4ea855013b0dc72c939e60973763 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:24 +0200
Subject: [PATCH 2/4] cargo-bootstrap: update to 1.63.0.

---
 srcpkgs/cargo-bootstrap/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/cargo-bootstrap/template b/srcpkgs/cargo-bootstrap/template
index 0fdaac840a3c..23793d85ea9a 100644
--- a/srcpkgs/cargo-bootstrap/template
+++ b/srcpkgs/cargo-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo-bootstrap'
 pkgname=cargo-bootstrap
-version=1.61.0
+version=1.63.0
 revision=1
 short_desc="Bootstrap binaries of Rust package manager"
 maintainer="q66 <daniel@octaforge.org>"
@@ -26,16 +26,16 @@ distfiles="${_bootstrap_url}/cargo-${version}-${RUST_TARGET}.tar.xz"
 
 case "$XBPS_TARGET_MACHINE" in
 	i686)
-		checksum="fe258b85ef0644ff08c2095e329399dd4de0e1b2e51f4f4e90cb956d40dc61de"
+		checksum="6f2c109fc38ed8ccadcdcccf51d11505651ca9e12c396ab46ac1dbb55265b792"
 		;;
 	x86_64)
-		checksum="9461727d754f865ef2a87479d40bbe4c5176f80963b7c50b7797bc8940d7a0a0"
+		checksum="f370d12e4c11f0c835becb738bcf00d363f29b76f8b424b4dcb005abcf15fc9a"
 		;;
 	x86_64-musl)
-		checksum="db4b4423c2843b6e27737664cf8085afcba670374110ca24b9c8d341045e748c"
+		checksum="6f6ce044832a2433c250f4f27a61f69081e2b0f7e4e1f141492c2ce99ee8511e"
 		;;
 	ppc64le)
-		checksum="09817011ff1ef4b7006387c7cabb6a059731792a9372533dec7d87e7f014444b"
+		checksum="a4cdc00a42fd767bf5a296f7126d9db22a0a609cd956bbf0cb3eae882add1be7"
 		;;
 	ppc64le-musl)
 		checksum="39215cba9b1bda63209cac0edbda583e0c822f88a50fdbf33255c8c5386e4868"

From ef6a05747b4ea377073d38853fde745b30deaa39 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:31 +0200
Subject: [PATCH 3/4] rust: update to 1.63.0.

---
 .../rust/patches/0001-Fix-LLVM-build.patch    |  8 +--
 ...lib-and-musl_root-from-musl-targets.patch} | 65 ++++++++++++-------
 ...e-debugger-scripts-to-usr-share-rust.patch | 10 +--
 ...4-fix-shebang-on-install-template.sh.patch |  6 +-
 ...fer-libgcc_eh-over-libunwind-on-musl.patch | 24 -------
 ...ot-install-libunwind-source-removed.patch} | 10 +--
 ...06-fix-rustdoc-when-cross-compiling.patch} | 25 +++----
 ...stage-2-tools-dynamically-to-libstd.patch} | 10 +--
 ...against-host-target-LLVM-in-cross-s.patch} | 16 ++++-
 .../0009-do-not-export-LD_LIBRARY_PATH.patch  | 29 +++++++++
 ...age-of-musl-libc-for-the-libc-crate.patch} | 16 ++---
 .../0010-do-not-export-LD_LIBRARY_PATH.patch  | 23 -------
 ...-ELFv2-ABI-on-all-powerpc64-targets.patch} | 22 +++----
 ...e-initial-exec-TLS-model-on-powerpc.patch} | 11 ++--
 ...g-native-sysroot-to-use-for-linkage.patch} | 40 ++++++++----
 ...-of-need-ssp_nonshared.patch-from-al.patch | 28 ++++++++
 ...le.patch => 0015-initial-ppcle-port.patch} | 55 +++++++++++++---
 ...e16f055aa7925194fd2c360105a6d55f10f6.patch | 33 ----------
 .../need-ssp-nonshared-and-execinfo.patch     | 13 ----
 srcpkgs/rust/template                         |  5 +-
 20 files changed, 250 insertions(+), 199 deletions(-)
 rename srcpkgs/rust/patches/{0001-musl-void-setup.patch => 0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch} (89%)
 delete mode 100644 srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
 rename srcpkgs/rust/patches/{0006-do-not-install-libunwind-source-removed.patch => 0005-do-not-install-libunwind-source-removed.patch} (73%)
 rename srcpkgs/rust/patches/{0007-fix-rustdoc-when-cross-compiling.patch => 0006-fix-rustdoc-when-cross-compiling.patch} (67%)
 rename srcpkgs/rust/patches/{0008-link-stage-2-tools-dynamically-to-libstd.patch => 0007-link-stage-2-tools-dynamically-to-libstd.patch} (78%)
 rename srcpkgs/rust/patches/{0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch => 0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch} (71%)
 create mode 100644 srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
 rename srcpkgs/rust/patches/{0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch => 0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch} (69%)
 delete mode 100644 srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
 rename srcpkgs/rust/patches/{0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch => 0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch} (74%)
 rename srcpkgs/rust/patches/{fix-ppc32.patch => 0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch} (78%)
 rename srcpkgs/rust/patches/{native-sysroot.patch => 0013-allow-specifying-native-sysroot-to-use-for-linkage.patch} (69%)
 create mode 100644 srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
 rename srcpkgs/rust/patches/{xxx-ppcle.patch => 0015-initial-ppcle-port.patch} (85%)
 delete mode 100644 srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
 delete mode 100644 srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch

diff --git a/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch b/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
index 0da829af1da9..6cf9c3a755a9 100644
--- a/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
+++ b/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
@@ -1,4 +1,4 @@
-From 4443eca0d6b3ba599832b2f73a5350fdd0c90d10 Mon Sep 17 00:00:00 2001
+From 99a046adc7d1c7b2da3a31e077722ea69f84eeb6 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/15] Fix LLVM build
@@ -8,10 +8,10 @@ Subject: [PATCH 01/15] Fix LLVM build
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index a476d25f..c7e63990 100644
+index 4ac857b47..b603ae90a 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -768,7 +768,8 @@ impl Build {
+@@ -1050,7 +1050,8 @@ impl Build {
              .args()
              .iter()
              .map(|s| s.to_string_lossy().into_owned())
@@ -22,5 +22,5 @@ index a476d25f..c7e63990 100644
  
          // If we're compiling on macOS then we add a few unconditional flags
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0001-musl-void-setup.patch b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
similarity index 89%
rename from srcpkgs/rust/patches/0001-musl-void-setup.patch
rename to srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
index c13cb1730986..c156945b8111 100644
--- a/srcpkgs/rust/patches/0001-musl-void-setup.patch
+++ b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
@@ -1,5 +1,23 @@
+From 7219ba1c9accbad9b530d312fd9a9f69330c93da Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 3 May 2020 17:53:33 +0200
+Subject: [PATCH 02/15] Remove -nostdlib and musl_root from musl targets
+
+extended by various void contributors to match our musl setup
+---
+ compiler/rustc_target/src/spec/crt_objects.rs | 22 ----------
+ .../rustc_target/src/spec/linux_musl_base.rs  |  7 ---
+ config.toml.example                           |  8 ----
+ src/bootstrap/cc_detect.rs                    | 25 +----------
+ src/bootstrap/compile.rs                      | 43 +------------------
+ src/bootstrap/config.rs                       |  9 ----
+ src/bootstrap/configure.py                    | 28 ------------
+ src/bootstrap/lib.rs                          | 19 --------
+ src/bootstrap/sanity.rs                       | 23 ----------
+ 9 files changed, 3 insertions(+), 181 deletions(-)
+
 diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
-index 51f392a6..62560658 100644
+index 52ac3622e..f35e5b9d8 100644
 --- a/compiler/rustc_target/src/spec/crt_objects.rs
 +++ b/compiler/rustc_target/src/spec/crt_objects.rs
 @@ -63,28 +63,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects {
@@ -32,7 +50,7 @@ index 51f392a6..62560658 100644
      new(&[
          (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
 diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs
-index 207a87ab..88f807a5 100644
+index 207a87ab0..88f807a58 100644
 --- a/compiler/rustc_target/src/spec/linux_musl_base.rs
 +++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
 @@ -1,16 +1,9 @@
@@ -53,10 +71,10 @@ index 207a87ab..88f807a5 100644
      base
  }
 diff --git a/config.toml.example b/config.toml.example
-index 6e53d9b4..74980d2c 100644
+index b3284050f..62ac07f87 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -511,14 +511,6 @@ changelog-seen = 2
+@@ -523,14 +523,6 @@ changelog-seen = 2
  # supplementary build information, like distro-specific package versions.
  #description = <none> (string)
  
@@ -72,7 +90,7 @@ index 6e53d9b4..74980d2c 100644
  # 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
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index 7ce44687..4e7507ae 100644
+index dca782c29..8eb35ea43 100644
 --- a/src/bootstrap/cc_detect.rs
 +++ b/src/bootstrap/cc_detect.rs
 @@ -97,7 +97,7 @@ pub fn find(build: &mut Build) {
@@ -93,7 +111,7 @@ index 7ce44687..4e7507ae 100644
              true
          } else {
              // Use an auto-detected compiler (or one configured via `CXX_target_triple` env vars).
-@@ -157,7 +157,6 @@ fn set_compiler(
+@@ -161,7 +161,6 @@ fn set_compiler(
      compiler: Language,
      target: TargetSelection,
      config: Option<&Target>,
@@ -101,7 +119,7 @@ index 7ce44687..4e7507ae 100644
  ) {
      match &*target.triple {
          // When compiling for android we may have the NDK configured in the
-@@ -200,26 +199,6 @@ fn set_compiler(
+@@ -204,26 +203,6 @@ fn set_compiler(
              }
          }
  
@@ -129,10 +147,10 @@ index 7ce44687..4e7507ae 100644
      }
  }
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index afc333b5..9d67ab56 100644
+index b4807d1ab..ce483bf6b 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -197,39 +197,7 @@ fn copy_self_contained_objects(
+@@ -200,39 +200,7 @@ fn copy_self_contained_objects(
      let mut target_deps = vec![];
  
      // Copies the libc and CRT objects.
@@ -173,7 +191,7 @@ index afc333b5..9d67ab56 100644
          let srcdir = builder
              .wasi_root(target)
              .unwrap_or_else(|| {
-@@ -313,15 +281,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+@@ -316,15 +284,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
              .arg("--manifest-path")
              .arg(builder.src.join("library/test/Cargo.toml"));
  
@@ -190,10 +208,10 @@ index afc333b5..9d67ab56 100644
              if let Some(p) = builder.wasi_root(target) {
                  let root = format!("native={}/lib/wasm32-wasi", p.to_str().unwrap());
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 9534cc5f..642a5c24 100644
+index 146077419..18a764689 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -172,7 +172,6 @@ pub struct Config {
+@@ -186,7 +186,6 @@ pub struct Config {
      pub missing_tools: bool,
  
      // Fallback musl-root for all targets
@@ -201,7 +219,7 @@ index 9534cc5f..642a5c24 100644
      pub prefix: Option<PathBuf>,
      pub sysconfdir: Option<PathBuf>,
      pub datadir: Option<PathBuf>,
-@@ -299,8 +298,6 @@ pub struct Target {
+@@ -400,8 +399,6 @@ pub struct Target {
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
      pub crt_static: Option<bool>,
@@ -210,7 +228,7 @@ index 9534cc5f..642a5c24 100644
      pub wasi_root: Option<PathBuf>,
      pub qemu_rootfs: Option<PathBuf>,
      pub no_std: bool,
-@@ -587,7 +584,6 @@ struct Rust {
+@@ -689,7 +686,6 @@ define_config! {
          default_linker: Option<String> = "default-linker",
          channel: Option<String> = "channel",
          description: Option<String> = "description",
@@ -218,7 +236,7 @@ index 9534cc5f..642a5c24 100644
          rpath: Option<bool> = "rpath",
          verbose_tests: Option<bool> = "verbose-tests",
          optimize_tests: Option<bool> = "optimize-tests",
-@@ -631,8 +627,6 @@ struct TomlTarget {
+@@ -734,8 +730,6 @@ define_config! {
          sanitizers: Option<bool> = "sanitizers",
          profiler: Option<bool> = "profiler",
          crt_static: Option<bool> = "crt-static",
@@ -227,7 +245,7 @@ index 9534cc5f..642a5c24 100644
          wasi_root: Option<String> = "wasi-root",
          qemu_rootfs: Option<String> = "qemu-rootfs",
          no_std: Option<bool> = "no-std",
-@@ -1013,7 +1007,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1107,7 +1101,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;
@@ -235,7 +253,7 @@ index 9534cc5f..642a5c24 100644
              config.save_toolstates = rust.save_toolstates.map(PathBuf::from);
              set(&mut config.deny_warnings, flags.deny_warnings.or(rust.deny_warnings));
              set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
-@@ -1059,8 +1052,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1164,8 +1157,6 @@ impl Config {
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
                  target.crt_static = cfg.crt_static;
@@ -245,7 +263,7 @@ index 9534cc5f..642a5c24 100644
                  target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
                  target.sanitizers = cfg.sanitizers;
 diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
-index 87a130a0..bd4c9197 100755
+index 2fc036082..91737e0ea 100755
 --- a/src/bootstrap/configure.py
 +++ b/src/bootstrap/configure.py
 @@ -114,34 +114,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
@@ -284,10 +302,10 @@ index 87a130a0..bd4c9197 100755
    "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 570a6174..f3d5f308 100644
+index b603ae90a..0a7012dbd 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1125,25 +1125,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1153,25 +1153,6 @@ impl Build {
          }
      }
  
@@ -314,7 +332,7 @@ index 570a6174..f3d5f308 100644
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
          self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
 diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index 8c2899c1..dda15d76 100644
+index 64c5dd7ae..b8f9104ea 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
 @@ -11,7 +11,6 @@
@@ -325,7 +343,7 @@ index 8c2899c1..dda15d76 100644
  use std::path::PathBuf;
  use std::process::Command;
  
-@@ -177,28 +176,6 @@ pub fn check(build: &mut Build) {
+@@ -190,28 +189,6 @@ than building it.
              }
          }
  
@@ -354,3 +372,6 @@ index 8c2899c1..dda15d76 100644
          if need_cmake && target.contains("msvc") {
              // There are three builds of cmake on windows: MSVC, MinGW, and
              // Cygwin. The Cygwin build does not have generators for Visual
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch b/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
index 3c4e1cb96475..bc7053800945 100644
--- a/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
+++ b/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
@@ -1,7 +1,7 @@
-From f9a680688a685ec47ee5ec001574d9b91b4ba35e Mon Sep 17 00:00:00 2001
+From 8938b002edbec432be46de7b6f1b9d0a6912873a Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 00:45:35 +0100
-Subject: [PATCH 3/9] move debugger scripts to /usr/share/rust
+Subject: [PATCH 03/15] move debugger scripts to /usr/share/rust
 
 ---
  src/bootstrap/dist.rs | 2 +-
@@ -11,10 +11,10 @@ Subject: [PATCH 3/9] move debugger scripts to /usr/share/rust
  4 files changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index d4875cfe1..e8b61b8a2 100644
+index b1fae356d..e7a077134 100644
 --- a/src/bootstrap/dist.rs
 +++ b/src/bootstrap/dist.rs
-@@ -499,7 +499,7 @@ impl Step for DebuggerScripts {
+@@ -460,7 +460,7 @@ impl Step for DebuggerScripts {
      fn run(self, builder: &Builder<'_>) {
          let host = self.host;
          let sysroot = self.sysroot;
@@ -65,5 +65,5 @@ index bce72f1ba..8abb01245 100755
  # Call LLDB with the commands added to the argument list
  exec "$lldb" --one-line-before-file "$script_import" --source-before-file "$commands_file" "$@"
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch b/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
index 2e9cd93fdfb9..2ca7ffeaf73f 100644
--- a/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
+++ b/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
@@ -1,7 +1,7 @@
-From d5a6a431024790c911d04fd54381c515fb05819e Mon Sep 17 00:00:00 2001
+From d7d7fc24d1744a3db70a9fb010c31daa14a46df7 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 00:55:18 +0100
-Subject: [PATCH 4/9] fix shebang on install-template.sh
+Subject: [PATCH 04/15] fix shebang on install-template.sh
 
 ---
  src/tools/rust-installer/install-template.sh | 2 +-
@@ -18,5 +18,5 @@ index e68be8911..beaa90f7b 100644
  # file at the top-level directory of this distribution and at
  # http://rust-lang.org/COPYRIGHT.
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch b/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
deleted file mode 100644
index 30cb66fc24b1..000000000000
--- a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Additions for build.rs by q66, necessary for our musl setup.
-
-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/library/unwind/src/lib.rs
-+++ b/library/unwind/src/lib.rs
-@@ -51,7 +51,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", cfg(target_feature = "crt-static"))]
-         #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
-         extern "C" {}
-     }
diff --git a/srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch b/srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
similarity index 73%
rename from srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch
rename to srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
index 0128b8fc61f2..92e0021ab6f4 100644
--- a/srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch
+++ b/srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
@@ -1,17 +1,17 @@
-From fc69414484327e4dbff138dd0834fc3bde626008 Mon Sep 17 00:00:00 2001
+From 1335a445327a6605c5f933d9647b97e771089abd Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:44:54 +0100
-Subject: [PATCH 6/9] do not install libunwind source (removed)
+Subject: [PATCH 05/15] do not install libunwind source (removed)
 
 ---
  src/bootstrap/dist.rs | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index e8b61b8a2..02d24a77d 100644
+index e7a077134..74e75df4b 100644
 --- a/src/bootstrap/dist.rs
 +++ b/src/bootstrap/dist.rs
-@@ -849,7 +849,7 @@ impl Step for Src {
+@@ -804,7 +804,7 @@ impl Step for Src {
          copy_src_dirs(
              builder,
              &builder.src,
@@ -21,5 +21,5 @@ index e8b61b8a2..02d24a77d 100644
                  // not needed and contains symlinks which rustup currently
                  // chokes on when unpacking.
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch b/srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
similarity index 67%
rename from srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
rename to srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
index 2cc1f6b900d3..88eaf65de8b7 100644
--- a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
+++ b/srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
@@ -1,17 +1,17 @@
-From 81ba387384e8ce0aa9bb9b4bd76014d922d85de8 Mon Sep 17 00:00:00 2001
+From 50075907c3dd2f06d471b3375d7c0ee850263eb2 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:48:14 +0100
-Subject: [PATCH 7/9] fix rustdoc when cross-compiling
+Subject: [PATCH 06/15] fix rustdoc when cross-compiling
 
 ---
  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 e4396d530..cb2312028 100644
+index 5f85fc5aa..01e81fc39 100644
 --- a/src/bootstrap/bin/rustdoc.rs
 +++ b/src/bootstrap/bin/rustdoc.rs
-@@ -22,14 +22,11 @@ fn main() {
+@@ -26,9 +26,6 @@ fn main() {
          Err(_) => 0,
      };
  
@@ -19,15 +19,18 @@ index e4396d530..cb2312028 100644
 -    dylib_path.insert(0, PathBuf::from(libdir.clone()));
 -
      let mut cmd = Command::new(rustdoc);
-     cmd.args(&args)
-         .arg("--sysroot")
-         .arg(&sysroot)
--        .env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
-+        .env(dylib_path_var(), PathBuf::from(libdir.clone()));
+ 
+     // cfg(bootstrap)
+@@ -43,7 +40,7 @@ fn main() {
+     }
+ 
+     cmd.args(&args);
+-    cmd.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
++    cmd.env(dylib_path_var(), PathBuf::from(libdir.clone()));
  
      // Force all crates compiled by this compiler to (a) be unstable and (b)
      // allow the `rustc_private` feature to link to other unstable crates
-@@ -62,7 +59,7 @@ fn main() {
+@@ -69,7 +66,7 @@ fn main() {
          eprintln!(
              "rustdoc command: {:?}={:?} {:?}",
              dylib_path_var(),
@@ -37,5 +40,5 @@ index e4396d530..cb2312028 100644
          );
          eprintln!("sysroot: {:?}", sysroot);
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch b/srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
similarity index 78%
rename from srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch
rename to srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
index f6793d8a3202..198e4fcc7a6a 100644
--- a/srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch
+++ b/srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
@@ -1,7 +1,7 @@
-From 1c4a66621a5fa34c78fc020084e4166f3af7cbb5 Mon Sep 17 00:00:00 2001
+From c2de45cbdaee1a8c81b2d65f6bced1439a738e00 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:48:49 +0100
-Subject: [PATCH 8/9] link stage 2 tools dynamically to libstd
+Subject: [PATCH 07/15] link stage 2 tools dynamically to libstd
 
 stage 2 tools are the ones that are distributed, and we distribute
 them together with the rust libs so there is no need to worry
@@ -11,10 +11,10 @@ about unstable ABI
  1 file changed, 2 insertions(+)
 
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index 6750f7a54..de771280e 100644
+index 62b5416ce..554dd4188 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1520,6 +1520,8 @@ impl<'a> Builder<'a> {
+@@ -2066,6 +2066,8 @@ impl<'a> Builder<'a> {
          // linking all deps statically into the dylib.
          if matches!(mode, Mode::Std | Mode::Rustc) {
              rustflags.arg("-Cprefer-dynamic");
@@ -24,5 +24,5 @@ index 6750f7a54..de771280e 100644
  
          // When building incrementally we default to a lower ThinLTO import limit
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch b/srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
similarity index 71%
rename from srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch
rename to srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
index 3b2e388c014e..3edba737f923 100644
--- a/srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch
+++ b/srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
@@ -1,8 +1,18 @@
+From f229c2bbd32deab98978d8453d0f44f23849fa09 Mon Sep 17 00:00:00 2001
+From: q66 <daniel@octaforge.org>
+Date: Sun, 3 May 2020 18:05:22 +0200
+Subject: [PATCH 08/15] Void: fix linkage against host/target LLVM in cross
+ setups
+
+---
+ compiler/rustc_llvm/build.rs | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
 diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs
-index 36a6d2cc3..af4e1219f 100644
+index 7729ec6be..66b8a4215 100644
 --- a/compiler/rustc_llvm/build.rs
 +++ b/compiler/rustc_llvm/build.rs
-@@ -230,9 +230,11 @@ fn main() {
+@@ -291,9 +291,11 @@ fn main() {
      for lib in output(&mut cmd).split_whitespace() {
          if is_crossed {
              if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
@@ -17,5 +27,5 @@ index 36a6d2cc3..af4e1219f 100644
          } else if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
              println!("cargo:rustc-link-search=native={}", stripped);
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch b/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
new file mode 100644
index 000000000000..f66766270a12
--- /dev/null
+++ b/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
@@ -0,0 +1,29 @@
+From 5e9e5fa2b2aefefbdc00547d7f10ee92d9b3356a Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Tue, 21 Dec 2021 00:48:29 +0100
+Subject: [PATCH 09/15] do not export LD_LIBRARY_PATH
+
+---
+ src/bootstrap/bootstrap.py | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
+index 40d478a17..3501fd901 100644
+--- a/src/bootstrap/bootstrap.py
++++ b/src/bootstrap/bootstrap.py
+@@ -756,12 +756,6 @@ class RustBuild(object):
+             del env["CARGO_BUILD_TARGET"]
+         env["CARGO_TARGET_DIR"] = build_dir
+         env["RUSTC"] = self.rustc()
+-        env["LD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+-            (os.pathsep + env["LD_LIBRARY_PATH"]) \
+-            if "LD_LIBRARY_PATH" in env else ""
+-        env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+-            (os.pathsep + env["DYLD_LIBRARY_PATH"]) \
+-            if "DYLD_LIBRARY_PATH" in env else ""
+         env["LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+             (os.pathsep + env["LIBRARY_PATH"]) \
+             if "LIBRARY_PATH" in env else ""
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch b/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
similarity index 69%
rename from srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
rename to srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
index 8a18e414e209..f2780ae08dfb 100644
--- a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
+++ b/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
@@ -1,18 +1,17 @@
-From e363a0e0ff7ffc8bd83f72ec1a20d289996b6370 Mon Sep 17 00:00:00 2001
+From 7e100ca9dad23efa1aafccd8faf86ec5fa85c351 Mon Sep 17 00:00:00 2001
 From: q66 <daniel@octaforge.org>
 Date: Sun, 3 May 2020 18:02:03 +0200
-Subject: [PATCH 12/15] Fix dynamic linkage of musl libc for the libc crate
+Subject: [PATCH 10/15] Fix dynamic linkage of musl libc for the libc crate
 
 ---
- vendor/libc/src/lib.rs      | 1 +
  vendor/libc/src/unix/mod.rs | 6 +++---
- 2 files changed, 4 insertions(+), 3 deletions(-)
+ 1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs
-index 238da24b..ffb05ee7 100644
+index ecee44411..7ae05f24e 100644
 --- a/vendor/libc/src/unix/mod.rs
 +++ b/vendor/libc/src/unix/mod.rs
-@@ -329,11 +329,11 @@ cfg_if! {
+@@ -337,11 +337,11 @@ cfg_if! {
          #[link(name = "c", cfg(not(target_feature = "crt-static")))]
          extern {}
      } else if #[cfg(target_env = "musl")] {
@@ -20,14 +19,13 @@ index 238da24b..ffb05ee7 100644
 +        extern {}
          #[cfg_attr(feature = "rustc-dep-of-std",
 -                   link(name = "c", kind = "static", modifiers = "-bundle",
-+                   link(name = "gcc", kind = "static-nobundle",
++                   link(name = "gcc", kind = "static", modifiers = "-bundle",
                          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")]
-index 0b1496af..7f7e85a7 100644
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch b/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
deleted file mode 100644
index d7714d5ee4fd..000000000000
--- a/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-commit 798e44e67c0bac6509b7915767450b0381c94017
-Author: Daniel Kolesa <daniel@octaforge.org>
-Date:   Tue Dec 21 00:48:29 2021 +0100
-
-    do not export LD_LIBRARY_PATH
-
-diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 0170be967..f7a9ec785 100644
---- a/src/bootstrap/bootstrap.py
-+++ b/src/bootstrap/bootstrap.py
-@@ -924,12 +924,6 @@ class RustBuild(object):
-             del env["CARGO_BUILD_TARGET"]
-         env["CARGO_TARGET_DIR"] = build_dir
-         env["RUSTC"] = self.rustc(True)
--        env["LD_LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
--            (os.pathsep + env["LD_LIBRARY_PATH"]) \
--            if "LD_LIBRARY_PATH" in env else ""
--        env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
--            (os.pathsep + env["DYLD_LIBRARY_PATH"]) \
--            if "DYLD_LIBRARY_PATH" in env else ""
-         env["LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
-             (os.pathsep + env["LIBRARY_PATH"]) \
-             if "LIBRARY_PATH" in env else ""
diff --git a/srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
similarity index 74%
rename from srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
rename to srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
index 3f3bd3212bb9..347ee613983d 100644
--- a/srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
+++ b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
@@ -1,24 +1,24 @@
-From c6b54a373e74a1e4ce64f349b5b69105f2bc1a49 Mon Sep 17 00:00:00 2001
+From de93abe8a0d9dc7878a48f61b9e3ae4a923020f6 Mon Sep 17 00:00:00 2001
 From: q66 <daniel@octaforge.org>
 Date: Sun, 3 May 2020 18:08:09 +0200
-Subject: [PATCH 15/15] Use ELFv2 ABI on all powerpc64 targets
+Subject: [PATCH 11/15] Use ELFv2 ABI on all powerpc64 targets
 
 This patches librustc_target so that ELFv2 is used everywhere, matching our
 LLVM. While this is not perfect (it does not allow rustc to compile legacy
 binaries), rustc never requests specific ABI from llvm in the first place,
 so at least match the environment we have.
 ---
- src/librustc_target/abi/call/powerpc64.rs               | 9 +--------
- src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs | 6 +-----
+ compiler/rustc_target/src/abi/call/powerpc64.rs          | 9 +--------
+ .../rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs | 6 +-----
  2 files changed, 2 insertions(+), 13 deletions(-)
 
 diff --git a/compiler/rustc_target/src/abi/call/powerpc64.rs b/compiler/rustc_target/src/abi/call/powerpc64.rs
-index 8c2a9d09a..2dcbf2c09 100644
+index c22ef9c8f..932172b2f 100644
 --- a/compiler/rustc_target/src/abi/call/powerpc64.rs
 +++ b/compiler/rustc_target/src/abi/call/powerpc64.rs
 @@ -119,14 +119,7 @@ where
-     Ty: TyAndLayoutMethods<'a, C> + Copy,
-     C: LayoutOf<Ty = Ty, TyAndLayout = TyAndLayout<'a, Ty>> + HasDataLayout + HasTargetSpec,
+     Ty: TyAbiInterface<'a, C> + Copy,
+     C: HasDataLayout + HasTargetSpec,
  {
 -    let abi = if cx.target_spec().env == "musl" {
 -        ELFv2
@@ -33,7 +33,7 @@ index 8c2a9d09a..2dcbf2c09 100644
      if !fn_abi.ret.is_ignore() {
          classify_ret(cx, &mut fn_abi.ret, abi);
 diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
-index 751022c12..c4d55a62e 100644
+index 24d5d187e..aa594b02e 100644
 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
 +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
 @@ -1,5 +1,5 @@
@@ -44,7 +44,7 @@ index 751022c12..c4d55a62e 100644
  pub fn target() -> Target {
      let mut base = super::linux_gnu_base::opts();
 @@ -7,10 +7,6 @@ pub fn target() -> Target {
-     base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
+     base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m64".into());
      base.max_atomic_width = Some(64);
  
 -    // ld.so in at least RHEL6 on ppc64 has a bug related to BIND_NOW, so only enable partial RELRO
@@ -52,8 +52,8 @@ index 751022c12..c4d55a62e 100644
 -    base.relro_level = RelroLevel::Partial;
 -
      Target {
-         llvm_target: "powerpc64-unknown-linux-gnu".to_string(),
+         llvm_target: "powerpc64-unknown-linux-gnu".into(),
          pointer_width: 64,
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/fix-ppc32.patch b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
similarity index 78%
rename from srcpkgs/rust/patches/fix-ppc32.patch
rename to srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
index 739ce4bce7f0..7b1ba46b1f2b 100644
--- a/srcpkgs/rust/patches/fix-ppc32.patch
+++ b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
@@ -1,7 +1,7 @@
-From 283619cf5ca25272b294525273ec42e9c7820edb Mon Sep 17 00:00:00 2001
+From 4b803b211f765f6c6b18223e23670dbf754a980f Mon Sep 17 00:00:00 2001
 From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
 Date: Sat, 29 May 2021 12:38:46 +0000
-Subject: [PATCH] bootstrap: Disable initial-exec TLS model on powerpc
+Subject: [PATCH 12/15] bootstrap: Disable initial-exec TLS model on powerpc
 
 Fixes #81334.
 ---
@@ -9,10 +9,10 @@ Fixes #81334.
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index 6750f7a549d..6032a685776 100644
+index 554dd4188..6a02a225c 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1299,7 +1299,7 @@ pub fn cargo(
+@@ -1844,7 +1844,7 @@ impl<'a> Builder<'a> {
          // efficient initial-exec TLS model. This doesn't work with `dlopen`,
          // so we can't use it by default in general, but we can use it for tools
          // and our own internal libraries.
@@ -21,3 +21,6 @@ index 6750f7a549d..6032a685776 100644
              rustflags.arg("-Ztls-model=initial-exec");
          }
  
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/native-sysroot.patch b/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
similarity index 69%
rename from srcpkgs/rust/patches/native-sysroot.patch
rename to srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
index 6826b114b6b7..2414d72380b6 100644
--- a/srcpkgs/rust/patches/native-sysroot.patch
+++ b/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
@@ -1,8 +1,21 @@
+From 236c0272667d69380d03984cfa8bad44b033fd69 Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Tue, 21 Dec 2021 02:46:30 +0100
+Subject: [PATCH 13/15] allow specifying native sysroot to use for linkage
+
+This allows us to get around the linker attempting to use
+incompatible libs.
+---
+ src/bootstrap/builder.rs | 4 ++++
+ src/bootstrap/config.rs  | 3 +++
+ src/bootstrap/lib.rs     | 4 ++++
+ 3 files changed, 11 insertions(+)
+
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index e816f9b4..a2668fa9 100644
+index 6a02a225c..483aa8818 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1313,6 +1313,10 @@ pub fn cargo(
+@@ -1708,6 +1708,10 @@ impl<'a> Builder<'a> {
              }
          }
  
@@ -14,10 +27,10 @@ index e816f9b4..a2668fa9 100644
              cargo.env("RUSTC_HOST_LINKER", host_linker);
          }
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 642a5c24..0dd4f879 100644
+index 18a764689..f8b9bbd96 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -294,6 +294,7 @@ pub struct Target {
+@@ -395,6 +395,7 @@ pub struct Target {
      pub ranlib: Option<PathBuf>,
      pub default_linker: Option<PathBuf>,
      pub linker: Option<PathBuf>,
@@ -25,15 +38,15 @@ index 642a5c24..0dd4f879 100644
      pub ndk: Option<PathBuf>,
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
-@@ -621,6 +622,7 @@ struct TomlTarget {
+@@ -723,6 +724,7 @@ define_config! {
          ranlib: Option<String> = "ranlib",
          default_linker: Option<PathBuf> = "default-linker",
          linker: Option<String> = "linker",
 +        sysroot: Option<String> = "sysroot",
          llvm_config: Option<String> = "llvm-config",
          llvm_filecheck: Option<String> = "llvm-filecheck",
-         android_ndk: Option<String> = "android-ndk",
-@@ -1051,6 +1053,7 @@ pub fn parse(args: &[String]) -> Config {
+         llvm_libunwind: Option<String> = "llvm-libunwind",
+@@ -1156,6 +1158,7 @@ impl Config {
                  target.ar = cfg.ar.map(PathBuf::from);
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
@@ -42,17 +55,20 @@ index 642a5c24..0dd4f879 100644
                  target.wasi_root = cfg.wasi_root.map(PathBuf::from);
                  target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
 diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index f3d5f308..7f8b9b27 100644
+index 0a7012dbd..cded50d20 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1125,6 +1125,10 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1152,6 +1152,10 @@ impl Build {
+             self.config.target_config.get(&target).and_then(|t| t.crt_static)
          }
      }
- 
++    
 +    fn native_sysroot(&self, target: TargetSelection) -> Option<&Path> {
 +        self.config.target_config.get(&target).and_then(|c| c.sysroot.as_ref()).map(|p| &**p)
 +    }
-+
+ 
      /// Returns the sysroot for the wasi target, if defined
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
-         self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch b/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
new file mode 100644
index 000000000000..ec26d9c26ae0
--- /dev/null
+++ b/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
@@ -0,0 +1,28 @@
+From 0b057b456a5b24ce5cf898e47eddb7cbc7448fe2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
+Date: Fri, 16 Apr 2021 03:34:16 -0300
+Subject: [PATCH 14/15] copy new version of need-ssp_nonshared.patch from
+ alpine
+
+---
+ library/std/src/sys/unix/mod.rs | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/library/std/src/sys/unix/mod.rs b/library/std/src/sys/unix/mod.rs
+index 34a023b02..934a87570 100644
+--- a/library/std/src/sys/unix/mod.rs
++++ b/library/std/src/sys/unix/mod.rs
+@@ -297,6 +297,10 @@ cfg_if::cfg_if! {
+         #[link(name = "dl")]
+         #[link(name = "log")]
+         extern "C" {}
++    } else if #[cfg(all(target_os = "linux", target_env = "musl"))] {
++	    #[link(name = "ssp_nonshared")]
++        #[link(name = "execinfo")]
++	    extern "C" {}
+     } else if #[cfg(target_os = "freebsd")] {
+         #[link(name = "execinfo")]
+         #[link(name = "pthread")]
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/xxx-ppcle.patch b/srcpkgs/rust/patches/0015-initial-ppcle-port.patch
similarity index 85%
rename from srcpkgs/rust/patches/xxx-ppcle.patch
rename to srcpkgs/rust/patches/0015-initial-ppcle-port.patch
index c0522f0eaafc..dd6b72e21bcb 100644
--- a/srcpkgs/rust/patches/xxx-ppcle.patch
+++ b/srcpkgs/rust/patches/0015-initial-ppcle-port.patch
@@ -1,8 +1,40 @@
+From 2b3b4a11dd75ff43e0f1f12de395d0ce29f8555f Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Sat, 3 Jul 2021 21:02:03 +0200
+Subject: [PATCH 15/15] initial ppcle port
+
+---
+ compiler/rustc_middle/src/ty/layout.rs            |  5 ++++-
+ compiler/rustc_target/src/spec/mod.rs             |  2 ++
+ .../src/spec/powerpcle_unknown_linux_gnu.rs       | 15 +++++++++++++++
+ .../src/spec/powerpcle_unknown_linux_musl.rs      | 15 +++++++++++++++
+ src/bootstrap/bootstrap.py                        |  2 ++
+ .../codegen/abi-main-signature-16bit-c-int.rs     |  1 +
+ src/test/codegen/global_asm.rs                    |  1 +
+ src/test/codegen/global_asm_include.rs            |  1 +
+ src/test/codegen/global_asm_x2.rs                 |  1 +
+ src/test/codegen/repr-transparent-aggregates-1.rs |  1 +
+ src/test/codegen/repr-transparent-aggregates-2.rs |  1 +
+ src/test/codegen/stack-probes.rs                  |  1 +
+ .../run-make-fulldeps/atomic-lock-free/Makefile   |  2 ++
+ src/test/ui/abi/stack-probes-lto.rs               |  1 +
+ src/test/ui/abi/stack-probes.rs                   |  1 +
+ src/test/ui/target-feature/gate.rs                |  1 +
+ src/test/ui/target-feature/invalid-attribute.rs   |  1 +
+ src/tools/compiletest/src/util.rs                 |  1 +
+ vendor/cc/src/lib.rs                              |  1 +
+ vendor/target-lexicon/src/targets.rs              |  7 +++++++
+ vendor/tikv-jemallocator/benches/roundtrip.rs     |  3 ++-
+ vendor/tikv-jemallocator/src/lib.rs               |  3 ++-
+ 22 files changed, 64 insertions(+), 3 deletions(-)
+ create mode 100644 compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
+ create mode 100644 compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
+
 diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs
-index 0c1ab67cc..8d4e5f3cb 100644
+index 3b05e42a5..66420f507 100644
 --- a/compiler/rustc_middle/src/ty/layout.rs
 +++ b/compiler/rustc_middle/src/ty/layout.rs
-@@ -3057,6 +3057,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
+@@ -3205,6 +3205,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
              target.os == "linux" && target.arch == "sparc64" && target_env_gnu_like;
          let linux_powerpc_gnu_like =
              target.os == "linux" && target.arch == "powerpc" && target_env_gnu_like;
@@ -11,7 +43,7 @@ index 0c1ab67cc..8d4e5f3cb 100644
          use SpecAbi::*;
          let rust_abi = matches!(sig.abi, RustIntrinsic | PlatformIntrinsic | Rust | RustCall);
  
-@@ -3165,7 +3167,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
+@@ -3311,7 +3313,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
                      || (!win_x64_gnu
                          && !linux_s390x_gnu_like
                          && !linux_sparc64_gnu_like
@@ -22,10 +54,10 @@ index 0c1ab67cc..8d4e5f3cb 100644
                      arg.mode = PassMode::Ignore;
                  }
 diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
-index bd5b712c1..f60be010c 100644
+index da0589cdd..2db403913 100644
 --- a/compiler/rustc_target/src/spec/mod.rs
 +++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -824,6 +824,8 @@ supported_targets! {
+@@ -831,6 +831,8 @@ supported_targets! {
      ("powerpc-unknown-linux-gnu", powerpc_unknown_linux_gnu),
      ("powerpc-unknown-linux-gnuspe", powerpc_unknown_linux_gnuspe),
      ("powerpc-unknown-linux-musl", powerpc_unknown_linux_musl),
@@ -77,10 +109,10 @@ index 000000000..a826b6e47
 +    }
 +}
 diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 71b8f3c45..1505c12e4 100644
+index 3501fd901..a28f456d3 100644
 --- a/src/bootstrap/bootstrap.py
 +++ b/src/bootstrap/bootstrap.py
-@@ -320,9 +320,11 @@ def default_build_triple(verbose):
+@@ -339,9 +339,11 @@ def default_build_triple(verbose):
          'i786': 'i686',
          'm68k': 'm68k',
          'powerpc': 'powerpc',
@@ -141,7 +173,7 @@ index bdcf0ea84..1e2ff8b8d 100644
  // ignore-amdgcn
  // ignore-sparc
 diff --git a/src/test/codegen/repr-transparent-aggregates-1.rs b/src/test/codegen/repr-transparent-aggregates-1.rs
-index 4ad3642c0..fca31c0c6 100644
+index 9d18c5f03..8e69d2afd 100644
 --- a/src/test/codegen/repr-transparent-aggregates-1.rs
 +++ b/src/test/codegen/repr-transparent-aggregates-1.rs
 @@ -6,6 +6,7 @@
@@ -238,10 +270,10 @@ index ad1b6e96b..122d59a57 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
-index bed509d77..8bc817897 100644
+index 215af347f..a1c7e4c6a 100644
 --- a/src/tools/compiletest/src/util.rs
 +++ b/src/tools/compiletest/src/util.rs
-@@ -70,6 +70,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
+@@ -71,6 +71,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
      ("msp430", "msp430"),
      ("nvptx64", "nvptx64"),
      ("powerpc", "powerpc"),
@@ -342,3 +374,6 @@ index 4a9397331..4cf47c05d 100644
  )))]
  const ALIGNOF_MAX_ALIGN_T: usize = 8;
  #[cfg(all(any(
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch b/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
deleted file mode 100644
index d9a7ae68b6e0..000000000000
--- a/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From beb4e16f055aa7925194fd2c360105a6d55f10f6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Lo=C3=AFc=20BRANSTETT?= <lolo.branstett@numericable.fr>
-Date: Wed, 27 Apr 2022 19:11:56 +0200
-Subject: [PATCH] Add missing `target_feature` to the list of well known cfg
- names
-
----
- compiler/rustc_session/src/config.rs | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
-index 12c5c4445d46f..330201dd8fef6 100644
---- a/compiler/rustc_session/src/config.rs
-+++ b/compiler/rustc_session/src/config.rs
-@@ -1038,6 +1038,7 @@ impl CrateCheckConfig {
-             sym::target_has_atomic_load_store,
-             sym::target_has_atomic,
-             sym::target_has_atomic_equal_alignment,
-+            sym::target_feature,
-             sym::panic,
-             sym::sanitize,
-             sym::debug_assertions,
-@@ -1081,6 +1082,10 @@ impl CrateCheckConfig {
-             .into_iter()
-             .map(|sanitizer| Symbol::intern(sanitizer.as_str().unwrap()));
- 
-+        // Unknown possible values:
-+        //  - `feature`
-+        //  - `target_feature`
-+
-         // No-values
-         for name in [
-             sym::doc,
diff --git a/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch b/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch
deleted file mode 100644
index fe0377dbc381..000000000000
--- a/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/library/std/src/sys/unix/mod.rs
-+++ b/library/std/src/sys/unix/mod.rs
-@@ -212,6 +212,10 @@ cfg_if::cfg_if! {
-         #[link(name = "log")]
-         #[link(name = "gcc")]
-         extern "C" {}
-+    } else if #[cfg(all(target_os = "linux", target_env = "musl"))] {
-+	#[link(name = "ssp_nonshared")]
-+  #[link(name = "execinfo")]
-+	extern "C" {}
-     } else if #[cfg(target_os = "freebsd")] {
-         #[link(name = "execinfo")]
-         #[link(name = "pthread")]
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index da3ca779e7c6..d120f21bf50a 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -8,7 +8,7 @@
 # uploaded to https://repo-default.voidlinux.org/distfiles/
 #
 pkgname=rust
-version=1.61.0
+version=1.63.0
 revision=1
 wrksrc="rustc-${version}-src"
 hostmakedepends="cmake curl pkg-config python3 tar cargo-bootstrap"
@@ -19,7 +19,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://www.rust-lang.org/"
 distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
-checksum=ad0b4351675aa9abdf4c7e066613bd274c4391c5506db152983426376101daed
+checksum=1f9580295642ef5da7e475a8da2397d65153d3f2cb92849dbd08ed0effca99d0
 lib32disabled=yes
 make_check=no # CBA for now
 
@@ -127,6 +127,7 @@ do_configure() {
 		incremental = false
 		parallel-compiler = false
 		channel = "stable"
+		description = "Void"
 		rpath = ${_use_rpath}
 		verbose-tests = true
 		dist-src = false

From cdfcff63c0503c0d72ef7cd08f135600c39c3fe5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:35 +0200
Subject: [PATCH 4/4] cargo: update to 1.63.0.

---
 srcpkgs/cargo/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index e3c30f625acd..9f653c39fd43 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo'
 pkgname=cargo
-version=1.61.0
+version=1.63.0
 revision=1
 wrksrc="cargo-rust-${version}"
 build_helper=rust
@@ -13,7 +13,7 @@ license="MIT, Apache-2.0"
 homepage="https://crates.io/"
 distfiles="https://github.com/rust-lang/cargo/archive/rust-${version}.tar.gz
  https://github.com/crossbeam-rs/crossbeam/archive/refs/tags/crossbeam-utils-0.8.8.tar.gz"
-checksum="6261b51441f50abe08a2992a349b22a2385846bfc9cb288ae9a3a609b904099e
+checksum="b1f50e4957a0453c1513cabe98c7fd94e715cd0ca70138b1945cef338e1abf35
  52c451910203cd9002cc4b85cff95f45c6ba245392801e80d7898ca5c3c3ab29"
 replaces="cargo-tree>=0"
 

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
                   ` (9 preceding siblings ...)
  2022-08-16 15:18 ` [PR PATCH] [Updated] " jcgruenhage
@ 2022-08-17  5:43 ` jcgruenhage
  2022-08-17 13:23 ` jcgruenhage
                   ` (12 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jcgruenhage @ 2022-08-17  5:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 321 bytes --]

New comment by jcgruenhage on void-packages repository

https://github.com/void-linux/void-packages/pull/38662#issuecomment-1217487030

Comment:
Sorry for the hold-up, I'm currently building the bootstrap packages and really am in need for a faster build machine, lol, waiting hours per architecture isn't exactly great.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
                   ` (10 preceding siblings ...)
  2022-08-17  5:43 ` jcgruenhage
@ 2022-08-17 13:23 ` jcgruenhage
  2022-08-19  9:17 ` [PR PATCH] [Updated] " jcgruenhage
                   ` (11 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jcgruenhage @ 2022-08-17 13:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 520 bytes --]

New comment by jcgruenhage on void-packages repository

https://github.com/void-linux/void-packages/pull/38662#issuecomment-1217486137

Comment:
> I noticed that the `rust.description` field in the config.toml hasn't been set yet ([reference](https://github.com/rust-lang/rust/blob/4916e2b9e6ef8cee6f9c6abb75bd01ba9dc07e5c/config.toml.example#L521-L524)), could you maybe also include that here?

Added this now, thanks for the pointer.

Edit: Output now is this:

```
$ rustc --version
rustc 1.63.0 (Void)
```

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PR PATCH] [Updated] Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
                   ` (11 preceding siblings ...)
  2022-08-17 13:23 ` jcgruenhage
@ 2022-08-19  9:17 ` jcgruenhage
  2022-08-19  9:22 ` [PR REVIEW] " jcgruenhage
                   ` (10 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jcgruenhage @ 2022-08-19  9:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 864 bytes --]

There is an updated pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages rust-1.63
https://github.com/void-linux/void-packages/pull/38662

Update Rust toolchain to 1.63.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

[ci skip]

`cargo-crev` requires 1.62 at least, so I thought I'd gave updating Rust a go, and it worked out just fine tbh. The new `cargo-crev` release compiled fine on this toolchain and works properly.

#### Local build testing
- I built this PR natively for
  - `x86_64`, `glibc` and `musl`
  - `i686`, `glibc`
- I crossbuilt this PR for
  - `aarch64`, `musl`


A patch file from https://github.com/void-linux/void-packages/pull/38662.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rust-1.63-38662.patch --]
[-- Type: text/x-diff, Size: 55368 bytes --]

From ab4a8a921ce5c5e0435b4a7c2e79a2190c6bf070 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:01 +0200
Subject: [PATCH 1/4] rust-bootstrap: update to 1.63.0.

---
 srcpkgs/rust-bootstrap/template | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/rust-bootstrap/template b/srcpkgs/rust-bootstrap/template
index 66d04d634638..47742bf17eae 100644
--- a/srcpkgs/rust-bootstrap/template
+++ b/srcpkgs/rust-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'rust-bootstrap'
 pkgname=rust-bootstrap
-version=1.61.0
+version=1.63.0
 revision=1
 create_wrksrc=yes
 short_desc="Rust programming language bootstrap toolchain"
@@ -29,38 +29,38 @@ distfiles="
 case "$XBPS_TARGET_MACHINE" in
 	i686)
 		checksum="
-		 8af0ec3eb470e7e28439fedf9ebdadf90df8c58da544cc643033e6fc0ccf0bea
-		 ab223fcec35183bc0fe630403537cd7dae55c403103df29b25077db4882cb88e"
+		 11d3729f0343a069e9e59531745170cb0b6ce68f73848699564ea0bbcbf2c02f
+		 3177d3a159b4fcd54bca93d09ff1a903689a64ed4037699de372e685d12d4335"
 		;;
 	x86_64)
 		checksum="
-		 21c4613f389ed130fbaaf88f1e984319f72b5fc10734569a5ba19e22ebb03abd
-		 270b07aa5f2de52255a117e1e587138d77375ce0d09a1d7fead085f29b3977e9"
+		 bdab9d9afa5c329c40f9ba568364815237fab8426477c12bfabad35ffc484ab5
+		 993c2c17bf76ac626bfb5b17bddce65fbdfc14f70d183f33773de0cd12df46d2"
 		;;
 	x86_64-musl)
 		checksum="
-		 89cb72cbc493cb5cd8e43830009b4a1a5bfd472246ae184157868c9b0607bf6c
-		 1f4f2e4c5dd0f9b0dac7c8888f4a49ef16a6fe8992f39895823d2a442f0fe408"
+		 b6566a9b1dafe03cf4a01b58b2db0e14a0044ae5773736827882bd549108277e
+		 6fcfa4f9a51d35bf2c5c92ac15c688baa8c98d9fded05ab6abfdae85cb5aed8c"
 		;;
 	ppc64le)
 		checksum="
-		 dc54893d747e4f3330515caa75e404f78c6c5475a1216d1428f5e7ce1c2e9602
-		 36c0ccff14c80419507561db050f9533f0abd43fc50f3ddb859c10df74b1c351"
+		 b3dc2c082e76b5effe0b158aac3831830168a1a6980b39347c355e49be63fcca
+		 3ae0b74ba428c569fcecebbb09060ad0bd434a5f1fc9ffd1329b56941a897b6e"
 		;;
 	ppc64le-musl)
 		checksum="
-		 2191613e654a192dc6dbab693ecb90a3669d7c71a29d392271138b3bb77fdb54
-		 2a587565344e44bfa55e56df24e54f0f706e8280b3eccb45940af161205c9524"
+		 63273dc52f3f9e16e26de1c2f5749cabc3c958af5416cf6da6c7600ddf086447
+		 6f78a87825c624b85c7c5c2a47a185d354a72b1604e354fae40888958069d4d1"
 		;;
 	ppc64)
 		checksum="
-		 070a334ecf824a99b89385f5b286632c3a7e88c921186f0cc75ede31501df3a3
-		 0be4769a41fe2bcdcda2e5c92759826a59828615a5df057a09f2107dba888d72"
+		 52dacd9c0adda206bc0255dc978f53453fec995a33a905c2b1cf9b1b1fe8089b
+		 514e5f62cb17a0d0ee2981bfb1aba9284f37eb44a20ff36164faab32cc0a22bc"
 		;;
 	ppc)
 		checksum="
-		 f28a8c2986fce5015c67823e39ad4b53e2db06603b6ea4a1217ac961cbbfb073
-		 7d2f7f900c8c05616fba8e99ab041d847af3653c259b99445edd788acddf878c"
+		 7a99dd6a7f30b8a8f85d95f47fa77084a48c7ebc94092978daa3563268a4b15b
+		 a25719c0ad2a5e7f52eed87b75cb76c4a52b8dc6e24b4bef16ed7fb9133e5b42"
 		;;
 	*) broken="rust bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac

From 84b3c695e7f5ce9cfbebc29d9ec1194be4d7580c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:24 +0200
Subject: [PATCH 2/4] cargo-bootstrap: update to 1.63.0.

---
 srcpkgs/cargo-bootstrap/template | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/cargo-bootstrap/template b/srcpkgs/cargo-bootstrap/template
index 0fdaac840a3c..da727491a6a4 100644
--- a/srcpkgs/cargo-bootstrap/template
+++ b/srcpkgs/cargo-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo-bootstrap'
 pkgname=cargo-bootstrap
-version=1.61.0
+version=1.63.0
 revision=1
 short_desc="Bootstrap binaries of Rust package manager"
 maintainer="q66 <daniel@octaforge.org>"
@@ -26,25 +26,25 @@ distfiles="${_bootstrap_url}/cargo-${version}-${RUST_TARGET}.tar.xz"
 
 case "$XBPS_TARGET_MACHINE" in
 	i686)
-		checksum="fe258b85ef0644ff08c2095e329399dd4de0e1b2e51f4f4e90cb956d40dc61de"
+		checksum="6f2c109fc38ed8ccadcdcccf51d11505651ca9e12c396ab46ac1dbb55265b792"
 		;;
 	x86_64)
-		checksum="9461727d754f865ef2a87479d40bbe4c5176f80963b7c50b7797bc8940d7a0a0"
+		checksum="f370d12e4c11f0c835becb738bcf00d363f29b76f8b424b4dcb005abcf15fc9a"
 		;;
 	x86_64-musl)
-		checksum="db4b4423c2843b6e27737664cf8085afcba670374110ca24b9c8d341045e748c"
+		checksum="6f6ce044832a2433c250f4f27a61f69081e2b0f7e4e1f141492c2ce99ee8511e"
 		;;
 	ppc64le)
-		checksum="09817011ff1ef4b7006387c7cabb6a059731792a9372533dec7d87e7f014444b"
+		checksum="a4cdc00a42fd767bf5a296f7126d9db22a0a609cd956bbf0cb3eae882add1be7"
 		;;
 	ppc64le-musl)
-		checksum="39215cba9b1bda63209cac0edbda583e0c822f88a50fdbf33255c8c5386e4868"
+		checksum="3dc497186493a9fc974ae8add91a6fed34d95e263bedb95142d636ba257b2240"
 		;;
 	ppc64)
-		checksum="3fa6e033bbbab339e480842627523f95d84119a5dcae56ad4b14e5c6d1536e6b"
+		checksum="babded6c2d112aa92cb1af5ca24d93a034b20c0315f03c231a4eb3a92408a6cd"
 		;;
 	ppc)
-		checksum="5d6226a5080e429cb6bb8366ff1f71feeccde70f8bf6651779674fe27eb35e7f"
+		checksum="3c7f4d28987d8bf5d10fb0cf4ec792b73a4725add2845d69b85e36d47f3c228e"
 		;;
 	*) broken="cargo bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac

From bd7cbc65954b037d766b33b666a526fce5365dbd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:31 +0200
Subject: [PATCH 3/4] rust: update to 1.63.0.

---
 .../rust/patches/0001-Fix-LLVM-build.patch    |  8 +--
 ...lib-and-musl_root-from-musl-targets.patch} | 65 ++++++++++++-------
 ...e-debugger-scripts-to-usr-share-rust.patch | 10 +--
 ...4-fix-shebang-on-install-template.sh.patch |  6 +-
 ...fer-libgcc_eh-over-libunwind-on-musl.patch | 24 -------
 ...ot-install-libunwind-source-removed.patch} | 10 +--
 ...06-fix-rustdoc-when-cross-compiling.patch} | 25 +++----
 ...stage-2-tools-dynamically-to-libstd.patch} | 10 +--
 ...against-host-target-LLVM-in-cross-s.patch} | 16 ++++-
 .../0009-do-not-export-LD_LIBRARY_PATH.patch  | 29 +++++++++
 ...age-of-musl-libc-for-the-libc-crate.patch} | 16 ++---
 .../0010-do-not-export-LD_LIBRARY_PATH.patch  | 23 -------
 ...-ELFv2-ABI-on-all-powerpc64-targets.patch} | 22 +++----
 ...e-initial-exec-TLS-model-on-powerpc.patch} | 11 ++--
 ...g-native-sysroot-to-use-for-linkage.patch} | 40 ++++++++----
 ...-of-need-ssp_nonshared.patch-from-al.patch | 28 ++++++++
 ...le.patch => 0015-initial-ppcle-port.patch} | 55 +++++++++++++---
 ...e16f055aa7925194fd2c360105a6d55f10f6.patch | 33 ----------
 .../need-ssp-nonshared-and-execinfo.patch     | 13 ----
 srcpkgs/rust/template                         |  5 +-
 20 files changed, 250 insertions(+), 199 deletions(-)
 rename srcpkgs/rust/patches/{0001-musl-void-setup.patch => 0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch} (89%)
 delete mode 100644 srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
 rename srcpkgs/rust/patches/{0006-do-not-install-libunwind-source-removed.patch => 0005-do-not-install-libunwind-source-removed.patch} (73%)
 rename srcpkgs/rust/patches/{0007-fix-rustdoc-when-cross-compiling.patch => 0006-fix-rustdoc-when-cross-compiling.patch} (67%)
 rename srcpkgs/rust/patches/{0008-link-stage-2-tools-dynamically-to-libstd.patch => 0007-link-stage-2-tools-dynamically-to-libstd.patch} (78%)
 rename srcpkgs/rust/patches/{0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch => 0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch} (71%)
 create mode 100644 srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
 rename srcpkgs/rust/patches/{0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch => 0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch} (69%)
 delete mode 100644 srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
 rename srcpkgs/rust/patches/{0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch => 0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch} (74%)
 rename srcpkgs/rust/patches/{fix-ppc32.patch => 0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch} (78%)
 rename srcpkgs/rust/patches/{native-sysroot.patch => 0013-allow-specifying-native-sysroot-to-use-for-linkage.patch} (69%)
 create mode 100644 srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
 rename srcpkgs/rust/patches/{xxx-ppcle.patch => 0015-initial-ppcle-port.patch} (85%)
 delete mode 100644 srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
 delete mode 100644 srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch

diff --git a/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch b/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
index 0da829af1da9..6cf9c3a755a9 100644
--- a/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
+++ b/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
@@ -1,4 +1,4 @@
-From 4443eca0d6b3ba599832b2f73a5350fdd0c90d10 Mon Sep 17 00:00:00 2001
+From 99a046adc7d1c7b2da3a31e077722ea69f84eeb6 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/15] Fix LLVM build
@@ -8,10 +8,10 @@ Subject: [PATCH 01/15] Fix LLVM build
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index a476d25f..c7e63990 100644
+index 4ac857b47..b603ae90a 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -768,7 +768,8 @@ impl Build {
+@@ -1050,7 +1050,8 @@ impl Build {
              .args()
              .iter()
              .map(|s| s.to_string_lossy().into_owned())
@@ -22,5 +22,5 @@ index a476d25f..c7e63990 100644
  
          // If we're compiling on macOS then we add a few unconditional flags
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0001-musl-void-setup.patch b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
similarity index 89%
rename from srcpkgs/rust/patches/0001-musl-void-setup.patch
rename to srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
index c13cb1730986..c156945b8111 100644
--- a/srcpkgs/rust/patches/0001-musl-void-setup.patch
+++ b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
@@ -1,5 +1,23 @@
+From 7219ba1c9accbad9b530d312fd9a9f69330c93da Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 3 May 2020 17:53:33 +0200
+Subject: [PATCH 02/15] Remove -nostdlib and musl_root from musl targets
+
+extended by various void contributors to match our musl setup
+---
+ compiler/rustc_target/src/spec/crt_objects.rs | 22 ----------
+ .../rustc_target/src/spec/linux_musl_base.rs  |  7 ---
+ config.toml.example                           |  8 ----
+ src/bootstrap/cc_detect.rs                    | 25 +----------
+ src/bootstrap/compile.rs                      | 43 +------------------
+ src/bootstrap/config.rs                       |  9 ----
+ src/bootstrap/configure.py                    | 28 ------------
+ src/bootstrap/lib.rs                          | 19 --------
+ src/bootstrap/sanity.rs                       | 23 ----------
+ 9 files changed, 3 insertions(+), 181 deletions(-)
+
 diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
-index 51f392a6..62560658 100644
+index 52ac3622e..f35e5b9d8 100644
 --- a/compiler/rustc_target/src/spec/crt_objects.rs
 +++ b/compiler/rustc_target/src/spec/crt_objects.rs
 @@ -63,28 +63,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects {
@@ -32,7 +50,7 @@ index 51f392a6..62560658 100644
      new(&[
          (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
 diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs
-index 207a87ab..88f807a5 100644
+index 207a87ab0..88f807a58 100644
 --- a/compiler/rustc_target/src/spec/linux_musl_base.rs
 +++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
 @@ -1,16 +1,9 @@
@@ -53,10 +71,10 @@ index 207a87ab..88f807a5 100644
      base
  }
 diff --git a/config.toml.example b/config.toml.example
-index 6e53d9b4..74980d2c 100644
+index b3284050f..62ac07f87 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -511,14 +511,6 @@ changelog-seen = 2
+@@ -523,14 +523,6 @@ changelog-seen = 2
  # supplementary build information, like distro-specific package versions.
  #description = <none> (string)
  
@@ -72,7 +90,7 @@ index 6e53d9b4..74980d2c 100644
  # 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
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index 7ce44687..4e7507ae 100644
+index dca782c29..8eb35ea43 100644
 --- a/src/bootstrap/cc_detect.rs
 +++ b/src/bootstrap/cc_detect.rs
 @@ -97,7 +97,7 @@ pub fn find(build: &mut Build) {
@@ -93,7 +111,7 @@ index 7ce44687..4e7507ae 100644
              true
          } else {
              // Use an auto-detected compiler (or one configured via `CXX_target_triple` env vars).
-@@ -157,7 +157,6 @@ fn set_compiler(
+@@ -161,7 +161,6 @@ fn set_compiler(
      compiler: Language,
      target: TargetSelection,
      config: Option<&Target>,
@@ -101,7 +119,7 @@ index 7ce44687..4e7507ae 100644
  ) {
      match &*target.triple {
          // When compiling for android we may have the NDK configured in the
-@@ -200,26 +199,6 @@ fn set_compiler(
+@@ -204,26 +203,6 @@ fn set_compiler(
              }
          }
  
@@ -129,10 +147,10 @@ index 7ce44687..4e7507ae 100644
      }
  }
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index afc333b5..9d67ab56 100644
+index b4807d1ab..ce483bf6b 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -197,39 +197,7 @@ fn copy_self_contained_objects(
+@@ -200,39 +200,7 @@ fn copy_self_contained_objects(
      let mut target_deps = vec![];
  
      // Copies the libc and CRT objects.
@@ -173,7 +191,7 @@ index afc333b5..9d67ab56 100644
          let srcdir = builder
              .wasi_root(target)
              .unwrap_or_else(|| {
-@@ -313,15 +281,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+@@ -316,15 +284,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
              .arg("--manifest-path")
              .arg(builder.src.join("library/test/Cargo.toml"));
  
@@ -190,10 +208,10 @@ index afc333b5..9d67ab56 100644
              if let Some(p) = builder.wasi_root(target) {
                  let root = format!("native={}/lib/wasm32-wasi", p.to_str().unwrap());
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 9534cc5f..642a5c24 100644
+index 146077419..18a764689 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -172,7 +172,6 @@ pub struct Config {
+@@ -186,7 +186,6 @@ pub struct Config {
      pub missing_tools: bool,
  
      // Fallback musl-root for all targets
@@ -201,7 +219,7 @@ index 9534cc5f..642a5c24 100644
      pub prefix: Option<PathBuf>,
      pub sysconfdir: Option<PathBuf>,
      pub datadir: Option<PathBuf>,
-@@ -299,8 +298,6 @@ pub struct Target {
+@@ -400,8 +399,6 @@ pub struct Target {
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
      pub crt_static: Option<bool>,
@@ -210,7 +228,7 @@ index 9534cc5f..642a5c24 100644
      pub wasi_root: Option<PathBuf>,
      pub qemu_rootfs: Option<PathBuf>,
      pub no_std: bool,
-@@ -587,7 +584,6 @@ struct Rust {
+@@ -689,7 +686,6 @@ define_config! {
          default_linker: Option<String> = "default-linker",
          channel: Option<String> = "channel",
          description: Option<String> = "description",
@@ -218,7 +236,7 @@ index 9534cc5f..642a5c24 100644
          rpath: Option<bool> = "rpath",
          verbose_tests: Option<bool> = "verbose-tests",
          optimize_tests: Option<bool> = "optimize-tests",
-@@ -631,8 +627,6 @@ struct TomlTarget {
+@@ -734,8 +730,6 @@ define_config! {
          sanitizers: Option<bool> = "sanitizers",
          profiler: Option<bool> = "profiler",
          crt_static: Option<bool> = "crt-static",
@@ -227,7 +245,7 @@ index 9534cc5f..642a5c24 100644
          wasi_root: Option<String> = "wasi-root",
          qemu_rootfs: Option<String> = "qemu-rootfs",
          no_std: Option<bool> = "no-std",
-@@ -1013,7 +1007,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1107,7 +1101,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;
@@ -235,7 +253,7 @@ index 9534cc5f..642a5c24 100644
              config.save_toolstates = rust.save_toolstates.map(PathBuf::from);
              set(&mut config.deny_warnings, flags.deny_warnings.or(rust.deny_warnings));
              set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
-@@ -1059,8 +1052,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1164,8 +1157,6 @@ impl Config {
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
                  target.crt_static = cfg.crt_static;
@@ -245,7 +263,7 @@ index 9534cc5f..642a5c24 100644
                  target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
                  target.sanitizers = cfg.sanitizers;
 diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
-index 87a130a0..bd4c9197 100755
+index 2fc036082..91737e0ea 100755
 --- a/src/bootstrap/configure.py
 +++ b/src/bootstrap/configure.py
 @@ -114,34 +114,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
@@ -284,10 +302,10 @@ index 87a130a0..bd4c9197 100755
    "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 570a6174..f3d5f308 100644
+index b603ae90a..0a7012dbd 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1125,25 +1125,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1153,25 +1153,6 @@ impl Build {
          }
      }
  
@@ -314,7 +332,7 @@ index 570a6174..f3d5f308 100644
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
          self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
 diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index 8c2899c1..dda15d76 100644
+index 64c5dd7ae..b8f9104ea 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
 @@ -11,7 +11,6 @@
@@ -325,7 +343,7 @@ index 8c2899c1..dda15d76 100644
  use std::path::PathBuf;
  use std::process::Command;
  
-@@ -177,28 +176,6 @@ pub fn check(build: &mut Build) {
+@@ -190,28 +189,6 @@ than building it.
              }
          }
  
@@ -354,3 +372,6 @@ index 8c2899c1..dda15d76 100644
          if need_cmake && target.contains("msvc") {
              // There are three builds of cmake on windows: MSVC, MinGW, and
              // Cygwin. The Cygwin build does not have generators for Visual
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch b/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
index 3c4e1cb96475..bc7053800945 100644
--- a/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
+++ b/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
@@ -1,7 +1,7 @@
-From f9a680688a685ec47ee5ec001574d9b91b4ba35e Mon Sep 17 00:00:00 2001
+From 8938b002edbec432be46de7b6f1b9d0a6912873a Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 00:45:35 +0100
-Subject: [PATCH 3/9] move debugger scripts to /usr/share/rust
+Subject: [PATCH 03/15] move debugger scripts to /usr/share/rust
 
 ---
  src/bootstrap/dist.rs | 2 +-
@@ -11,10 +11,10 @@ Subject: [PATCH 3/9] move debugger scripts to /usr/share/rust
  4 files changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index d4875cfe1..e8b61b8a2 100644
+index b1fae356d..e7a077134 100644
 --- a/src/bootstrap/dist.rs
 +++ b/src/bootstrap/dist.rs
-@@ -499,7 +499,7 @@ impl Step for DebuggerScripts {
+@@ -460,7 +460,7 @@ impl Step for DebuggerScripts {
      fn run(self, builder: &Builder<'_>) {
          let host = self.host;
          let sysroot = self.sysroot;
@@ -65,5 +65,5 @@ index bce72f1ba..8abb01245 100755
  # Call LLDB with the commands added to the argument list
  exec "$lldb" --one-line-before-file "$script_import" --source-before-file "$commands_file" "$@"
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch b/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
index 2e9cd93fdfb9..2ca7ffeaf73f 100644
--- a/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
+++ b/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
@@ -1,7 +1,7 @@
-From d5a6a431024790c911d04fd54381c515fb05819e Mon Sep 17 00:00:00 2001
+From d7d7fc24d1744a3db70a9fb010c31daa14a46df7 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 00:55:18 +0100
-Subject: [PATCH 4/9] fix shebang on install-template.sh
+Subject: [PATCH 04/15] fix shebang on install-template.sh
 
 ---
  src/tools/rust-installer/install-template.sh | 2 +-
@@ -18,5 +18,5 @@ index e68be8911..beaa90f7b 100644
  # file at the top-level directory of this distribution and at
  # http://rust-lang.org/COPYRIGHT.
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch b/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
deleted file mode 100644
index 30cb66fc24b1..000000000000
--- a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Additions for build.rs by q66, necessary for our musl setup.
-
-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/library/unwind/src/lib.rs
-+++ b/library/unwind/src/lib.rs
-@@ -51,7 +51,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", cfg(target_feature = "crt-static"))]
-         #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
-         extern "C" {}
-     }
diff --git a/srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch b/srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
similarity index 73%
rename from srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch
rename to srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
index 0128b8fc61f2..92e0021ab6f4 100644
--- a/srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch
+++ b/srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
@@ -1,17 +1,17 @@
-From fc69414484327e4dbff138dd0834fc3bde626008 Mon Sep 17 00:00:00 2001
+From 1335a445327a6605c5f933d9647b97e771089abd Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:44:54 +0100
-Subject: [PATCH 6/9] do not install libunwind source (removed)
+Subject: [PATCH 05/15] do not install libunwind source (removed)
 
 ---
  src/bootstrap/dist.rs | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index e8b61b8a2..02d24a77d 100644
+index e7a077134..74e75df4b 100644
 --- a/src/bootstrap/dist.rs
 +++ b/src/bootstrap/dist.rs
-@@ -849,7 +849,7 @@ impl Step for Src {
+@@ -804,7 +804,7 @@ impl Step for Src {
          copy_src_dirs(
              builder,
              &builder.src,
@@ -21,5 +21,5 @@ index e8b61b8a2..02d24a77d 100644
                  // not needed and contains symlinks which rustup currently
                  // chokes on when unpacking.
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch b/srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
similarity index 67%
rename from srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
rename to srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
index 2cc1f6b900d3..88eaf65de8b7 100644
--- a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
+++ b/srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
@@ -1,17 +1,17 @@
-From 81ba387384e8ce0aa9bb9b4bd76014d922d85de8 Mon Sep 17 00:00:00 2001
+From 50075907c3dd2f06d471b3375d7c0ee850263eb2 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:48:14 +0100
-Subject: [PATCH 7/9] fix rustdoc when cross-compiling
+Subject: [PATCH 06/15] fix rustdoc when cross-compiling
 
 ---
  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 e4396d530..cb2312028 100644
+index 5f85fc5aa..01e81fc39 100644
 --- a/src/bootstrap/bin/rustdoc.rs
 +++ b/src/bootstrap/bin/rustdoc.rs
-@@ -22,14 +22,11 @@ fn main() {
+@@ -26,9 +26,6 @@ fn main() {
          Err(_) => 0,
      };
  
@@ -19,15 +19,18 @@ index e4396d530..cb2312028 100644
 -    dylib_path.insert(0, PathBuf::from(libdir.clone()));
 -
      let mut cmd = Command::new(rustdoc);
-     cmd.args(&args)
-         .arg("--sysroot")
-         .arg(&sysroot)
--        .env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
-+        .env(dylib_path_var(), PathBuf::from(libdir.clone()));
+ 
+     // cfg(bootstrap)
+@@ -43,7 +40,7 @@ fn main() {
+     }
+ 
+     cmd.args(&args);
+-    cmd.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
++    cmd.env(dylib_path_var(), PathBuf::from(libdir.clone()));
  
      // Force all crates compiled by this compiler to (a) be unstable and (b)
      // allow the `rustc_private` feature to link to other unstable crates
-@@ -62,7 +59,7 @@ fn main() {
+@@ -69,7 +66,7 @@ fn main() {
          eprintln!(
              "rustdoc command: {:?}={:?} {:?}",
              dylib_path_var(),
@@ -37,5 +40,5 @@ index e4396d530..cb2312028 100644
          );
          eprintln!("sysroot: {:?}", sysroot);
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch b/srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
similarity index 78%
rename from srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch
rename to srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
index f6793d8a3202..198e4fcc7a6a 100644
--- a/srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch
+++ b/srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
@@ -1,7 +1,7 @@
-From 1c4a66621a5fa34c78fc020084e4166f3af7cbb5 Mon Sep 17 00:00:00 2001
+From c2de45cbdaee1a8c81b2d65f6bced1439a738e00 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:48:49 +0100
-Subject: [PATCH 8/9] link stage 2 tools dynamically to libstd
+Subject: [PATCH 07/15] link stage 2 tools dynamically to libstd
 
 stage 2 tools are the ones that are distributed, and we distribute
 them together with the rust libs so there is no need to worry
@@ -11,10 +11,10 @@ about unstable ABI
  1 file changed, 2 insertions(+)
 
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index 6750f7a54..de771280e 100644
+index 62b5416ce..554dd4188 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1520,6 +1520,8 @@ impl<'a> Builder<'a> {
+@@ -2066,6 +2066,8 @@ impl<'a> Builder<'a> {
          // linking all deps statically into the dylib.
          if matches!(mode, Mode::Std | Mode::Rustc) {
              rustflags.arg("-Cprefer-dynamic");
@@ -24,5 +24,5 @@ index 6750f7a54..de771280e 100644
  
          // When building incrementally we default to a lower ThinLTO import limit
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch b/srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
similarity index 71%
rename from srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch
rename to srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
index 3b2e388c014e..3edba737f923 100644
--- a/srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch
+++ b/srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
@@ -1,8 +1,18 @@
+From f229c2bbd32deab98978d8453d0f44f23849fa09 Mon Sep 17 00:00:00 2001
+From: q66 <daniel@octaforge.org>
+Date: Sun, 3 May 2020 18:05:22 +0200
+Subject: [PATCH 08/15] Void: fix linkage against host/target LLVM in cross
+ setups
+
+---
+ compiler/rustc_llvm/build.rs | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
 diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs
-index 36a6d2cc3..af4e1219f 100644
+index 7729ec6be..66b8a4215 100644
 --- a/compiler/rustc_llvm/build.rs
 +++ b/compiler/rustc_llvm/build.rs
-@@ -230,9 +230,11 @@ fn main() {
+@@ -291,9 +291,11 @@ fn main() {
      for lib in output(&mut cmd).split_whitespace() {
          if is_crossed {
              if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
@@ -17,5 +27,5 @@ index 36a6d2cc3..af4e1219f 100644
          } else if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
              println!("cargo:rustc-link-search=native={}", stripped);
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch b/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
new file mode 100644
index 000000000000..f66766270a12
--- /dev/null
+++ b/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
@@ -0,0 +1,29 @@
+From 5e9e5fa2b2aefefbdc00547d7f10ee92d9b3356a Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Tue, 21 Dec 2021 00:48:29 +0100
+Subject: [PATCH 09/15] do not export LD_LIBRARY_PATH
+
+---
+ src/bootstrap/bootstrap.py | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
+index 40d478a17..3501fd901 100644
+--- a/src/bootstrap/bootstrap.py
++++ b/src/bootstrap/bootstrap.py
+@@ -756,12 +756,6 @@ class RustBuild(object):
+             del env["CARGO_BUILD_TARGET"]
+         env["CARGO_TARGET_DIR"] = build_dir
+         env["RUSTC"] = self.rustc()
+-        env["LD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+-            (os.pathsep + env["LD_LIBRARY_PATH"]) \
+-            if "LD_LIBRARY_PATH" in env else ""
+-        env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+-            (os.pathsep + env["DYLD_LIBRARY_PATH"]) \
+-            if "DYLD_LIBRARY_PATH" in env else ""
+         env["LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+             (os.pathsep + env["LIBRARY_PATH"]) \
+             if "LIBRARY_PATH" in env else ""
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch b/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
similarity index 69%
rename from srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
rename to srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
index 8a18e414e209..f2780ae08dfb 100644
--- a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
+++ b/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
@@ -1,18 +1,17 @@
-From e363a0e0ff7ffc8bd83f72ec1a20d289996b6370 Mon Sep 17 00:00:00 2001
+From 7e100ca9dad23efa1aafccd8faf86ec5fa85c351 Mon Sep 17 00:00:00 2001
 From: q66 <daniel@octaforge.org>
 Date: Sun, 3 May 2020 18:02:03 +0200
-Subject: [PATCH 12/15] Fix dynamic linkage of musl libc for the libc crate
+Subject: [PATCH 10/15] Fix dynamic linkage of musl libc for the libc crate
 
 ---
- vendor/libc/src/lib.rs      | 1 +
  vendor/libc/src/unix/mod.rs | 6 +++---
- 2 files changed, 4 insertions(+), 3 deletions(-)
+ 1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs
-index 238da24b..ffb05ee7 100644
+index ecee44411..7ae05f24e 100644
 --- a/vendor/libc/src/unix/mod.rs
 +++ b/vendor/libc/src/unix/mod.rs
-@@ -329,11 +329,11 @@ cfg_if! {
+@@ -337,11 +337,11 @@ cfg_if! {
          #[link(name = "c", cfg(not(target_feature = "crt-static")))]
          extern {}
      } else if #[cfg(target_env = "musl")] {
@@ -20,14 +19,13 @@ index 238da24b..ffb05ee7 100644
 +        extern {}
          #[cfg_attr(feature = "rustc-dep-of-std",
 -                   link(name = "c", kind = "static", modifiers = "-bundle",
-+                   link(name = "gcc", kind = "static-nobundle",
++                   link(name = "gcc", kind = "static", modifiers = "-bundle",
                          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")]
-index 0b1496af..7f7e85a7 100644
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch b/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
deleted file mode 100644
index d7714d5ee4fd..000000000000
--- a/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-commit 798e44e67c0bac6509b7915767450b0381c94017
-Author: Daniel Kolesa <daniel@octaforge.org>
-Date:   Tue Dec 21 00:48:29 2021 +0100
-
-    do not export LD_LIBRARY_PATH
-
-diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 0170be967..f7a9ec785 100644
---- a/src/bootstrap/bootstrap.py
-+++ b/src/bootstrap/bootstrap.py
-@@ -924,12 +924,6 @@ class RustBuild(object):
-             del env["CARGO_BUILD_TARGET"]
-         env["CARGO_TARGET_DIR"] = build_dir
-         env["RUSTC"] = self.rustc(True)
--        env["LD_LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
--            (os.pathsep + env["LD_LIBRARY_PATH"]) \
--            if "LD_LIBRARY_PATH" in env else ""
--        env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
--            (os.pathsep + env["DYLD_LIBRARY_PATH"]) \
--            if "DYLD_LIBRARY_PATH" in env else ""
-         env["LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
-             (os.pathsep + env["LIBRARY_PATH"]) \
-             if "LIBRARY_PATH" in env else ""
diff --git a/srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
similarity index 74%
rename from srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
rename to srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
index 3f3bd3212bb9..347ee613983d 100644
--- a/srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
+++ b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
@@ -1,24 +1,24 @@
-From c6b54a373e74a1e4ce64f349b5b69105f2bc1a49 Mon Sep 17 00:00:00 2001
+From de93abe8a0d9dc7878a48f61b9e3ae4a923020f6 Mon Sep 17 00:00:00 2001
 From: q66 <daniel@octaforge.org>
 Date: Sun, 3 May 2020 18:08:09 +0200
-Subject: [PATCH 15/15] Use ELFv2 ABI on all powerpc64 targets
+Subject: [PATCH 11/15] Use ELFv2 ABI on all powerpc64 targets
 
 This patches librustc_target so that ELFv2 is used everywhere, matching our
 LLVM. While this is not perfect (it does not allow rustc to compile legacy
 binaries), rustc never requests specific ABI from llvm in the first place,
 so at least match the environment we have.
 ---
- src/librustc_target/abi/call/powerpc64.rs               | 9 +--------
- src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs | 6 +-----
+ compiler/rustc_target/src/abi/call/powerpc64.rs          | 9 +--------
+ .../rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs | 6 +-----
  2 files changed, 2 insertions(+), 13 deletions(-)
 
 diff --git a/compiler/rustc_target/src/abi/call/powerpc64.rs b/compiler/rustc_target/src/abi/call/powerpc64.rs
-index 8c2a9d09a..2dcbf2c09 100644
+index c22ef9c8f..932172b2f 100644
 --- a/compiler/rustc_target/src/abi/call/powerpc64.rs
 +++ b/compiler/rustc_target/src/abi/call/powerpc64.rs
 @@ -119,14 +119,7 @@ where
-     Ty: TyAndLayoutMethods<'a, C> + Copy,
-     C: LayoutOf<Ty = Ty, TyAndLayout = TyAndLayout<'a, Ty>> + HasDataLayout + HasTargetSpec,
+     Ty: TyAbiInterface<'a, C> + Copy,
+     C: HasDataLayout + HasTargetSpec,
  {
 -    let abi = if cx.target_spec().env == "musl" {
 -        ELFv2
@@ -33,7 +33,7 @@ index 8c2a9d09a..2dcbf2c09 100644
      if !fn_abi.ret.is_ignore() {
          classify_ret(cx, &mut fn_abi.ret, abi);
 diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
-index 751022c12..c4d55a62e 100644
+index 24d5d187e..aa594b02e 100644
 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
 +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
 @@ -1,5 +1,5 @@
@@ -44,7 +44,7 @@ index 751022c12..c4d55a62e 100644
  pub fn target() -> Target {
      let mut base = super::linux_gnu_base::opts();
 @@ -7,10 +7,6 @@ pub fn target() -> Target {
-     base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
+     base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m64".into());
      base.max_atomic_width = Some(64);
  
 -    // ld.so in at least RHEL6 on ppc64 has a bug related to BIND_NOW, so only enable partial RELRO
@@ -52,8 +52,8 @@ index 751022c12..c4d55a62e 100644
 -    base.relro_level = RelroLevel::Partial;
 -
      Target {
-         llvm_target: "powerpc64-unknown-linux-gnu".to_string(),
+         llvm_target: "powerpc64-unknown-linux-gnu".into(),
          pointer_width: 64,
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/fix-ppc32.patch b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
similarity index 78%
rename from srcpkgs/rust/patches/fix-ppc32.patch
rename to srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
index 739ce4bce7f0..7b1ba46b1f2b 100644
--- a/srcpkgs/rust/patches/fix-ppc32.patch
+++ b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
@@ -1,7 +1,7 @@
-From 283619cf5ca25272b294525273ec42e9c7820edb Mon Sep 17 00:00:00 2001
+From 4b803b211f765f6c6b18223e23670dbf754a980f Mon Sep 17 00:00:00 2001
 From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
 Date: Sat, 29 May 2021 12:38:46 +0000
-Subject: [PATCH] bootstrap: Disable initial-exec TLS model on powerpc
+Subject: [PATCH 12/15] bootstrap: Disable initial-exec TLS model on powerpc
 
 Fixes #81334.
 ---
@@ -9,10 +9,10 @@ Fixes #81334.
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index 6750f7a549d..6032a685776 100644
+index 554dd4188..6a02a225c 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1299,7 +1299,7 @@ pub fn cargo(
+@@ -1844,7 +1844,7 @@ impl<'a> Builder<'a> {
          // efficient initial-exec TLS model. This doesn't work with `dlopen`,
          // so we can't use it by default in general, but we can use it for tools
          // and our own internal libraries.
@@ -21,3 +21,6 @@ index 6750f7a549d..6032a685776 100644
              rustflags.arg("-Ztls-model=initial-exec");
          }
  
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/native-sysroot.patch b/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
similarity index 69%
rename from srcpkgs/rust/patches/native-sysroot.patch
rename to srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
index 6826b114b6b7..2414d72380b6 100644
--- a/srcpkgs/rust/patches/native-sysroot.patch
+++ b/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
@@ -1,8 +1,21 @@
+From 236c0272667d69380d03984cfa8bad44b033fd69 Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Tue, 21 Dec 2021 02:46:30 +0100
+Subject: [PATCH 13/15] allow specifying native sysroot to use for linkage
+
+This allows us to get around the linker attempting to use
+incompatible libs.
+---
+ src/bootstrap/builder.rs | 4 ++++
+ src/bootstrap/config.rs  | 3 +++
+ src/bootstrap/lib.rs     | 4 ++++
+ 3 files changed, 11 insertions(+)
+
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index e816f9b4..a2668fa9 100644
+index 6a02a225c..483aa8818 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1313,6 +1313,10 @@ pub fn cargo(
+@@ -1708,6 +1708,10 @@ impl<'a> Builder<'a> {
              }
          }
  
@@ -14,10 +27,10 @@ index e816f9b4..a2668fa9 100644
              cargo.env("RUSTC_HOST_LINKER", host_linker);
          }
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 642a5c24..0dd4f879 100644
+index 18a764689..f8b9bbd96 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -294,6 +294,7 @@ pub struct Target {
+@@ -395,6 +395,7 @@ pub struct Target {
      pub ranlib: Option<PathBuf>,
      pub default_linker: Option<PathBuf>,
      pub linker: Option<PathBuf>,
@@ -25,15 +38,15 @@ index 642a5c24..0dd4f879 100644
      pub ndk: Option<PathBuf>,
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
-@@ -621,6 +622,7 @@ struct TomlTarget {
+@@ -723,6 +724,7 @@ define_config! {
          ranlib: Option<String> = "ranlib",
          default_linker: Option<PathBuf> = "default-linker",
          linker: Option<String> = "linker",
 +        sysroot: Option<String> = "sysroot",
          llvm_config: Option<String> = "llvm-config",
          llvm_filecheck: Option<String> = "llvm-filecheck",
-         android_ndk: Option<String> = "android-ndk",
-@@ -1051,6 +1053,7 @@ pub fn parse(args: &[String]) -> Config {
+         llvm_libunwind: Option<String> = "llvm-libunwind",
+@@ -1156,6 +1158,7 @@ impl Config {
                  target.ar = cfg.ar.map(PathBuf::from);
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
@@ -42,17 +55,20 @@ index 642a5c24..0dd4f879 100644
                  target.wasi_root = cfg.wasi_root.map(PathBuf::from);
                  target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
 diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index f3d5f308..7f8b9b27 100644
+index 0a7012dbd..cded50d20 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1125,6 +1125,10 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1152,6 +1152,10 @@ impl Build {
+             self.config.target_config.get(&target).and_then(|t| t.crt_static)
          }
      }
- 
++    
 +    fn native_sysroot(&self, target: TargetSelection) -> Option<&Path> {
 +        self.config.target_config.get(&target).and_then(|c| c.sysroot.as_ref()).map(|p| &**p)
 +    }
-+
+ 
      /// Returns the sysroot for the wasi target, if defined
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
-         self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch b/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
new file mode 100644
index 000000000000..ec26d9c26ae0
--- /dev/null
+++ b/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
@@ -0,0 +1,28 @@
+From 0b057b456a5b24ce5cf898e47eddb7cbc7448fe2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
+Date: Fri, 16 Apr 2021 03:34:16 -0300
+Subject: [PATCH 14/15] copy new version of need-ssp_nonshared.patch from
+ alpine
+
+---
+ library/std/src/sys/unix/mod.rs | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/library/std/src/sys/unix/mod.rs b/library/std/src/sys/unix/mod.rs
+index 34a023b02..934a87570 100644
+--- a/library/std/src/sys/unix/mod.rs
++++ b/library/std/src/sys/unix/mod.rs
+@@ -297,6 +297,10 @@ cfg_if::cfg_if! {
+         #[link(name = "dl")]
+         #[link(name = "log")]
+         extern "C" {}
++    } else if #[cfg(all(target_os = "linux", target_env = "musl"))] {
++	    #[link(name = "ssp_nonshared")]
++        #[link(name = "execinfo")]
++	    extern "C" {}
+     } else if #[cfg(target_os = "freebsd")] {
+         #[link(name = "execinfo")]
+         #[link(name = "pthread")]
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/xxx-ppcle.patch b/srcpkgs/rust/patches/0015-initial-ppcle-port.patch
similarity index 85%
rename from srcpkgs/rust/patches/xxx-ppcle.patch
rename to srcpkgs/rust/patches/0015-initial-ppcle-port.patch
index c0522f0eaafc..dd6b72e21bcb 100644
--- a/srcpkgs/rust/patches/xxx-ppcle.patch
+++ b/srcpkgs/rust/patches/0015-initial-ppcle-port.patch
@@ -1,8 +1,40 @@
+From 2b3b4a11dd75ff43e0f1f12de395d0ce29f8555f Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Sat, 3 Jul 2021 21:02:03 +0200
+Subject: [PATCH 15/15] initial ppcle port
+
+---
+ compiler/rustc_middle/src/ty/layout.rs            |  5 ++++-
+ compiler/rustc_target/src/spec/mod.rs             |  2 ++
+ .../src/spec/powerpcle_unknown_linux_gnu.rs       | 15 +++++++++++++++
+ .../src/spec/powerpcle_unknown_linux_musl.rs      | 15 +++++++++++++++
+ src/bootstrap/bootstrap.py                        |  2 ++
+ .../codegen/abi-main-signature-16bit-c-int.rs     |  1 +
+ src/test/codegen/global_asm.rs                    |  1 +
+ src/test/codegen/global_asm_include.rs            |  1 +
+ src/test/codegen/global_asm_x2.rs                 |  1 +
+ src/test/codegen/repr-transparent-aggregates-1.rs |  1 +
+ src/test/codegen/repr-transparent-aggregates-2.rs |  1 +
+ src/test/codegen/stack-probes.rs                  |  1 +
+ .../run-make-fulldeps/atomic-lock-free/Makefile   |  2 ++
+ src/test/ui/abi/stack-probes-lto.rs               |  1 +
+ src/test/ui/abi/stack-probes.rs                   |  1 +
+ src/test/ui/target-feature/gate.rs                |  1 +
+ src/test/ui/target-feature/invalid-attribute.rs   |  1 +
+ src/tools/compiletest/src/util.rs                 |  1 +
+ vendor/cc/src/lib.rs                              |  1 +
+ vendor/target-lexicon/src/targets.rs              |  7 +++++++
+ vendor/tikv-jemallocator/benches/roundtrip.rs     |  3 ++-
+ vendor/tikv-jemallocator/src/lib.rs               |  3 ++-
+ 22 files changed, 64 insertions(+), 3 deletions(-)
+ create mode 100644 compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
+ create mode 100644 compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
+
 diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs
-index 0c1ab67cc..8d4e5f3cb 100644
+index 3b05e42a5..66420f507 100644
 --- a/compiler/rustc_middle/src/ty/layout.rs
 +++ b/compiler/rustc_middle/src/ty/layout.rs
-@@ -3057,6 +3057,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
+@@ -3205,6 +3205,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
              target.os == "linux" && target.arch == "sparc64" && target_env_gnu_like;
          let linux_powerpc_gnu_like =
              target.os == "linux" && target.arch == "powerpc" && target_env_gnu_like;
@@ -11,7 +43,7 @@ index 0c1ab67cc..8d4e5f3cb 100644
          use SpecAbi::*;
          let rust_abi = matches!(sig.abi, RustIntrinsic | PlatformIntrinsic | Rust | RustCall);
  
-@@ -3165,7 +3167,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
+@@ -3311,7 +3313,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
                      || (!win_x64_gnu
                          && !linux_s390x_gnu_like
                          && !linux_sparc64_gnu_like
@@ -22,10 +54,10 @@ index 0c1ab67cc..8d4e5f3cb 100644
                      arg.mode = PassMode::Ignore;
                  }
 diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
-index bd5b712c1..f60be010c 100644
+index da0589cdd..2db403913 100644
 --- a/compiler/rustc_target/src/spec/mod.rs
 +++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -824,6 +824,8 @@ supported_targets! {
+@@ -831,6 +831,8 @@ supported_targets! {
      ("powerpc-unknown-linux-gnu", powerpc_unknown_linux_gnu),
      ("powerpc-unknown-linux-gnuspe", powerpc_unknown_linux_gnuspe),
      ("powerpc-unknown-linux-musl", powerpc_unknown_linux_musl),
@@ -77,10 +109,10 @@ index 000000000..a826b6e47
 +    }
 +}
 diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 71b8f3c45..1505c12e4 100644
+index 3501fd901..a28f456d3 100644
 --- a/src/bootstrap/bootstrap.py
 +++ b/src/bootstrap/bootstrap.py
-@@ -320,9 +320,11 @@ def default_build_triple(verbose):
+@@ -339,9 +339,11 @@ def default_build_triple(verbose):
          'i786': 'i686',
          'm68k': 'm68k',
          'powerpc': 'powerpc',
@@ -141,7 +173,7 @@ index bdcf0ea84..1e2ff8b8d 100644
  // ignore-amdgcn
  // ignore-sparc
 diff --git a/src/test/codegen/repr-transparent-aggregates-1.rs b/src/test/codegen/repr-transparent-aggregates-1.rs
-index 4ad3642c0..fca31c0c6 100644
+index 9d18c5f03..8e69d2afd 100644
 --- a/src/test/codegen/repr-transparent-aggregates-1.rs
 +++ b/src/test/codegen/repr-transparent-aggregates-1.rs
 @@ -6,6 +6,7 @@
@@ -238,10 +270,10 @@ index ad1b6e96b..122d59a57 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
-index bed509d77..8bc817897 100644
+index 215af347f..a1c7e4c6a 100644
 --- a/src/tools/compiletest/src/util.rs
 +++ b/src/tools/compiletest/src/util.rs
-@@ -70,6 +70,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
+@@ -71,6 +71,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
      ("msp430", "msp430"),
      ("nvptx64", "nvptx64"),
      ("powerpc", "powerpc"),
@@ -342,3 +374,6 @@ index 4a9397331..4cf47c05d 100644
  )))]
  const ALIGNOF_MAX_ALIGN_T: usize = 8;
  #[cfg(all(any(
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch b/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
deleted file mode 100644
index d9a7ae68b6e0..000000000000
--- a/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From beb4e16f055aa7925194fd2c360105a6d55f10f6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Lo=C3=AFc=20BRANSTETT?= <lolo.branstett@numericable.fr>
-Date: Wed, 27 Apr 2022 19:11:56 +0200
-Subject: [PATCH] Add missing `target_feature` to the list of well known cfg
- names
-
----
- compiler/rustc_session/src/config.rs | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
-index 12c5c4445d46f..330201dd8fef6 100644
---- a/compiler/rustc_session/src/config.rs
-+++ b/compiler/rustc_session/src/config.rs
-@@ -1038,6 +1038,7 @@ impl CrateCheckConfig {
-             sym::target_has_atomic_load_store,
-             sym::target_has_atomic,
-             sym::target_has_atomic_equal_alignment,
-+            sym::target_feature,
-             sym::panic,
-             sym::sanitize,
-             sym::debug_assertions,
-@@ -1081,6 +1082,10 @@ impl CrateCheckConfig {
-             .into_iter()
-             .map(|sanitizer| Symbol::intern(sanitizer.as_str().unwrap()));
- 
-+        // Unknown possible values:
-+        //  - `feature`
-+        //  - `target_feature`
-+
-         // No-values
-         for name in [
-             sym::doc,
diff --git a/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch b/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch
deleted file mode 100644
index fe0377dbc381..000000000000
--- a/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/library/std/src/sys/unix/mod.rs
-+++ b/library/std/src/sys/unix/mod.rs
-@@ -212,6 +212,10 @@ cfg_if::cfg_if! {
-         #[link(name = "log")]
-         #[link(name = "gcc")]
-         extern "C" {}
-+    } else if #[cfg(all(target_os = "linux", target_env = "musl"))] {
-+	#[link(name = "ssp_nonshared")]
-+  #[link(name = "execinfo")]
-+	extern "C" {}
-     } else if #[cfg(target_os = "freebsd")] {
-         #[link(name = "execinfo")]
-         #[link(name = "pthread")]
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index da3ca779e7c6..d120f21bf50a 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -8,7 +8,7 @@
 # uploaded to https://repo-default.voidlinux.org/distfiles/
 #
 pkgname=rust
-version=1.61.0
+version=1.63.0
 revision=1
 wrksrc="rustc-${version}-src"
 hostmakedepends="cmake curl pkg-config python3 tar cargo-bootstrap"
@@ -19,7 +19,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://www.rust-lang.org/"
 distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
-checksum=ad0b4351675aa9abdf4c7e066613bd274c4391c5506db152983426376101daed
+checksum=1f9580295642ef5da7e475a8da2397d65153d3f2cb92849dbd08ed0effca99d0
 lib32disabled=yes
 make_check=no # CBA for now
 
@@ -127,6 +127,7 @@ do_configure() {
 		incremental = false
 		parallel-compiler = false
 		channel = "stable"
+		description = "Void"
 		rpath = ${_use_rpath}
 		verbose-tests = true
 		dist-src = false

From e9360cf32fc3da696923445cc1ec7bc5f1eadf7a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:35 +0200
Subject: [PATCH 4/4] cargo: update to 1.63.0.

---
 srcpkgs/cargo/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index e3c30f625acd..9f653c39fd43 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo'
 pkgname=cargo
-version=1.61.0
+version=1.63.0
 revision=1
 wrksrc="cargo-rust-${version}"
 build_helper=rust
@@ -13,7 +13,7 @@ license="MIT, Apache-2.0"
 homepage="https://crates.io/"
 distfiles="https://github.com/rust-lang/cargo/archive/rust-${version}.tar.gz
  https://github.com/crossbeam-rs/crossbeam/archive/refs/tags/crossbeam-utils-0.8.8.tar.gz"
-checksum="6261b51441f50abe08a2992a349b22a2385846bfc9cb288ae9a3a609b904099e
+checksum="b1f50e4957a0453c1513cabe98c7fd94e715cd0ca70138b1945cef338e1abf35
  52c451910203cd9002cc4b85cff95f45c6ba245392801e80d7898ca5c3c3ab29"
 replaces="cargo-tree>=0"
 

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PR REVIEW] Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
                   ` (12 preceding siblings ...)
  2022-08-19  9:17 ` [PR PATCH] [Updated] " jcgruenhage
@ 2022-08-19  9:22 ` jcgruenhage
  2022-08-19  9:24 ` jcgruenhage
                   ` (9 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jcgruenhage @ 2022-08-19  9:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 251 bytes --]

New review comment by jcgruenhage on void-packages repository

https://github.com/void-linux/void-packages/pull/38662#discussion_r949994599

Comment:
Causes this suffix in the compiler version output:
```
$ rustc --version
rustc 1.63.0 (Void)
```

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PR REVIEW] Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
                   ` (13 preceding siblings ...)
  2022-08-19  9:22 ` [PR REVIEW] " jcgruenhage
@ 2022-08-19  9:24 ` jcgruenhage
  2022-08-19 17:07 ` [PR PATCH] [Updated] " jcgruenhage
                   ` (8 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jcgruenhage @ 2022-08-19  9:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 318 bytes --]

New review comment by jcgruenhage on void-packages repository

https://github.com/void-linux/void-packages/pull/38662#discussion_r949996227

Comment:
`kind = "static-nobundle"` was removed. `static` defaults to the modifier `+bundle`, and setting the modifier `-bundle` behaves like ``static-nobundle` behaved before.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PR PATCH] [Updated] Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
                   ` (14 preceding siblings ...)
  2022-08-19  9:24 ` jcgruenhage
@ 2022-08-19 17:07 ` jcgruenhage
  2022-08-19 17:12 ` [PR REVIEW] " classabbyamp
                   ` (7 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jcgruenhage @ 2022-08-19 17:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 864 bytes --]

There is an updated pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages rust-1.63
https://github.com/void-linux/void-packages/pull/38662

Update Rust toolchain to 1.63.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

[ci skip]

`cargo-crev` requires 1.62 at least, so I thought I'd gave updating Rust a go, and it worked out just fine tbh. The new `cargo-crev` release compiled fine on this toolchain and works properly.

#### Local build testing
- I built this PR natively for
  - `x86_64`, `glibc` and `musl`
  - `i686`, `glibc`
- I crossbuilt this PR for
  - `aarch64`, `musl`


A patch file from https://github.com/void-linux/void-packages/pull/38662.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rust-1.63-38662.patch --]
[-- Type: text/x-diff, Size: 59052 bytes --]

From ab4a8a921ce5c5e0435b4a7c2e79a2190c6bf070 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:01 +0200
Subject: [PATCH 1/5] rust-bootstrap: update to 1.63.0.

---
 srcpkgs/rust-bootstrap/template | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/rust-bootstrap/template b/srcpkgs/rust-bootstrap/template
index 66d04d634638..47742bf17eae 100644
--- a/srcpkgs/rust-bootstrap/template
+++ b/srcpkgs/rust-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'rust-bootstrap'
 pkgname=rust-bootstrap
-version=1.61.0
+version=1.63.0
 revision=1
 create_wrksrc=yes
 short_desc="Rust programming language bootstrap toolchain"
@@ -29,38 +29,38 @@ distfiles="
 case "$XBPS_TARGET_MACHINE" in
 	i686)
 		checksum="
-		 8af0ec3eb470e7e28439fedf9ebdadf90df8c58da544cc643033e6fc0ccf0bea
-		 ab223fcec35183bc0fe630403537cd7dae55c403103df29b25077db4882cb88e"
+		 11d3729f0343a069e9e59531745170cb0b6ce68f73848699564ea0bbcbf2c02f
+		 3177d3a159b4fcd54bca93d09ff1a903689a64ed4037699de372e685d12d4335"
 		;;
 	x86_64)
 		checksum="
-		 21c4613f389ed130fbaaf88f1e984319f72b5fc10734569a5ba19e22ebb03abd
-		 270b07aa5f2de52255a117e1e587138d77375ce0d09a1d7fead085f29b3977e9"
+		 bdab9d9afa5c329c40f9ba568364815237fab8426477c12bfabad35ffc484ab5
+		 993c2c17bf76ac626bfb5b17bddce65fbdfc14f70d183f33773de0cd12df46d2"
 		;;
 	x86_64-musl)
 		checksum="
-		 89cb72cbc493cb5cd8e43830009b4a1a5bfd472246ae184157868c9b0607bf6c
-		 1f4f2e4c5dd0f9b0dac7c8888f4a49ef16a6fe8992f39895823d2a442f0fe408"
+		 b6566a9b1dafe03cf4a01b58b2db0e14a0044ae5773736827882bd549108277e
+		 6fcfa4f9a51d35bf2c5c92ac15c688baa8c98d9fded05ab6abfdae85cb5aed8c"
 		;;
 	ppc64le)
 		checksum="
-		 dc54893d747e4f3330515caa75e404f78c6c5475a1216d1428f5e7ce1c2e9602
-		 36c0ccff14c80419507561db050f9533f0abd43fc50f3ddb859c10df74b1c351"
+		 b3dc2c082e76b5effe0b158aac3831830168a1a6980b39347c355e49be63fcca
+		 3ae0b74ba428c569fcecebbb09060ad0bd434a5f1fc9ffd1329b56941a897b6e"
 		;;
 	ppc64le-musl)
 		checksum="
-		 2191613e654a192dc6dbab693ecb90a3669d7c71a29d392271138b3bb77fdb54
-		 2a587565344e44bfa55e56df24e54f0f706e8280b3eccb45940af161205c9524"
+		 63273dc52f3f9e16e26de1c2f5749cabc3c958af5416cf6da6c7600ddf086447
+		 6f78a87825c624b85c7c5c2a47a185d354a72b1604e354fae40888958069d4d1"
 		;;
 	ppc64)
 		checksum="
-		 070a334ecf824a99b89385f5b286632c3a7e88c921186f0cc75ede31501df3a3
-		 0be4769a41fe2bcdcda2e5c92759826a59828615a5df057a09f2107dba888d72"
+		 52dacd9c0adda206bc0255dc978f53453fec995a33a905c2b1cf9b1b1fe8089b
+		 514e5f62cb17a0d0ee2981bfb1aba9284f37eb44a20ff36164faab32cc0a22bc"
 		;;
 	ppc)
 		checksum="
-		 f28a8c2986fce5015c67823e39ad4b53e2db06603b6ea4a1217ac961cbbfb073
-		 7d2f7f900c8c05616fba8e99ab041d847af3653c259b99445edd788acddf878c"
+		 7a99dd6a7f30b8a8f85d95f47fa77084a48c7ebc94092978daa3563268a4b15b
+		 a25719c0ad2a5e7f52eed87b75cb76c4a52b8dc6e24b4bef16ed7fb9133e5b42"
 		;;
 	*) broken="rust bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac

From 84b3c695e7f5ce9cfbebc29d9ec1194be4d7580c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:24 +0200
Subject: [PATCH 2/5] cargo-bootstrap: update to 1.63.0.

---
 srcpkgs/cargo-bootstrap/template | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/cargo-bootstrap/template b/srcpkgs/cargo-bootstrap/template
index 0fdaac840a3c..da727491a6a4 100644
--- a/srcpkgs/cargo-bootstrap/template
+++ b/srcpkgs/cargo-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo-bootstrap'
 pkgname=cargo-bootstrap
-version=1.61.0
+version=1.63.0
 revision=1
 short_desc="Bootstrap binaries of Rust package manager"
 maintainer="q66 <daniel@octaforge.org>"
@@ -26,25 +26,25 @@ distfiles="${_bootstrap_url}/cargo-${version}-${RUST_TARGET}.tar.xz"
 
 case "$XBPS_TARGET_MACHINE" in
 	i686)
-		checksum="fe258b85ef0644ff08c2095e329399dd4de0e1b2e51f4f4e90cb956d40dc61de"
+		checksum="6f2c109fc38ed8ccadcdcccf51d11505651ca9e12c396ab46ac1dbb55265b792"
 		;;
 	x86_64)
-		checksum="9461727d754f865ef2a87479d40bbe4c5176f80963b7c50b7797bc8940d7a0a0"
+		checksum="f370d12e4c11f0c835becb738bcf00d363f29b76f8b424b4dcb005abcf15fc9a"
 		;;
 	x86_64-musl)
-		checksum="db4b4423c2843b6e27737664cf8085afcba670374110ca24b9c8d341045e748c"
+		checksum="6f6ce044832a2433c250f4f27a61f69081e2b0f7e4e1f141492c2ce99ee8511e"
 		;;
 	ppc64le)
-		checksum="09817011ff1ef4b7006387c7cabb6a059731792a9372533dec7d87e7f014444b"
+		checksum="a4cdc00a42fd767bf5a296f7126d9db22a0a609cd956bbf0cb3eae882add1be7"
 		;;
 	ppc64le-musl)
-		checksum="39215cba9b1bda63209cac0edbda583e0c822f88a50fdbf33255c8c5386e4868"
+		checksum="3dc497186493a9fc974ae8add91a6fed34d95e263bedb95142d636ba257b2240"
 		;;
 	ppc64)
-		checksum="3fa6e033bbbab339e480842627523f95d84119a5dcae56ad4b14e5c6d1536e6b"
+		checksum="babded6c2d112aa92cb1af5ca24d93a034b20c0315f03c231a4eb3a92408a6cd"
 		;;
 	ppc)
-		checksum="5d6226a5080e429cb6bb8366ff1f71feeccde70f8bf6651779674fe27eb35e7f"
+		checksum="3c7f4d28987d8bf5d10fb0cf4ec792b73a4725add2845d69b85e36d47f3c228e"
 		;;
 	*) broken="cargo bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac

From bd7cbc65954b037d766b33b666a526fce5365dbd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:31 +0200
Subject: [PATCH 3/5] rust: update to 1.63.0.

---
 .../rust/patches/0001-Fix-LLVM-build.patch    |  8 +--
 ...lib-and-musl_root-from-musl-targets.patch} | 65 ++++++++++++-------
 ...e-debugger-scripts-to-usr-share-rust.patch | 10 +--
 ...4-fix-shebang-on-install-template.sh.patch |  6 +-
 ...fer-libgcc_eh-over-libunwind-on-musl.patch | 24 -------
 ...ot-install-libunwind-source-removed.patch} | 10 +--
 ...06-fix-rustdoc-when-cross-compiling.patch} | 25 +++----
 ...stage-2-tools-dynamically-to-libstd.patch} | 10 +--
 ...against-host-target-LLVM-in-cross-s.patch} | 16 ++++-
 .../0009-do-not-export-LD_LIBRARY_PATH.patch  | 29 +++++++++
 ...age-of-musl-libc-for-the-libc-crate.patch} | 16 ++---
 .../0010-do-not-export-LD_LIBRARY_PATH.patch  | 23 -------
 ...-ELFv2-ABI-on-all-powerpc64-targets.patch} | 22 +++----
 ...e-initial-exec-TLS-model-on-powerpc.patch} | 11 ++--
 ...g-native-sysroot-to-use-for-linkage.patch} | 40 ++++++++----
 ...-of-need-ssp_nonshared.patch-from-al.patch | 28 ++++++++
 ...le.patch => 0015-initial-ppcle-port.patch} | 55 +++++++++++++---
 ...e16f055aa7925194fd2c360105a6d55f10f6.patch | 33 ----------
 .../need-ssp-nonshared-and-execinfo.patch     | 13 ----
 srcpkgs/rust/template                         |  5 +-
 20 files changed, 250 insertions(+), 199 deletions(-)
 rename srcpkgs/rust/patches/{0001-musl-void-setup.patch => 0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch} (89%)
 delete mode 100644 srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
 rename srcpkgs/rust/patches/{0006-do-not-install-libunwind-source-removed.patch => 0005-do-not-install-libunwind-source-removed.patch} (73%)
 rename srcpkgs/rust/patches/{0007-fix-rustdoc-when-cross-compiling.patch => 0006-fix-rustdoc-when-cross-compiling.patch} (67%)
 rename srcpkgs/rust/patches/{0008-link-stage-2-tools-dynamically-to-libstd.patch => 0007-link-stage-2-tools-dynamically-to-libstd.patch} (78%)
 rename srcpkgs/rust/patches/{0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch => 0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch} (71%)
 create mode 100644 srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
 rename srcpkgs/rust/patches/{0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch => 0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch} (69%)
 delete mode 100644 srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
 rename srcpkgs/rust/patches/{0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch => 0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch} (74%)
 rename srcpkgs/rust/patches/{fix-ppc32.patch => 0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch} (78%)
 rename srcpkgs/rust/patches/{native-sysroot.patch => 0013-allow-specifying-native-sysroot-to-use-for-linkage.patch} (69%)
 create mode 100644 srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
 rename srcpkgs/rust/patches/{xxx-ppcle.patch => 0015-initial-ppcle-port.patch} (85%)
 delete mode 100644 srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
 delete mode 100644 srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch

diff --git a/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch b/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
index 0da829af1da9..6cf9c3a755a9 100644
--- a/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
+++ b/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
@@ -1,4 +1,4 @@
-From 4443eca0d6b3ba599832b2f73a5350fdd0c90d10 Mon Sep 17 00:00:00 2001
+From 99a046adc7d1c7b2da3a31e077722ea69f84eeb6 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/15] Fix LLVM build
@@ -8,10 +8,10 @@ Subject: [PATCH 01/15] Fix LLVM build
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index a476d25f..c7e63990 100644
+index 4ac857b47..b603ae90a 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -768,7 +768,8 @@ impl Build {
+@@ -1050,7 +1050,8 @@ impl Build {
              .args()
              .iter()
              .map(|s| s.to_string_lossy().into_owned())
@@ -22,5 +22,5 @@ index a476d25f..c7e63990 100644
  
          // If we're compiling on macOS then we add a few unconditional flags
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0001-musl-void-setup.patch b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
similarity index 89%
rename from srcpkgs/rust/patches/0001-musl-void-setup.patch
rename to srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
index c13cb1730986..c156945b8111 100644
--- a/srcpkgs/rust/patches/0001-musl-void-setup.patch
+++ b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
@@ -1,5 +1,23 @@
+From 7219ba1c9accbad9b530d312fd9a9f69330c93da Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 3 May 2020 17:53:33 +0200
+Subject: [PATCH 02/15] Remove -nostdlib and musl_root from musl targets
+
+extended by various void contributors to match our musl setup
+---
+ compiler/rustc_target/src/spec/crt_objects.rs | 22 ----------
+ .../rustc_target/src/spec/linux_musl_base.rs  |  7 ---
+ config.toml.example                           |  8 ----
+ src/bootstrap/cc_detect.rs                    | 25 +----------
+ src/bootstrap/compile.rs                      | 43 +------------------
+ src/bootstrap/config.rs                       |  9 ----
+ src/bootstrap/configure.py                    | 28 ------------
+ src/bootstrap/lib.rs                          | 19 --------
+ src/bootstrap/sanity.rs                       | 23 ----------
+ 9 files changed, 3 insertions(+), 181 deletions(-)
+
 diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
-index 51f392a6..62560658 100644
+index 52ac3622e..f35e5b9d8 100644
 --- a/compiler/rustc_target/src/spec/crt_objects.rs
 +++ b/compiler/rustc_target/src/spec/crt_objects.rs
 @@ -63,28 +63,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects {
@@ -32,7 +50,7 @@ index 51f392a6..62560658 100644
      new(&[
          (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
 diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs
-index 207a87ab..88f807a5 100644
+index 207a87ab0..88f807a58 100644
 --- a/compiler/rustc_target/src/spec/linux_musl_base.rs
 +++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
 @@ -1,16 +1,9 @@
@@ -53,10 +71,10 @@ index 207a87ab..88f807a5 100644
      base
  }
 diff --git a/config.toml.example b/config.toml.example
-index 6e53d9b4..74980d2c 100644
+index b3284050f..62ac07f87 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -511,14 +511,6 @@ changelog-seen = 2
+@@ -523,14 +523,6 @@ changelog-seen = 2
  # supplementary build information, like distro-specific package versions.
  #description = <none> (string)
  
@@ -72,7 +90,7 @@ index 6e53d9b4..74980d2c 100644
  # 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
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index 7ce44687..4e7507ae 100644
+index dca782c29..8eb35ea43 100644
 --- a/src/bootstrap/cc_detect.rs
 +++ b/src/bootstrap/cc_detect.rs
 @@ -97,7 +97,7 @@ pub fn find(build: &mut Build) {
@@ -93,7 +111,7 @@ index 7ce44687..4e7507ae 100644
              true
          } else {
              // Use an auto-detected compiler (or one configured via `CXX_target_triple` env vars).
-@@ -157,7 +157,6 @@ fn set_compiler(
+@@ -161,7 +161,6 @@ fn set_compiler(
      compiler: Language,
      target: TargetSelection,
      config: Option<&Target>,
@@ -101,7 +119,7 @@ index 7ce44687..4e7507ae 100644
  ) {
      match &*target.triple {
          // When compiling for android we may have the NDK configured in the
-@@ -200,26 +199,6 @@ fn set_compiler(
+@@ -204,26 +203,6 @@ fn set_compiler(
              }
          }
  
@@ -129,10 +147,10 @@ index 7ce44687..4e7507ae 100644
      }
  }
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index afc333b5..9d67ab56 100644
+index b4807d1ab..ce483bf6b 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -197,39 +197,7 @@ fn copy_self_contained_objects(
+@@ -200,39 +200,7 @@ fn copy_self_contained_objects(
      let mut target_deps = vec![];
  
      // Copies the libc and CRT objects.
@@ -173,7 +191,7 @@ index afc333b5..9d67ab56 100644
          let srcdir = builder
              .wasi_root(target)
              .unwrap_or_else(|| {
-@@ -313,15 +281,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+@@ -316,15 +284,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
              .arg("--manifest-path")
              .arg(builder.src.join("library/test/Cargo.toml"));
  
@@ -190,10 +208,10 @@ index afc333b5..9d67ab56 100644
              if let Some(p) = builder.wasi_root(target) {
                  let root = format!("native={}/lib/wasm32-wasi", p.to_str().unwrap());
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 9534cc5f..642a5c24 100644
+index 146077419..18a764689 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -172,7 +172,6 @@ pub struct Config {
+@@ -186,7 +186,6 @@ pub struct Config {
      pub missing_tools: bool,
  
      // Fallback musl-root for all targets
@@ -201,7 +219,7 @@ index 9534cc5f..642a5c24 100644
      pub prefix: Option<PathBuf>,
      pub sysconfdir: Option<PathBuf>,
      pub datadir: Option<PathBuf>,
-@@ -299,8 +298,6 @@ pub struct Target {
+@@ -400,8 +399,6 @@ pub struct Target {
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
      pub crt_static: Option<bool>,
@@ -210,7 +228,7 @@ index 9534cc5f..642a5c24 100644
      pub wasi_root: Option<PathBuf>,
      pub qemu_rootfs: Option<PathBuf>,
      pub no_std: bool,
-@@ -587,7 +584,6 @@ struct Rust {
+@@ -689,7 +686,6 @@ define_config! {
          default_linker: Option<String> = "default-linker",
          channel: Option<String> = "channel",
          description: Option<String> = "description",
@@ -218,7 +236,7 @@ index 9534cc5f..642a5c24 100644
          rpath: Option<bool> = "rpath",
          verbose_tests: Option<bool> = "verbose-tests",
          optimize_tests: Option<bool> = "optimize-tests",
-@@ -631,8 +627,6 @@ struct TomlTarget {
+@@ -734,8 +730,6 @@ define_config! {
          sanitizers: Option<bool> = "sanitizers",
          profiler: Option<bool> = "profiler",
          crt_static: Option<bool> = "crt-static",
@@ -227,7 +245,7 @@ index 9534cc5f..642a5c24 100644
          wasi_root: Option<String> = "wasi-root",
          qemu_rootfs: Option<String> = "qemu-rootfs",
          no_std: Option<bool> = "no-std",
-@@ -1013,7 +1007,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1107,7 +1101,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;
@@ -235,7 +253,7 @@ index 9534cc5f..642a5c24 100644
              config.save_toolstates = rust.save_toolstates.map(PathBuf::from);
              set(&mut config.deny_warnings, flags.deny_warnings.or(rust.deny_warnings));
              set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
-@@ -1059,8 +1052,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1164,8 +1157,6 @@ impl Config {
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
                  target.crt_static = cfg.crt_static;
@@ -245,7 +263,7 @@ index 9534cc5f..642a5c24 100644
                  target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
                  target.sanitizers = cfg.sanitizers;
 diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
-index 87a130a0..bd4c9197 100755
+index 2fc036082..91737e0ea 100755
 --- a/src/bootstrap/configure.py
 +++ b/src/bootstrap/configure.py
 @@ -114,34 +114,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
@@ -284,10 +302,10 @@ index 87a130a0..bd4c9197 100755
    "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 570a6174..f3d5f308 100644
+index b603ae90a..0a7012dbd 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1125,25 +1125,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1153,25 +1153,6 @@ impl Build {
          }
      }
  
@@ -314,7 +332,7 @@ index 570a6174..f3d5f308 100644
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
          self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
 diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index 8c2899c1..dda15d76 100644
+index 64c5dd7ae..b8f9104ea 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
 @@ -11,7 +11,6 @@
@@ -325,7 +343,7 @@ index 8c2899c1..dda15d76 100644
  use std::path::PathBuf;
  use std::process::Command;
  
-@@ -177,28 +176,6 @@ pub fn check(build: &mut Build) {
+@@ -190,28 +189,6 @@ than building it.
              }
          }
  
@@ -354,3 +372,6 @@ index 8c2899c1..dda15d76 100644
          if need_cmake && target.contains("msvc") {
              // There are three builds of cmake on windows: MSVC, MinGW, and
              // Cygwin. The Cygwin build does not have generators for Visual
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch b/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
index 3c4e1cb96475..bc7053800945 100644
--- a/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
+++ b/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
@@ -1,7 +1,7 @@
-From f9a680688a685ec47ee5ec001574d9b91b4ba35e Mon Sep 17 00:00:00 2001
+From 8938b002edbec432be46de7b6f1b9d0a6912873a Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 00:45:35 +0100
-Subject: [PATCH 3/9] move debugger scripts to /usr/share/rust
+Subject: [PATCH 03/15] move debugger scripts to /usr/share/rust
 
 ---
  src/bootstrap/dist.rs | 2 +-
@@ -11,10 +11,10 @@ Subject: [PATCH 3/9] move debugger scripts to /usr/share/rust
  4 files changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index d4875cfe1..e8b61b8a2 100644
+index b1fae356d..e7a077134 100644
 --- a/src/bootstrap/dist.rs
 +++ b/src/bootstrap/dist.rs
-@@ -499,7 +499,7 @@ impl Step for DebuggerScripts {
+@@ -460,7 +460,7 @@ impl Step for DebuggerScripts {
      fn run(self, builder: &Builder<'_>) {
          let host = self.host;
          let sysroot = self.sysroot;
@@ -65,5 +65,5 @@ index bce72f1ba..8abb01245 100755
  # Call LLDB with the commands added to the argument list
  exec "$lldb" --one-line-before-file "$script_import" --source-before-file "$commands_file" "$@"
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch b/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
index 2e9cd93fdfb9..2ca7ffeaf73f 100644
--- a/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
+++ b/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
@@ -1,7 +1,7 @@
-From d5a6a431024790c911d04fd54381c515fb05819e Mon Sep 17 00:00:00 2001
+From d7d7fc24d1744a3db70a9fb010c31daa14a46df7 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 00:55:18 +0100
-Subject: [PATCH 4/9] fix shebang on install-template.sh
+Subject: [PATCH 04/15] fix shebang on install-template.sh
 
 ---
  src/tools/rust-installer/install-template.sh | 2 +-
@@ -18,5 +18,5 @@ index e68be8911..beaa90f7b 100644
  # file at the top-level directory of this distribution and at
  # http://rust-lang.org/COPYRIGHT.
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch b/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
deleted file mode 100644
index 30cb66fc24b1..000000000000
--- a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Additions for build.rs by q66, necessary for our musl setup.
-
-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/library/unwind/src/lib.rs
-+++ b/library/unwind/src/lib.rs
-@@ -51,7 +51,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", cfg(target_feature = "crt-static"))]
-         #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
-         extern "C" {}
-     }
diff --git a/srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch b/srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
similarity index 73%
rename from srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch
rename to srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
index 0128b8fc61f2..92e0021ab6f4 100644
--- a/srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch
+++ b/srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
@@ -1,17 +1,17 @@
-From fc69414484327e4dbff138dd0834fc3bde626008 Mon Sep 17 00:00:00 2001
+From 1335a445327a6605c5f933d9647b97e771089abd Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:44:54 +0100
-Subject: [PATCH 6/9] do not install libunwind source (removed)
+Subject: [PATCH 05/15] do not install libunwind source (removed)
 
 ---
  src/bootstrap/dist.rs | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index e8b61b8a2..02d24a77d 100644
+index e7a077134..74e75df4b 100644
 --- a/src/bootstrap/dist.rs
 +++ b/src/bootstrap/dist.rs
-@@ -849,7 +849,7 @@ impl Step for Src {
+@@ -804,7 +804,7 @@ impl Step for Src {
          copy_src_dirs(
              builder,
              &builder.src,
@@ -21,5 +21,5 @@ index e8b61b8a2..02d24a77d 100644
                  // not needed and contains symlinks which rustup currently
                  // chokes on when unpacking.
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch b/srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
similarity index 67%
rename from srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
rename to srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
index 2cc1f6b900d3..88eaf65de8b7 100644
--- a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
+++ b/srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
@@ -1,17 +1,17 @@
-From 81ba387384e8ce0aa9bb9b4bd76014d922d85de8 Mon Sep 17 00:00:00 2001
+From 50075907c3dd2f06d471b3375d7c0ee850263eb2 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:48:14 +0100
-Subject: [PATCH 7/9] fix rustdoc when cross-compiling
+Subject: [PATCH 06/15] fix rustdoc when cross-compiling
 
 ---
  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 e4396d530..cb2312028 100644
+index 5f85fc5aa..01e81fc39 100644
 --- a/src/bootstrap/bin/rustdoc.rs
 +++ b/src/bootstrap/bin/rustdoc.rs
-@@ -22,14 +22,11 @@ fn main() {
+@@ -26,9 +26,6 @@ fn main() {
          Err(_) => 0,
      };
  
@@ -19,15 +19,18 @@ index e4396d530..cb2312028 100644
 -    dylib_path.insert(0, PathBuf::from(libdir.clone()));
 -
      let mut cmd = Command::new(rustdoc);
-     cmd.args(&args)
-         .arg("--sysroot")
-         .arg(&sysroot)
--        .env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
-+        .env(dylib_path_var(), PathBuf::from(libdir.clone()));
+ 
+     // cfg(bootstrap)
+@@ -43,7 +40,7 @@ fn main() {
+     }
+ 
+     cmd.args(&args);
+-    cmd.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
++    cmd.env(dylib_path_var(), PathBuf::from(libdir.clone()));
  
      // Force all crates compiled by this compiler to (a) be unstable and (b)
      // allow the `rustc_private` feature to link to other unstable crates
-@@ -62,7 +59,7 @@ fn main() {
+@@ -69,7 +66,7 @@ fn main() {
          eprintln!(
              "rustdoc command: {:?}={:?} {:?}",
              dylib_path_var(),
@@ -37,5 +40,5 @@ index e4396d530..cb2312028 100644
          );
          eprintln!("sysroot: {:?}", sysroot);
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch b/srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
similarity index 78%
rename from srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch
rename to srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
index f6793d8a3202..198e4fcc7a6a 100644
--- a/srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch
+++ b/srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
@@ -1,7 +1,7 @@
-From 1c4a66621a5fa34c78fc020084e4166f3af7cbb5 Mon Sep 17 00:00:00 2001
+From c2de45cbdaee1a8c81b2d65f6bced1439a738e00 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:48:49 +0100
-Subject: [PATCH 8/9] link stage 2 tools dynamically to libstd
+Subject: [PATCH 07/15] link stage 2 tools dynamically to libstd
 
 stage 2 tools are the ones that are distributed, and we distribute
 them together with the rust libs so there is no need to worry
@@ -11,10 +11,10 @@ about unstable ABI
  1 file changed, 2 insertions(+)
 
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index 6750f7a54..de771280e 100644
+index 62b5416ce..554dd4188 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1520,6 +1520,8 @@ impl<'a> Builder<'a> {
+@@ -2066,6 +2066,8 @@ impl<'a> Builder<'a> {
          // linking all deps statically into the dylib.
          if matches!(mode, Mode::Std | Mode::Rustc) {
              rustflags.arg("-Cprefer-dynamic");
@@ -24,5 +24,5 @@ index 6750f7a54..de771280e 100644
  
          // When building incrementally we default to a lower ThinLTO import limit
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch b/srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
similarity index 71%
rename from srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch
rename to srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
index 3b2e388c014e..3edba737f923 100644
--- a/srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch
+++ b/srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
@@ -1,8 +1,18 @@
+From f229c2bbd32deab98978d8453d0f44f23849fa09 Mon Sep 17 00:00:00 2001
+From: q66 <daniel@octaforge.org>
+Date: Sun, 3 May 2020 18:05:22 +0200
+Subject: [PATCH 08/15] Void: fix linkage against host/target LLVM in cross
+ setups
+
+---
+ compiler/rustc_llvm/build.rs | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
 diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs
-index 36a6d2cc3..af4e1219f 100644
+index 7729ec6be..66b8a4215 100644
 --- a/compiler/rustc_llvm/build.rs
 +++ b/compiler/rustc_llvm/build.rs
-@@ -230,9 +230,11 @@ fn main() {
+@@ -291,9 +291,11 @@ fn main() {
      for lib in output(&mut cmd).split_whitespace() {
          if is_crossed {
              if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
@@ -17,5 +27,5 @@ index 36a6d2cc3..af4e1219f 100644
          } else if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
              println!("cargo:rustc-link-search=native={}", stripped);
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch b/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
new file mode 100644
index 000000000000..f66766270a12
--- /dev/null
+++ b/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
@@ -0,0 +1,29 @@
+From 5e9e5fa2b2aefefbdc00547d7f10ee92d9b3356a Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Tue, 21 Dec 2021 00:48:29 +0100
+Subject: [PATCH 09/15] do not export LD_LIBRARY_PATH
+
+---
+ src/bootstrap/bootstrap.py | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
+index 40d478a17..3501fd901 100644
+--- a/src/bootstrap/bootstrap.py
++++ b/src/bootstrap/bootstrap.py
+@@ -756,12 +756,6 @@ class RustBuild(object):
+             del env["CARGO_BUILD_TARGET"]
+         env["CARGO_TARGET_DIR"] = build_dir
+         env["RUSTC"] = self.rustc()
+-        env["LD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+-            (os.pathsep + env["LD_LIBRARY_PATH"]) \
+-            if "LD_LIBRARY_PATH" in env else ""
+-        env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+-            (os.pathsep + env["DYLD_LIBRARY_PATH"]) \
+-            if "DYLD_LIBRARY_PATH" in env else ""
+         env["LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+             (os.pathsep + env["LIBRARY_PATH"]) \
+             if "LIBRARY_PATH" in env else ""
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch b/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
similarity index 69%
rename from srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
rename to srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
index 8a18e414e209..f2780ae08dfb 100644
--- a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
+++ b/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
@@ -1,18 +1,17 @@
-From e363a0e0ff7ffc8bd83f72ec1a20d289996b6370 Mon Sep 17 00:00:00 2001
+From 7e100ca9dad23efa1aafccd8faf86ec5fa85c351 Mon Sep 17 00:00:00 2001
 From: q66 <daniel@octaforge.org>
 Date: Sun, 3 May 2020 18:02:03 +0200
-Subject: [PATCH 12/15] Fix dynamic linkage of musl libc for the libc crate
+Subject: [PATCH 10/15] Fix dynamic linkage of musl libc for the libc crate
 
 ---
- vendor/libc/src/lib.rs      | 1 +
  vendor/libc/src/unix/mod.rs | 6 +++---
- 2 files changed, 4 insertions(+), 3 deletions(-)
+ 1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs
-index 238da24b..ffb05ee7 100644
+index ecee44411..7ae05f24e 100644
 --- a/vendor/libc/src/unix/mod.rs
 +++ b/vendor/libc/src/unix/mod.rs
-@@ -329,11 +329,11 @@ cfg_if! {
+@@ -337,11 +337,11 @@ cfg_if! {
          #[link(name = "c", cfg(not(target_feature = "crt-static")))]
          extern {}
      } else if #[cfg(target_env = "musl")] {
@@ -20,14 +19,13 @@ index 238da24b..ffb05ee7 100644
 +        extern {}
          #[cfg_attr(feature = "rustc-dep-of-std",
 -                   link(name = "c", kind = "static", modifiers = "-bundle",
-+                   link(name = "gcc", kind = "static-nobundle",
++                   link(name = "gcc", kind = "static", modifiers = "-bundle",
                          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")]
-index 0b1496af..7f7e85a7 100644
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch b/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
deleted file mode 100644
index d7714d5ee4fd..000000000000
--- a/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-commit 798e44e67c0bac6509b7915767450b0381c94017
-Author: Daniel Kolesa <daniel@octaforge.org>
-Date:   Tue Dec 21 00:48:29 2021 +0100
-
-    do not export LD_LIBRARY_PATH
-
-diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 0170be967..f7a9ec785 100644
---- a/src/bootstrap/bootstrap.py
-+++ b/src/bootstrap/bootstrap.py
-@@ -924,12 +924,6 @@ class RustBuild(object):
-             del env["CARGO_BUILD_TARGET"]
-         env["CARGO_TARGET_DIR"] = build_dir
-         env["RUSTC"] = self.rustc(True)
--        env["LD_LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
--            (os.pathsep + env["LD_LIBRARY_PATH"]) \
--            if "LD_LIBRARY_PATH" in env else ""
--        env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
--            (os.pathsep + env["DYLD_LIBRARY_PATH"]) \
--            if "DYLD_LIBRARY_PATH" in env else ""
-         env["LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
-             (os.pathsep + env["LIBRARY_PATH"]) \
-             if "LIBRARY_PATH" in env else ""
diff --git a/srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
similarity index 74%
rename from srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
rename to srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
index 3f3bd3212bb9..347ee613983d 100644
--- a/srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
+++ b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
@@ -1,24 +1,24 @@
-From c6b54a373e74a1e4ce64f349b5b69105f2bc1a49 Mon Sep 17 00:00:00 2001
+From de93abe8a0d9dc7878a48f61b9e3ae4a923020f6 Mon Sep 17 00:00:00 2001
 From: q66 <daniel@octaforge.org>
 Date: Sun, 3 May 2020 18:08:09 +0200
-Subject: [PATCH 15/15] Use ELFv2 ABI on all powerpc64 targets
+Subject: [PATCH 11/15] Use ELFv2 ABI on all powerpc64 targets
 
 This patches librustc_target so that ELFv2 is used everywhere, matching our
 LLVM. While this is not perfect (it does not allow rustc to compile legacy
 binaries), rustc never requests specific ABI from llvm in the first place,
 so at least match the environment we have.
 ---
- src/librustc_target/abi/call/powerpc64.rs               | 9 +--------
- src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs | 6 +-----
+ compiler/rustc_target/src/abi/call/powerpc64.rs          | 9 +--------
+ .../rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs | 6 +-----
  2 files changed, 2 insertions(+), 13 deletions(-)
 
 diff --git a/compiler/rustc_target/src/abi/call/powerpc64.rs b/compiler/rustc_target/src/abi/call/powerpc64.rs
-index 8c2a9d09a..2dcbf2c09 100644
+index c22ef9c8f..932172b2f 100644
 --- a/compiler/rustc_target/src/abi/call/powerpc64.rs
 +++ b/compiler/rustc_target/src/abi/call/powerpc64.rs
 @@ -119,14 +119,7 @@ where
-     Ty: TyAndLayoutMethods<'a, C> + Copy,
-     C: LayoutOf<Ty = Ty, TyAndLayout = TyAndLayout<'a, Ty>> + HasDataLayout + HasTargetSpec,
+     Ty: TyAbiInterface<'a, C> + Copy,
+     C: HasDataLayout + HasTargetSpec,
  {
 -    let abi = if cx.target_spec().env == "musl" {
 -        ELFv2
@@ -33,7 +33,7 @@ index 8c2a9d09a..2dcbf2c09 100644
      if !fn_abi.ret.is_ignore() {
          classify_ret(cx, &mut fn_abi.ret, abi);
 diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
-index 751022c12..c4d55a62e 100644
+index 24d5d187e..aa594b02e 100644
 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
 +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
 @@ -1,5 +1,5 @@
@@ -44,7 +44,7 @@ index 751022c12..c4d55a62e 100644
  pub fn target() -> Target {
      let mut base = super::linux_gnu_base::opts();
 @@ -7,10 +7,6 @@ pub fn target() -> Target {
-     base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
+     base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m64".into());
      base.max_atomic_width = Some(64);
  
 -    // ld.so in at least RHEL6 on ppc64 has a bug related to BIND_NOW, so only enable partial RELRO
@@ -52,8 +52,8 @@ index 751022c12..c4d55a62e 100644
 -    base.relro_level = RelroLevel::Partial;
 -
      Target {
-         llvm_target: "powerpc64-unknown-linux-gnu".to_string(),
+         llvm_target: "powerpc64-unknown-linux-gnu".into(),
          pointer_width: 64,
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/fix-ppc32.patch b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
similarity index 78%
rename from srcpkgs/rust/patches/fix-ppc32.patch
rename to srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
index 739ce4bce7f0..7b1ba46b1f2b 100644
--- a/srcpkgs/rust/patches/fix-ppc32.patch
+++ b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
@@ -1,7 +1,7 @@
-From 283619cf5ca25272b294525273ec42e9c7820edb Mon Sep 17 00:00:00 2001
+From 4b803b211f765f6c6b18223e23670dbf754a980f Mon Sep 17 00:00:00 2001
 From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
 Date: Sat, 29 May 2021 12:38:46 +0000
-Subject: [PATCH] bootstrap: Disable initial-exec TLS model on powerpc
+Subject: [PATCH 12/15] bootstrap: Disable initial-exec TLS model on powerpc
 
 Fixes #81334.
 ---
@@ -9,10 +9,10 @@ Fixes #81334.
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index 6750f7a549d..6032a685776 100644
+index 554dd4188..6a02a225c 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1299,7 +1299,7 @@ pub fn cargo(
+@@ -1844,7 +1844,7 @@ impl<'a> Builder<'a> {
          // efficient initial-exec TLS model. This doesn't work with `dlopen`,
          // so we can't use it by default in general, but we can use it for tools
          // and our own internal libraries.
@@ -21,3 +21,6 @@ index 6750f7a549d..6032a685776 100644
              rustflags.arg("-Ztls-model=initial-exec");
          }
  
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/native-sysroot.patch b/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
similarity index 69%
rename from srcpkgs/rust/patches/native-sysroot.patch
rename to srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
index 6826b114b6b7..2414d72380b6 100644
--- a/srcpkgs/rust/patches/native-sysroot.patch
+++ b/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
@@ -1,8 +1,21 @@
+From 236c0272667d69380d03984cfa8bad44b033fd69 Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Tue, 21 Dec 2021 02:46:30 +0100
+Subject: [PATCH 13/15] allow specifying native sysroot to use for linkage
+
+This allows us to get around the linker attempting to use
+incompatible libs.
+---
+ src/bootstrap/builder.rs | 4 ++++
+ src/bootstrap/config.rs  | 3 +++
+ src/bootstrap/lib.rs     | 4 ++++
+ 3 files changed, 11 insertions(+)
+
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index e816f9b4..a2668fa9 100644
+index 6a02a225c..483aa8818 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1313,6 +1313,10 @@ pub fn cargo(
+@@ -1708,6 +1708,10 @@ impl<'a> Builder<'a> {
              }
          }
  
@@ -14,10 +27,10 @@ index e816f9b4..a2668fa9 100644
              cargo.env("RUSTC_HOST_LINKER", host_linker);
          }
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 642a5c24..0dd4f879 100644
+index 18a764689..f8b9bbd96 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -294,6 +294,7 @@ pub struct Target {
+@@ -395,6 +395,7 @@ pub struct Target {
      pub ranlib: Option<PathBuf>,
      pub default_linker: Option<PathBuf>,
      pub linker: Option<PathBuf>,
@@ -25,15 +38,15 @@ index 642a5c24..0dd4f879 100644
      pub ndk: Option<PathBuf>,
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
-@@ -621,6 +622,7 @@ struct TomlTarget {
+@@ -723,6 +724,7 @@ define_config! {
          ranlib: Option<String> = "ranlib",
          default_linker: Option<PathBuf> = "default-linker",
          linker: Option<String> = "linker",
 +        sysroot: Option<String> = "sysroot",
          llvm_config: Option<String> = "llvm-config",
          llvm_filecheck: Option<String> = "llvm-filecheck",
-         android_ndk: Option<String> = "android-ndk",
-@@ -1051,6 +1053,7 @@ pub fn parse(args: &[String]) -> Config {
+         llvm_libunwind: Option<String> = "llvm-libunwind",
+@@ -1156,6 +1158,7 @@ impl Config {
                  target.ar = cfg.ar.map(PathBuf::from);
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
@@ -42,17 +55,20 @@ index 642a5c24..0dd4f879 100644
                  target.wasi_root = cfg.wasi_root.map(PathBuf::from);
                  target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
 diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index f3d5f308..7f8b9b27 100644
+index 0a7012dbd..cded50d20 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1125,6 +1125,10 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1152,6 +1152,10 @@ impl Build {
+             self.config.target_config.get(&target).and_then(|t| t.crt_static)
          }
      }
- 
++    
 +    fn native_sysroot(&self, target: TargetSelection) -> Option<&Path> {
 +        self.config.target_config.get(&target).and_then(|c| c.sysroot.as_ref()).map(|p| &**p)
 +    }
-+
+ 
      /// Returns the sysroot for the wasi target, if defined
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
-         self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch b/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
new file mode 100644
index 000000000000..ec26d9c26ae0
--- /dev/null
+++ b/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
@@ -0,0 +1,28 @@
+From 0b057b456a5b24ce5cf898e47eddb7cbc7448fe2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
+Date: Fri, 16 Apr 2021 03:34:16 -0300
+Subject: [PATCH 14/15] copy new version of need-ssp_nonshared.patch from
+ alpine
+
+---
+ library/std/src/sys/unix/mod.rs | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/library/std/src/sys/unix/mod.rs b/library/std/src/sys/unix/mod.rs
+index 34a023b02..934a87570 100644
+--- a/library/std/src/sys/unix/mod.rs
++++ b/library/std/src/sys/unix/mod.rs
+@@ -297,6 +297,10 @@ cfg_if::cfg_if! {
+         #[link(name = "dl")]
+         #[link(name = "log")]
+         extern "C" {}
++    } else if #[cfg(all(target_os = "linux", target_env = "musl"))] {
++	    #[link(name = "ssp_nonshared")]
++        #[link(name = "execinfo")]
++	    extern "C" {}
+     } else if #[cfg(target_os = "freebsd")] {
+         #[link(name = "execinfo")]
+         #[link(name = "pthread")]
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/xxx-ppcle.patch b/srcpkgs/rust/patches/0015-initial-ppcle-port.patch
similarity index 85%
rename from srcpkgs/rust/patches/xxx-ppcle.patch
rename to srcpkgs/rust/patches/0015-initial-ppcle-port.patch
index c0522f0eaafc..dd6b72e21bcb 100644
--- a/srcpkgs/rust/patches/xxx-ppcle.patch
+++ b/srcpkgs/rust/patches/0015-initial-ppcle-port.patch
@@ -1,8 +1,40 @@
+From 2b3b4a11dd75ff43e0f1f12de395d0ce29f8555f Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Sat, 3 Jul 2021 21:02:03 +0200
+Subject: [PATCH 15/15] initial ppcle port
+
+---
+ compiler/rustc_middle/src/ty/layout.rs            |  5 ++++-
+ compiler/rustc_target/src/spec/mod.rs             |  2 ++
+ .../src/spec/powerpcle_unknown_linux_gnu.rs       | 15 +++++++++++++++
+ .../src/spec/powerpcle_unknown_linux_musl.rs      | 15 +++++++++++++++
+ src/bootstrap/bootstrap.py                        |  2 ++
+ .../codegen/abi-main-signature-16bit-c-int.rs     |  1 +
+ src/test/codegen/global_asm.rs                    |  1 +
+ src/test/codegen/global_asm_include.rs            |  1 +
+ src/test/codegen/global_asm_x2.rs                 |  1 +
+ src/test/codegen/repr-transparent-aggregates-1.rs |  1 +
+ src/test/codegen/repr-transparent-aggregates-2.rs |  1 +
+ src/test/codegen/stack-probes.rs                  |  1 +
+ .../run-make-fulldeps/atomic-lock-free/Makefile   |  2 ++
+ src/test/ui/abi/stack-probes-lto.rs               |  1 +
+ src/test/ui/abi/stack-probes.rs                   |  1 +
+ src/test/ui/target-feature/gate.rs                |  1 +
+ src/test/ui/target-feature/invalid-attribute.rs   |  1 +
+ src/tools/compiletest/src/util.rs                 |  1 +
+ vendor/cc/src/lib.rs                              |  1 +
+ vendor/target-lexicon/src/targets.rs              |  7 +++++++
+ vendor/tikv-jemallocator/benches/roundtrip.rs     |  3 ++-
+ vendor/tikv-jemallocator/src/lib.rs               |  3 ++-
+ 22 files changed, 64 insertions(+), 3 deletions(-)
+ create mode 100644 compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
+ create mode 100644 compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
+
 diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs
-index 0c1ab67cc..8d4e5f3cb 100644
+index 3b05e42a5..66420f507 100644
 --- a/compiler/rustc_middle/src/ty/layout.rs
 +++ b/compiler/rustc_middle/src/ty/layout.rs
-@@ -3057,6 +3057,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
+@@ -3205,6 +3205,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
              target.os == "linux" && target.arch == "sparc64" && target_env_gnu_like;
          let linux_powerpc_gnu_like =
              target.os == "linux" && target.arch == "powerpc" && target_env_gnu_like;
@@ -11,7 +43,7 @@ index 0c1ab67cc..8d4e5f3cb 100644
          use SpecAbi::*;
          let rust_abi = matches!(sig.abi, RustIntrinsic | PlatformIntrinsic | Rust | RustCall);
  
-@@ -3165,7 +3167,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
+@@ -3311,7 +3313,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
                      || (!win_x64_gnu
                          && !linux_s390x_gnu_like
                          && !linux_sparc64_gnu_like
@@ -22,10 +54,10 @@ index 0c1ab67cc..8d4e5f3cb 100644
                      arg.mode = PassMode::Ignore;
                  }
 diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
-index bd5b712c1..f60be010c 100644
+index da0589cdd..2db403913 100644
 --- a/compiler/rustc_target/src/spec/mod.rs
 +++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -824,6 +824,8 @@ supported_targets! {
+@@ -831,6 +831,8 @@ supported_targets! {
      ("powerpc-unknown-linux-gnu", powerpc_unknown_linux_gnu),
      ("powerpc-unknown-linux-gnuspe", powerpc_unknown_linux_gnuspe),
      ("powerpc-unknown-linux-musl", powerpc_unknown_linux_musl),
@@ -77,10 +109,10 @@ index 000000000..a826b6e47
 +    }
 +}
 diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 71b8f3c45..1505c12e4 100644
+index 3501fd901..a28f456d3 100644
 --- a/src/bootstrap/bootstrap.py
 +++ b/src/bootstrap/bootstrap.py
-@@ -320,9 +320,11 @@ def default_build_triple(verbose):
+@@ -339,9 +339,11 @@ def default_build_triple(verbose):
          'i786': 'i686',
          'm68k': 'm68k',
          'powerpc': 'powerpc',
@@ -141,7 +173,7 @@ index bdcf0ea84..1e2ff8b8d 100644
  // ignore-amdgcn
  // ignore-sparc
 diff --git a/src/test/codegen/repr-transparent-aggregates-1.rs b/src/test/codegen/repr-transparent-aggregates-1.rs
-index 4ad3642c0..fca31c0c6 100644
+index 9d18c5f03..8e69d2afd 100644
 --- a/src/test/codegen/repr-transparent-aggregates-1.rs
 +++ b/src/test/codegen/repr-transparent-aggregates-1.rs
 @@ -6,6 +6,7 @@
@@ -238,10 +270,10 @@ index ad1b6e96b..122d59a57 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
-index bed509d77..8bc817897 100644
+index 215af347f..a1c7e4c6a 100644
 --- a/src/tools/compiletest/src/util.rs
 +++ b/src/tools/compiletest/src/util.rs
-@@ -70,6 +70,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
+@@ -71,6 +71,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
      ("msp430", "msp430"),
      ("nvptx64", "nvptx64"),
      ("powerpc", "powerpc"),
@@ -342,3 +374,6 @@ index 4a9397331..4cf47c05d 100644
  )))]
  const ALIGNOF_MAX_ALIGN_T: usize = 8;
  #[cfg(all(any(
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch b/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
deleted file mode 100644
index d9a7ae68b6e0..000000000000
--- a/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From beb4e16f055aa7925194fd2c360105a6d55f10f6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Lo=C3=AFc=20BRANSTETT?= <lolo.branstett@numericable.fr>
-Date: Wed, 27 Apr 2022 19:11:56 +0200
-Subject: [PATCH] Add missing `target_feature` to the list of well known cfg
- names
-
----
- compiler/rustc_session/src/config.rs | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
-index 12c5c4445d46f..330201dd8fef6 100644
---- a/compiler/rustc_session/src/config.rs
-+++ b/compiler/rustc_session/src/config.rs
-@@ -1038,6 +1038,7 @@ impl CrateCheckConfig {
-             sym::target_has_atomic_load_store,
-             sym::target_has_atomic,
-             sym::target_has_atomic_equal_alignment,
-+            sym::target_feature,
-             sym::panic,
-             sym::sanitize,
-             sym::debug_assertions,
-@@ -1081,6 +1082,10 @@ impl CrateCheckConfig {
-             .into_iter()
-             .map(|sanitizer| Symbol::intern(sanitizer.as_str().unwrap()));
- 
-+        // Unknown possible values:
-+        //  - `feature`
-+        //  - `target_feature`
-+
-         // No-values
-         for name in [
-             sym::doc,
diff --git a/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch b/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch
deleted file mode 100644
index fe0377dbc381..000000000000
--- a/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/library/std/src/sys/unix/mod.rs
-+++ b/library/std/src/sys/unix/mod.rs
-@@ -212,6 +212,10 @@ cfg_if::cfg_if! {
-         #[link(name = "log")]
-         #[link(name = "gcc")]
-         extern "C" {}
-+    } else if #[cfg(all(target_os = "linux", target_env = "musl"))] {
-+	#[link(name = "ssp_nonshared")]
-+  #[link(name = "execinfo")]
-+	extern "C" {}
-     } else if #[cfg(target_os = "freebsd")] {
-         #[link(name = "execinfo")]
-         #[link(name = "pthread")]
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index da3ca779e7c6..d120f21bf50a 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -8,7 +8,7 @@
 # uploaded to https://repo-default.voidlinux.org/distfiles/
 #
 pkgname=rust
-version=1.61.0
+version=1.63.0
 revision=1
 wrksrc="rustc-${version}-src"
 hostmakedepends="cmake curl pkg-config python3 tar cargo-bootstrap"
@@ -19,7 +19,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://www.rust-lang.org/"
 distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
-checksum=ad0b4351675aa9abdf4c7e066613bd274c4391c5506db152983426376101daed
+checksum=1f9580295642ef5da7e475a8da2397d65153d3f2cb92849dbd08ed0effca99d0
 lib32disabled=yes
 make_check=no # CBA for now
 
@@ -127,6 +127,7 @@ do_configure() {
 		incremental = false
 		parallel-compiler = false
 		channel = "stable"
+		description = "Void"
 		rpath = ${_use_rpath}
 		verbose-tests = true
 		dist-src = false

From e9360cf32fc3da696923445cc1ec7bc5f1eadf7a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:35 +0200
Subject: [PATCH 4/5] cargo: update to 1.63.0.

---
 srcpkgs/cargo/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index e3c30f625acd..9f653c39fd43 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo'
 pkgname=cargo
-version=1.61.0
+version=1.63.0
 revision=1
 wrksrc="cargo-rust-${version}"
 build_helper=rust
@@ -13,7 +13,7 @@ license="MIT, Apache-2.0"
 homepage="https://crates.io/"
 distfiles="https://github.com/rust-lang/cargo/archive/rust-${version}.tar.gz
  https://github.com/crossbeam-rs/crossbeam/archive/refs/tags/crossbeam-utils-0.8.8.tar.gz"
-checksum="6261b51441f50abe08a2992a349b22a2385846bfc9cb288ae9a3a609b904099e
+checksum="b1f50e4957a0453c1513cabe98c7fd94e715cd0ca70138b1945cef338e1abf35
  52c451910203cd9002cc4b85cff95f45c6ba245392801e80d7898ca5c3c3ab29"
 replaces="cargo-tree>=0"
 

From 508415169bc1d717fcb629ab9eecaa88fa82669a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Fri, 19 Aug 2022 19:07:34 +0200
Subject: [PATCH 5/5] rust-bootstrap: document cross compiled distfile
 generation

---
 .../files/generating-distfiles.md             | 67 +++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100644 srcpkgs/rust-bootstrap/files/generating-distfiles.md

diff --git a/srcpkgs/rust-bootstrap/files/generating-distfiles.md b/srcpkgs/rust-bootstrap/files/generating-distfiles.md
new file mode 100644
index 000000000000..ed5aa0da8596
--- /dev/null
+++ b/srcpkgs/rust-bootstrap/files/generating-distfiles.md
@@ -0,0 +1,67 @@
+## Generating self-hosted rust and cargo bootstrap distfiles
+
+Rust doesn't ship binaries for some of the targets we support bootstrapping on,
+so we have to generate distfiles for a few architectures as well, namely
+`ppc64le-musl` and `ppc64` for `rust-bootstrap`, and additionally `ppc` for
+`cargo-bootstrap`, as the `ppc` cargo binaries provided by upstream have
+problems.
+
+### Set up appropriate masterdirs and remote-repositories
+
+This guide assumes you're on an x86\_64 machine. If you're not, please adapt the
+appropriate sections.
+
+First, we bootstrap our masterdirs. We need both a glibc one and a musl one:
+
+```
+$ ./xbps-src -m masterdir-glibc binary-bootstrap x86_64
+$ ./xbps-src -m masterdir-musl binary-bootstrap x86_64-musl
+```
+
+In addition to those, we need to set up binary remotes for the ppc repos. As
+they aren't officially maintained by Voidlinux, they aren't included in this
+repo, but you can include them locally by creating these three files:
+
+- `etc/xbps.d/repos-remote-ppc.conf`, with
+  `repository=https://repo.voidlinux-ppc.org/current/ppc` in it.
+- `etc/xbps.d/repos-remote-ppc64.conf`, with
+  `repository=https://repo.voidlinux-ppc.org/current/be` in it.
+- `etc/xbps.d/repos-remote-ppc64le-musl.conf`, with
+  `repository=https://repo.voidlinux-ppc.org/current/musl` in it.
+
+### Bootstrapping on your native architecture
+
+Assuming you've already adjusted the version and checksums for the distfiles
+provided by upstream, we can now start building rust for our native
+architecture, with both glibc and musl. Run this for both masterdirs
+bootstrapped above
+
+```
+$ ./xbps-src -m <masterdir> pkg cargo
+```
+
+This builds `rust-bootstrap`, `cargo-bootstrap`, `rust` and `cargo` for your
+native architecture, which we will need for the next step.
+
+### Crosscompiling for the target architectures and generating distfiles
+
+Now that we have the our native architecture covered, we cross build for the
+architectures we need to generate distfiles for:
+
+```
+$ ./xbps-src -m <masterdir> -a <arch> pkg -o bindist rust
+$ ./xbps-src -m <masterdir> -a <arch> pkg rust
+$ ./xbps-src -m <masterdir> -a <arch> pkg -o bindist cargo
+```
+
+Repeat these three steps for `masterdir-glibc` with `ppc`, `masterdir-musl` with
+`ppc64le-musl` and `masterdir-glibc` with `ppc64`. In the case of `ppc`, you can
+skip the `bindist` build for rust, as we are taking those from upstream.
+
+Now that we have run those commands, the generated distfiles are available in
+`hostdir/sources/distfiles`. Generate a `sha256sum` for each of those files, and
+set the hashes in the appropriate places in the `rust-bootstrap` and
+`cargo-bootstrap` templates. If you want to verify you did things correctly, you
+can copy the generated distfiles over into `hostdir/sources/rust-bootstrap-${version}`
+and `hostdir/sources/cargo-bootstrap-${version}`, and try cross-building the
+bootstrap packages for those architectures.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PR REVIEW] Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
                   ` (15 preceding siblings ...)
  2022-08-19 17:07 ` [PR PATCH] [Updated] " jcgruenhage
@ 2022-08-19 17:12 ` classabbyamp
  2022-08-19 17:17 ` [PR PATCH] [Updated] " jcgruenhage
                   ` (6 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: classabbyamp @ 2022-08-19 17:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 195 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/38662#discussion_r950410093

Comment:
hm maybe `Void Linux`? (a bit of a nitpick)

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PR PATCH] [Updated] Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
                   ` (16 preceding siblings ...)
  2022-08-19 17:12 ` [PR REVIEW] " classabbyamp
@ 2022-08-19 17:17 ` jcgruenhage
  2022-08-19 18:43 ` [PR REVIEW] " jcgruenhage
                   ` (5 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jcgruenhage @ 2022-08-19 17:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 864 bytes --]

There is an updated pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages rust-1.63
https://github.com/void-linux/void-packages/pull/38662

Update Rust toolchain to 1.63.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

[ci skip]

`cargo-crev` requires 1.62 at least, so I thought I'd gave updating Rust a go, and it worked out just fine tbh. The new `cargo-crev` release compiled fine on this toolchain and works properly.

#### Local build testing
- I built this PR natively for
  - `x86_64`, `glibc` and `musl`
  - `i686`, `glibc`
- I crossbuilt this PR for
  - `aarch64`, `musl`


A patch file from https://github.com/void-linux/void-packages/pull/38662.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rust-1.63-38662.patch --]
[-- Type: text/x-diff, Size: 59586 bytes --]

From ab4a8a921ce5c5e0435b4a7c2e79a2190c6bf070 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:01 +0200
Subject: [PATCH 1/5] rust-bootstrap: update to 1.63.0.

---
 srcpkgs/rust-bootstrap/template | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/rust-bootstrap/template b/srcpkgs/rust-bootstrap/template
index 66d04d634638..47742bf17eae 100644
--- a/srcpkgs/rust-bootstrap/template
+++ b/srcpkgs/rust-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'rust-bootstrap'
 pkgname=rust-bootstrap
-version=1.61.0
+version=1.63.0
 revision=1
 create_wrksrc=yes
 short_desc="Rust programming language bootstrap toolchain"
@@ -29,38 +29,38 @@ distfiles="
 case "$XBPS_TARGET_MACHINE" in
 	i686)
 		checksum="
-		 8af0ec3eb470e7e28439fedf9ebdadf90df8c58da544cc643033e6fc0ccf0bea
-		 ab223fcec35183bc0fe630403537cd7dae55c403103df29b25077db4882cb88e"
+		 11d3729f0343a069e9e59531745170cb0b6ce68f73848699564ea0bbcbf2c02f
+		 3177d3a159b4fcd54bca93d09ff1a903689a64ed4037699de372e685d12d4335"
 		;;
 	x86_64)
 		checksum="
-		 21c4613f389ed130fbaaf88f1e984319f72b5fc10734569a5ba19e22ebb03abd
-		 270b07aa5f2de52255a117e1e587138d77375ce0d09a1d7fead085f29b3977e9"
+		 bdab9d9afa5c329c40f9ba568364815237fab8426477c12bfabad35ffc484ab5
+		 993c2c17bf76ac626bfb5b17bddce65fbdfc14f70d183f33773de0cd12df46d2"
 		;;
 	x86_64-musl)
 		checksum="
-		 89cb72cbc493cb5cd8e43830009b4a1a5bfd472246ae184157868c9b0607bf6c
-		 1f4f2e4c5dd0f9b0dac7c8888f4a49ef16a6fe8992f39895823d2a442f0fe408"
+		 b6566a9b1dafe03cf4a01b58b2db0e14a0044ae5773736827882bd549108277e
+		 6fcfa4f9a51d35bf2c5c92ac15c688baa8c98d9fded05ab6abfdae85cb5aed8c"
 		;;
 	ppc64le)
 		checksum="
-		 dc54893d747e4f3330515caa75e404f78c6c5475a1216d1428f5e7ce1c2e9602
-		 36c0ccff14c80419507561db050f9533f0abd43fc50f3ddb859c10df74b1c351"
+		 b3dc2c082e76b5effe0b158aac3831830168a1a6980b39347c355e49be63fcca
+		 3ae0b74ba428c569fcecebbb09060ad0bd434a5f1fc9ffd1329b56941a897b6e"
 		;;
 	ppc64le-musl)
 		checksum="
-		 2191613e654a192dc6dbab693ecb90a3669d7c71a29d392271138b3bb77fdb54
-		 2a587565344e44bfa55e56df24e54f0f706e8280b3eccb45940af161205c9524"
+		 63273dc52f3f9e16e26de1c2f5749cabc3c958af5416cf6da6c7600ddf086447
+		 6f78a87825c624b85c7c5c2a47a185d354a72b1604e354fae40888958069d4d1"
 		;;
 	ppc64)
 		checksum="
-		 070a334ecf824a99b89385f5b286632c3a7e88c921186f0cc75ede31501df3a3
-		 0be4769a41fe2bcdcda2e5c92759826a59828615a5df057a09f2107dba888d72"
+		 52dacd9c0adda206bc0255dc978f53453fec995a33a905c2b1cf9b1b1fe8089b
+		 514e5f62cb17a0d0ee2981bfb1aba9284f37eb44a20ff36164faab32cc0a22bc"
 		;;
 	ppc)
 		checksum="
-		 f28a8c2986fce5015c67823e39ad4b53e2db06603b6ea4a1217ac961cbbfb073
-		 7d2f7f900c8c05616fba8e99ab041d847af3653c259b99445edd788acddf878c"
+		 7a99dd6a7f30b8a8f85d95f47fa77084a48c7ebc94092978daa3563268a4b15b
+		 a25719c0ad2a5e7f52eed87b75cb76c4a52b8dc6e24b4bef16ed7fb9133e5b42"
 		;;
 	*) broken="rust bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac

From 84b3c695e7f5ce9cfbebc29d9ec1194be4d7580c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:24 +0200
Subject: [PATCH 2/5] cargo-bootstrap: update to 1.63.0.

---
 srcpkgs/cargo-bootstrap/template | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/cargo-bootstrap/template b/srcpkgs/cargo-bootstrap/template
index 0fdaac840a3c..da727491a6a4 100644
--- a/srcpkgs/cargo-bootstrap/template
+++ b/srcpkgs/cargo-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo-bootstrap'
 pkgname=cargo-bootstrap
-version=1.61.0
+version=1.63.0
 revision=1
 short_desc="Bootstrap binaries of Rust package manager"
 maintainer="q66 <daniel@octaforge.org>"
@@ -26,25 +26,25 @@ distfiles="${_bootstrap_url}/cargo-${version}-${RUST_TARGET}.tar.xz"
 
 case "$XBPS_TARGET_MACHINE" in
 	i686)
-		checksum="fe258b85ef0644ff08c2095e329399dd4de0e1b2e51f4f4e90cb956d40dc61de"
+		checksum="6f2c109fc38ed8ccadcdcccf51d11505651ca9e12c396ab46ac1dbb55265b792"
 		;;
 	x86_64)
-		checksum="9461727d754f865ef2a87479d40bbe4c5176f80963b7c50b7797bc8940d7a0a0"
+		checksum="f370d12e4c11f0c835becb738bcf00d363f29b76f8b424b4dcb005abcf15fc9a"
 		;;
 	x86_64-musl)
-		checksum="db4b4423c2843b6e27737664cf8085afcba670374110ca24b9c8d341045e748c"
+		checksum="6f6ce044832a2433c250f4f27a61f69081e2b0f7e4e1f141492c2ce99ee8511e"
 		;;
 	ppc64le)
-		checksum="09817011ff1ef4b7006387c7cabb6a059731792a9372533dec7d87e7f014444b"
+		checksum="a4cdc00a42fd767bf5a296f7126d9db22a0a609cd956bbf0cb3eae882add1be7"
 		;;
 	ppc64le-musl)
-		checksum="39215cba9b1bda63209cac0edbda583e0c822f88a50fdbf33255c8c5386e4868"
+		checksum="3dc497186493a9fc974ae8add91a6fed34d95e263bedb95142d636ba257b2240"
 		;;
 	ppc64)
-		checksum="3fa6e033bbbab339e480842627523f95d84119a5dcae56ad4b14e5c6d1536e6b"
+		checksum="babded6c2d112aa92cb1af5ca24d93a034b20c0315f03c231a4eb3a92408a6cd"
 		;;
 	ppc)
-		checksum="5d6226a5080e429cb6bb8366ff1f71feeccde70f8bf6651779674fe27eb35e7f"
+		checksum="3c7f4d28987d8bf5d10fb0cf4ec792b73a4725add2845d69b85e36d47f3c228e"
 		;;
 	*) broken="cargo bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac

From bd7cbc65954b037d766b33b666a526fce5365dbd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:31 +0200
Subject: [PATCH 3/5] rust: update to 1.63.0.

---
 .../rust/patches/0001-Fix-LLVM-build.patch    |  8 +--
 ...lib-and-musl_root-from-musl-targets.patch} | 65 ++++++++++++-------
 ...e-debugger-scripts-to-usr-share-rust.patch | 10 +--
 ...4-fix-shebang-on-install-template.sh.patch |  6 +-
 ...fer-libgcc_eh-over-libunwind-on-musl.patch | 24 -------
 ...ot-install-libunwind-source-removed.patch} | 10 +--
 ...06-fix-rustdoc-when-cross-compiling.patch} | 25 +++----
 ...stage-2-tools-dynamically-to-libstd.patch} | 10 +--
 ...against-host-target-LLVM-in-cross-s.patch} | 16 ++++-
 .../0009-do-not-export-LD_LIBRARY_PATH.patch  | 29 +++++++++
 ...age-of-musl-libc-for-the-libc-crate.patch} | 16 ++---
 .../0010-do-not-export-LD_LIBRARY_PATH.patch  | 23 -------
 ...-ELFv2-ABI-on-all-powerpc64-targets.patch} | 22 +++----
 ...e-initial-exec-TLS-model-on-powerpc.patch} | 11 ++--
 ...g-native-sysroot-to-use-for-linkage.patch} | 40 ++++++++----
 ...-of-need-ssp_nonshared.patch-from-al.patch | 28 ++++++++
 ...le.patch => 0015-initial-ppcle-port.patch} | 55 +++++++++++++---
 ...e16f055aa7925194fd2c360105a6d55f10f6.patch | 33 ----------
 .../need-ssp-nonshared-and-execinfo.patch     | 13 ----
 srcpkgs/rust/template                         |  5 +-
 20 files changed, 250 insertions(+), 199 deletions(-)
 rename srcpkgs/rust/patches/{0001-musl-void-setup.patch => 0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch} (89%)
 delete mode 100644 srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
 rename srcpkgs/rust/patches/{0006-do-not-install-libunwind-source-removed.patch => 0005-do-not-install-libunwind-source-removed.patch} (73%)
 rename srcpkgs/rust/patches/{0007-fix-rustdoc-when-cross-compiling.patch => 0006-fix-rustdoc-when-cross-compiling.patch} (67%)
 rename srcpkgs/rust/patches/{0008-link-stage-2-tools-dynamically-to-libstd.patch => 0007-link-stage-2-tools-dynamically-to-libstd.patch} (78%)
 rename srcpkgs/rust/patches/{0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch => 0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch} (71%)
 create mode 100644 srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
 rename srcpkgs/rust/patches/{0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch => 0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch} (69%)
 delete mode 100644 srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
 rename srcpkgs/rust/patches/{0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch => 0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch} (74%)
 rename srcpkgs/rust/patches/{fix-ppc32.patch => 0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch} (78%)
 rename srcpkgs/rust/patches/{native-sysroot.patch => 0013-allow-specifying-native-sysroot-to-use-for-linkage.patch} (69%)
 create mode 100644 srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
 rename srcpkgs/rust/patches/{xxx-ppcle.patch => 0015-initial-ppcle-port.patch} (85%)
 delete mode 100644 srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
 delete mode 100644 srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch

diff --git a/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch b/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
index 0da829af1da9..6cf9c3a755a9 100644
--- a/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
+++ b/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
@@ -1,4 +1,4 @@
-From 4443eca0d6b3ba599832b2f73a5350fdd0c90d10 Mon Sep 17 00:00:00 2001
+From 99a046adc7d1c7b2da3a31e077722ea69f84eeb6 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/15] Fix LLVM build
@@ -8,10 +8,10 @@ Subject: [PATCH 01/15] Fix LLVM build
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index a476d25f..c7e63990 100644
+index 4ac857b47..b603ae90a 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -768,7 +768,8 @@ impl Build {
+@@ -1050,7 +1050,8 @@ impl Build {
              .args()
              .iter()
              .map(|s| s.to_string_lossy().into_owned())
@@ -22,5 +22,5 @@ index a476d25f..c7e63990 100644
  
          // If we're compiling on macOS then we add a few unconditional flags
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0001-musl-void-setup.patch b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
similarity index 89%
rename from srcpkgs/rust/patches/0001-musl-void-setup.patch
rename to srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
index c13cb1730986..c156945b8111 100644
--- a/srcpkgs/rust/patches/0001-musl-void-setup.patch
+++ b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
@@ -1,5 +1,23 @@
+From 7219ba1c9accbad9b530d312fd9a9f69330c93da Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 3 May 2020 17:53:33 +0200
+Subject: [PATCH 02/15] Remove -nostdlib and musl_root from musl targets
+
+extended by various void contributors to match our musl setup
+---
+ compiler/rustc_target/src/spec/crt_objects.rs | 22 ----------
+ .../rustc_target/src/spec/linux_musl_base.rs  |  7 ---
+ config.toml.example                           |  8 ----
+ src/bootstrap/cc_detect.rs                    | 25 +----------
+ src/bootstrap/compile.rs                      | 43 +------------------
+ src/bootstrap/config.rs                       |  9 ----
+ src/bootstrap/configure.py                    | 28 ------------
+ src/bootstrap/lib.rs                          | 19 --------
+ src/bootstrap/sanity.rs                       | 23 ----------
+ 9 files changed, 3 insertions(+), 181 deletions(-)
+
 diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
-index 51f392a6..62560658 100644
+index 52ac3622e..f35e5b9d8 100644
 --- a/compiler/rustc_target/src/spec/crt_objects.rs
 +++ b/compiler/rustc_target/src/spec/crt_objects.rs
 @@ -63,28 +63,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects {
@@ -32,7 +50,7 @@ index 51f392a6..62560658 100644
      new(&[
          (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
 diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs
-index 207a87ab..88f807a5 100644
+index 207a87ab0..88f807a58 100644
 --- a/compiler/rustc_target/src/spec/linux_musl_base.rs
 +++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
 @@ -1,16 +1,9 @@
@@ -53,10 +71,10 @@ index 207a87ab..88f807a5 100644
      base
  }
 diff --git a/config.toml.example b/config.toml.example
-index 6e53d9b4..74980d2c 100644
+index b3284050f..62ac07f87 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -511,14 +511,6 @@ changelog-seen = 2
+@@ -523,14 +523,6 @@ changelog-seen = 2
  # supplementary build information, like distro-specific package versions.
  #description = <none> (string)
  
@@ -72,7 +90,7 @@ index 6e53d9b4..74980d2c 100644
  # 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
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index 7ce44687..4e7507ae 100644
+index dca782c29..8eb35ea43 100644
 --- a/src/bootstrap/cc_detect.rs
 +++ b/src/bootstrap/cc_detect.rs
 @@ -97,7 +97,7 @@ pub fn find(build: &mut Build) {
@@ -93,7 +111,7 @@ index 7ce44687..4e7507ae 100644
              true
          } else {
              // Use an auto-detected compiler (or one configured via `CXX_target_triple` env vars).
-@@ -157,7 +157,6 @@ fn set_compiler(
+@@ -161,7 +161,6 @@ fn set_compiler(
      compiler: Language,
      target: TargetSelection,
      config: Option<&Target>,
@@ -101,7 +119,7 @@ index 7ce44687..4e7507ae 100644
  ) {
      match &*target.triple {
          // When compiling for android we may have the NDK configured in the
-@@ -200,26 +199,6 @@ fn set_compiler(
+@@ -204,26 +203,6 @@ fn set_compiler(
              }
          }
  
@@ -129,10 +147,10 @@ index 7ce44687..4e7507ae 100644
      }
  }
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index afc333b5..9d67ab56 100644
+index b4807d1ab..ce483bf6b 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -197,39 +197,7 @@ fn copy_self_contained_objects(
+@@ -200,39 +200,7 @@ fn copy_self_contained_objects(
      let mut target_deps = vec![];
  
      // Copies the libc and CRT objects.
@@ -173,7 +191,7 @@ index afc333b5..9d67ab56 100644
          let srcdir = builder
              .wasi_root(target)
              .unwrap_or_else(|| {
-@@ -313,15 +281,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+@@ -316,15 +284,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
              .arg("--manifest-path")
              .arg(builder.src.join("library/test/Cargo.toml"));
  
@@ -190,10 +208,10 @@ index afc333b5..9d67ab56 100644
              if let Some(p) = builder.wasi_root(target) {
                  let root = format!("native={}/lib/wasm32-wasi", p.to_str().unwrap());
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 9534cc5f..642a5c24 100644
+index 146077419..18a764689 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -172,7 +172,6 @@ pub struct Config {
+@@ -186,7 +186,6 @@ pub struct Config {
      pub missing_tools: bool,
  
      // Fallback musl-root for all targets
@@ -201,7 +219,7 @@ index 9534cc5f..642a5c24 100644
      pub prefix: Option<PathBuf>,
      pub sysconfdir: Option<PathBuf>,
      pub datadir: Option<PathBuf>,
-@@ -299,8 +298,6 @@ pub struct Target {
+@@ -400,8 +399,6 @@ pub struct Target {
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
      pub crt_static: Option<bool>,
@@ -210,7 +228,7 @@ index 9534cc5f..642a5c24 100644
      pub wasi_root: Option<PathBuf>,
      pub qemu_rootfs: Option<PathBuf>,
      pub no_std: bool,
-@@ -587,7 +584,6 @@ struct Rust {
+@@ -689,7 +686,6 @@ define_config! {
          default_linker: Option<String> = "default-linker",
          channel: Option<String> = "channel",
          description: Option<String> = "description",
@@ -218,7 +236,7 @@ index 9534cc5f..642a5c24 100644
          rpath: Option<bool> = "rpath",
          verbose_tests: Option<bool> = "verbose-tests",
          optimize_tests: Option<bool> = "optimize-tests",
-@@ -631,8 +627,6 @@ struct TomlTarget {
+@@ -734,8 +730,6 @@ define_config! {
          sanitizers: Option<bool> = "sanitizers",
          profiler: Option<bool> = "profiler",
          crt_static: Option<bool> = "crt-static",
@@ -227,7 +245,7 @@ index 9534cc5f..642a5c24 100644
          wasi_root: Option<String> = "wasi-root",
          qemu_rootfs: Option<String> = "qemu-rootfs",
          no_std: Option<bool> = "no-std",
-@@ -1013,7 +1007,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1107,7 +1101,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;
@@ -235,7 +253,7 @@ index 9534cc5f..642a5c24 100644
              config.save_toolstates = rust.save_toolstates.map(PathBuf::from);
              set(&mut config.deny_warnings, flags.deny_warnings.or(rust.deny_warnings));
              set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
-@@ -1059,8 +1052,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1164,8 +1157,6 @@ impl Config {
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
                  target.crt_static = cfg.crt_static;
@@ -245,7 +263,7 @@ index 9534cc5f..642a5c24 100644
                  target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
                  target.sanitizers = cfg.sanitizers;
 diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
-index 87a130a0..bd4c9197 100755
+index 2fc036082..91737e0ea 100755
 --- a/src/bootstrap/configure.py
 +++ b/src/bootstrap/configure.py
 @@ -114,34 +114,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
@@ -284,10 +302,10 @@ index 87a130a0..bd4c9197 100755
    "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 570a6174..f3d5f308 100644
+index b603ae90a..0a7012dbd 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1125,25 +1125,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1153,25 +1153,6 @@ impl Build {
          }
      }
  
@@ -314,7 +332,7 @@ index 570a6174..f3d5f308 100644
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
          self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
 diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index 8c2899c1..dda15d76 100644
+index 64c5dd7ae..b8f9104ea 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
 @@ -11,7 +11,6 @@
@@ -325,7 +343,7 @@ index 8c2899c1..dda15d76 100644
  use std::path::PathBuf;
  use std::process::Command;
  
-@@ -177,28 +176,6 @@ pub fn check(build: &mut Build) {
+@@ -190,28 +189,6 @@ than building it.
              }
          }
  
@@ -354,3 +372,6 @@ index 8c2899c1..dda15d76 100644
          if need_cmake && target.contains("msvc") {
              // There are three builds of cmake on windows: MSVC, MinGW, and
              // Cygwin. The Cygwin build does not have generators for Visual
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch b/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
index 3c4e1cb96475..bc7053800945 100644
--- a/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
+++ b/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
@@ -1,7 +1,7 @@
-From f9a680688a685ec47ee5ec001574d9b91b4ba35e Mon Sep 17 00:00:00 2001
+From 8938b002edbec432be46de7b6f1b9d0a6912873a Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 00:45:35 +0100
-Subject: [PATCH 3/9] move debugger scripts to /usr/share/rust
+Subject: [PATCH 03/15] move debugger scripts to /usr/share/rust
 
 ---
  src/bootstrap/dist.rs | 2 +-
@@ -11,10 +11,10 @@ Subject: [PATCH 3/9] move debugger scripts to /usr/share/rust
  4 files changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index d4875cfe1..e8b61b8a2 100644
+index b1fae356d..e7a077134 100644
 --- a/src/bootstrap/dist.rs
 +++ b/src/bootstrap/dist.rs
-@@ -499,7 +499,7 @@ impl Step for DebuggerScripts {
+@@ -460,7 +460,7 @@ impl Step for DebuggerScripts {
      fn run(self, builder: &Builder<'_>) {
          let host = self.host;
          let sysroot = self.sysroot;
@@ -65,5 +65,5 @@ index bce72f1ba..8abb01245 100755
  # Call LLDB with the commands added to the argument list
  exec "$lldb" --one-line-before-file "$script_import" --source-before-file "$commands_file" "$@"
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch b/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
index 2e9cd93fdfb9..2ca7ffeaf73f 100644
--- a/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
+++ b/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
@@ -1,7 +1,7 @@
-From d5a6a431024790c911d04fd54381c515fb05819e Mon Sep 17 00:00:00 2001
+From d7d7fc24d1744a3db70a9fb010c31daa14a46df7 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 00:55:18 +0100
-Subject: [PATCH 4/9] fix shebang on install-template.sh
+Subject: [PATCH 04/15] fix shebang on install-template.sh
 
 ---
  src/tools/rust-installer/install-template.sh | 2 +-
@@ -18,5 +18,5 @@ index e68be8911..beaa90f7b 100644
  # file at the top-level directory of this distribution and at
  # http://rust-lang.org/COPYRIGHT.
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch b/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
deleted file mode 100644
index 30cb66fc24b1..000000000000
--- a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Additions for build.rs by q66, necessary for our musl setup.
-
-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/library/unwind/src/lib.rs
-+++ b/library/unwind/src/lib.rs
-@@ -51,7 +51,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", cfg(target_feature = "crt-static"))]
-         #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
-         extern "C" {}
-     }
diff --git a/srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch b/srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
similarity index 73%
rename from srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch
rename to srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
index 0128b8fc61f2..92e0021ab6f4 100644
--- a/srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch
+++ b/srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
@@ -1,17 +1,17 @@
-From fc69414484327e4dbff138dd0834fc3bde626008 Mon Sep 17 00:00:00 2001
+From 1335a445327a6605c5f933d9647b97e771089abd Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:44:54 +0100
-Subject: [PATCH 6/9] do not install libunwind source (removed)
+Subject: [PATCH 05/15] do not install libunwind source (removed)
 
 ---
  src/bootstrap/dist.rs | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index e8b61b8a2..02d24a77d 100644
+index e7a077134..74e75df4b 100644
 --- a/src/bootstrap/dist.rs
 +++ b/src/bootstrap/dist.rs
-@@ -849,7 +849,7 @@ impl Step for Src {
+@@ -804,7 +804,7 @@ impl Step for Src {
          copy_src_dirs(
              builder,
              &builder.src,
@@ -21,5 +21,5 @@ index e8b61b8a2..02d24a77d 100644
                  // not needed and contains symlinks which rustup currently
                  // chokes on when unpacking.
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch b/srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
similarity index 67%
rename from srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
rename to srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
index 2cc1f6b900d3..88eaf65de8b7 100644
--- a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
+++ b/srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
@@ -1,17 +1,17 @@
-From 81ba387384e8ce0aa9bb9b4bd76014d922d85de8 Mon Sep 17 00:00:00 2001
+From 50075907c3dd2f06d471b3375d7c0ee850263eb2 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:48:14 +0100
-Subject: [PATCH 7/9] fix rustdoc when cross-compiling
+Subject: [PATCH 06/15] fix rustdoc when cross-compiling
 
 ---
  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 e4396d530..cb2312028 100644
+index 5f85fc5aa..01e81fc39 100644
 --- a/src/bootstrap/bin/rustdoc.rs
 +++ b/src/bootstrap/bin/rustdoc.rs
-@@ -22,14 +22,11 @@ fn main() {
+@@ -26,9 +26,6 @@ fn main() {
          Err(_) => 0,
      };
  
@@ -19,15 +19,18 @@ index e4396d530..cb2312028 100644
 -    dylib_path.insert(0, PathBuf::from(libdir.clone()));
 -
      let mut cmd = Command::new(rustdoc);
-     cmd.args(&args)
-         .arg("--sysroot")
-         .arg(&sysroot)
--        .env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
-+        .env(dylib_path_var(), PathBuf::from(libdir.clone()));
+ 
+     // cfg(bootstrap)
+@@ -43,7 +40,7 @@ fn main() {
+     }
+ 
+     cmd.args(&args);
+-    cmd.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
++    cmd.env(dylib_path_var(), PathBuf::from(libdir.clone()));
  
      // Force all crates compiled by this compiler to (a) be unstable and (b)
      // allow the `rustc_private` feature to link to other unstable crates
-@@ -62,7 +59,7 @@ fn main() {
+@@ -69,7 +66,7 @@ fn main() {
          eprintln!(
              "rustdoc command: {:?}={:?} {:?}",
              dylib_path_var(),
@@ -37,5 +40,5 @@ index e4396d530..cb2312028 100644
          );
          eprintln!("sysroot: {:?}", sysroot);
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch b/srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
similarity index 78%
rename from srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch
rename to srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
index f6793d8a3202..198e4fcc7a6a 100644
--- a/srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch
+++ b/srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
@@ -1,7 +1,7 @@
-From 1c4a66621a5fa34c78fc020084e4166f3af7cbb5 Mon Sep 17 00:00:00 2001
+From c2de45cbdaee1a8c81b2d65f6bced1439a738e00 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:48:49 +0100
-Subject: [PATCH 8/9] link stage 2 tools dynamically to libstd
+Subject: [PATCH 07/15] link stage 2 tools dynamically to libstd
 
 stage 2 tools are the ones that are distributed, and we distribute
 them together with the rust libs so there is no need to worry
@@ -11,10 +11,10 @@ about unstable ABI
  1 file changed, 2 insertions(+)
 
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index 6750f7a54..de771280e 100644
+index 62b5416ce..554dd4188 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1520,6 +1520,8 @@ impl<'a> Builder<'a> {
+@@ -2066,6 +2066,8 @@ impl<'a> Builder<'a> {
          // linking all deps statically into the dylib.
          if matches!(mode, Mode::Std | Mode::Rustc) {
              rustflags.arg("-Cprefer-dynamic");
@@ -24,5 +24,5 @@ index 6750f7a54..de771280e 100644
  
          // When building incrementally we default to a lower ThinLTO import limit
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch b/srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
similarity index 71%
rename from srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch
rename to srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
index 3b2e388c014e..3edba737f923 100644
--- a/srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch
+++ b/srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
@@ -1,8 +1,18 @@
+From f229c2bbd32deab98978d8453d0f44f23849fa09 Mon Sep 17 00:00:00 2001
+From: q66 <daniel@octaforge.org>
+Date: Sun, 3 May 2020 18:05:22 +0200
+Subject: [PATCH 08/15] Void: fix linkage against host/target LLVM in cross
+ setups
+
+---
+ compiler/rustc_llvm/build.rs | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
 diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs
-index 36a6d2cc3..af4e1219f 100644
+index 7729ec6be..66b8a4215 100644
 --- a/compiler/rustc_llvm/build.rs
 +++ b/compiler/rustc_llvm/build.rs
-@@ -230,9 +230,11 @@ fn main() {
+@@ -291,9 +291,11 @@ fn main() {
      for lib in output(&mut cmd).split_whitespace() {
          if is_crossed {
              if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
@@ -17,5 +27,5 @@ index 36a6d2cc3..af4e1219f 100644
          } else if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
              println!("cargo:rustc-link-search=native={}", stripped);
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch b/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
new file mode 100644
index 000000000000..f66766270a12
--- /dev/null
+++ b/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
@@ -0,0 +1,29 @@
+From 5e9e5fa2b2aefefbdc00547d7f10ee92d9b3356a Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Tue, 21 Dec 2021 00:48:29 +0100
+Subject: [PATCH 09/15] do not export LD_LIBRARY_PATH
+
+---
+ src/bootstrap/bootstrap.py | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
+index 40d478a17..3501fd901 100644
+--- a/src/bootstrap/bootstrap.py
++++ b/src/bootstrap/bootstrap.py
+@@ -756,12 +756,6 @@ class RustBuild(object):
+             del env["CARGO_BUILD_TARGET"]
+         env["CARGO_TARGET_DIR"] = build_dir
+         env["RUSTC"] = self.rustc()
+-        env["LD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+-            (os.pathsep + env["LD_LIBRARY_PATH"]) \
+-            if "LD_LIBRARY_PATH" in env else ""
+-        env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+-            (os.pathsep + env["DYLD_LIBRARY_PATH"]) \
+-            if "DYLD_LIBRARY_PATH" in env else ""
+         env["LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+             (os.pathsep + env["LIBRARY_PATH"]) \
+             if "LIBRARY_PATH" in env else ""
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch b/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
similarity index 69%
rename from srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
rename to srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
index 8a18e414e209..f2780ae08dfb 100644
--- a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
+++ b/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
@@ -1,18 +1,17 @@
-From e363a0e0ff7ffc8bd83f72ec1a20d289996b6370 Mon Sep 17 00:00:00 2001
+From 7e100ca9dad23efa1aafccd8faf86ec5fa85c351 Mon Sep 17 00:00:00 2001
 From: q66 <daniel@octaforge.org>
 Date: Sun, 3 May 2020 18:02:03 +0200
-Subject: [PATCH 12/15] Fix dynamic linkage of musl libc for the libc crate
+Subject: [PATCH 10/15] Fix dynamic linkage of musl libc for the libc crate
 
 ---
- vendor/libc/src/lib.rs      | 1 +
  vendor/libc/src/unix/mod.rs | 6 +++---
- 2 files changed, 4 insertions(+), 3 deletions(-)
+ 1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs
-index 238da24b..ffb05ee7 100644
+index ecee44411..7ae05f24e 100644
 --- a/vendor/libc/src/unix/mod.rs
 +++ b/vendor/libc/src/unix/mod.rs
-@@ -329,11 +329,11 @@ cfg_if! {
+@@ -337,11 +337,11 @@ cfg_if! {
          #[link(name = "c", cfg(not(target_feature = "crt-static")))]
          extern {}
      } else if #[cfg(target_env = "musl")] {
@@ -20,14 +19,13 @@ index 238da24b..ffb05ee7 100644
 +        extern {}
          #[cfg_attr(feature = "rustc-dep-of-std",
 -                   link(name = "c", kind = "static", modifiers = "-bundle",
-+                   link(name = "gcc", kind = "static-nobundle",
++                   link(name = "gcc", kind = "static", modifiers = "-bundle",
                          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")]
-index 0b1496af..7f7e85a7 100644
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch b/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
deleted file mode 100644
index d7714d5ee4fd..000000000000
--- a/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-commit 798e44e67c0bac6509b7915767450b0381c94017
-Author: Daniel Kolesa <daniel@octaforge.org>
-Date:   Tue Dec 21 00:48:29 2021 +0100
-
-    do not export LD_LIBRARY_PATH
-
-diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 0170be967..f7a9ec785 100644
---- a/src/bootstrap/bootstrap.py
-+++ b/src/bootstrap/bootstrap.py
-@@ -924,12 +924,6 @@ class RustBuild(object):
-             del env["CARGO_BUILD_TARGET"]
-         env["CARGO_TARGET_DIR"] = build_dir
-         env["RUSTC"] = self.rustc(True)
--        env["LD_LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
--            (os.pathsep + env["LD_LIBRARY_PATH"]) \
--            if "LD_LIBRARY_PATH" in env else ""
--        env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
--            (os.pathsep + env["DYLD_LIBRARY_PATH"]) \
--            if "DYLD_LIBRARY_PATH" in env else ""
-         env["LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
-             (os.pathsep + env["LIBRARY_PATH"]) \
-             if "LIBRARY_PATH" in env else ""
diff --git a/srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
similarity index 74%
rename from srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
rename to srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
index 3f3bd3212bb9..347ee613983d 100644
--- a/srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
+++ b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
@@ -1,24 +1,24 @@
-From c6b54a373e74a1e4ce64f349b5b69105f2bc1a49 Mon Sep 17 00:00:00 2001
+From de93abe8a0d9dc7878a48f61b9e3ae4a923020f6 Mon Sep 17 00:00:00 2001
 From: q66 <daniel@octaforge.org>
 Date: Sun, 3 May 2020 18:08:09 +0200
-Subject: [PATCH 15/15] Use ELFv2 ABI on all powerpc64 targets
+Subject: [PATCH 11/15] Use ELFv2 ABI on all powerpc64 targets
 
 This patches librustc_target so that ELFv2 is used everywhere, matching our
 LLVM. While this is not perfect (it does not allow rustc to compile legacy
 binaries), rustc never requests specific ABI from llvm in the first place,
 so at least match the environment we have.
 ---
- src/librustc_target/abi/call/powerpc64.rs               | 9 +--------
- src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs | 6 +-----
+ compiler/rustc_target/src/abi/call/powerpc64.rs          | 9 +--------
+ .../rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs | 6 +-----
  2 files changed, 2 insertions(+), 13 deletions(-)
 
 diff --git a/compiler/rustc_target/src/abi/call/powerpc64.rs b/compiler/rustc_target/src/abi/call/powerpc64.rs
-index 8c2a9d09a..2dcbf2c09 100644
+index c22ef9c8f..932172b2f 100644
 --- a/compiler/rustc_target/src/abi/call/powerpc64.rs
 +++ b/compiler/rustc_target/src/abi/call/powerpc64.rs
 @@ -119,14 +119,7 @@ where
-     Ty: TyAndLayoutMethods<'a, C> + Copy,
-     C: LayoutOf<Ty = Ty, TyAndLayout = TyAndLayout<'a, Ty>> + HasDataLayout + HasTargetSpec,
+     Ty: TyAbiInterface<'a, C> + Copy,
+     C: HasDataLayout + HasTargetSpec,
  {
 -    let abi = if cx.target_spec().env == "musl" {
 -        ELFv2
@@ -33,7 +33,7 @@ index 8c2a9d09a..2dcbf2c09 100644
      if !fn_abi.ret.is_ignore() {
          classify_ret(cx, &mut fn_abi.ret, abi);
 diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
-index 751022c12..c4d55a62e 100644
+index 24d5d187e..aa594b02e 100644
 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
 +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
 @@ -1,5 +1,5 @@
@@ -44,7 +44,7 @@ index 751022c12..c4d55a62e 100644
  pub fn target() -> Target {
      let mut base = super::linux_gnu_base::opts();
 @@ -7,10 +7,6 @@ pub fn target() -> Target {
-     base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
+     base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m64".into());
      base.max_atomic_width = Some(64);
  
 -    // ld.so in at least RHEL6 on ppc64 has a bug related to BIND_NOW, so only enable partial RELRO
@@ -52,8 +52,8 @@ index 751022c12..c4d55a62e 100644
 -    base.relro_level = RelroLevel::Partial;
 -
      Target {
-         llvm_target: "powerpc64-unknown-linux-gnu".to_string(),
+         llvm_target: "powerpc64-unknown-linux-gnu".into(),
          pointer_width: 64,
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/fix-ppc32.patch b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
similarity index 78%
rename from srcpkgs/rust/patches/fix-ppc32.patch
rename to srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
index 739ce4bce7f0..7b1ba46b1f2b 100644
--- a/srcpkgs/rust/patches/fix-ppc32.patch
+++ b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
@@ -1,7 +1,7 @@
-From 283619cf5ca25272b294525273ec42e9c7820edb Mon Sep 17 00:00:00 2001
+From 4b803b211f765f6c6b18223e23670dbf754a980f Mon Sep 17 00:00:00 2001
 From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
 Date: Sat, 29 May 2021 12:38:46 +0000
-Subject: [PATCH] bootstrap: Disable initial-exec TLS model on powerpc
+Subject: [PATCH 12/15] bootstrap: Disable initial-exec TLS model on powerpc
 
 Fixes #81334.
 ---
@@ -9,10 +9,10 @@ Fixes #81334.
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index 6750f7a549d..6032a685776 100644
+index 554dd4188..6a02a225c 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1299,7 +1299,7 @@ pub fn cargo(
+@@ -1844,7 +1844,7 @@ impl<'a> Builder<'a> {
          // efficient initial-exec TLS model. This doesn't work with `dlopen`,
          // so we can't use it by default in general, but we can use it for tools
          // and our own internal libraries.
@@ -21,3 +21,6 @@ index 6750f7a549d..6032a685776 100644
              rustflags.arg("-Ztls-model=initial-exec");
          }
  
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/native-sysroot.patch b/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
similarity index 69%
rename from srcpkgs/rust/patches/native-sysroot.patch
rename to srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
index 6826b114b6b7..2414d72380b6 100644
--- a/srcpkgs/rust/patches/native-sysroot.patch
+++ b/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
@@ -1,8 +1,21 @@
+From 236c0272667d69380d03984cfa8bad44b033fd69 Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Tue, 21 Dec 2021 02:46:30 +0100
+Subject: [PATCH 13/15] allow specifying native sysroot to use for linkage
+
+This allows us to get around the linker attempting to use
+incompatible libs.
+---
+ src/bootstrap/builder.rs | 4 ++++
+ src/bootstrap/config.rs  | 3 +++
+ src/bootstrap/lib.rs     | 4 ++++
+ 3 files changed, 11 insertions(+)
+
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index e816f9b4..a2668fa9 100644
+index 6a02a225c..483aa8818 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1313,6 +1313,10 @@ pub fn cargo(
+@@ -1708,6 +1708,10 @@ impl<'a> Builder<'a> {
              }
          }
  
@@ -14,10 +27,10 @@ index e816f9b4..a2668fa9 100644
              cargo.env("RUSTC_HOST_LINKER", host_linker);
          }
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 642a5c24..0dd4f879 100644
+index 18a764689..f8b9bbd96 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -294,6 +294,7 @@ pub struct Target {
+@@ -395,6 +395,7 @@ pub struct Target {
      pub ranlib: Option<PathBuf>,
      pub default_linker: Option<PathBuf>,
      pub linker: Option<PathBuf>,
@@ -25,15 +38,15 @@ index 642a5c24..0dd4f879 100644
      pub ndk: Option<PathBuf>,
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
-@@ -621,6 +622,7 @@ struct TomlTarget {
+@@ -723,6 +724,7 @@ define_config! {
          ranlib: Option<String> = "ranlib",
          default_linker: Option<PathBuf> = "default-linker",
          linker: Option<String> = "linker",
 +        sysroot: Option<String> = "sysroot",
          llvm_config: Option<String> = "llvm-config",
          llvm_filecheck: Option<String> = "llvm-filecheck",
-         android_ndk: Option<String> = "android-ndk",
-@@ -1051,6 +1053,7 @@ pub fn parse(args: &[String]) -> Config {
+         llvm_libunwind: Option<String> = "llvm-libunwind",
+@@ -1156,6 +1158,7 @@ impl Config {
                  target.ar = cfg.ar.map(PathBuf::from);
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
@@ -42,17 +55,20 @@ index 642a5c24..0dd4f879 100644
                  target.wasi_root = cfg.wasi_root.map(PathBuf::from);
                  target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
 diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index f3d5f308..7f8b9b27 100644
+index 0a7012dbd..cded50d20 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1125,6 +1125,10 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1152,6 +1152,10 @@ impl Build {
+             self.config.target_config.get(&target).and_then(|t| t.crt_static)
          }
      }
- 
++    
 +    fn native_sysroot(&self, target: TargetSelection) -> Option<&Path> {
 +        self.config.target_config.get(&target).and_then(|c| c.sysroot.as_ref()).map(|p| &**p)
 +    }
-+
+ 
      /// Returns the sysroot for the wasi target, if defined
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
-         self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch b/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
new file mode 100644
index 000000000000..ec26d9c26ae0
--- /dev/null
+++ b/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
@@ -0,0 +1,28 @@
+From 0b057b456a5b24ce5cf898e47eddb7cbc7448fe2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
+Date: Fri, 16 Apr 2021 03:34:16 -0300
+Subject: [PATCH 14/15] copy new version of need-ssp_nonshared.patch from
+ alpine
+
+---
+ library/std/src/sys/unix/mod.rs | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/library/std/src/sys/unix/mod.rs b/library/std/src/sys/unix/mod.rs
+index 34a023b02..934a87570 100644
+--- a/library/std/src/sys/unix/mod.rs
++++ b/library/std/src/sys/unix/mod.rs
+@@ -297,6 +297,10 @@ cfg_if::cfg_if! {
+         #[link(name = "dl")]
+         #[link(name = "log")]
+         extern "C" {}
++    } else if #[cfg(all(target_os = "linux", target_env = "musl"))] {
++	    #[link(name = "ssp_nonshared")]
++        #[link(name = "execinfo")]
++	    extern "C" {}
+     } else if #[cfg(target_os = "freebsd")] {
+         #[link(name = "execinfo")]
+         #[link(name = "pthread")]
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/xxx-ppcle.patch b/srcpkgs/rust/patches/0015-initial-ppcle-port.patch
similarity index 85%
rename from srcpkgs/rust/patches/xxx-ppcle.patch
rename to srcpkgs/rust/patches/0015-initial-ppcle-port.patch
index c0522f0eaafc..dd6b72e21bcb 100644
--- a/srcpkgs/rust/patches/xxx-ppcle.patch
+++ b/srcpkgs/rust/patches/0015-initial-ppcle-port.patch
@@ -1,8 +1,40 @@
+From 2b3b4a11dd75ff43e0f1f12de395d0ce29f8555f Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Sat, 3 Jul 2021 21:02:03 +0200
+Subject: [PATCH 15/15] initial ppcle port
+
+---
+ compiler/rustc_middle/src/ty/layout.rs            |  5 ++++-
+ compiler/rustc_target/src/spec/mod.rs             |  2 ++
+ .../src/spec/powerpcle_unknown_linux_gnu.rs       | 15 +++++++++++++++
+ .../src/spec/powerpcle_unknown_linux_musl.rs      | 15 +++++++++++++++
+ src/bootstrap/bootstrap.py                        |  2 ++
+ .../codegen/abi-main-signature-16bit-c-int.rs     |  1 +
+ src/test/codegen/global_asm.rs                    |  1 +
+ src/test/codegen/global_asm_include.rs            |  1 +
+ src/test/codegen/global_asm_x2.rs                 |  1 +
+ src/test/codegen/repr-transparent-aggregates-1.rs |  1 +
+ src/test/codegen/repr-transparent-aggregates-2.rs |  1 +
+ src/test/codegen/stack-probes.rs                  |  1 +
+ .../run-make-fulldeps/atomic-lock-free/Makefile   |  2 ++
+ src/test/ui/abi/stack-probes-lto.rs               |  1 +
+ src/test/ui/abi/stack-probes.rs                   |  1 +
+ src/test/ui/target-feature/gate.rs                |  1 +
+ src/test/ui/target-feature/invalid-attribute.rs   |  1 +
+ src/tools/compiletest/src/util.rs                 |  1 +
+ vendor/cc/src/lib.rs                              |  1 +
+ vendor/target-lexicon/src/targets.rs              |  7 +++++++
+ vendor/tikv-jemallocator/benches/roundtrip.rs     |  3 ++-
+ vendor/tikv-jemallocator/src/lib.rs               |  3 ++-
+ 22 files changed, 64 insertions(+), 3 deletions(-)
+ create mode 100644 compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
+ create mode 100644 compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
+
 diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs
-index 0c1ab67cc..8d4e5f3cb 100644
+index 3b05e42a5..66420f507 100644
 --- a/compiler/rustc_middle/src/ty/layout.rs
 +++ b/compiler/rustc_middle/src/ty/layout.rs
-@@ -3057,6 +3057,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
+@@ -3205,6 +3205,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
              target.os == "linux" && target.arch == "sparc64" && target_env_gnu_like;
          let linux_powerpc_gnu_like =
              target.os == "linux" && target.arch == "powerpc" && target_env_gnu_like;
@@ -11,7 +43,7 @@ index 0c1ab67cc..8d4e5f3cb 100644
          use SpecAbi::*;
          let rust_abi = matches!(sig.abi, RustIntrinsic | PlatformIntrinsic | Rust | RustCall);
  
-@@ -3165,7 +3167,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
+@@ -3311,7 +3313,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
                      || (!win_x64_gnu
                          && !linux_s390x_gnu_like
                          && !linux_sparc64_gnu_like
@@ -22,10 +54,10 @@ index 0c1ab67cc..8d4e5f3cb 100644
                      arg.mode = PassMode::Ignore;
                  }
 diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
-index bd5b712c1..f60be010c 100644
+index da0589cdd..2db403913 100644
 --- a/compiler/rustc_target/src/spec/mod.rs
 +++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -824,6 +824,8 @@ supported_targets! {
+@@ -831,6 +831,8 @@ supported_targets! {
      ("powerpc-unknown-linux-gnu", powerpc_unknown_linux_gnu),
      ("powerpc-unknown-linux-gnuspe", powerpc_unknown_linux_gnuspe),
      ("powerpc-unknown-linux-musl", powerpc_unknown_linux_musl),
@@ -77,10 +109,10 @@ index 000000000..a826b6e47
 +    }
 +}
 diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 71b8f3c45..1505c12e4 100644
+index 3501fd901..a28f456d3 100644
 --- a/src/bootstrap/bootstrap.py
 +++ b/src/bootstrap/bootstrap.py
-@@ -320,9 +320,11 @@ def default_build_triple(verbose):
+@@ -339,9 +339,11 @@ def default_build_triple(verbose):
          'i786': 'i686',
          'm68k': 'm68k',
          'powerpc': 'powerpc',
@@ -141,7 +173,7 @@ index bdcf0ea84..1e2ff8b8d 100644
  // ignore-amdgcn
  // ignore-sparc
 diff --git a/src/test/codegen/repr-transparent-aggregates-1.rs b/src/test/codegen/repr-transparent-aggregates-1.rs
-index 4ad3642c0..fca31c0c6 100644
+index 9d18c5f03..8e69d2afd 100644
 --- a/src/test/codegen/repr-transparent-aggregates-1.rs
 +++ b/src/test/codegen/repr-transparent-aggregates-1.rs
 @@ -6,6 +6,7 @@
@@ -238,10 +270,10 @@ index ad1b6e96b..122d59a57 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
-index bed509d77..8bc817897 100644
+index 215af347f..a1c7e4c6a 100644
 --- a/src/tools/compiletest/src/util.rs
 +++ b/src/tools/compiletest/src/util.rs
-@@ -70,6 +70,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
+@@ -71,6 +71,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
      ("msp430", "msp430"),
      ("nvptx64", "nvptx64"),
      ("powerpc", "powerpc"),
@@ -342,3 +374,6 @@ index 4a9397331..4cf47c05d 100644
  )))]
  const ALIGNOF_MAX_ALIGN_T: usize = 8;
  #[cfg(all(any(
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch b/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
deleted file mode 100644
index d9a7ae68b6e0..000000000000
--- a/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From beb4e16f055aa7925194fd2c360105a6d55f10f6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Lo=C3=AFc=20BRANSTETT?= <lolo.branstett@numericable.fr>
-Date: Wed, 27 Apr 2022 19:11:56 +0200
-Subject: [PATCH] Add missing `target_feature` to the list of well known cfg
- names
-
----
- compiler/rustc_session/src/config.rs | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
-index 12c5c4445d46f..330201dd8fef6 100644
---- a/compiler/rustc_session/src/config.rs
-+++ b/compiler/rustc_session/src/config.rs
-@@ -1038,6 +1038,7 @@ impl CrateCheckConfig {
-             sym::target_has_atomic_load_store,
-             sym::target_has_atomic,
-             sym::target_has_atomic_equal_alignment,
-+            sym::target_feature,
-             sym::panic,
-             sym::sanitize,
-             sym::debug_assertions,
-@@ -1081,6 +1082,10 @@ impl CrateCheckConfig {
-             .into_iter()
-             .map(|sanitizer| Symbol::intern(sanitizer.as_str().unwrap()));
- 
-+        // Unknown possible values:
-+        //  - `feature`
-+        //  - `target_feature`
-+
-         // No-values
-         for name in [
-             sym::doc,
diff --git a/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch b/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch
deleted file mode 100644
index fe0377dbc381..000000000000
--- a/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/library/std/src/sys/unix/mod.rs
-+++ b/library/std/src/sys/unix/mod.rs
-@@ -212,6 +212,10 @@ cfg_if::cfg_if! {
-         #[link(name = "log")]
-         #[link(name = "gcc")]
-         extern "C" {}
-+    } else if #[cfg(all(target_os = "linux", target_env = "musl"))] {
-+	#[link(name = "ssp_nonshared")]
-+  #[link(name = "execinfo")]
-+	extern "C" {}
-     } else if #[cfg(target_os = "freebsd")] {
-         #[link(name = "execinfo")]
-         #[link(name = "pthread")]
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index da3ca779e7c6..d120f21bf50a 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -8,7 +8,7 @@
 # uploaded to https://repo-default.voidlinux.org/distfiles/
 #
 pkgname=rust
-version=1.61.0
+version=1.63.0
 revision=1
 wrksrc="rustc-${version}-src"
 hostmakedepends="cmake curl pkg-config python3 tar cargo-bootstrap"
@@ -19,7 +19,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://www.rust-lang.org/"
 distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
-checksum=ad0b4351675aa9abdf4c7e066613bd274c4391c5506db152983426376101daed
+checksum=1f9580295642ef5da7e475a8da2397d65153d3f2cb92849dbd08ed0effca99d0
 lib32disabled=yes
 make_check=no # CBA for now
 
@@ -127,6 +127,7 @@ do_configure() {
 		incremental = false
 		parallel-compiler = false
 		channel = "stable"
+		description = "Void"
 		rpath = ${_use_rpath}
 		verbose-tests = true
 		dist-src = false

From e9360cf32fc3da696923445cc1ec7bc5f1eadf7a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:35 +0200
Subject: [PATCH 4/5] cargo: update to 1.63.0.

---
 srcpkgs/cargo/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index e3c30f625acd..9f653c39fd43 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo'
 pkgname=cargo
-version=1.61.0
+version=1.63.0
 revision=1
 wrksrc="cargo-rust-${version}"
 build_helper=rust
@@ -13,7 +13,7 @@ license="MIT, Apache-2.0"
 homepage="https://crates.io/"
 distfiles="https://github.com/rust-lang/cargo/archive/rust-${version}.tar.gz
  https://github.com/crossbeam-rs/crossbeam/archive/refs/tags/crossbeam-utils-0.8.8.tar.gz"
-checksum="6261b51441f50abe08a2992a349b22a2385846bfc9cb288ae9a3a609b904099e
+checksum="b1f50e4957a0453c1513cabe98c7fd94e715cd0ca70138b1945cef338e1abf35
  52c451910203cd9002cc4b85cff95f45c6ba245392801e80d7898ca5c3c3ab29"
 replaces="cargo-tree>=0"
 

From af578e9804e12fa0a1fd745a27e08f7a73d93c15 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Fri, 19 Aug 2022 19:07:34 +0200
Subject: [PATCH 5/5] rust-bootstrap: document cross compiled distfile
 generation

---
 .../files/generating-distfiles.md             | 67 +++++++++++++++++++
 srcpkgs/rust-bootstrap/template               |  1 +
 2 files changed, 68 insertions(+)
 create mode 100644 srcpkgs/rust-bootstrap/files/generating-distfiles.md

diff --git a/srcpkgs/rust-bootstrap/files/generating-distfiles.md b/srcpkgs/rust-bootstrap/files/generating-distfiles.md
new file mode 100644
index 000000000000..ed5aa0da8596
--- /dev/null
+++ b/srcpkgs/rust-bootstrap/files/generating-distfiles.md
@@ -0,0 +1,67 @@
+## Generating self-hosted rust and cargo bootstrap distfiles
+
+Rust doesn't ship binaries for some of the targets we support bootstrapping on,
+so we have to generate distfiles for a few architectures as well, namely
+`ppc64le-musl` and `ppc64` for `rust-bootstrap`, and additionally `ppc` for
+`cargo-bootstrap`, as the `ppc` cargo binaries provided by upstream have
+problems.
+
+### Set up appropriate masterdirs and remote-repositories
+
+This guide assumes you're on an x86\_64 machine. If you're not, please adapt the
+appropriate sections.
+
+First, we bootstrap our masterdirs. We need both a glibc one and a musl one:
+
+```
+$ ./xbps-src -m masterdir-glibc binary-bootstrap x86_64
+$ ./xbps-src -m masterdir-musl binary-bootstrap x86_64-musl
+```
+
+In addition to those, we need to set up binary remotes for the ppc repos. As
+they aren't officially maintained by Voidlinux, they aren't included in this
+repo, but you can include them locally by creating these three files:
+
+- `etc/xbps.d/repos-remote-ppc.conf`, with
+  `repository=https://repo.voidlinux-ppc.org/current/ppc` in it.
+- `etc/xbps.d/repos-remote-ppc64.conf`, with
+  `repository=https://repo.voidlinux-ppc.org/current/be` in it.
+- `etc/xbps.d/repos-remote-ppc64le-musl.conf`, with
+  `repository=https://repo.voidlinux-ppc.org/current/musl` in it.
+
+### Bootstrapping on your native architecture
+
+Assuming you've already adjusted the version and checksums for the distfiles
+provided by upstream, we can now start building rust for our native
+architecture, with both glibc and musl. Run this for both masterdirs
+bootstrapped above
+
+```
+$ ./xbps-src -m <masterdir> pkg cargo
+```
+
+This builds `rust-bootstrap`, `cargo-bootstrap`, `rust` and `cargo` for your
+native architecture, which we will need for the next step.
+
+### Crosscompiling for the target architectures and generating distfiles
+
+Now that we have the our native architecture covered, we cross build for the
+architectures we need to generate distfiles for:
+
+```
+$ ./xbps-src -m <masterdir> -a <arch> pkg -o bindist rust
+$ ./xbps-src -m <masterdir> -a <arch> pkg rust
+$ ./xbps-src -m <masterdir> -a <arch> pkg -o bindist cargo
+```
+
+Repeat these three steps for `masterdir-glibc` with `ppc`, `masterdir-musl` with
+`ppc64le-musl` and `masterdir-glibc` with `ppc64`. In the case of `ppc`, you can
+skip the `bindist` build for rust, as we are taking those from upstream.
+
+Now that we have run those commands, the generated distfiles are available in
+`hostdir/sources/distfiles`. Generate a `sha256sum` for each of those files, and
+set the hashes in the appropriate places in the `rust-bootstrap` and
+`cargo-bootstrap` templates. If you want to verify you did things correctly, you
+can copy the generated distfiles over into `hostdir/sources/rust-bootstrap-${version}`
+and `hostdir/sources/cargo-bootstrap-${version}`, and try cross-building the
+bootstrap packages for those architectures.
diff --git a/srcpkgs/rust-bootstrap/template b/srcpkgs/rust-bootstrap/template
index 47742bf17eae..b756b9ade940 100644
--- a/srcpkgs/rust-bootstrap/template
+++ b/srcpkgs/rust-bootstrap/template
@@ -19,6 +19,7 @@ _bootstrap_url="https://static.rust-lang.org/dist"
 
 case "$XBPS_TARGET_MACHINE" in
 	x86_64*|i686|ppc64le|ppc) ;;
+	# See srcpkgs/rust-bootstrap/files/generating-distfiles.md for details
 	*) _bootstrap_url="https://repo-default.voidlinux.org/distfiles";;
 esac
 

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PR REVIEW] Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
                   ` (17 preceding siblings ...)
  2022-08-19 17:17 ` [PR PATCH] [Updated] " jcgruenhage
@ 2022-08-19 18:43 ` jcgruenhage
  2022-08-22  8:05 ` jcgruenhage
                   ` (4 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jcgruenhage @ 2022-08-19 18:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 303 bytes --]

New review comment by jcgruenhage on void-packages repository

https://github.com/void-linux/void-packages/pull/38662#discussion_r950478051

Comment:
We can do that for the next version, but I'd prefer not rebuilding rust another 7 times to get the new distfiles into place with that change included :D

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
                   ` (18 preceding siblings ...)
  2022-08-19 18:43 ` [PR REVIEW] " jcgruenhage
@ 2022-08-22  8:05 ` jcgruenhage
  2022-08-24  3:49 ` [PR REVIEW] " classabbyamp
                   ` (3 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: jcgruenhage @ 2022-08-22  8:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 284 bytes --]

New comment by jcgruenhage on void-packages repository

https://github.com/void-linux/void-packages/pull/38662#issuecomment-1221997002

Comment:
The self-hosted distfiles for ppc64, ppc64le-musl and ppc have been uploaded, which probably means that this is now relatively good-to-go?

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PR REVIEW] Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
                   ` (19 preceding siblings ...)
  2022-08-22  8:05 ` jcgruenhage
@ 2022-08-24  3:49 ` classabbyamp
  2022-08-24  4:21 ` [PR PATCH] [Updated] " classabbyamp
                   ` (2 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: classabbyamp @ 2022-08-24  3:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 267 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/38662#discussion_r953314669

Comment:
it's fine for the bootstrap distfiles to not have that minor difference I think, I'll make the change when merging.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PR PATCH] [Updated] Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
                   ` (20 preceding siblings ...)
  2022-08-24  3:49 ` [PR REVIEW] " classabbyamp
@ 2022-08-24  4:21 ` classabbyamp
  2022-08-24  4:26 ` classabbyamp
  2022-08-24 16:21 ` [PR PATCH] [Merged]: " classabbyamp
  23 siblings, 0 replies; 25+ messages in thread
From: classabbyamp @ 2022-08-24  4:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 930 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/jcgruenhage/void-packages rust-1.63
https://github.com/void-linux/void-packages/pull/38662

Update Rust toolchain to 1.63.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

[ci skip]

`cargo-crev` requires 1.62 at least, so I thought I'd gave updating Rust a go, and it worked out just fine tbh. The new `cargo-crev` release compiled fine on this toolchain and works properly.

#### Local build testing
- I built this PR natively for
  - `x86_64`, `glibc` and `musl`
  - `i686`, `glibc`
- I crossbuilt this PR for
  - `aarch64`, `musl`
  - `ppc`, `glibc`
  - `ppc64`, `glibc`
  - `ppc64le`, `musl`


A patch file from https://github.com/void-linux/void-packages/pull/38662.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-rust-1.63-38662.patch --]
[-- Type: text/x-diff, Size: 59924 bytes --]

From d1d79a1960688210c5cef9c33d5e794e30adad04 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:01 +0200
Subject: [PATCH 1/5] rust-bootstrap: update to 1.63.0.

---
 srcpkgs/rust-bootstrap/template | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/rust-bootstrap/template b/srcpkgs/rust-bootstrap/template
index 66d04d634638..47742bf17eae 100644
--- a/srcpkgs/rust-bootstrap/template
+++ b/srcpkgs/rust-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'rust-bootstrap'
 pkgname=rust-bootstrap
-version=1.61.0
+version=1.63.0
 revision=1
 create_wrksrc=yes
 short_desc="Rust programming language bootstrap toolchain"
@@ -29,38 +29,38 @@ distfiles="
 case "$XBPS_TARGET_MACHINE" in
 	i686)
 		checksum="
-		 8af0ec3eb470e7e28439fedf9ebdadf90df8c58da544cc643033e6fc0ccf0bea
-		 ab223fcec35183bc0fe630403537cd7dae55c403103df29b25077db4882cb88e"
+		 11d3729f0343a069e9e59531745170cb0b6ce68f73848699564ea0bbcbf2c02f
+		 3177d3a159b4fcd54bca93d09ff1a903689a64ed4037699de372e685d12d4335"
 		;;
 	x86_64)
 		checksum="
-		 21c4613f389ed130fbaaf88f1e984319f72b5fc10734569a5ba19e22ebb03abd
-		 270b07aa5f2de52255a117e1e587138d77375ce0d09a1d7fead085f29b3977e9"
+		 bdab9d9afa5c329c40f9ba568364815237fab8426477c12bfabad35ffc484ab5
+		 993c2c17bf76ac626bfb5b17bddce65fbdfc14f70d183f33773de0cd12df46d2"
 		;;
 	x86_64-musl)
 		checksum="
-		 89cb72cbc493cb5cd8e43830009b4a1a5bfd472246ae184157868c9b0607bf6c
-		 1f4f2e4c5dd0f9b0dac7c8888f4a49ef16a6fe8992f39895823d2a442f0fe408"
+		 b6566a9b1dafe03cf4a01b58b2db0e14a0044ae5773736827882bd549108277e
+		 6fcfa4f9a51d35bf2c5c92ac15c688baa8c98d9fded05ab6abfdae85cb5aed8c"
 		;;
 	ppc64le)
 		checksum="
-		 dc54893d747e4f3330515caa75e404f78c6c5475a1216d1428f5e7ce1c2e9602
-		 36c0ccff14c80419507561db050f9533f0abd43fc50f3ddb859c10df74b1c351"
+		 b3dc2c082e76b5effe0b158aac3831830168a1a6980b39347c355e49be63fcca
+		 3ae0b74ba428c569fcecebbb09060ad0bd434a5f1fc9ffd1329b56941a897b6e"
 		;;
 	ppc64le-musl)
 		checksum="
-		 2191613e654a192dc6dbab693ecb90a3669d7c71a29d392271138b3bb77fdb54
-		 2a587565344e44bfa55e56df24e54f0f706e8280b3eccb45940af161205c9524"
+		 63273dc52f3f9e16e26de1c2f5749cabc3c958af5416cf6da6c7600ddf086447
+		 6f78a87825c624b85c7c5c2a47a185d354a72b1604e354fae40888958069d4d1"
 		;;
 	ppc64)
 		checksum="
-		 070a334ecf824a99b89385f5b286632c3a7e88c921186f0cc75ede31501df3a3
-		 0be4769a41fe2bcdcda2e5c92759826a59828615a5df057a09f2107dba888d72"
+		 52dacd9c0adda206bc0255dc978f53453fec995a33a905c2b1cf9b1b1fe8089b
+		 514e5f62cb17a0d0ee2981bfb1aba9284f37eb44a20ff36164faab32cc0a22bc"
 		;;
 	ppc)
 		checksum="
-		 f28a8c2986fce5015c67823e39ad4b53e2db06603b6ea4a1217ac961cbbfb073
-		 7d2f7f900c8c05616fba8e99ab041d847af3653c259b99445edd788acddf878c"
+		 7a99dd6a7f30b8a8f85d95f47fa77084a48c7ebc94092978daa3563268a4b15b
+		 a25719c0ad2a5e7f52eed87b75cb76c4a52b8dc6e24b4bef16ed7fb9133e5b42"
 		;;
 	*) broken="rust bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac

From 1fa583123e3aeae92e80f042b03f512724a164f4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:24 +0200
Subject: [PATCH 2/5] cargo-bootstrap: update to 1.63.0.

---
 srcpkgs/cargo-bootstrap/template | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/cargo-bootstrap/template b/srcpkgs/cargo-bootstrap/template
index 0fdaac840a3c..11efae0868fa 100644
--- a/srcpkgs/cargo-bootstrap/template
+++ b/srcpkgs/cargo-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo-bootstrap'
 pkgname=cargo-bootstrap
-version=1.61.0
+version=1.63.0
 revision=1
 short_desc="Bootstrap binaries of Rust package manager"
 maintainer="q66 <daniel@octaforge.org>"
@@ -18,6 +18,7 @@ _bootstrap_url="https://static.rust-lang.org/dist"
 # ppc64 is excluded because of ABI incompatibility
 case "$XBPS_TARGET_MACHINE" in
 	x86_64*|i686|ppc64le) ;;
+	# See srcpkgs/rust-bootstrap/files/generating-distfiles.md for details
 	*) _bootstrap_url="https://repo-default.voidlinux.org/distfiles" ;;
 esac
 
@@ -26,25 +27,25 @@ distfiles="${_bootstrap_url}/cargo-${version}-${RUST_TARGET}.tar.xz"
 
 case "$XBPS_TARGET_MACHINE" in
 	i686)
-		checksum="fe258b85ef0644ff08c2095e329399dd4de0e1b2e51f4f4e90cb956d40dc61de"
+		checksum="6f2c109fc38ed8ccadcdcccf51d11505651ca9e12c396ab46ac1dbb55265b792"
 		;;
 	x86_64)
-		checksum="9461727d754f865ef2a87479d40bbe4c5176f80963b7c50b7797bc8940d7a0a0"
+		checksum="f370d12e4c11f0c835becb738bcf00d363f29b76f8b424b4dcb005abcf15fc9a"
 		;;
 	x86_64-musl)
-		checksum="db4b4423c2843b6e27737664cf8085afcba670374110ca24b9c8d341045e748c"
+		checksum="6f6ce044832a2433c250f4f27a61f69081e2b0f7e4e1f141492c2ce99ee8511e"
 		;;
 	ppc64le)
-		checksum="09817011ff1ef4b7006387c7cabb6a059731792a9372533dec7d87e7f014444b"
+		checksum="a4cdc00a42fd767bf5a296f7126d9db22a0a609cd956bbf0cb3eae882add1be7"
 		;;
 	ppc64le-musl)
-		checksum="39215cba9b1bda63209cac0edbda583e0c822f88a50fdbf33255c8c5386e4868"
+		checksum="3dc497186493a9fc974ae8add91a6fed34d95e263bedb95142d636ba257b2240"
 		;;
 	ppc64)
-		checksum="3fa6e033bbbab339e480842627523f95d84119a5dcae56ad4b14e5c6d1536e6b"
+		checksum="babded6c2d112aa92cb1af5ca24d93a034b20c0315f03c231a4eb3a92408a6cd"
 		;;
 	ppc)
-		checksum="5d6226a5080e429cb6bb8366ff1f71feeccde70f8bf6651779674fe27eb35e7f"
+		checksum="3c7f4d28987d8bf5d10fb0cf4ec792b73a4725add2845d69b85e36d47f3c228e"
 		;;
 	*) broken="cargo bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac

From c4fa4fc5332f06e8a5588df897700abc47ed4715 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:31 +0200
Subject: [PATCH 3/5] rust: update to 1.63.0.

---
 .../rust/patches/0001-Fix-LLVM-build.patch    |  8 +--
 ...lib-and-musl_root-from-musl-targets.patch} | 65 ++++++++++++-------
 ...e-debugger-scripts-to-usr-share-rust.patch | 10 +--
 ...4-fix-shebang-on-install-template.sh.patch |  6 +-
 ...fer-libgcc_eh-over-libunwind-on-musl.patch | 24 -------
 ...ot-install-libunwind-source-removed.patch} | 10 +--
 ...06-fix-rustdoc-when-cross-compiling.patch} | 25 +++----
 ...stage-2-tools-dynamically-to-libstd.patch} | 10 +--
 ...against-host-target-LLVM-in-cross-s.patch} | 16 ++++-
 .../0009-do-not-export-LD_LIBRARY_PATH.patch  | 29 +++++++++
 ...age-of-musl-libc-for-the-libc-crate.patch} | 16 ++---
 .../0010-do-not-export-LD_LIBRARY_PATH.patch  | 23 -------
 ...-ELFv2-ABI-on-all-powerpc64-targets.patch} | 22 +++----
 ...e-initial-exec-TLS-model-on-powerpc.patch} | 11 ++--
 ...g-native-sysroot-to-use-for-linkage.patch} | 40 ++++++++----
 ...-of-need-ssp_nonshared.patch-from-al.patch | 28 ++++++++
 ...le.patch => 0015-initial-ppcle-port.patch} | 55 +++++++++++++---
 ...e16f055aa7925194fd2c360105a6d55f10f6.patch | 33 ----------
 .../need-ssp-nonshared-and-execinfo.patch     | 13 ----
 srcpkgs/rust/template                         |  5 +-
 20 files changed, 250 insertions(+), 199 deletions(-)
 rename srcpkgs/rust/patches/{0001-musl-void-setup.patch => 0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch} (89%)
 delete mode 100644 srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
 rename srcpkgs/rust/patches/{0006-do-not-install-libunwind-source-removed.patch => 0005-do-not-install-libunwind-source-removed.patch} (73%)
 rename srcpkgs/rust/patches/{0007-fix-rustdoc-when-cross-compiling.patch => 0006-fix-rustdoc-when-cross-compiling.patch} (67%)
 rename srcpkgs/rust/patches/{0008-link-stage-2-tools-dynamically-to-libstd.patch => 0007-link-stage-2-tools-dynamically-to-libstd.patch} (78%)
 rename srcpkgs/rust/patches/{0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch => 0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch} (71%)
 create mode 100644 srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
 rename srcpkgs/rust/patches/{0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch => 0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch} (69%)
 delete mode 100644 srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
 rename srcpkgs/rust/patches/{0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch => 0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch} (74%)
 rename srcpkgs/rust/patches/{fix-ppc32.patch => 0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch} (78%)
 rename srcpkgs/rust/patches/{native-sysroot.patch => 0013-allow-specifying-native-sysroot-to-use-for-linkage.patch} (69%)
 create mode 100644 srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
 rename srcpkgs/rust/patches/{xxx-ppcle.patch => 0015-initial-ppcle-port.patch} (85%)
 delete mode 100644 srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
 delete mode 100644 srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch

diff --git a/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch b/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
index 0da829af1da9..6cf9c3a755a9 100644
--- a/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
+++ b/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch
@@ -1,4 +1,4 @@
-From 4443eca0d6b3ba599832b2f73a5350fdd0c90d10 Mon Sep 17 00:00:00 2001
+From 99a046adc7d1c7b2da3a31e077722ea69f84eeb6 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/15] Fix LLVM build
@@ -8,10 +8,10 @@ Subject: [PATCH 01/15] Fix LLVM build
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index a476d25f..c7e63990 100644
+index 4ac857b47..b603ae90a 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -768,7 +768,8 @@ impl Build {
+@@ -1050,7 +1050,8 @@ impl Build {
              .args()
              .iter()
              .map(|s| s.to_string_lossy().into_owned())
@@ -22,5 +22,5 @@ index a476d25f..c7e63990 100644
  
          // If we're compiling on macOS then we add a few unconditional flags
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0001-musl-void-setup.patch b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
similarity index 89%
rename from srcpkgs/rust/patches/0001-musl-void-setup.patch
rename to srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
index c13cb1730986..c156945b8111 100644
--- a/srcpkgs/rust/patches/0001-musl-void-setup.patch
+++ b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch
@@ -1,5 +1,23 @@
+From 7219ba1c9accbad9b530d312fd9a9f69330c93da Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 3 May 2020 17:53:33 +0200
+Subject: [PATCH 02/15] Remove -nostdlib and musl_root from musl targets
+
+extended by various void contributors to match our musl setup
+---
+ compiler/rustc_target/src/spec/crt_objects.rs | 22 ----------
+ .../rustc_target/src/spec/linux_musl_base.rs  |  7 ---
+ config.toml.example                           |  8 ----
+ src/bootstrap/cc_detect.rs                    | 25 +----------
+ src/bootstrap/compile.rs                      | 43 +------------------
+ src/bootstrap/config.rs                       |  9 ----
+ src/bootstrap/configure.py                    | 28 ------------
+ src/bootstrap/lib.rs                          | 19 --------
+ src/bootstrap/sanity.rs                       | 23 ----------
+ 9 files changed, 3 insertions(+), 181 deletions(-)
+
 diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
-index 51f392a6..62560658 100644
+index 52ac3622e..f35e5b9d8 100644
 --- a/compiler/rustc_target/src/spec/crt_objects.rs
 +++ b/compiler/rustc_target/src/spec/crt_objects.rs
 @@ -63,28 +63,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects {
@@ -32,7 +50,7 @@ index 51f392a6..62560658 100644
      new(&[
          (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
 diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs
-index 207a87ab..88f807a5 100644
+index 207a87ab0..88f807a58 100644
 --- a/compiler/rustc_target/src/spec/linux_musl_base.rs
 +++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
 @@ -1,16 +1,9 @@
@@ -53,10 +71,10 @@ index 207a87ab..88f807a5 100644
      base
  }
 diff --git a/config.toml.example b/config.toml.example
-index 6e53d9b4..74980d2c 100644
+index b3284050f..62ac07f87 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -511,14 +511,6 @@ changelog-seen = 2
+@@ -523,14 +523,6 @@ changelog-seen = 2
  # supplementary build information, like distro-specific package versions.
  #description = <none> (string)
  
@@ -72,7 +90,7 @@ index 6e53d9b4..74980d2c 100644
  # 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
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index 7ce44687..4e7507ae 100644
+index dca782c29..8eb35ea43 100644
 --- a/src/bootstrap/cc_detect.rs
 +++ b/src/bootstrap/cc_detect.rs
 @@ -97,7 +97,7 @@ pub fn find(build: &mut Build) {
@@ -93,7 +111,7 @@ index 7ce44687..4e7507ae 100644
              true
          } else {
              // Use an auto-detected compiler (or one configured via `CXX_target_triple` env vars).
-@@ -157,7 +157,6 @@ fn set_compiler(
+@@ -161,7 +161,6 @@ fn set_compiler(
      compiler: Language,
      target: TargetSelection,
      config: Option<&Target>,
@@ -101,7 +119,7 @@ index 7ce44687..4e7507ae 100644
  ) {
      match &*target.triple {
          // When compiling for android we may have the NDK configured in the
-@@ -200,26 +199,6 @@ fn set_compiler(
+@@ -204,26 +203,6 @@ fn set_compiler(
              }
          }
  
@@ -129,10 +147,10 @@ index 7ce44687..4e7507ae 100644
      }
  }
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index afc333b5..9d67ab56 100644
+index b4807d1ab..ce483bf6b 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -197,39 +197,7 @@ fn copy_self_contained_objects(
+@@ -200,39 +200,7 @@ fn copy_self_contained_objects(
      let mut target_deps = vec![];
  
      // Copies the libc and CRT objects.
@@ -173,7 +191,7 @@ index afc333b5..9d67ab56 100644
          let srcdir = builder
              .wasi_root(target)
              .unwrap_or_else(|| {
-@@ -313,15 +281,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+@@ -316,15 +284,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
              .arg("--manifest-path")
              .arg(builder.src.join("library/test/Cargo.toml"));
  
@@ -190,10 +208,10 @@ index afc333b5..9d67ab56 100644
              if let Some(p) = builder.wasi_root(target) {
                  let root = format!("native={}/lib/wasm32-wasi", p.to_str().unwrap());
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 9534cc5f..642a5c24 100644
+index 146077419..18a764689 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -172,7 +172,6 @@ pub struct Config {
+@@ -186,7 +186,6 @@ pub struct Config {
      pub missing_tools: bool,
  
      // Fallback musl-root for all targets
@@ -201,7 +219,7 @@ index 9534cc5f..642a5c24 100644
      pub prefix: Option<PathBuf>,
      pub sysconfdir: Option<PathBuf>,
      pub datadir: Option<PathBuf>,
-@@ -299,8 +298,6 @@ pub struct Target {
+@@ -400,8 +399,6 @@ pub struct Target {
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
      pub crt_static: Option<bool>,
@@ -210,7 +228,7 @@ index 9534cc5f..642a5c24 100644
      pub wasi_root: Option<PathBuf>,
      pub qemu_rootfs: Option<PathBuf>,
      pub no_std: bool,
-@@ -587,7 +584,6 @@ struct Rust {
+@@ -689,7 +686,6 @@ define_config! {
          default_linker: Option<String> = "default-linker",
          channel: Option<String> = "channel",
          description: Option<String> = "description",
@@ -218,7 +236,7 @@ index 9534cc5f..642a5c24 100644
          rpath: Option<bool> = "rpath",
          verbose_tests: Option<bool> = "verbose-tests",
          optimize_tests: Option<bool> = "optimize-tests",
-@@ -631,8 +627,6 @@ struct TomlTarget {
+@@ -734,8 +730,6 @@ define_config! {
          sanitizers: Option<bool> = "sanitizers",
          profiler: Option<bool> = "profiler",
          crt_static: Option<bool> = "crt-static",
@@ -227,7 +245,7 @@ index 9534cc5f..642a5c24 100644
          wasi_root: Option<String> = "wasi-root",
          qemu_rootfs: Option<String> = "qemu-rootfs",
          no_std: Option<bool> = "no-std",
-@@ -1013,7 +1007,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1107,7 +1101,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;
@@ -235,7 +253,7 @@ index 9534cc5f..642a5c24 100644
              config.save_toolstates = rust.save_toolstates.map(PathBuf::from);
              set(&mut config.deny_warnings, flags.deny_warnings.or(rust.deny_warnings));
              set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
-@@ -1059,8 +1052,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1164,8 +1157,6 @@ impl Config {
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
                  target.crt_static = cfg.crt_static;
@@ -245,7 +263,7 @@ index 9534cc5f..642a5c24 100644
                  target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
                  target.sanitizers = cfg.sanitizers;
 diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
-index 87a130a0..bd4c9197 100755
+index 2fc036082..91737e0ea 100755
 --- a/src/bootstrap/configure.py
 +++ b/src/bootstrap/configure.py
 @@ -114,34 +114,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
@@ -284,10 +302,10 @@ index 87a130a0..bd4c9197 100755
    "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 570a6174..f3d5f308 100644
+index b603ae90a..0a7012dbd 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1125,25 +1125,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1153,25 +1153,6 @@ impl Build {
          }
      }
  
@@ -314,7 +332,7 @@ index 570a6174..f3d5f308 100644
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
          self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
 diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index 8c2899c1..dda15d76 100644
+index 64c5dd7ae..b8f9104ea 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
 @@ -11,7 +11,6 @@
@@ -325,7 +343,7 @@ index 8c2899c1..dda15d76 100644
  use std::path::PathBuf;
  use std::process::Command;
  
-@@ -177,28 +176,6 @@ pub fn check(build: &mut Build) {
+@@ -190,28 +189,6 @@ than building it.
              }
          }
  
@@ -354,3 +372,6 @@ index 8c2899c1..dda15d76 100644
          if need_cmake && target.contains("msvc") {
              // There are three builds of cmake on windows: MSVC, MinGW, and
              // Cygwin. The Cygwin build does not have generators for Visual
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch b/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
index 3c4e1cb96475..bc7053800945 100644
--- a/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
+++ b/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch
@@ -1,7 +1,7 @@
-From f9a680688a685ec47ee5ec001574d9b91b4ba35e Mon Sep 17 00:00:00 2001
+From 8938b002edbec432be46de7b6f1b9d0a6912873a Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 00:45:35 +0100
-Subject: [PATCH 3/9] move debugger scripts to /usr/share/rust
+Subject: [PATCH 03/15] move debugger scripts to /usr/share/rust
 
 ---
  src/bootstrap/dist.rs | 2 +-
@@ -11,10 +11,10 @@ Subject: [PATCH 3/9] move debugger scripts to /usr/share/rust
  4 files changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index d4875cfe1..e8b61b8a2 100644
+index b1fae356d..e7a077134 100644
 --- a/src/bootstrap/dist.rs
 +++ b/src/bootstrap/dist.rs
-@@ -499,7 +499,7 @@ impl Step for DebuggerScripts {
+@@ -460,7 +460,7 @@ impl Step for DebuggerScripts {
      fn run(self, builder: &Builder<'_>) {
          let host = self.host;
          let sysroot = self.sysroot;
@@ -65,5 +65,5 @@ index bce72f1ba..8abb01245 100755
  # Call LLDB with the commands added to the argument list
  exec "$lldb" --one-line-before-file "$script_import" --source-before-file "$commands_file" "$@"
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch b/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
index 2e9cd93fdfb9..2ca7ffeaf73f 100644
--- a/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
+++ b/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch
@@ -1,7 +1,7 @@
-From d5a6a431024790c911d04fd54381c515fb05819e Mon Sep 17 00:00:00 2001
+From d7d7fc24d1744a3db70a9fb010c31daa14a46df7 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 00:55:18 +0100
-Subject: [PATCH 4/9] fix shebang on install-template.sh
+Subject: [PATCH 04/15] fix shebang on install-template.sh
 
 ---
  src/tools/rust-installer/install-template.sh | 2 +-
@@ -18,5 +18,5 @@ index e68be8911..beaa90f7b 100644
  # file at the top-level directory of this distribution and at
  # http://rust-lang.org/COPYRIGHT.
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch b/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
deleted file mode 100644
index 30cb66fc24b1..000000000000
--- a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Additions for build.rs by q66, necessary for our musl setup.
-
-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/library/unwind/src/lib.rs
-+++ b/library/unwind/src/lib.rs
-@@ -51,7 +51,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", cfg(target_feature = "crt-static"))]
-         #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
-         extern "C" {}
-     }
diff --git a/srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch b/srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
similarity index 73%
rename from srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch
rename to srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
index 0128b8fc61f2..92e0021ab6f4 100644
--- a/srcpkgs/rust/patches/0006-do-not-install-libunwind-source-removed.patch
+++ b/srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch
@@ -1,17 +1,17 @@
-From fc69414484327e4dbff138dd0834fc3bde626008 Mon Sep 17 00:00:00 2001
+From 1335a445327a6605c5f933d9647b97e771089abd Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:44:54 +0100
-Subject: [PATCH 6/9] do not install libunwind source (removed)
+Subject: [PATCH 05/15] do not install libunwind source (removed)
 
 ---
  src/bootstrap/dist.rs | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
-index e8b61b8a2..02d24a77d 100644
+index e7a077134..74e75df4b 100644
 --- a/src/bootstrap/dist.rs
 +++ b/src/bootstrap/dist.rs
-@@ -849,7 +849,7 @@ impl Step for Src {
+@@ -804,7 +804,7 @@ impl Step for Src {
          copy_src_dirs(
              builder,
              &builder.src,
@@ -21,5 +21,5 @@ index e8b61b8a2..02d24a77d 100644
                  // not needed and contains symlinks which rustup currently
                  // chokes on when unpacking.
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch b/srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
similarity index 67%
rename from srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
rename to srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
index 2cc1f6b900d3..88eaf65de8b7 100644
--- a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
+++ b/srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch
@@ -1,17 +1,17 @@
-From 81ba387384e8ce0aa9bb9b4bd76014d922d85de8 Mon Sep 17 00:00:00 2001
+From 50075907c3dd2f06d471b3375d7c0ee850263eb2 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:48:14 +0100
-Subject: [PATCH 7/9] fix rustdoc when cross-compiling
+Subject: [PATCH 06/15] fix rustdoc when cross-compiling
 
 ---
  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 e4396d530..cb2312028 100644
+index 5f85fc5aa..01e81fc39 100644
 --- a/src/bootstrap/bin/rustdoc.rs
 +++ b/src/bootstrap/bin/rustdoc.rs
-@@ -22,14 +22,11 @@ fn main() {
+@@ -26,9 +26,6 @@ fn main() {
          Err(_) => 0,
      };
  
@@ -19,15 +19,18 @@ index e4396d530..cb2312028 100644
 -    dylib_path.insert(0, PathBuf::from(libdir.clone()));
 -
      let mut cmd = Command::new(rustdoc);
-     cmd.args(&args)
-         .arg("--sysroot")
-         .arg(&sysroot)
--        .env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
-+        .env(dylib_path_var(), PathBuf::from(libdir.clone()));
+ 
+     // cfg(bootstrap)
+@@ -43,7 +40,7 @@ fn main() {
+     }
+ 
+     cmd.args(&args);
+-    cmd.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
++    cmd.env(dylib_path_var(), PathBuf::from(libdir.clone()));
  
      // Force all crates compiled by this compiler to (a) be unstable and (b)
      // allow the `rustc_private` feature to link to other unstable crates
-@@ -62,7 +59,7 @@ fn main() {
+@@ -69,7 +66,7 @@ fn main() {
          eprintln!(
              "rustdoc command: {:?}={:?} {:?}",
              dylib_path_var(),
@@ -37,5 +40,5 @@ index e4396d530..cb2312028 100644
          );
          eprintln!("sysroot: {:?}", sysroot);
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch b/srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
similarity index 78%
rename from srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch
rename to srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
index f6793d8a3202..198e4fcc7a6a 100644
--- a/srcpkgs/rust/patches/0008-link-stage-2-tools-dynamically-to-libstd.patch
+++ b/srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch
@@ -1,7 +1,7 @@
-From 1c4a66621a5fa34c78fc020084e4166f3af7cbb5 Mon Sep 17 00:00:00 2001
+From c2de45cbdaee1a8c81b2d65f6bced1439a738e00 Mon Sep 17 00:00:00 2001
 From: Daniel Kolesa <daniel@octaforge.org>
 Date: Mon, 20 Dec 2021 01:48:49 +0100
-Subject: [PATCH 8/9] link stage 2 tools dynamically to libstd
+Subject: [PATCH 07/15] link stage 2 tools dynamically to libstd
 
 stage 2 tools are the ones that are distributed, and we distribute
 them together with the rust libs so there is no need to worry
@@ -11,10 +11,10 @@ about unstable ABI
  1 file changed, 2 insertions(+)
 
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index 6750f7a54..de771280e 100644
+index 62b5416ce..554dd4188 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1520,6 +1520,8 @@ impl<'a> Builder<'a> {
+@@ -2066,6 +2066,8 @@ impl<'a> Builder<'a> {
          // linking all deps statically into the dylib.
          if matches!(mode, Mode::Std | Mode::Rustc) {
              rustflags.arg("-Cprefer-dynamic");
@@ -24,5 +24,5 @@ index 6750f7a54..de771280e 100644
  
          // When building incrementally we default to a lower ThinLTO import limit
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch b/srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
similarity index 71%
rename from srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch
rename to srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
index 3b2e388c014e..3edba737f923 100644
--- a/srcpkgs/rust/patches/0009-use-XBPS_CROSS_BASE-for-llvm-cross.patch
+++ b/srcpkgs/rust/patches/0008-Void-fix-linkage-against-host-target-LLVM-in-cross-s.patch
@@ -1,8 +1,18 @@
+From f229c2bbd32deab98978d8453d0f44f23849fa09 Mon Sep 17 00:00:00 2001
+From: q66 <daniel@octaforge.org>
+Date: Sun, 3 May 2020 18:05:22 +0200
+Subject: [PATCH 08/15] Void: fix linkage against host/target LLVM in cross
+ setups
+
+---
+ compiler/rustc_llvm/build.rs | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
 diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs
-index 36a6d2cc3..af4e1219f 100644
+index 7729ec6be..66b8a4215 100644
 --- a/compiler/rustc_llvm/build.rs
 +++ b/compiler/rustc_llvm/build.rs
-@@ -230,9 +230,11 @@ fn main() {
+@@ -291,9 +291,11 @@ fn main() {
      for lib in output(&mut cmd).split_whitespace() {
          if is_crossed {
              if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
@@ -17,5 +27,5 @@ index 36a6d2cc3..af4e1219f 100644
          } else if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
              println!("cargo:rustc-link-search=native={}", stripped);
 -- 
-2.34.1
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch b/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
new file mode 100644
index 000000000000..f66766270a12
--- /dev/null
+++ b/srcpkgs/rust/patches/0009-do-not-export-LD_LIBRARY_PATH.patch
@@ -0,0 +1,29 @@
+From 5e9e5fa2b2aefefbdc00547d7f10ee92d9b3356a Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Tue, 21 Dec 2021 00:48:29 +0100
+Subject: [PATCH 09/15] do not export LD_LIBRARY_PATH
+
+---
+ src/bootstrap/bootstrap.py | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
+index 40d478a17..3501fd901 100644
+--- a/src/bootstrap/bootstrap.py
++++ b/src/bootstrap/bootstrap.py
+@@ -756,12 +756,6 @@ class RustBuild(object):
+             del env["CARGO_BUILD_TARGET"]
+         env["CARGO_TARGET_DIR"] = build_dir
+         env["RUSTC"] = self.rustc()
+-        env["LD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+-            (os.pathsep + env["LD_LIBRARY_PATH"]) \
+-            if "LD_LIBRARY_PATH" in env else ""
+-        env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+-            (os.pathsep + env["DYLD_LIBRARY_PATH"]) \
+-            if "DYLD_LIBRARY_PATH" in env else ""
+         env["LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
+             (os.pathsep + env["LIBRARY_PATH"]) \
+             if "LIBRARY_PATH" in env else ""
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch b/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
similarity index 69%
rename from srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
rename to srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
index 8a18e414e209..f2780ae08dfb 100644
--- a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
+++ b/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
@@ -1,18 +1,17 @@
-From e363a0e0ff7ffc8bd83f72ec1a20d289996b6370 Mon Sep 17 00:00:00 2001
+From 7e100ca9dad23efa1aafccd8faf86ec5fa85c351 Mon Sep 17 00:00:00 2001
 From: q66 <daniel@octaforge.org>
 Date: Sun, 3 May 2020 18:02:03 +0200
-Subject: [PATCH 12/15] Fix dynamic linkage of musl libc for the libc crate
+Subject: [PATCH 10/15] Fix dynamic linkage of musl libc for the libc crate
 
 ---
- vendor/libc/src/lib.rs      | 1 +
  vendor/libc/src/unix/mod.rs | 6 +++---
- 2 files changed, 4 insertions(+), 3 deletions(-)
+ 1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs
-index 238da24b..ffb05ee7 100644
+index ecee44411..7ae05f24e 100644
 --- a/vendor/libc/src/unix/mod.rs
 +++ b/vendor/libc/src/unix/mod.rs
-@@ -329,11 +329,11 @@ cfg_if! {
+@@ -337,11 +337,11 @@ cfg_if! {
          #[link(name = "c", cfg(not(target_feature = "crt-static")))]
          extern {}
      } else if #[cfg(target_env = "musl")] {
@@ -20,14 +19,13 @@ index 238da24b..ffb05ee7 100644
 +        extern {}
          #[cfg_attr(feature = "rustc-dep-of-std",
 -                   link(name = "c", kind = "static", modifiers = "-bundle",
-+                   link(name = "gcc", kind = "static-nobundle",
++                   link(name = "gcc", kind = "static", modifiers = "-bundle",
                          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")]
-index 0b1496af..7f7e85a7 100644
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch b/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
deleted file mode 100644
index d7714d5ee4fd..000000000000
--- a/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-commit 798e44e67c0bac6509b7915767450b0381c94017
-Author: Daniel Kolesa <daniel@octaforge.org>
-Date:   Tue Dec 21 00:48:29 2021 +0100
-
-    do not export LD_LIBRARY_PATH
-
-diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 0170be967..f7a9ec785 100644
---- a/src/bootstrap/bootstrap.py
-+++ b/src/bootstrap/bootstrap.py
-@@ -924,12 +924,6 @@ class RustBuild(object):
-             del env["CARGO_BUILD_TARGET"]
-         env["CARGO_TARGET_DIR"] = build_dir
-         env["RUSTC"] = self.rustc(True)
--        env["LD_LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
--            (os.pathsep + env["LD_LIBRARY_PATH"]) \
--            if "LD_LIBRARY_PATH" in env else ""
--        env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
--            (os.pathsep + env["DYLD_LIBRARY_PATH"]) \
--            if "DYLD_LIBRARY_PATH" in env else ""
-         env["LIBRARY_PATH"] = os.path.join(self.bin_root(True), "lib") + \
-             (os.pathsep + env["LIBRARY_PATH"]) \
-             if "LIBRARY_PATH" in env else ""
diff --git a/srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
similarity index 74%
rename from srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
rename to srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
index 3f3bd3212bb9..347ee613983d 100644
--- a/srcpkgs/rust/patches/0015-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
+++ b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch
@@ -1,24 +1,24 @@
-From c6b54a373e74a1e4ce64f349b5b69105f2bc1a49 Mon Sep 17 00:00:00 2001
+From de93abe8a0d9dc7878a48f61b9e3ae4a923020f6 Mon Sep 17 00:00:00 2001
 From: q66 <daniel@octaforge.org>
 Date: Sun, 3 May 2020 18:08:09 +0200
-Subject: [PATCH 15/15] Use ELFv2 ABI on all powerpc64 targets
+Subject: [PATCH 11/15] Use ELFv2 ABI on all powerpc64 targets
 
 This patches librustc_target so that ELFv2 is used everywhere, matching our
 LLVM. While this is not perfect (it does not allow rustc to compile legacy
 binaries), rustc never requests specific ABI from llvm in the first place,
 so at least match the environment we have.
 ---
- src/librustc_target/abi/call/powerpc64.rs               | 9 +--------
- src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs | 6 +-----
+ compiler/rustc_target/src/abi/call/powerpc64.rs          | 9 +--------
+ .../rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs | 6 +-----
  2 files changed, 2 insertions(+), 13 deletions(-)
 
 diff --git a/compiler/rustc_target/src/abi/call/powerpc64.rs b/compiler/rustc_target/src/abi/call/powerpc64.rs
-index 8c2a9d09a..2dcbf2c09 100644
+index c22ef9c8f..932172b2f 100644
 --- a/compiler/rustc_target/src/abi/call/powerpc64.rs
 +++ b/compiler/rustc_target/src/abi/call/powerpc64.rs
 @@ -119,14 +119,7 @@ where
-     Ty: TyAndLayoutMethods<'a, C> + Copy,
-     C: LayoutOf<Ty = Ty, TyAndLayout = TyAndLayout<'a, Ty>> + HasDataLayout + HasTargetSpec,
+     Ty: TyAbiInterface<'a, C> + Copy,
+     C: HasDataLayout + HasTargetSpec,
  {
 -    let abi = if cx.target_spec().env == "musl" {
 -        ELFv2
@@ -33,7 +33,7 @@ index 8c2a9d09a..2dcbf2c09 100644
      if !fn_abi.ret.is_ignore() {
          classify_ret(cx, &mut fn_abi.ret, abi);
 diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
-index 751022c12..c4d55a62e 100644
+index 24d5d187e..aa594b02e 100644
 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
 +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs
 @@ -1,5 +1,5 @@
@@ -44,7 +44,7 @@ index 751022c12..c4d55a62e 100644
  pub fn target() -> Target {
      let mut base = super::linux_gnu_base::opts();
 @@ -7,10 +7,6 @@ pub fn target() -> Target {
-     base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
+     base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m64".into());
      base.max_atomic_width = Some(64);
  
 -    // ld.so in at least RHEL6 on ppc64 has a bug related to BIND_NOW, so only enable partial RELRO
@@ -52,8 +52,8 @@ index 751022c12..c4d55a62e 100644
 -    base.relro_level = RelroLevel::Partial;
 -
      Target {
-         llvm_target: "powerpc64-unknown-linux-gnu".to_string(),
+         llvm_target: "powerpc64-unknown-linux-gnu".into(),
          pointer_width: 64,
 -- 
-2.26.2
+2.37.2
 
diff --git a/srcpkgs/rust/patches/fix-ppc32.patch b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
similarity index 78%
rename from srcpkgs/rust/patches/fix-ppc32.patch
rename to srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
index 739ce4bce7f0..7b1ba46b1f2b 100644
--- a/srcpkgs/rust/patches/fix-ppc32.patch
+++ b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch
@@ -1,7 +1,7 @@
-From 283619cf5ca25272b294525273ec42e9c7820edb Mon Sep 17 00:00:00 2001
+From 4b803b211f765f6c6b18223e23670dbf754a980f Mon Sep 17 00:00:00 2001
 From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
 Date: Sat, 29 May 2021 12:38:46 +0000
-Subject: [PATCH] bootstrap: Disable initial-exec TLS model on powerpc
+Subject: [PATCH 12/15] bootstrap: Disable initial-exec TLS model on powerpc
 
 Fixes #81334.
 ---
@@ -9,10 +9,10 @@ Fixes #81334.
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index 6750f7a549d..6032a685776 100644
+index 554dd4188..6a02a225c 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1299,7 +1299,7 @@ pub fn cargo(
+@@ -1844,7 +1844,7 @@ impl<'a> Builder<'a> {
          // efficient initial-exec TLS model. This doesn't work with `dlopen`,
          // so we can't use it by default in general, but we can use it for tools
          // and our own internal libraries.
@@ -21,3 +21,6 @@ index 6750f7a549d..6032a685776 100644
              rustflags.arg("-Ztls-model=initial-exec");
          }
  
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/native-sysroot.patch b/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
similarity index 69%
rename from srcpkgs/rust/patches/native-sysroot.patch
rename to srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
index 6826b114b6b7..2414d72380b6 100644
--- a/srcpkgs/rust/patches/native-sysroot.patch
+++ b/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch
@@ -1,8 +1,21 @@
+From 236c0272667d69380d03984cfa8bad44b033fd69 Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Tue, 21 Dec 2021 02:46:30 +0100
+Subject: [PATCH 13/15] allow specifying native sysroot to use for linkage
+
+This allows us to get around the linker attempting to use
+incompatible libs.
+---
+ src/bootstrap/builder.rs | 4 ++++
+ src/bootstrap/config.rs  | 3 +++
+ src/bootstrap/lib.rs     | 4 ++++
+ 3 files changed, 11 insertions(+)
+
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index e816f9b4..a2668fa9 100644
+index 6a02a225c..483aa8818 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1313,6 +1313,10 @@ pub fn cargo(
+@@ -1708,6 +1708,10 @@ impl<'a> Builder<'a> {
              }
          }
  
@@ -14,10 +27,10 @@ index e816f9b4..a2668fa9 100644
              cargo.env("RUSTC_HOST_LINKER", host_linker);
          }
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 642a5c24..0dd4f879 100644
+index 18a764689..f8b9bbd96 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -294,6 +294,7 @@ pub struct Target {
+@@ -395,6 +395,7 @@ pub struct Target {
      pub ranlib: Option<PathBuf>,
      pub default_linker: Option<PathBuf>,
      pub linker: Option<PathBuf>,
@@ -25,15 +38,15 @@ index 642a5c24..0dd4f879 100644
      pub ndk: Option<PathBuf>,
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
-@@ -621,6 +622,7 @@ struct TomlTarget {
+@@ -723,6 +724,7 @@ define_config! {
          ranlib: Option<String> = "ranlib",
          default_linker: Option<PathBuf> = "default-linker",
          linker: Option<String> = "linker",
 +        sysroot: Option<String> = "sysroot",
          llvm_config: Option<String> = "llvm-config",
          llvm_filecheck: Option<String> = "llvm-filecheck",
-         android_ndk: Option<String> = "android-ndk",
-@@ -1051,6 +1053,7 @@ pub fn parse(args: &[String]) -> Config {
+         llvm_libunwind: Option<String> = "llvm-libunwind",
+@@ -1156,6 +1158,7 @@ impl Config {
                  target.ar = cfg.ar.map(PathBuf::from);
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
@@ -42,17 +55,20 @@ index 642a5c24..0dd4f879 100644
                  target.wasi_root = cfg.wasi_root.map(PathBuf::from);
                  target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from);
 diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
-index f3d5f308..7f8b9b27 100644
+index 0a7012dbd..cded50d20 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1125,6 +1125,10 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1152,6 +1152,10 @@ impl Build {
+             self.config.target_config.get(&target).and_then(|t| t.crt_static)
          }
      }
- 
++    
 +    fn native_sysroot(&self, target: TargetSelection) -> Option<&Path> {
 +        self.config.target_config.get(&target).and_then(|c| c.sysroot.as_ref()).map(|p| &**p)
 +    }
-+
+ 
      /// Returns the sysroot for the wasi target, if defined
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
-         self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch b/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
new file mode 100644
index 000000000000..ec26d9c26ae0
--- /dev/null
+++ b/srcpkgs/rust/patches/0014-copy-new-version-of-need-ssp_nonshared.patch-from-al.patch
@@ -0,0 +1,28 @@
+From 0b057b456a5b24ce5cf898e47eddb7cbc7448fe2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
+Date: Fri, 16 Apr 2021 03:34:16 -0300
+Subject: [PATCH 14/15] copy new version of need-ssp_nonshared.patch from
+ alpine
+
+---
+ library/std/src/sys/unix/mod.rs | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/library/std/src/sys/unix/mod.rs b/library/std/src/sys/unix/mod.rs
+index 34a023b02..934a87570 100644
+--- a/library/std/src/sys/unix/mod.rs
++++ b/library/std/src/sys/unix/mod.rs
+@@ -297,6 +297,10 @@ cfg_if::cfg_if! {
+         #[link(name = "dl")]
+         #[link(name = "log")]
+         extern "C" {}
++    } else if #[cfg(all(target_os = "linux", target_env = "musl"))] {
++	    #[link(name = "ssp_nonshared")]
++        #[link(name = "execinfo")]
++	    extern "C" {}
+     } else if #[cfg(target_os = "freebsd")] {
+         #[link(name = "execinfo")]
+         #[link(name = "pthread")]
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/xxx-ppcle.patch b/srcpkgs/rust/patches/0015-initial-ppcle-port.patch
similarity index 85%
rename from srcpkgs/rust/patches/xxx-ppcle.patch
rename to srcpkgs/rust/patches/0015-initial-ppcle-port.patch
index c0522f0eaafc..dd6b72e21bcb 100644
--- a/srcpkgs/rust/patches/xxx-ppcle.patch
+++ b/srcpkgs/rust/patches/0015-initial-ppcle-port.patch
@@ -1,8 +1,40 @@
+From 2b3b4a11dd75ff43e0f1f12de395d0ce29f8555f Mon Sep 17 00:00:00 2001
+From: Daniel Kolesa <daniel@octaforge.org>
+Date: Sat, 3 Jul 2021 21:02:03 +0200
+Subject: [PATCH 15/15] initial ppcle port
+
+---
+ compiler/rustc_middle/src/ty/layout.rs            |  5 ++++-
+ compiler/rustc_target/src/spec/mod.rs             |  2 ++
+ .../src/spec/powerpcle_unknown_linux_gnu.rs       | 15 +++++++++++++++
+ .../src/spec/powerpcle_unknown_linux_musl.rs      | 15 +++++++++++++++
+ src/bootstrap/bootstrap.py                        |  2 ++
+ .../codegen/abi-main-signature-16bit-c-int.rs     |  1 +
+ src/test/codegen/global_asm.rs                    |  1 +
+ src/test/codegen/global_asm_include.rs            |  1 +
+ src/test/codegen/global_asm_x2.rs                 |  1 +
+ src/test/codegen/repr-transparent-aggregates-1.rs |  1 +
+ src/test/codegen/repr-transparent-aggregates-2.rs |  1 +
+ src/test/codegen/stack-probes.rs                  |  1 +
+ .../run-make-fulldeps/atomic-lock-free/Makefile   |  2 ++
+ src/test/ui/abi/stack-probes-lto.rs               |  1 +
+ src/test/ui/abi/stack-probes.rs                   |  1 +
+ src/test/ui/target-feature/gate.rs                |  1 +
+ src/test/ui/target-feature/invalid-attribute.rs   |  1 +
+ src/tools/compiletest/src/util.rs                 |  1 +
+ vendor/cc/src/lib.rs                              |  1 +
+ vendor/target-lexicon/src/targets.rs              |  7 +++++++
+ vendor/tikv-jemallocator/benches/roundtrip.rs     |  3 ++-
+ vendor/tikv-jemallocator/src/lib.rs               |  3 ++-
+ 22 files changed, 64 insertions(+), 3 deletions(-)
+ create mode 100644 compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
+ create mode 100644 compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
+
 diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs
-index 0c1ab67cc..8d4e5f3cb 100644
+index 3b05e42a5..66420f507 100644
 --- a/compiler/rustc_middle/src/ty/layout.rs
 +++ b/compiler/rustc_middle/src/ty/layout.rs
-@@ -3057,6 +3057,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
+@@ -3205,6 +3205,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
              target.os == "linux" && target.arch == "sparc64" && target_env_gnu_like;
          let linux_powerpc_gnu_like =
              target.os == "linux" && target.arch == "powerpc" && target_env_gnu_like;
@@ -11,7 +43,7 @@ index 0c1ab67cc..8d4e5f3cb 100644
          use SpecAbi::*;
          let rust_abi = matches!(sig.abi, RustIntrinsic | PlatformIntrinsic | Rust | RustCall);
  
-@@ -3165,7 +3167,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
+@@ -3311,7 +3313,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
                      || (!win_x64_gnu
                          && !linux_s390x_gnu_like
                          && !linux_sparc64_gnu_like
@@ -22,10 +54,10 @@ index 0c1ab67cc..8d4e5f3cb 100644
                      arg.mode = PassMode::Ignore;
                  }
 diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
-index bd5b712c1..f60be010c 100644
+index da0589cdd..2db403913 100644
 --- a/compiler/rustc_target/src/spec/mod.rs
 +++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -824,6 +824,8 @@ supported_targets! {
+@@ -831,6 +831,8 @@ supported_targets! {
      ("powerpc-unknown-linux-gnu", powerpc_unknown_linux_gnu),
      ("powerpc-unknown-linux-gnuspe", powerpc_unknown_linux_gnuspe),
      ("powerpc-unknown-linux-musl", powerpc_unknown_linux_musl),
@@ -77,10 +109,10 @@ index 000000000..a826b6e47
 +    }
 +}
 diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 71b8f3c45..1505c12e4 100644
+index 3501fd901..a28f456d3 100644
 --- a/src/bootstrap/bootstrap.py
 +++ b/src/bootstrap/bootstrap.py
-@@ -320,9 +320,11 @@ def default_build_triple(verbose):
+@@ -339,9 +339,11 @@ def default_build_triple(verbose):
          'i786': 'i686',
          'm68k': 'm68k',
          'powerpc': 'powerpc',
@@ -141,7 +173,7 @@ index bdcf0ea84..1e2ff8b8d 100644
  // ignore-amdgcn
  // ignore-sparc
 diff --git a/src/test/codegen/repr-transparent-aggregates-1.rs b/src/test/codegen/repr-transparent-aggregates-1.rs
-index 4ad3642c0..fca31c0c6 100644
+index 9d18c5f03..8e69d2afd 100644
 --- a/src/test/codegen/repr-transparent-aggregates-1.rs
 +++ b/src/test/codegen/repr-transparent-aggregates-1.rs
 @@ -6,6 +6,7 @@
@@ -238,10 +270,10 @@ index ad1b6e96b..122d59a57 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
-index bed509d77..8bc817897 100644
+index 215af347f..a1c7e4c6a 100644
 --- a/src/tools/compiletest/src/util.rs
 +++ b/src/tools/compiletest/src/util.rs
-@@ -70,6 +70,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
+@@ -71,6 +71,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
      ("msp430", "msp430"),
      ("nvptx64", "nvptx64"),
      ("powerpc", "powerpc"),
@@ -342,3 +374,6 @@ index 4a9397331..4cf47c05d 100644
  )))]
  const ALIGNOF_MAX_ALIGN_T: usize = 8;
  #[cfg(all(any(
+-- 
+2.37.2
+
diff --git a/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch b/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
deleted file mode 100644
index d9a7ae68b6e0..000000000000
--- a/srcpkgs/rust/patches/beb4e16f055aa7925194fd2c360105a6d55f10f6.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From beb4e16f055aa7925194fd2c360105a6d55f10f6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Lo=C3=AFc=20BRANSTETT?= <lolo.branstett@numericable.fr>
-Date: Wed, 27 Apr 2022 19:11:56 +0200
-Subject: [PATCH] Add missing `target_feature` to the list of well known cfg
- names
-
----
- compiler/rustc_session/src/config.rs | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
-index 12c5c4445d46f..330201dd8fef6 100644
---- a/compiler/rustc_session/src/config.rs
-+++ b/compiler/rustc_session/src/config.rs
-@@ -1038,6 +1038,7 @@ impl CrateCheckConfig {
-             sym::target_has_atomic_load_store,
-             sym::target_has_atomic,
-             sym::target_has_atomic_equal_alignment,
-+            sym::target_feature,
-             sym::panic,
-             sym::sanitize,
-             sym::debug_assertions,
-@@ -1081,6 +1082,10 @@ impl CrateCheckConfig {
-             .into_iter()
-             .map(|sanitizer| Symbol::intern(sanitizer.as_str().unwrap()));
- 
-+        // Unknown possible values:
-+        //  - `feature`
-+        //  - `target_feature`
-+
-         // No-values
-         for name in [
-             sym::doc,
diff --git a/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch b/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch
deleted file mode 100644
index fe0377dbc381..000000000000
--- a/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/library/std/src/sys/unix/mod.rs
-+++ b/library/std/src/sys/unix/mod.rs
-@@ -212,6 +212,10 @@ cfg_if::cfg_if! {
-         #[link(name = "log")]
-         #[link(name = "gcc")]
-         extern "C" {}
-+    } else if #[cfg(all(target_os = "linux", target_env = "musl"))] {
-+	#[link(name = "ssp_nonshared")]
-+  #[link(name = "execinfo")]
-+	extern "C" {}
-     } else if #[cfg(target_os = "freebsd")] {
-         #[link(name = "execinfo")]
-         #[link(name = "pthread")]
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index da3ca779e7c6..571a7c0a9abc 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -8,7 +8,7 @@
 # uploaded to https://repo-default.voidlinux.org/distfiles/
 #
 pkgname=rust
-version=1.61.0
+version=1.63.0
 revision=1
 wrksrc="rustc-${version}-src"
 hostmakedepends="cmake curl pkg-config python3 tar cargo-bootstrap"
@@ -19,7 +19,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://www.rust-lang.org/"
 distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
-checksum=ad0b4351675aa9abdf4c7e066613bd274c4391c5506db152983426376101daed
+checksum=1f9580295642ef5da7e475a8da2397d65153d3f2cb92849dbd08ed0effca99d0
 lib32disabled=yes
 make_check=no # CBA for now
 
@@ -127,6 +127,7 @@ do_configure() {
 		incremental = false
 		parallel-compiler = false
 		channel = "stable"
+		description = "Void Linux"
 		rpath = ${_use_rpath}
 		verbose-tests = true
 		dist-src = false

From 251b226460599643cebf41c60d29ea863b2fec53 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 14 Aug 2022 02:26:35 +0200
Subject: [PATCH 4/5] cargo: update to 1.63.0.

---
 srcpkgs/cargo/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index e3c30f625acd..9f653c39fd43 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo'
 pkgname=cargo
-version=1.61.0
+version=1.63.0
 revision=1
 wrksrc="cargo-rust-${version}"
 build_helper=rust
@@ -13,7 +13,7 @@ license="MIT, Apache-2.0"
 homepage="https://crates.io/"
 distfiles="https://github.com/rust-lang/cargo/archive/rust-${version}.tar.gz
  https://github.com/crossbeam-rs/crossbeam/archive/refs/tags/crossbeam-utils-0.8.8.tar.gz"
-checksum="6261b51441f50abe08a2992a349b22a2385846bfc9cb288ae9a3a609b904099e
+checksum="b1f50e4957a0453c1513cabe98c7fd94e715cd0ca70138b1945cef338e1abf35
  52c451910203cd9002cc4b85cff95f45c6ba245392801e80d7898ca5c3c3ab29"
 replaces="cargo-tree>=0"
 

From d0f9f411cda6baba40cf9f9abb280564114fe513 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Fri, 19 Aug 2022 19:07:34 +0200
Subject: [PATCH 5/5] rust-bootstrap: document cross compiled distfile
 generation

---
 .../files/generating-distfiles.md             | 67 +++++++++++++++++++
 srcpkgs/rust-bootstrap/template               |  1 +
 2 files changed, 68 insertions(+)
 create mode 100644 srcpkgs/rust-bootstrap/files/generating-distfiles.md

diff --git a/srcpkgs/rust-bootstrap/files/generating-distfiles.md b/srcpkgs/rust-bootstrap/files/generating-distfiles.md
new file mode 100644
index 000000000000..ed5aa0da8596
--- /dev/null
+++ b/srcpkgs/rust-bootstrap/files/generating-distfiles.md
@@ -0,0 +1,67 @@
+## Generating self-hosted rust and cargo bootstrap distfiles
+
+Rust doesn't ship binaries for some of the targets we support bootstrapping on,
+so we have to generate distfiles for a few architectures as well, namely
+`ppc64le-musl` and `ppc64` for `rust-bootstrap`, and additionally `ppc` for
+`cargo-bootstrap`, as the `ppc` cargo binaries provided by upstream have
+problems.
+
+### Set up appropriate masterdirs and remote-repositories
+
+This guide assumes you're on an x86\_64 machine. If you're not, please adapt the
+appropriate sections.
+
+First, we bootstrap our masterdirs. We need both a glibc one and a musl one:
+
+```
+$ ./xbps-src -m masterdir-glibc binary-bootstrap x86_64
+$ ./xbps-src -m masterdir-musl binary-bootstrap x86_64-musl
+```
+
+In addition to those, we need to set up binary remotes for the ppc repos. As
+they aren't officially maintained by Voidlinux, they aren't included in this
+repo, but you can include them locally by creating these three files:
+
+- `etc/xbps.d/repos-remote-ppc.conf`, with
+  `repository=https://repo.voidlinux-ppc.org/current/ppc` in it.
+- `etc/xbps.d/repos-remote-ppc64.conf`, with
+  `repository=https://repo.voidlinux-ppc.org/current/be` in it.
+- `etc/xbps.d/repos-remote-ppc64le-musl.conf`, with
+  `repository=https://repo.voidlinux-ppc.org/current/musl` in it.
+
+### Bootstrapping on your native architecture
+
+Assuming you've already adjusted the version and checksums for the distfiles
+provided by upstream, we can now start building rust for our native
+architecture, with both glibc and musl. Run this for both masterdirs
+bootstrapped above
+
+```
+$ ./xbps-src -m <masterdir> pkg cargo
+```
+
+This builds `rust-bootstrap`, `cargo-bootstrap`, `rust` and `cargo` for your
+native architecture, which we will need for the next step.
+
+### Crosscompiling for the target architectures and generating distfiles
+
+Now that we have the our native architecture covered, we cross build for the
+architectures we need to generate distfiles for:
+
+```
+$ ./xbps-src -m <masterdir> -a <arch> pkg -o bindist rust
+$ ./xbps-src -m <masterdir> -a <arch> pkg rust
+$ ./xbps-src -m <masterdir> -a <arch> pkg -o bindist cargo
+```
+
+Repeat these three steps for `masterdir-glibc` with `ppc`, `masterdir-musl` with
+`ppc64le-musl` and `masterdir-glibc` with `ppc64`. In the case of `ppc`, you can
+skip the `bindist` build for rust, as we are taking those from upstream.
+
+Now that we have run those commands, the generated distfiles are available in
+`hostdir/sources/distfiles`. Generate a `sha256sum` for each of those files, and
+set the hashes in the appropriate places in the `rust-bootstrap` and
+`cargo-bootstrap` templates. If you want to verify you did things correctly, you
+can copy the generated distfiles over into `hostdir/sources/rust-bootstrap-${version}`
+and `hostdir/sources/cargo-bootstrap-${version}`, and try cross-building the
+bootstrap packages for those architectures.
diff --git a/srcpkgs/rust-bootstrap/template b/srcpkgs/rust-bootstrap/template
index 47742bf17eae..b756b9ade940 100644
--- a/srcpkgs/rust-bootstrap/template
+++ b/srcpkgs/rust-bootstrap/template
@@ -19,6 +19,7 @@ _bootstrap_url="https://static.rust-lang.org/dist"
 
 case "$XBPS_TARGET_MACHINE" in
 	x86_64*|i686|ppc64le|ppc) ;;
+	# See srcpkgs/rust-bootstrap/files/generating-distfiles.md for details
 	*) _bootstrap_url="https://repo-default.voidlinux.org/distfiles";;
 esac
 

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
                   ` (21 preceding siblings ...)
  2022-08-24  4:21 ` [PR PATCH] [Updated] " classabbyamp
@ 2022-08-24  4:26 ` classabbyamp
  2022-08-24 16:21 ` [PR PATCH] [Merged]: " classabbyamp
  23 siblings, 0 replies; 25+ messages in thread
From: classabbyamp @ 2022-08-24  4:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 203 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/38662#issuecomment-1225174754

Comment:
will merge when firefox issues on the builders get fixed

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PR PATCH] [Merged]: Update Rust toolchain to 1.63.0
  2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
                   ` (22 preceding siblings ...)
  2022-08-24  4:26 ` classabbyamp
@ 2022-08-24 16:21 ` classabbyamp
  23 siblings, 0 replies; 25+ messages in thread
From: classabbyamp @ 2022-08-24 16:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 763 bytes --]

There's a merged pull request on the void-packages repository

Update Rust toolchain to 1.63.0
https://github.com/void-linux/void-packages/pull/38662

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

[ci skip]

`cargo-crev` requires 1.62 at least, so I thought I'd gave updating Rust a go, and it worked out just fine tbh. The new `cargo-crev` release compiled fine on this toolchain and works properly.

#### Local build testing
- I built this PR natively for
  - `x86_64`, `glibc` and `musl`
  - `i686`, `glibc`
- I crossbuilt this PR for
  - `aarch64`, `musl`
  - `ppc`, `glibc`
  - `ppc64`, `glibc`
  - `ppc64le`, `musl`


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2022-08-24 16:21 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-14  0:46 [PR PATCH] Update Rust toolchain to 1.63.0 jcgruenhage
2022-08-14  0:48 ` [PR PATCH] [Updated] " jcgruenhage
2022-08-14  0:51 ` jcgruenhage
2022-08-14  9:00 ` jcgruenhage
2022-08-14  9:32 ` [PR PATCH] [Updated] " jcgruenhage
2022-08-14  9:33 ` jcgruenhage
2022-08-14 13:06 ` jcgruenhage
2022-08-14 14:17 ` classabbyamp
2022-08-14 16:09 ` jcgruenhage
2022-08-15 15:43 ` Zapeth
2022-08-16 15:18 ` [PR PATCH] [Updated] " jcgruenhage
2022-08-17  5:43 ` jcgruenhage
2022-08-17 13:23 ` jcgruenhage
2022-08-19  9:17 ` [PR PATCH] [Updated] " jcgruenhage
2022-08-19  9:22 ` [PR REVIEW] " jcgruenhage
2022-08-19  9:24 ` jcgruenhage
2022-08-19 17:07 ` [PR PATCH] [Updated] " jcgruenhage
2022-08-19 17:12 ` [PR REVIEW] " classabbyamp
2022-08-19 17:17 ` [PR PATCH] [Updated] " jcgruenhage
2022-08-19 18:43 ` [PR REVIEW] " jcgruenhage
2022-08-22  8:05 ` jcgruenhage
2022-08-24  3:49 ` [PR REVIEW] " classabbyamp
2022-08-24  4:21 ` [PR PATCH] [Updated] " classabbyamp
2022-08-24  4:26 ` classabbyamp
2022-08-24 16:21 ` [PR PATCH] [Merged]: " classabbyamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).