Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Update Rust toolchain to 1.61.0
@ 2022-05-21 21:09 tranzystorek-io
  2022-05-21 21:14 ` tranzystorek-io
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: tranzystorek-io @ 2022-05-21 21:09 UTC (permalink / raw)
  To: ml

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

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

https://github.com/tranzystorek-io/void-packages rust-toolchain
https://github.com/void-linux/void-packages/pull/37232

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

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-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)


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

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

From 38dd7c6cd458e789f9d344bd576f36b58b6923f9 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:03:26 +0200
Subject: [PATCH 1/4] rust-bootstrap: update to 1.61.0

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

diff --git a/srcpkgs/rust-bootstrap/template b/srcpkgs/rust-bootstrap/template
index bbedb66430b6..bbeb3b085464 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.57.0
+version=1.61.0
 revision=1
 create_wrksrc=yes
 short_desc="Rust programming language bootstrap toolchain"
@@ -17,7 +17,7 @@ fi
 
 _bootstrap_url="https://static.rust-lang.org/dist"
 
-case "$XBPS_MACHINE" in
+case "$XBPS_TARGET_MACHINE" in
 	x86_64*|i686|ppc64le|ppc) ;;
 	*) _bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles";;
 esac
@@ -29,40 +29,40 @@ distfiles="
 case "$XBPS_TARGET_MACHINE" in
 	i686)
 		checksum="
-		 9bade3fcd246b0ad6859fcf5d0a80d3eb833e5410efa3a5552c241865562461e
-		 586e7fd521a058cbf4778abb67d7d078dd4820d356351d0b6a719e21d00966db"
+		 8af0ec3eb470e7e28439fedf9ebdadf90df8c58da544cc643033e6fc0ccf0bea
+		 ab223fcec35183bc0fe630403537cd7dae55c403103df29b25077db4882cb88e"
 		;;
 	x86_64)
 		checksum="
-		 c42f40c5279a3a9d539cae93dbcab9d333777ad9a60a5b9f1086b874ef63db86
-		 ccdc72d06c90841b7227ec3630337881eeda3da5fbe87328d2e9d705f6f8016c"
+		 21c4613f389ed130fbaaf88f1e984319f72b5fc10734569a5ba19e22ebb03abd
+		 270b07aa5f2de52255a117e1e587138d77375ce0d09a1d7fead085f29b3977e9"
 		;;
 	x86_64-musl)
 		checksum="
-		 5b04e0e0bbf140f7c49baa6280114c28f59f6de50481bdd45074eebf629c174c
-		 818213a6444503ed6adf0231d3c71de990d4c26926c62e8c602bb7e2d636fb94"
+		 89cb72cbc493cb5cd8e43830009b4a1a5bfd472246ae184157868c9b0607bf6c
+		 1f4f2e4c5dd0f9b0dac7c8888f4a49ef16a6fe8992f39895823d2a442f0fe408"
 		;;
 	ppc64le)
 		checksum="
-		 f43cb99109c3438c77c7079cdce4673df3320e310158e0b4d949c1babc4300fc
-		 fc07eb3e9f3d227428cc5b53ca868e3de375bc198ce4dce7b87a9246e6fec81a"
+		 dc54893d747e4f3330515caa75e404f78c6c5475a1216d1428f5e7ce1c2e9602
+		 36c0ccff14c80419507561db050f9533f0abd43fc50f3ddb859c10df74b1c351"
 		;;
 	ppc64le-musl)
 		checksum="
-		 6b48e521ba8a070a7b992595e82c5a164cc01c93bbd9a7b3d4db362f4b060df8
-		 d7876e817fc95df2e81858fc9ddb95b10fb83b413277ea6dbdfa9a80fa0d990e"
+		 badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb
+		 badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
 	ppc64)
 		checksum="
-		 2ea5b66d2cd8b9c251590fd5bd3e23cedec658b61f541e2824ce3fdcda263982
-		 e9c1394771b1b24241d8938ad75c4a6ed8bfa043522c74767b3528f2289095c0"
+		 badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb
+		 badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
 	ppc)
 		checksum="
-		 a1d7611b2d39224ba9a915009ae2a6639def42767370f50effd57770b3eb2150
-		 bc117ce5f0c81d2e14ea2d1832c0e908b1153caf49f295a9d28af2128f5fae44"
+		 f28a8c2986fce5015c67823e39ad4b53e2db06603b6ea4a1217ac961cbbfb073
+		 7d2f7f900c8c05616fba8e99ab041d847af3653c259b99445edd788acddf878c"
 		;;
-	*) broken="rust bootstrap binaries unavailable for ${XBPS_MACHINE}";;
+	*) broken="rust bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac
 
 do_install() {

From 29c05dcea0bd9fd80e3722793d5885c8c782f670 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:12:56 +0200
Subject: [PATCH 2/4] cargo-bootstrap: update to 1.61.0

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

diff --git a/srcpkgs/cargo-bootstrap/template b/srcpkgs/cargo-bootstrap/template
index e75f8763b5b8..a2c365cbe00d 100644
--- a/srcpkgs/cargo-bootstrap/template
+++ b/srcpkgs/cargo-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo-bootstrap'
 pkgname=cargo-bootstrap
-version=0.58.0
+version=1.61.0
 revision=1
 short_desc="Bootstrap binaries of Rust package manager"
 maintainer="q66 <daniel@octaforge.org>"
@@ -11,45 +11,41 @@ lib32disabled=yes
 nostrip=yes
 
 _bootstrap_url="https://static.rust-lang.org/dist"
-_bootver=1.57.0
 
 # we don't use upstream cargo binaries for ppc32, as they are busted (probably
 # a dependency is wrong, which results in failed signature verification when
 # updating the crates.io index)
 case "$XBPS_TARGET_MACHINE" in
 	x86_64*|i686|ppc64le) ;;
-	*)
-		_bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles"
-		_bootver=${version}
-		;;
+	*) _bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles" ;;
 esac
 
-wrksrc="cargo-${_bootver}-${RUST_TARGET}"
-distfiles="${_bootstrap_url}/cargo-${_bootver}-${RUST_TARGET}.tar.xz"
+wrksrc="cargo-${version}-${RUST_TARGET}"
+distfiles="${_bootstrap_url}/cargo-${version}-${RUST_TARGET}.tar.xz"
 
 case "$XBPS_TARGET_MACHINE" in
 	i686)
-		checksum="9898a1fae2647f930fa14b9c160a1d22e67ccc70ac0d2d8f79ef1ffcf8d89af7"
+		checksum="fe258b85ef0644ff08c2095e329399dd4de0e1b2e51f4f4e90cb956d40dc61de"
 		;;
 	x86_64)
-		checksum="ed2013713ae742895af5df8d91c5430ba9ba3c781e3bc7f3471b220cc06d565d"
+		checksum="9461727d754f865ef2a87479d40bbe4c5176f80963b7c50b7797bc8940d7a0a0"
 		;;
 	x86_64-musl)
-		checksum="0d8564d0348843d6c08d98990d9eac50b7b7ab790f89d514b4f45079e786d932"
+		checksum="db4b4423c2843b6e27737664cf8085afcba670374110ca24b9c8d341045e748c"
 		;;
 	ppc64le)
-		checksum="599cf1b5a8cdbf76d591621bc9222aefa60e2f5fd378ae71c4dcf4514c47122e"
+		checksum="09817011ff1ef4b7006387c7cabb6a059731792a9372533dec7d87e7f014444b"
 		;;
 	ppc64le-musl)
-		checksum="99ae7661c62617ac42adacb50cce9ae8d019bcf85e987b98fbc27240bceb1dd9"
+		checksum="badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
 	ppc64)
-		checksum="c64b9cce7a3ceaf5c310fad70be33077f1e6dea1384767fcf744732c0daa7473"
+		checksum="badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
 	ppc)
-		checksum="e67c2a7d16b3c732a1dcb663d031daf6eaca4b74d1d15196086c53c0c3a5b0a2"
+		checksum="badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
-	*) broken="cargo bootstrap binaries unavailable for ${XBPS_MACHINE}";;
+	*) broken="cargo bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac
 
 do_install() {

From 8634f3823b0d750acb062c0f72344a28e43554bb Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:09:02 +0200
Subject: [PATCH 3/4] rust: update to 1.61.0

---
 .../rust/patches/0001-musl-void-setup.patch   | 135 +++-----
 ...007-fix-rustdoc-when-cross-compiling.patch |  12 +-
 ... 0010-do-not-export-LD_LIBRARY_PATH.patch} |   0
 ...kage-of-musl-libc-for-the-libc-crate.patch |   8 +-
 srcpkgs/rust/patches/native-sysroot.patch     |  41 +--
 srcpkgs/rust/patches/xxx-ppcle.patch          | 309 ++++--------------
 srcpkgs/rust/template                         |  13 +-
 7 files changed, 138 insertions(+), 380 deletions(-)
 rename srcpkgs/rust/patches/{ld-library-path.patch => 0010-do-not-export-LD_LIBRARY_PATH.patch} (100%)

diff --git a/srcpkgs/rust/patches/0001-musl-void-setup.patch b/srcpkgs/rust/patches/0001-musl-void-setup.patch
index 427581c48f54..c13cb1730986 100644
--- a/srcpkgs/rust/patches/0001-musl-void-setup.patch
+++ b/srcpkgs/rust/patches/0001-musl-void-setup.patch
@@ -1,8 +1,8 @@
 diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
-index 2fc9ab29f92..27673615968 100644
+index 51f392a6..62560658 100644
 --- a/compiler/rustc_target/src/spec/crt_objects.rs
 +++ b/compiler/rustc_target/src/spec/crt_objects.rs
-@@ -62,28 +62,6 @@ pub(super) fn all(obj: &str) -> CrtObjects {
+@@ -63,28 +63,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects {
      ])
  }
  
@@ -32,7 +32,7 @@ index 2fc9ab29f92..27673615968 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 5038a967d0a..b3c0e5bc416 100644
+index 207a87ab..88f807a5 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 @@
@@ -42,7 +42,7 @@ index 5038a967d0a..b3c0e5bc416 100644
  pub fn opts() -> TargetOptions {
      let mut base = super::linux_base::opts();
  
-     base.env = "musl".to_string();
+     base.env = "musl".into();
 -    base.pre_link_objects_fallback = crt_objects::pre_musl_fallback();
 -    base.post_link_objects_fallback = crt_objects::post_musl_fallback();
 -    base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
@@ -53,30 +53,29 @@ index 5038a967d0a..b3c0e5bc416 100644
      base
  }
 diff --git a/config.toml.example b/config.toml.example
-index 61e57eee782..77943129204 100644
+index 6e53d9b4..74980d2c 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -668,15 +668,6 @@ changelog-seen = 2
- # only use static libraries. If unset, the target's default linkage is used.
- #crt-static = <platform-specific> (bool)
+@@ -511,14 +511,6 @@ changelog-seen = 2
+ # supplementary build information, like distro-specific package versions.
+ #description = <none> (string)
  
 -# The root location of the musl installation directory. The library directory
 -# will also need to contain libunwind.a for an unwinding implementation. Note
 -# that this option only makes sense for musl targets that produce statically
 -# linked binaries.
--#musl-root = build.musl-root (path)
+-#
+-# Defaults to /usr on musl hosts. Has no default otherwise.
+-#musl-root = <platform specific> (path)
 -
--# The full path to the musl libdir.
--#musl-libdir = musl-root/lib
--
- # The root location of the `wasm32-wasi` sysroot. Only used for the
- # `wasm32-wasi` target. If you are building wasm32-wasi target, make sure to
- # create a `[target.wasm32-wasi]` section and move this field there.
+ # By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
+ # platforms to ensure that the compiler is usable by default from the build
+ # directory (as it links to a number of dynamic libraries). This may not be
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index e750c2963dd..f6ba3032b0d 100644
+index 7ce44687..4e7507ae 100644
 --- a/src/bootstrap/cc_detect.rs
 +++ b/src/bootstrap/cc_detect.rs
-@@ -98,7 +98,7 @@ pub fn find(build: &mut Build) {
+@@ -97,7 +97,7 @@ pub fn find(build: &mut Build) {
          if let Some(cc) = config.and_then(|c| c.cc.as_ref()) {
              cfg.compiler(cc);
          } else {
@@ -85,7 +84,7 @@ index e750c2963dd..f6ba3032b0d 100644
          }
  
          let compiler = cfg.get_compiler();
-@@ -126,7 +126,7 @@ pub fn find(build: &mut Build) {
+@@ -125,7 +125,7 @@ pub fn find(build: &mut Build) {
              cfg.compiler(cxx);
              true
          } else if build.hosts.contains(&target) || build.build == target {
@@ -130,13 +129,14 @@ index e750c2963dd..f6ba3032b0d 100644
      }
  }
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index e9cc7662e63..4971534ba0e 100644
+index afc333b5..9d67ab56 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -199,36 +199,7 @@ fn copy_self_contained_objects(
+@@ -197,39 +197,7 @@ fn copy_self_contained_objects(
+     let mut target_deps = vec![];
  
-     // Copies the CRT objects.
-     //
+     // Copies the libc and CRT objects.
+-    //
 -    // rustc historically provides a more self-contained installation for musl targets
 -    // not requiring the presence of a native musl toolchain. For example, it can fall back
 -    // to using gcc from a glibc-targeting toolchain for linking.
@@ -146,7 +146,7 @@ index e9cc7662e63..4971534ba0e 100644
 -        let srcdir = builder.musl_libdir(target).unwrap_or_else(|| {
 -            panic!("Target {:?} does not have a \"musl-libdir\" key", target.triple)
 -        });
--        for &obj in &["crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
+-        for &obj in &["libc.a", "crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
 -            copy_and_stamp(
 -                builder,
 -                &libdir_self_contained,
@@ -164,14 +164,16 @@ index e9cc7662e63..4971534ba0e 100644
 -            target_deps.push((target, DependencyType::TargetSelfContained));
 -        }
 -
--        let libunwind_path = copy_llvm_libunwind(builder, target, &libdir_self_contained);
--        target_deps.push((libunwind_path, DependencyType::TargetSelfContained));
+-        if !target.starts_with("s390x") {
+-            let libunwind_path = copy_llvm_libunwind(builder, target, &libdir_self_contained);
+-            target_deps.push((libunwind_path, DependencyType::TargetSelfContained));
+-        }
 -    } else if target.ends_with("-wasi") {
 +    if target.ends_with("-wasi") {
          let srcdir = builder
              .wasi_root(target)
              .unwrap_or_else(|| {
-@@ -312,15 +283,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+@@ -313,15 +281,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
              .arg("--manifest-path")
              .arg(builder.src.join("library/test/Cargo.toml"));
  
@@ -188,7 +190,7 @@ index e9cc7662e63..4971534ba0e 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 e658d958d0a..914b1390b37 100644
+index 9534cc5f..642a5c24 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
 @@ -172,7 +172,6 @@ pub struct Config {
@@ -199,7 +201,7 @@ index e658d958d0a..914b1390b37 100644
      pub prefix: Option<PathBuf>,
      pub sysconfdir: Option<PathBuf>,
      pub datadir: Option<PathBuf>,
-@@ -298,8 +297,6 @@ pub struct Target {
+@@ -299,8 +298,6 @@ pub struct Target {
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
      pub crt_static: Option<bool>,
@@ -208,24 +210,24 @@ index e658d958d0a..914b1390b37 100644
      pub wasi_root: Option<PathBuf>,
      pub qemu_rootfs: Option<PathBuf>,
      pub no_std: bool,
-@@ -493,7 +490,6 @@ struct Rust {
-     default_linker: Option<String>,
-     channel: Option<String>,
-     description: Option<String>,
--    musl_root: Option<String>,
-     rpath: Option<bool>,
-     verbose_tests: Option<bool>,
-     optimize_tests: Option<bool>,
-@@ -536,8 +532,6 @@ struct TomlTarget {
-     sanitizers: Option<bool>,
-     profiler: Option<bool>,
-     crt_static: Option<bool>,
--    musl_root: Option<String>,
--    musl_libdir: Option<String>,
-     wasi_root: Option<String>,
-     qemu_rootfs: Option<String>,
-     no_std: Option<bool>,
-@@ -872,7 +866,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -587,7 +584,6 @@ struct Rust {
+         default_linker: Option<String> = "default-linker",
+         channel: Option<String> = "channel",
+         description: Option<String> = "description",
+-        musl_root: Option<String> = "musl-root",
+         rpath: Option<bool> = "rpath",
+         verbose_tests: Option<bool> = "verbose-tests",
+         optimize_tests: Option<bool> = "optimize-tests",
+@@ -631,8 +627,6 @@ struct TomlTarget {
+         sanitizers: Option<bool> = "sanitizers",
+         profiler: Option<bool> = "profiler",
+         crt_static: Option<bool> = "crt-static",
+-        musl_root: Option<String> = "musl-root",
+-        musl_libdir: Option<String> = "musl-libdir",
+         wasi_root: Option<String> = "wasi-root",
+         qemu_rootfs: Option<String> = "qemu-rootfs",
+         no_std: Option<bool> = "no-std",
+@@ -1013,7 +1007,6 @@ pub fn parse(args: &[String]) -> Config {
              set(&mut config.llvm_tools_enabled, rust.llvm_tools);
              config.rustc_parallel = rust.parallel_compiler.unwrap_or(false);
              config.rustc_default_linker = rust.default_linker;
@@ -233,7 +235,7 @@ index e658d958d0a..914b1390b37 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);
-@@ -918,8 +911,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1059,8 +1052,6 @@ pub fn parse(args: &[String]) -> Config {
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
                  target.crt_static = cfg.crt_static;
@@ -243,7 +245,7 @@ index e658d958d0a..914b1390b37 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 94424cb4548..9ae0cc053e3 100755
+index 87a130a0..bd4c9197 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",
@@ -282,18 +284,10 @@ index 94424cb4548..9ae0cc053e3 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 2d4e1527897..3abe9f4a143 100644
+index 570a6174..f3d5f308 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -277,7 +277,6 @@ pub struct Build {
- struct Crate {
-     name: Interned<String>,
-     deps: HashSet<Interned<String>>,
--    id: String,
-     path: PathBuf,
- }
- 
-@@ -1056,25 +1055,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1125,25 +1125,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
          }
      }
  
@@ -319,29 +313,8 @@ index 2d4e1527897..3abe9f4a143 100644
      /// Returns the sysroot for the wasi target, if defined
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
          self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
-diff --git a/src/bootstrap/metadata.rs b/src/bootstrap/metadata.rs
-index a38391c7b88..65e229697dc 100644
---- a/src/bootstrap/metadata.rs
-+++ b/src/bootstrap/metadata.rs
-@@ -14,7 +14,6 @@ struct Output {
- 
- #[derive(Deserialize)]
- struct Package {
--    id: String,
-     name: String,
-     source: Option<String>,
-     manifest_path: String,
-@@ -50,7 +49,7 @@ pub fn build(build: &mut Build) {
-                 .filter(|dep| dep.source.is_none())
-                 .map(|dep| INTERNER.intern_string(dep.name))
-                 .collect();
--            build.crates.insert(name, Crate { name, id: package.id, deps, path });
-+            build.crates.insert(name, Crate { name, deps, path });
-         }
-     }
- }
 diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index d7db2cef24f..a791177956d 100644
+index 8c2899c1..dda15d76 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
 @@ -11,7 +11,6 @@
@@ -352,7 +325,7 @@ index d7db2cef24f..a791177956d 100644
  use std::path::PathBuf;
  use std::process::Command;
  
-@@ -178,28 +177,6 @@ pub fn check(build: &mut Build) {
+@@ -177,28 +176,6 @@ pub fn check(build: &mut Build) {
              }
          }
  
diff --git a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch b/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
index adaf86f2f451..2cc1f6b900d3 100644
--- a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
+++ b/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
@@ -11,26 +11,26 @@ diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
 index e4396d530..cb2312028 100644
 --- a/src/bootstrap/bin/rustdoc.rs
 +++ b/src/bootstrap/bin/rustdoc.rs
-@@ -20,14 +20,11 @@ fn main() {
+@@ -22,14 +22,11 @@ fn main() {
          Err(_) => 0,
      };
  
--    let mut dylib_path = bootstrap::util::dylib_path();
+-    let mut dylib_path = dylib_path();
 -    dylib_path.insert(0, PathBuf::from(libdir.clone()));
 -
      let mut cmd = Command::new(rustdoc);
      cmd.args(&args)
          .arg("--sysroot")
          .arg(&sysroot)
--        .env(bootstrap::util::dylib_path_var(), env::join_paths(&dylib_path).unwrap());
-+        .env(bootstrap::util::dylib_path_var(), PathBuf::from(libdir.clone()));
+-        .env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
++        .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
-@@ -60,7 +57,7 @@ fn main() {
+@@ -62,7 +59,7 @@ fn main() {
          eprintln!(
              "rustdoc command: {:?}={:?} {:?}",
-             bootstrap::util::dylib_path_var(),
+             dylib_path_var(),
 -            env::join_paths(&dylib_path).unwrap(),
 +            PathBuf::from(libdir.clone()),
              cmd,
diff --git a/srcpkgs/rust/patches/ld-library-path.patch b/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
similarity index 100%
rename from srcpkgs/rust/patches/ld-library-path.patch
rename to srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
diff --git a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch b/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
index a9ca5f6c7bba..8a18e414e209 100644
--- a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
+++ b/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
@@ -12,14 +12,14 @@ diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs
 index 238da24b..ffb05ee7 100644
 --- a/vendor/libc/src/unix/mod.rs
 +++ b/vendor/libc/src/unix/mod.rs
-@@ -299,11 +299,11 @@ cfg_if! {
-         // cargo build, don't pull in anything extra as the libstd dep
-         // already pulls in all libs.
+@@ -329,11 +329,11 @@ cfg_if! {
+         #[link(name = "c", cfg(not(target_feature = "crt-static")))]
+         extern {}
      } else if #[cfg(target_env = "musl")] {
 +        #[link(name = "c")]
 +        extern {}
          #[cfg_attr(feature = "rustc-dep-of-std",
--                   link(name = "c", kind = "static",
+-                   link(name = "c", kind = "static", modifiers = "-bundle",
 +                   link(name = "gcc", kind = "static-nobundle",
                          cfg(target_feature = "crt-static")))]
 -        #[cfg_attr(feature = "rustc-dep-of-std",
diff --git a/srcpkgs/rust/patches/native-sysroot.patch b/srcpkgs/rust/patches/native-sysroot.patch
index a23046220e9c..6826b114b6b7 100644
--- a/srcpkgs/rust/patches/native-sysroot.patch
+++ b/srcpkgs/rust/patches/native-sysroot.patch
@@ -1,17 +1,8 @@
-commit 57ed964d186212739fa436f103bd923a2309f341
-Author: Daniel Kolesa <daniel@octaforge.org>
-Date:   Tue Dec 21 02:46:30 2021 +0100
-
-    allow specifying native sysroot to use for linkage
-    
-    This allows us to get around the linker attempting to use
-    incompatible libs.
-
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index de771280e..5faaf9439 100644
+index e816f9b4..a2668fa9 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1166,6 +1166,10 @@ impl<'a> Builder<'a> {
+@@ -1313,6 +1313,10 @@ pub fn cargo(
              }
          }
  
@@ -23,26 +14,26 @@ index de771280e..5faaf9439 100644
              cargo.env("RUSTC_HOST_LINKER", host_linker);
          }
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 06b7a8c55..d8e9275ad 100644
+index 642a5c24..0dd4f879 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -292,6 +292,7 @@ pub struct Target {
-     pub ar: Option<PathBuf>,
+@@ -294,6 +294,7 @@ pub struct Target {
      pub ranlib: Option<PathBuf>,
+     pub default_linker: Option<PathBuf>,
      pub linker: Option<PathBuf>,
 +    pub sysroot: Option<PathBuf>,
      pub ndk: Option<PathBuf>,
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
-@@ -525,6 +526,7 @@ struct TomlTarget {
-     ar: Option<String>,
-     ranlib: Option<String>,
-     linker: Option<String>,
-+    sysroot: Option<String>,
-     llvm_config: Option<String>,
-     llvm_filecheck: Option<String>,
-     android_ndk: Option<String>,
-@@ -909,6 +911,7 @@ impl Config {
+@@ -621,6 +622,7 @@ struct TomlTarget {
+         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 {
                  target.ar = cfg.ar.map(PathBuf::from);
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
@@ -51,10 +42,10 @@ index 06b7a8c55..d8e9275ad 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 b930f3cd7..06e782520 100644
+index f3d5f308..7f8b9b27 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1056,6 +1056,10 @@ impl Build {
+@@ -1125,6 +1125,10 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
          }
      }
  
diff --git a/srcpkgs/rust/patches/xxx-ppcle.patch b/srcpkgs/rust/patches/xxx-ppcle.patch
index 9473e7ad98f3..c0522f0eaafc 100644
--- a/srcpkgs/rust/patches/xxx-ppcle.patch
+++ b/srcpkgs/rust/patches/xxx-ppcle.patch
@@ -1,53 +1,8 @@
-From b92ce1ed0ac8d95831a43f4395544c17a0816c9b Mon Sep 17 00:00:00 2001
-From: Daniel Kolesa <daniel@octaforge.org>
-Date: Sat, 3 Jul 2021 21:02:03 +0200
-Subject: [PATCH] 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/fastcall-inreg.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/borrowck/borrowck-asm.rs              |  1 +
- src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs      |  1 +
- src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs  |  1 +
- src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs |  1 +
- src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs   |  1 +
- src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs  |  1 +
- src/test/ui/llvm-asm/llvm-asm-out-read-uninit.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/rustc-ap-rustc_target/src/spec/mod.rs      |  2 ++
- .../src/spec/powerpcle_unknown_linux_gnu.rs       | 15 +++++++++++++++
- .../src/spec/powerpcle_unknown_linux_musl.rs      | 15 +++++++++++++++
- vendor/target-lexicon/src/targets.rs              |  7 +++++++
- vendor/tikv-jemallocator/benches/roundtrip.rs     |  3 ++-
- vendor/tikv-jemallocator/src/lib.rs               |  3 ++-
- 37 files changed, 111 insertions(+), 6 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
- create mode 100644 vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
- create mode 100644 vendor/rustc-ap-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 c2e9dba6..8147a3c3 100644
+index 0c1ab67cc..8d4e5f3cb 100644
 --- a/compiler/rustc_middle/src/ty/layout.rs
 +++ b/compiler/rustc_middle/src/ty/layout.rs
-@@ -2753,6 +2753,8 @@ where
+@@ -3057,6 +3057,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;
@@ -56,7 +11,7 @@ index c2e9dba6..8147a3c3 100644
          use SpecAbi::*;
          let rust_abi = matches!(sig.abi, RustIntrinsic | PlatformIntrinsic | Rust | RustCall);
  
-@@ -2850,7 +2852,8 @@ where
+@@ -3165,7 +3167,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
                      || (!win_x64_gnu
                          && !linux_s390x_gnu_like
                          && !linux_sparc64_gnu_like
@@ -67,10 +22,10 @@ index c2e9dba6..8147a3c3 100644
                      arg.mode = PassMode::Ignore;
                  }
 diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
-index 2af46693..986d84e0 100644
+index bd5b712c1..f60be010c 100644
 --- a/compiler/rustc_target/src/spec/mod.rs
 +++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -716,6 +716,8 @@ supported_targets! {
+@@ -824,6 +824,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),
@@ -81,7 +36,7 @@ index 2af46693..986d84e0 100644
      ("powerpc64le-unknown-linux-gnu", powerpc64le_unknown_linux_gnu),
 diff --git a/compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
 new file mode 100644
-index 00000000..780c20a3
+index 000000000..b7148a2fc
 --- /dev/null
 +++ b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
 @@ -0,0 +1,15 @@
@@ -89,20 +44,20 @@ index 00000000..780c20a3
 +
 +pub fn target() -> Target {
 +    let mut base = super::linux_gnu_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
++    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".into());
 +    base.max_atomic_width = Some(32);
 +
 +    Target {
-+        llvm_target: "powerpcle-unknown-linux-gnu".to_string(),
++        llvm_target: "powerpcle-unknown-linux-gnu".into(),
 +        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
++        data_layout: "e-m:e-p:32:32-i64:64-n32".into(),
++        arch: "powerpc".into(),
++        options: TargetOptions { mcount: "_mcount".into(), ..base },
 +    }
 +}
 diff --git a/compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
 new file mode 100644
-index 00000000..9b848ccf
+index 000000000..a826b6e47
 --- /dev/null
 +++ b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
 @@ -0,0 +1,15 @@
@@ -110,24 +65,24 @@ index 00000000..9b848ccf
 +
 +pub fn target() -> Target {
 +    let mut base = super::linux_musl_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
++    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".into());
 +    base.max_atomic_width = Some(32);
 +
 +    Target {
-+        llvm_target: "powerpcle-unknown-linux-musl".to_string(),
++        llvm_target: "powerpcle-unknown-linux-musl".into(),
 +        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
++        data_layout: "e-m:e-p:32:32-i64:64-n32".into(),
++        arch: "powerpc".into(),
++        options: TargetOptions { mcount: "_mcount".into(), ..base },
 +    }
 +}
 diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 4111420e..cd69a8ec 100644
+index 71b8f3c45..1505c12e4 100644
 --- a/src/bootstrap/bootstrap.py
 +++ b/src/bootstrap/bootstrap.py
-@@ -289,9 +289,11 @@ def default_build_triple(verbose):
-         'i686': 'i686',
+@@ -320,9 +320,11 @@ def default_build_triple(verbose):
          'i786': 'i686',
+         'm68k': 'm68k',
          'powerpc': 'powerpc',
 +        'powerpcle': 'powerpcle',
          'powerpc64': 'powerpc64',
@@ -136,9 +91,9 @@ index 4111420e..cd69a8ec 100644
 +        'ppcle': 'powerpcle',
          'ppc64': 'powerpc64',
          'ppc64le': 'powerpc64le',
-         's390x': 's390x',
+         'riscv64': 'riscv64gc',
 diff --git a/src/test/codegen/abi-main-signature-16bit-c-int.rs b/src/test/codegen/abi-main-signature-16bit-c-int.rs
-index 4ed491df..82ec7755 100644
+index 4ed491dfb..82ec7755d 100644
 --- a/src/test/codegen/abi-main-signature-16bit-c-int.rs
 +++ b/src/test/codegen/abi-main-signature-16bit-c-int.rs
 @@ -9,6 +9,7 @@
@@ -149,20 +104,8 @@ index 4ed491df..82ec7755 100644
  // ignore-powerpc64
  // ignore-riscv64
  // ignore-s390x
-diff --git a/src/test/codegen/fastcall-inreg.rs b/src/test/codegen/fastcall-inreg.rs
-index adbeae45..0fd0a9e6 100644
---- a/src/test/codegen/fastcall-inreg.rs
-+++ b/src/test/codegen/fastcall-inreg.rs
-@@ -16,6 +16,7 @@
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-r600
- // ignore-riscv64
- // ignore-amdgcn
 diff --git a/src/test/codegen/global_asm.rs b/src/test/codegen/global_asm.rs
-index 57d8aeb1..e0b1b692 100644
+index fab84868f..104d93d01 100644
 --- a/src/test/codegen/global_asm.rs
 +++ b/src/test/codegen/global_asm.rs
 @@ -12,6 +12,7 @@
@@ -174,7 +117,7 @@ index 57d8aeb1..e0b1b692 100644
  // ignore-amdgcn
  // ignore-sparc
 diff --git a/src/test/codegen/global_asm_include.rs b/src/test/codegen/global_asm_include.rs
-index 44402619..62ecfa6d 100644
+index 02ee91645..13f303332 100644
 --- a/src/test/codegen/global_asm_include.rs
 +++ b/src/test/codegen/global_asm_include.rs
 @@ -12,6 +12,7 @@
@@ -186,7 +129,7 @@ index 44402619..62ecfa6d 100644
  // ignore-amdgcn
  // ignore-sparc
 diff --git a/src/test/codegen/global_asm_x2.rs b/src/test/codegen/global_asm_x2.rs
-index d632d0dd..29f97775 100644
+index bdcf0ea84..1e2ff8b8d 100644
 --- a/src/test/codegen/global_asm_x2.rs
 +++ b/src/test/codegen/global_asm_x2.rs
 @@ -12,6 +12,7 @@
@@ -198,10 +141,10 @@ index d632d0dd..29f97775 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 3017adb4..632565bb 100644
+index 4ad3642c0..fca31c0c6 100644
 --- a/src/test/codegen/repr-transparent-aggregates-1.rs
 +++ b/src/test/codegen/repr-transparent-aggregates-1.rs
-@@ -7,6 +7,7 @@
+@@ -6,6 +6,7 @@
  // ignore-mips
  // ignore-mips64
  // ignore-powerpc
@@ -210,10 +153,10 @@ index 3017adb4..632565bb 100644
  // ignore-riscv64 see codegen/riscv-abi
  // ignore-windows
 diff --git a/src/test/codegen/repr-transparent-aggregates-2.rs b/src/test/codegen/repr-transparent-aggregates-2.rs
-index 429d760b..57e75f95 100644
+index b68e8e9eb..97c509b1b 100644
 --- a/src/test/codegen/repr-transparent-aggregates-2.rs
 +++ b/src/test/codegen/repr-transparent-aggregates-2.rs
-@@ -6,6 +6,7 @@
+@@ -5,6 +5,7 @@
  // ignore-emscripten
  // ignore-mips64
  // ignore-powerpc
@@ -222,7 +165,7 @@ index 429d760b..57e75f95 100644
  // ignore-powerpc64le
  // ignore-riscv64 see codegen/riscv-abi
 diff --git a/src/test/codegen/stack-probes.rs b/src/test/codegen/stack-probes.rs
-index 9bd351df..29073eb5 100644
+index 9bd351df3..29073eb56 100644
 --- a/src/test/codegen/stack-probes.rs
 +++ b/src/test/codegen/stack-probes.rs
 @@ -3,6 +3,7 @@
@@ -234,7 +177,7 @@ index 9bd351df..29073eb5 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/test/run-make-fulldeps/atomic-lock-free/Makefile b/src/test/run-make-fulldeps/atomic-lock-free/Makefile
-index 9e8b4fab..402d37a4 100644
+index 9e8b4fabf..402d37a45 100644
 --- a/src/test/run-make-fulldeps/atomic-lock-free/Makefile
 +++ b/src/test/run-make-fulldeps/atomic-lock-free/Makefile
 @@ -36,6 +36,8 @@ ifeq ($(filter powerpc,$(LLVM_COMPONENTS)),powerpc)
@@ -247,7 +190,7 @@ index 9e8b4fab..402d37a4 100644
  	nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
  	$(RUSTC) --target=powerpc64le-unknown-linux-gnu atomic_lock_free.rs
 diff --git a/src/test/ui/abi/stack-probes-lto.rs b/src/test/ui/abi/stack-probes-lto.rs
-index 90df1f3f..8c6dda8b 100644
+index 90df1f3f5..8c6dda8b8 100644
 --- a/src/test/ui/abi/stack-probes-lto.rs
 +++ b/src/test/ui/abi/stack-probes-lto.rs
 @@ -4,6 +4,7 @@
@@ -259,7 +202,7 @@ index 90df1f3f..8c6dda8b 100644
  // ignore-sparc
  // ignore-sparc64
 diff --git a/src/test/ui/abi/stack-probes.rs b/src/test/ui/abi/stack-probes.rs
-index e998dd0f..9472e538 100644
+index e998dd0f8..9472e5387 100644
 --- a/src/test/ui/abi/stack-probes.rs
 +++ b/src/test/ui/abi/stack-probes.rs
 @@ -4,6 +4,7 @@
@@ -270,92 +213,8 @@ index e998dd0f..9472e538 100644
  // ignore-s390x
  // ignore-sparc
  // ignore-sparc64
-diff --git a/src/test/ui/borrowck/borrowck-asm.rs b/src/test/ui/borrowck/borrowck-asm.rs
-index a3f64524..faf9adb4 100644
---- a/src/test/ui/borrowck/borrowck-asm.rs
-+++ b/src/test/ui/borrowck/borrowck-asm.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs b/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs
-index 2868d3d3..5c6e325b 100644
---- a/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs
-@@ -4,6 +4,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs b/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs
-index e3bc7d29..49f53f67 100644
---- a/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs b/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs
-index daae0c81..fd505c86 100644
---- a/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs
-@@ -5,6 +5,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs b/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs
-index 9c62532c..baa1c1ba 100644
---- a/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs b/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs
-index 72edb339..2fec991d 100644
---- a/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs b/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs
-index acf4cf9f..dfad0775 100644
---- a/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
 diff --git a/src/test/ui/target-feature/gate.rs b/src/test/ui/target-feature/gate.rs
-index 164830fe..531a4b45 100644
+index 2382c98f8..e6fe855d7 100644
 --- a/src/test/ui/target-feature/gate.rs
 +++ b/src/test/ui/target-feature/gate.rs
 @@ -5,6 +5,7 @@
@@ -367,7 +226,7 @@ index 164830fe..531a4b45 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/test/ui/target-feature/invalid-attribute.rs b/src/test/ui/target-feature/invalid-attribute.rs
-index 5ea78215..47e7887a 100644
+index ad1b6e96b..122d59a57 100644
 --- a/src/test/ui/target-feature/invalid-attribute.rs
 +++ b/src/test/ui/target-feature/invalid-attribute.rs
 @@ -5,6 +5,7 @@
@@ -379,10 +238,10 @@ index 5ea78215..47e7887a 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
-index 7dbd7094..08c9de3c 100644
+index bed509d77..8bc817897 100644
 --- a/src/tools/compiletest/src/util.rs
 +++ b/src/tools/compiletest/src/util.rs
-@@ -67,6 +67,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
+@@ -70,6 +70,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
      ("msp430", "msp430"),
      ("nvptx64", "nvptx64"),
      ("powerpc", "powerpc"),
@@ -391,10 +250,10 @@ index 7dbd7094..08c9de3c 100644
      ("powerpc64le", "powerpc64"),
      ("riscv64gc", "riscv64"),
 diff --git a/vendor/cc/src/lib.rs b/vendor/cc/src/lib.rs
-index 5051b296..286c2fb7 100644
+index e3a2b98b0..0236729fd 100644
 --- a/vendor/cc/src/lib.rs
 +++ b/vendor/cc/src/lib.rs
-@@ -2409,6 +2409,7 @@ impl Build {
+@@ -2594,6 +2594,7 @@ impl Build {
              "powerpc-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
              "powerpc-unknown-linux-gnuspe" => Some("powerpc-linux-gnuspe"),
              "powerpc-unknown-netbsd" => Some("powerpc--netbsd"),
@@ -402,66 +261,11 @@ index 5051b296..286c2fb7 100644
              "powerpc64-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
              "powerpc64le-unknown-linux-gnu" => Some("powerpc64le-linux-gnu"),
              "riscv32i-unknown-none-elf" => self.find_working_gnu_prefix(&[
-diff --git a/vendor/rustc-ap-rustc_target/src/spec/mod.rs b/vendor/rustc-ap-rustc_target/src/spec/mod.rs
-index 2af46693..986d84e0 100644
---- a/vendor/rustc-ap-rustc_target/src/spec/mod.rs
-+++ b/vendor/rustc-ap-rustc_target/src/spec/mod.rs
-@@ -716,6 +716,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),
-+    ("powerpcle-unknown-linux-gnu", powerpcle_unknown_linux_gnu),
-+    ("powerpcle-unknown-linux-musl", powerpcle_unknown_linux_musl),
-     ("powerpc64-unknown-linux-gnu", powerpc64_unknown_linux_gnu),
-     ("powerpc64-unknown-linux-musl", powerpc64_unknown_linux_musl),
-     ("powerpc64le-unknown-linux-gnu", powerpc64le_unknown_linux_gnu),
-diff --git a/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
-new file mode 100644
-index 00000000..780c20a3
---- /dev/null
-+++ b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
-@@ -0,0 +1,15 @@
-+use crate::spec::{LinkerFlavor, Target, TargetOptions};
-+
-+pub fn target() -> Target {
-+    let mut base = super::linux_gnu_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
-+    base.max_atomic_width = Some(32);
-+
-+    Target {
-+        llvm_target: "powerpcle-unknown-linux-gnu".to_string(),
-+        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
-+    }
-+}
-diff --git a/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_musl.rs b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
-new file mode 100644
-index 00000000..9b848ccf
---- /dev/null
-+++ b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
-@@ -0,0 +1,15 @@
-+use crate::spec::{LinkerFlavor, Target, TargetOptions};
-+
-+pub fn target() -> Target {
-+    let mut base = super::linux_musl_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
-+    base.max_atomic_width = Some(32);
-+
-+    Target {
-+        llvm_target: "powerpcle-unknown-linux-musl".to_string(),
-+        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
-+    }
-+}
 diff --git a/vendor/target-lexicon/src/targets.rs b/vendor/target-lexicon/src/targets.rs
-index 87c237aa..dc694010 100644
+index 22cc95cc3..46167e34e 100644
 --- a/vendor/target-lexicon/src/targets.rs
 +++ b/vendor/target-lexicon/src/targets.rs
-@@ -26,6 +26,7 @@ pub enum Architecture {
+@@ -29,6 +29,7 @@ pub enum Architecture {
      Msp430,
      Nvptx64,
      Powerpc,
@@ -469,7 +273,7 @@ index 87c237aa..dc694010 100644
      Powerpc64,
      Powerpc64le,
      Riscv32(Riscv32Architecture),
-@@ -517,6 +518,7 @@ impl Architecture {
+@@ -533,6 +534,7 @@ impl Architecture {
              | Mips64(Mips64Architecture::Mipsisa64r6el)
              | Msp430
              | Nvptx64
@@ -477,15 +281,15 @@ index 87c237aa..dc694010 100644
              | Powerpc64le
              | Riscv32(_)
              | Riscv64(_)
-@@ -553,6 +555,7 @@ impl Architecture {
-             | Sparc
-             | Wasm32
+@@ -574,6 +576,7 @@ impl Architecture {
+             | M68k
              | Mips32(_)
+             | Powerpc
 +            | Powerpcle
-             | Powerpc => Ok(PointerWidth::U32),
+             | XTensa => Ok(PointerWidth::U32),
              AmdGcn
-             | Powerpc64le
-@@ -737,6 +740,7 @@ impl fmt::Display for Architecture {
+             | Bpfeb
+@@ -763,6 +766,7 @@ impl fmt::Display for Architecture {
              Msp430 => f.write_str("msp430"),
              Nvptx64 => f.write_str("nvptx64"),
              Powerpc => f.write_str("powerpc"),
@@ -493,7 +297,7 @@ index 87c237aa..dc694010 100644
              Powerpc64 => f.write_str("powerpc64"),
              Powerpc64le => f.write_str("powerpc64le"),
              Riscv32(riscv32) => riscv32.fmt(f),
-@@ -913,6 +917,7 @@ impl FromStr for Architecture {
+@@ -943,6 +947,7 @@ impl FromStr for Architecture {
              "msp430" => Msp430,
              "nvptx64" => Nvptx64,
              "powerpc" => Powerpc,
@@ -501,8 +305,8 @@ index 87c237aa..dc694010 100644
              "powerpc64" => Powerpc64,
              "powerpc64le" => Powerpc64le,
              "s390x" => S390x,
-@@ -1380,6 +1385,8 @@ mod tests {
-             "powerpc-unknown-netbsd",
+@@ -1445,6 +1450,8 @@ mod tests {
+             "powerpc-unknown-openbsd",
              "powerpc-wrs-vxworks",
              "powerpc-wrs-vxworks-spe",
 +            "powerpcle-unknown-linux-gnu",
@@ -511,7 +315,7 @@ index 87c237aa..dc694010 100644
              "powerpc64-unknown-linux-gnu",
              "powerpc64-unknown-linux-musl",
 diff --git a/vendor/tikv-jemallocator/benches/roundtrip.rs b/vendor/tikv-jemallocator/benches/roundtrip.rs
-index 40b8005f..bc4df023 100644
+index 767abe8d4..704bf955a 100644
 --- a/vendor/tikv-jemallocator/benches/roundtrip.rs
 +++ b/vendor/tikv-jemallocator/benches/roundtrip.rs
 @@ -22,7 +22,8 @@ static A: Jemalloc = Jemalloc;
@@ -525,19 +329,16 @@ index 40b8005f..bc4df023 100644
  const MIN_ALIGN: usize = 8;
  #[cfg(all(any(
 diff --git a/vendor/tikv-jemallocator/src/lib.rs b/vendor/tikv-jemallocator/src/lib.rs
-index 9a489b62..1ed12b26 100644
+index 4a9397331..4cf47c05d 100644
 --- a/vendor/tikv-jemallocator/src/lib.rs
 +++ b/vendor/tikv-jemallocator/src/lib.rs
-@@ -44,7 +44,8 @@ use libc::{c_int, c_void};
+@@ -46,7 +46,8 @@ use libc::{c_int, c_void};
      target_arch = "arm",
      target_arch = "mips",
      target_arch = "mipsel",
 -    target_arch = "powerpc"
 +    target_arch = "powerpc",
-+    target_arch = "powerpcle"
++    target_arch = "powerpcle",
  )))]
  const ALIGNOF_MAX_ALIGN_T: usize = 8;
  #[cfg(all(any(
--- 
-2.32.0
-
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index 560a629f3da2..53ef4333cc52 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -8,7 +8,7 @@
 # uploaded to https://alpha.de.repo.voidlinux.org/distfiles/
 #
 pkgname=rust
-version=1.57.0
+version=1.61.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=3546f9c3b91b1f8b8efd26c94d6b50312c08210397b4072ed2748e2bd4445c1a
+checksum=ad0b4351675aa9abdf4c7e066613bd274c4391c5506db152983426376101daed
 lib32disabled=yes
 make_check=no # CBA for now
 
@@ -61,7 +61,6 @@ post_patch() {
 	_clear_vendor_checksums libc
 	_clear_vendor_checksums typenum
 	_clear_vendor_checksums cc
-	_clear_vendor_checksums rustc-ap-rustc_target
 	_clear_vendor_checksums target-lexicon
 	_clear_vendor_checksums tikv-jemallocator
 }
@@ -216,14 +215,8 @@ do_install() {
 
 	cd ${DESTDIR}/usr/lib
 	# symlinks instead of copies
-	mv *.so rustlib/${RUST_TARGET}/lib
+	rm *.so
 	ln -sf rustlib/${RUST_TARGET}/lib/*.so .
-
-	# executable used for split dwarf, currently unstable on linux.
-	# it's copied directly from the local llvm package, but
-	# FIXME: cross builds are installing the version from the build machine,
-	# it shouldn't be necessary to remove it
-	rm rustlib/${RUST_TARGET}/bin/rust-llvm-dwp
 }
 
 rust-doc_package() {

From 7ef8ec2e8cdd2041e7b6572370505897499939fd Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:14:23 +0200
Subject: [PATCH 4/4] cargo: update to 1.61.0

---
 srcpkgs/cargo/template | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index c512e7005833..e3c30f625acd 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -1,8 +1,8 @@
 # Template file for 'cargo'
 pkgname=cargo
-version=0.58.0
+version=1.61.0
 revision=1
-wrksrc="cargo-${version}"
+wrksrc="cargo-rust-${version}"
 build_helper=rust
 hostmakedepends="cargo-bootstrap rust python3 curl cmake pkg-config zlib-devel"
 makedepends="rust libcurl-devel openssl-devel"
@@ -11,10 +11,10 @@ short_desc="Rust package manager"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://crates.io/"
-distfiles="https://github.com/rust-lang/cargo/archive/${version}.tar.gz
- https://github.com/crossbeam-rs/crossbeam/archive/refs/tags/crossbeam-utils-0.8.5.tar.gz"
-checksum="e1d6f55414a29906d24b13c687996b5220e08ccce9c682e4c02851138fc7093f
- 57db07eb38b0aaf7951c79b4639819cb84bc4269507091afea7267e10a54e079"
+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
+ 52c451910203cd9002cc4b85cff95f45c6ba245392801e80d7898ca5c3c3ab29"
 replaces="cargo-tree>=0"
 
 build_options="static bindist"
@@ -28,7 +28,7 @@ if [ -z "$_build_static" ]; then
 	makedepends+=" libgit2-devel"
 fi
 
-post_extract() {
+pre_patch() {
 	mv ../crossbeam-* crossbeam-utils
 }
 

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

* Re: Update Rust toolchain to 1.61.0
  2022-05-21 21:09 [PR PATCH] Update Rust toolchain to 1.61.0 tranzystorek-io
@ 2022-05-21 21:14 ` tranzystorek-io
  2022-05-21 23:18 ` [PR PATCH] [Updated] " tranzystorek-io
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tranzystorek-io @ 2022-05-21 21:14 UTC (permalink / raw)
  To: ml

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

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/37232#issuecomment-1133769262

Comment:
@q66 Could I ask for the following binaries:

- rust-bootstrap for ppc64le-musl, ppc64
- cargo-bootstrap for ppc64le-musl, ppc64, ppc

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

* Re: [PR PATCH] [Updated] Update Rust toolchain to 1.61.0
  2022-05-21 21:09 [PR PATCH] Update Rust toolchain to 1.61.0 tranzystorek-io
  2022-05-21 21:14 ` tranzystorek-io
@ 2022-05-21 23:18 ` tranzystorek-io
  2022-05-22  8:13 ` tranzystorek-io
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tranzystorek-io @ 2022-05-21 23:18 UTC (permalink / raw)
  To: ml

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

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

https://github.com/tranzystorek-io/void-packages rust-toolchain
https://github.com/void-linux/void-packages/pull/37232

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

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-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)


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

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

From 8a812071f55f1937607aefc3f4f00ef7c6687ff6 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:03:26 +0200
Subject: [PATCH 1/4] rust-bootstrap: update to 1.61.0

---
 srcpkgs/rust-bootstrap/template | 35 +++++++++++++++++----------------
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/srcpkgs/rust-bootstrap/template b/srcpkgs/rust-bootstrap/template
index bbedb66430b6..0af9b2a58604 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.57.0
+version=1.61.0
 revision=1
 create_wrksrc=yes
 short_desc="Rust programming language bootstrap toolchain"
@@ -17,7 +17,7 @@ fi
 
 _bootstrap_url="https://static.rust-lang.org/dist"
 
-case "$XBPS_MACHINE" in
+case "$XBPS_TARGET_MACHINE" in
 	x86_64*|i686|ppc64le|ppc) ;;
 	*) _bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles";;
 esac
@@ -29,40 +29,40 @@ distfiles="
 case "$XBPS_TARGET_MACHINE" in
 	i686)
 		checksum="
-		 9bade3fcd246b0ad6859fcf5d0a80d3eb833e5410efa3a5552c241865562461e
-		 586e7fd521a058cbf4778abb67d7d078dd4820d356351d0b6a719e21d00966db"
+		 8af0ec3eb470e7e28439fedf9ebdadf90df8c58da544cc643033e6fc0ccf0bea
+		 ab223fcec35183bc0fe630403537cd7dae55c403103df29b25077db4882cb88e"
 		;;
 	x86_64)
 		checksum="
-		 c42f40c5279a3a9d539cae93dbcab9d333777ad9a60a5b9f1086b874ef63db86
-		 ccdc72d06c90841b7227ec3630337881eeda3da5fbe87328d2e9d705f6f8016c"
+		 21c4613f389ed130fbaaf88f1e984319f72b5fc10734569a5ba19e22ebb03abd
+		 270b07aa5f2de52255a117e1e587138d77375ce0d09a1d7fead085f29b3977e9"
 		;;
 	x86_64-musl)
 		checksum="
-		 5b04e0e0bbf140f7c49baa6280114c28f59f6de50481bdd45074eebf629c174c
-		 818213a6444503ed6adf0231d3c71de990d4c26926c62e8c602bb7e2d636fb94"
+		 89cb72cbc493cb5cd8e43830009b4a1a5bfd472246ae184157868c9b0607bf6c
+		 1f4f2e4c5dd0f9b0dac7c8888f4a49ef16a6fe8992f39895823d2a442f0fe408"
 		;;
 	ppc64le)
 		checksum="
-		 f43cb99109c3438c77c7079cdce4673df3320e310158e0b4d949c1babc4300fc
-		 fc07eb3e9f3d227428cc5b53ca868e3de375bc198ce4dce7b87a9246e6fec81a"
+		 dc54893d747e4f3330515caa75e404f78c6c5475a1216d1428f5e7ce1c2e9602
+		 36c0ccff14c80419507561db050f9533f0abd43fc50f3ddb859c10df74b1c351"
 		;;
 	ppc64le-musl)
 		checksum="
-		 6b48e521ba8a070a7b992595e82c5a164cc01c93bbd9a7b3d4db362f4b060df8
-		 d7876e817fc95df2e81858fc9ddb95b10fb83b413277ea6dbdfa9a80fa0d990e"
+		 badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb
+		 badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
 	ppc64)
 		checksum="
-		 2ea5b66d2cd8b9c251590fd5bd3e23cedec658b61f541e2824ce3fdcda263982
-		 e9c1394771b1b24241d8938ad75c4a6ed8bfa043522c74767b3528f2289095c0"
+		 badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb
+		 badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
 	ppc)
 		checksum="
-		 a1d7611b2d39224ba9a915009ae2a6639def42767370f50effd57770b3eb2150
-		 bc117ce5f0c81d2e14ea2d1832c0e908b1153caf49f295a9d28af2128f5fae44"
+		 f28a8c2986fce5015c67823e39ad4b53e2db06603b6ea4a1217ac961cbbfb073
+		 7d2f7f900c8c05616fba8e99ab041d847af3653c259b99445edd788acddf878c"
 		;;
-	*) broken="rust bootstrap binaries unavailable for ${XBPS_MACHINE}";;
+	*) broken="rust bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac
 
 do_install() {
@@ -76,5 +76,6 @@ do_install() {
 	vlicense rustc-${version}-${RUST_TARGET}/LICENSE-APACHE
 	vlicense rustc-${version}-${RUST_TARGET}/LICENSE-MIT
 
+	rm -rf ${DESTDIR}/usr/share/doc/rust
 	rm -f ${DESTDIR}/usr/lib/rustlib/${RUST_TARGET}/bin/rust-ll*
 }

From d4f9f7f92e2f9d00853dc1d12bd4433e0e809b47 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:12:56 +0200
Subject: [PATCH 2/4] cargo-bootstrap: update to 1.61.0

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

diff --git a/srcpkgs/cargo-bootstrap/template b/srcpkgs/cargo-bootstrap/template
index e75f8763b5b8..a2c365cbe00d 100644
--- a/srcpkgs/cargo-bootstrap/template
+++ b/srcpkgs/cargo-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo-bootstrap'
 pkgname=cargo-bootstrap
-version=0.58.0
+version=1.61.0
 revision=1
 short_desc="Bootstrap binaries of Rust package manager"
 maintainer="q66 <daniel@octaforge.org>"
@@ -11,45 +11,41 @@ lib32disabled=yes
 nostrip=yes
 
 _bootstrap_url="https://static.rust-lang.org/dist"
-_bootver=1.57.0
 
 # we don't use upstream cargo binaries for ppc32, as they are busted (probably
 # a dependency is wrong, which results in failed signature verification when
 # updating the crates.io index)
 case "$XBPS_TARGET_MACHINE" in
 	x86_64*|i686|ppc64le) ;;
-	*)
-		_bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles"
-		_bootver=${version}
-		;;
+	*) _bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles" ;;
 esac
 
-wrksrc="cargo-${_bootver}-${RUST_TARGET}"
-distfiles="${_bootstrap_url}/cargo-${_bootver}-${RUST_TARGET}.tar.xz"
+wrksrc="cargo-${version}-${RUST_TARGET}"
+distfiles="${_bootstrap_url}/cargo-${version}-${RUST_TARGET}.tar.xz"
 
 case "$XBPS_TARGET_MACHINE" in
 	i686)
-		checksum="9898a1fae2647f930fa14b9c160a1d22e67ccc70ac0d2d8f79ef1ffcf8d89af7"
+		checksum="fe258b85ef0644ff08c2095e329399dd4de0e1b2e51f4f4e90cb956d40dc61de"
 		;;
 	x86_64)
-		checksum="ed2013713ae742895af5df8d91c5430ba9ba3c781e3bc7f3471b220cc06d565d"
+		checksum="9461727d754f865ef2a87479d40bbe4c5176f80963b7c50b7797bc8940d7a0a0"
 		;;
 	x86_64-musl)
-		checksum="0d8564d0348843d6c08d98990d9eac50b7b7ab790f89d514b4f45079e786d932"
+		checksum="db4b4423c2843b6e27737664cf8085afcba670374110ca24b9c8d341045e748c"
 		;;
 	ppc64le)
-		checksum="599cf1b5a8cdbf76d591621bc9222aefa60e2f5fd378ae71c4dcf4514c47122e"
+		checksum="09817011ff1ef4b7006387c7cabb6a059731792a9372533dec7d87e7f014444b"
 		;;
 	ppc64le-musl)
-		checksum="99ae7661c62617ac42adacb50cce9ae8d019bcf85e987b98fbc27240bceb1dd9"
+		checksum="badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
 	ppc64)
-		checksum="c64b9cce7a3ceaf5c310fad70be33077f1e6dea1384767fcf744732c0daa7473"
+		checksum="badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
 	ppc)
-		checksum="e67c2a7d16b3c732a1dcb663d031daf6eaca4b74d1d15196086c53c0c3a5b0a2"
+		checksum="badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
-	*) broken="cargo bootstrap binaries unavailable for ${XBPS_MACHINE}";;
+	*) broken="cargo bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac
 
 do_install() {

From f9662afb63463f6e9938d1ca99c9426a0fc01e9f Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:09:02 +0200
Subject: [PATCH 3/4] rust: update to 1.61.0

---
 .../rust/patches/0001-musl-void-setup.patch   | 135 +++-----
 ...007-fix-rustdoc-when-cross-compiling.patch |  12 +-
 ... 0010-do-not-export-LD_LIBRARY_PATH.patch} |   0
 ...kage-of-musl-libc-for-the-libc-crate.patch |   8 +-
 srcpkgs/rust/patches/native-sysroot.patch     |  41 +--
 srcpkgs/rust/patches/xxx-ppcle.patch          | 309 ++++--------------
 srcpkgs/rust/template                         |  13 +-
 7 files changed, 138 insertions(+), 380 deletions(-)
 rename srcpkgs/rust/patches/{ld-library-path.patch => 0010-do-not-export-LD_LIBRARY_PATH.patch} (100%)

diff --git a/srcpkgs/rust/patches/0001-musl-void-setup.patch b/srcpkgs/rust/patches/0001-musl-void-setup.patch
index 427581c48f54..c13cb1730986 100644
--- a/srcpkgs/rust/patches/0001-musl-void-setup.patch
+++ b/srcpkgs/rust/patches/0001-musl-void-setup.patch
@@ -1,8 +1,8 @@
 diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
-index 2fc9ab29f92..27673615968 100644
+index 51f392a6..62560658 100644
 --- a/compiler/rustc_target/src/spec/crt_objects.rs
 +++ b/compiler/rustc_target/src/spec/crt_objects.rs
-@@ -62,28 +62,6 @@ pub(super) fn all(obj: &str) -> CrtObjects {
+@@ -63,28 +63,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects {
      ])
  }
  
@@ -32,7 +32,7 @@ index 2fc9ab29f92..27673615968 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 5038a967d0a..b3c0e5bc416 100644
+index 207a87ab..88f807a5 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 @@
@@ -42,7 +42,7 @@ index 5038a967d0a..b3c0e5bc416 100644
  pub fn opts() -> TargetOptions {
      let mut base = super::linux_base::opts();
  
-     base.env = "musl".to_string();
+     base.env = "musl".into();
 -    base.pre_link_objects_fallback = crt_objects::pre_musl_fallback();
 -    base.post_link_objects_fallback = crt_objects::post_musl_fallback();
 -    base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
@@ -53,30 +53,29 @@ index 5038a967d0a..b3c0e5bc416 100644
      base
  }
 diff --git a/config.toml.example b/config.toml.example
-index 61e57eee782..77943129204 100644
+index 6e53d9b4..74980d2c 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -668,15 +668,6 @@ changelog-seen = 2
- # only use static libraries. If unset, the target's default linkage is used.
- #crt-static = <platform-specific> (bool)
+@@ -511,14 +511,6 @@ changelog-seen = 2
+ # supplementary build information, like distro-specific package versions.
+ #description = <none> (string)
  
 -# The root location of the musl installation directory. The library directory
 -# will also need to contain libunwind.a for an unwinding implementation. Note
 -# that this option only makes sense for musl targets that produce statically
 -# linked binaries.
--#musl-root = build.musl-root (path)
+-#
+-# Defaults to /usr on musl hosts. Has no default otherwise.
+-#musl-root = <platform specific> (path)
 -
--# The full path to the musl libdir.
--#musl-libdir = musl-root/lib
--
- # The root location of the `wasm32-wasi` sysroot. Only used for the
- # `wasm32-wasi` target. If you are building wasm32-wasi target, make sure to
- # create a `[target.wasm32-wasi]` section and move this field there.
+ # By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
+ # platforms to ensure that the compiler is usable by default from the build
+ # directory (as it links to a number of dynamic libraries). This may not be
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index e750c2963dd..f6ba3032b0d 100644
+index 7ce44687..4e7507ae 100644
 --- a/src/bootstrap/cc_detect.rs
 +++ b/src/bootstrap/cc_detect.rs
-@@ -98,7 +98,7 @@ pub fn find(build: &mut Build) {
+@@ -97,7 +97,7 @@ pub fn find(build: &mut Build) {
          if let Some(cc) = config.and_then(|c| c.cc.as_ref()) {
              cfg.compiler(cc);
          } else {
@@ -85,7 +84,7 @@ index e750c2963dd..f6ba3032b0d 100644
          }
  
          let compiler = cfg.get_compiler();
-@@ -126,7 +126,7 @@ pub fn find(build: &mut Build) {
+@@ -125,7 +125,7 @@ pub fn find(build: &mut Build) {
              cfg.compiler(cxx);
              true
          } else if build.hosts.contains(&target) || build.build == target {
@@ -130,13 +129,14 @@ index e750c2963dd..f6ba3032b0d 100644
      }
  }
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index e9cc7662e63..4971534ba0e 100644
+index afc333b5..9d67ab56 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -199,36 +199,7 @@ fn copy_self_contained_objects(
+@@ -197,39 +197,7 @@ fn copy_self_contained_objects(
+     let mut target_deps = vec![];
  
-     // Copies the CRT objects.
-     //
+     // Copies the libc and CRT objects.
+-    //
 -    // rustc historically provides a more self-contained installation for musl targets
 -    // not requiring the presence of a native musl toolchain. For example, it can fall back
 -    // to using gcc from a glibc-targeting toolchain for linking.
@@ -146,7 +146,7 @@ index e9cc7662e63..4971534ba0e 100644
 -        let srcdir = builder.musl_libdir(target).unwrap_or_else(|| {
 -            panic!("Target {:?} does not have a \"musl-libdir\" key", target.triple)
 -        });
--        for &obj in &["crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
+-        for &obj in &["libc.a", "crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
 -            copy_and_stamp(
 -                builder,
 -                &libdir_self_contained,
@@ -164,14 +164,16 @@ index e9cc7662e63..4971534ba0e 100644
 -            target_deps.push((target, DependencyType::TargetSelfContained));
 -        }
 -
--        let libunwind_path = copy_llvm_libunwind(builder, target, &libdir_self_contained);
--        target_deps.push((libunwind_path, DependencyType::TargetSelfContained));
+-        if !target.starts_with("s390x") {
+-            let libunwind_path = copy_llvm_libunwind(builder, target, &libdir_self_contained);
+-            target_deps.push((libunwind_path, DependencyType::TargetSelfContained));
+-        }
 -    } else if target.ends_with("-wasi") {
 +    if target.ends_with("-wasi") {
          let srcdir = builder
              .wasi_root(target)
              .unwrap_or_else(|| {
-@@ -312,15 +283,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+@@ -313,15 +281,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
              .arg("--manifest-path")
              .arg(builder.src.join("library/test/Cargo.toml"));
  
@@ -188,7 +190,7 @@ index e9cc7662e63..4971534ba0e 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 e658d958d0a..914b1390b37 100644
+index 9534cc5f..642a5c24 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
 @@ -172,7 +172,6 @@ pub struct Config {
@@ -199,7 +201,7 @@ index e658d958d0a..914b1390b37 100644
      pub prefix: Option<PathBuf>,
      pub sysconfdir: Option<PathBuf>,
      pub datadir: Option<PathBuf>,
-@@ -298,8 +297,6 @@ pub struct Target {
+@@ -299,8 +298,6 @@ pub struct Target {
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
      pub crt_static: Option<bool>,
@@ -208,24 +210,24 @@ index e658d958d0a..914b1390b37 100644
      pub wasi_root: Option<PathBuf>,
      pub qemu_rootfs: Option<PathBuf>,
      pub no_std: bool,
-@@ -493,7 +490,6 @@ struct Rust {
-     default_linker: Option<String>,
-     channel: Option<String>,
-     description: Option<String>,
--    musl_root: Option<String>,
-     rpath: Option<bool>,
-     verbose_tests: Option<bool>,
-     optimize_tests: Option<bool>,
-@@ -536,8 +532,6 @@ struct TomlTarget {
-     sanitizers: Option<bool>,
-     profiler: Option<bool>,
-     crt_static: Option<bool>,
--    musl_root: Option<String>,
--    musl_libdir: Option<String>,
-     wasi_root: Option<String>,
-     qemu_rootfs: Option<String>,
-     no_std: Option<bool>,
-@@ -872,7 +866,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -587,7 +584,6 @@ struct Rust {
+         default_linker: Option<String> = "default-linker",
+         channel: Option<String> = "channel",
+         description: Option<String> = "description",
+-        musl_root: Option<String> = "musl-root",
+         rpath: Option<bool> = "rpath",
+         verbose_tests: Option<bool> = "verbose-tests",
+         optimize_tests: Option<bool> = "optimize-tests",
+@@ -631,8 +627,6 @@ struct TomlTarget {
+         sanitizers: Option<bool> = "sanitizers",
+         profiler: Option<bool> = "profiler",
+         crt_static: Option<bool> = "crt-static",
+-        musl_root: Option<String> = "musl-root",
+-        musl_libdir: Option<String> = "musl-libdir",
+         wasi_root: Option<String> = "wasi-root",
+         qemu_rootfs: Option<String> = "qemu-rootfs",
+         no_std: Option<bool> = "no-std",
+@@ -1013,7 +1007,6 @@ pub fn parse(args: &[String]) -> Config {
              set(&mut config.llvm_tools_enabled, rust.llvm_tools);
              config.rustc_parallel = rust.parallel_compiler.unwrap_or(false);
              config.rustc_default_linker = rust.default_linker;
@@ -233,7 +235,7 @@ index e658d958d0a..914b1390b37 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);
-@@ -918,8 +911,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1059,8 +1052,6 @@ pub fn parse(args: &[String]) -> Config {
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
                  target.crt_static = cfg.crt_static;
@@ -243,7 +245,7 @@ index e658d958d0a..914b1390b37 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 94424cb4548..9ae0cc053e3 100755
+index 87a130a0..bd4c9197 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",
@@ -282,18 +284,10 @@ index 94424cb4548..9ae0cc053e3 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 2d4e1527897..3abe9f4a143 100644
+index 570a6174..f3d5f308 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -277,7 +277,6 @@ pub struct Build {
- struct Crate {
-     name: Interned<String>,
-     deps: HashSet<Interned<String>>,
--    id: String,
-     path: PathBuf,
- }
- 
-@@ -1056,25 +1055,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1125,25 +1125,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
          }
      }
  
@@ -319,29 +313,8 @@ index 2d4e1527897..3abe9f4a143 100644
      /// Returns the sysroot for the wasi target, if defined
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
          self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
-diff --git a/src/bootstrap/metadata.rs b/src/bootstrap/metadata.rs
-index a38391c7b88..65e229697dc 100644
---- a/src/bootstrap/metadata.rs
-+++ b/src/bootstrap/metadata.rs
-@@ -14,7 +14,6 @@ struct Output {
- 
- #[derive(Deserialize)]
- struct Package {
--    id: String,
-     name: String,
-     source: Option<String>,
-     manifest_path: String,
-@@ -50,7 +49,7 @@ pub fn build(build: &mut Build) {
-                 .filter(|dep| dep.source.is_none())
-                 .map(|dep| INTERNER.intern_string(dep.name))
-                 .collect();
--            build.crates.insert(name, Crate { name, id: package.id, deps, path });
-+            build.crates.insert(name, Crate { name, deps, path });
-         }
-     }
- }
 diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index d7db2cef24f..a791177956d 100644
+index 8c2899c1..dda15d76 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
 @@ -11,7 +11,6 @@
@@ -352,7 +325,7 @@ index d7db2cef24f..a791177956d 100644
  use std::path::PathBuf;
  use std::process::Command;
  
-@@ -178,28 +177,6 @@ pub fn check(build: &mut Build) {
+@@ -177,28 +176,6 @@ pub fn check(build: &mut Build) {
              }
          }
  
diff --git a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch b/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
index adaf86f2f451..2cc1f6b900d3 100644
--- a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
+++ b/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
@@ -11,26 +11,26 @@ diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
 index e4396d530..cb2312028 100644
 --- a/src/bootstrap/bin/rustdoc.rs
 +++ b/src/bootstrap/bin/rustdoc.rs
-@@ -20,14 +20,11 @@ fn main() {
+@@ -22,14 +22,11 @@ fn main() {
          Err(_) => 0,
      };
  
--    let mut dylib_path = bootstrap::util::dylib_path();
+-    let mut dylib_path = dylib_path();
 -    dylib_path.insert(0, PathBuf::from(libdir.clone()));
 -
      let mut cmd = Command::new(rustdoc);
      cmd.args(&args)
          .arg("--sysroot")
          .arg(&sysroot)
--        .env(bootstrap::util::dylib_path_var(), env::join_paths(&dylib_path).unwrap());
-+        .env(bootstrap::util::dylib_path_var(), PathBuf::from(libdir.clone()));
+-        .env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
++        .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
-@@ -60,7 +57,7 @@ fn main() {
+@@ -62,7 +59,7 @@ fn main() {
          eprintln!(
              "rustdoc command: {:?}={:?} {:?}",
-             bootstrap::util::dylib_path_var(),
+             dylib_path_var(),
 -            env::join_paths(&dylib_path).unwrap(),
 +            PathBuf::from(libdir.clone()),
              cmd,
diff --git a/srcpkgs/rust/patches/ld-library-path.patch b/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
similarity index 100%
rename from srcpkgs/rust/patches/ld-library-path.patch
rename to srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
diff --git a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch b/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
index a9ca5f6c7bba..8a18e414e209 100644
--- a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
+++ b/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
@@ -12,14 +12,14 @@ diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs
 index 238da24b..ffb05ee7 100644
 --- a/vendor/libc/src/unix/mod.rs
 +++ b/vendor/libc/src/unix/mod.rs
-@@ -299,11 +299,11 @@ cfg_if! {
-         // cargo build, don't pull in anything extra as the libstd dep
-         // already pulls in all libs.
+@@ -329,11 +329,11 @@ cfg_if! {
+         #[link(name = "c", cfg(not(target_feature = "crt-static")))]
+         extern {}
      } else if #[cfg(target_env = "musl")] {
 +        #[link(name = "c")]
 +        extern {}
          #[cfg_attr(feature = "rustc-dep-of-std",
--                   link(name = "c", kind = "static",
+-                   link(name = "c", kind = "static", modifiers = "-bundle",
 +                   link(name = "gcc", kind = "static-nobundle",
                          cfg(target_feature = "crt-static")))]
 -        #[cfg_attr(feature = "rustc-dep-of-std",
diff --git a/srcpkgs/rust/patches/native-sysroot.patch b/srcpkgs/rust/patches/native-sysroot.patch
index a23046220e9c..6826b114b6b7 100644
--- a/srcpkgs/rust/patches/native-sysroot.patch
+++ b/srcpkgs/rust/patches/native-sysroot.patch
@@ -1,17 +1,8 @@
-commit 57ed964d186212739fa436f103bd923a2309f341
-Author: Daniel Kolesa <daniel@octaforge.org>
-Date:   Tue Dec 21 02:46:30 2021 +0100
-
-    allow specifying native sysroot to use for linkage
-    
-    This allows us to get around the linker attempting to use
-    incompatible libs.
-
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index de771280e..5faaf9439 100644
+index e816f9b4..a2668fa9 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1166,6 +1166,10 @@ impl<'a> Builder<'a> {
+@@ -1313,6 +1313,10 @@ pub fn cargo(
              }
          }
  
@@ -23,26 +14,26 @@ index de771280e..5faaf9439 100644
              cargo.env("RUSTC_HOST_LINKER", host_linker);
          }
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 06b7a8c55..d8e9275ad 100644
+index 642a5c24..0dd4f879 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -292,6 +292,7 @@ pub struct Target {
-     pub ar: Option<PathBuf>,
+@@ -294,6 +294,7 @@ pub struct Target {
      pub ranlib: Option<PathBuf>,
+     pub default_linker: Option<PathBuf>,
      pub linker: Option<PathBuf>,
 +    pub sysroot: Option<PathBuf>,
      pub ndk: Option<PathBuf>,
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
-@@ -525,6 +526,7 @@ struct TomlTarget {
-     ar: Option<String>,
-     ranlib: Option<String>,
-     linker: Option<String>,
-+    sysroot: Option<String>,
-     llvm_config: Option<String>,
-     llvm_filecheck: Option<String>,
-     android_ndk: Option<String>,
-@@ -909,6 +911,7 @@ impl Config {
+@@ -621,6 +622,7 @@ struct TomlTarget {
+         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 {
                  target.ar = cfg.ar.map(PathBuf::from);
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
@@ -51,10 +42,10 @@ index 06b7a8c55..d8e9275ad 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 b930f3cd7..06e782520 100644
+index f3d5f308..7f8b9b27 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1056,6 +1056,10 @@ impl Build {
+@@ -1125,6 +1125,10 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
          }
      }
  
diff --git a/srcpkgs/rust/patches/xxx-ppcle.patch b/srcpkgs/rust/patches/xxx-ppcle.patch
index 9473e7ad98f3..c0522f0eaafc 100644
--- a/srcpkgs/rust/patches/xxx-ppcle.patch
+++ b/srcpkgs/rust/patches/xxx-ppcle.patch
@@ -1,53 +1,8 @@
-From b92ce1ed0ac8d95831a43f4395544c17a0816c9b Mon Sep 17 00:00:00 2001
-From: Daniel Kolesa <daniel@octaforge.org>
-Date: Sat, 3 Jul 2021 21:02:03 +0200
-Subject: [PATCH] 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/fastcall-inreg.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/borrowck/borrowck-asm.rs              |  1 +
- src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs      |  1 +
- src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs  |  1 +
- src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs |  1 +
- src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs   |  1 +
- src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs  |  1 +
- src/test/ui/llvm-asm/llvm-asm-out-read-uninit.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/rustc-ap-rustc_target/src/spec/mod.rs      |  2 ++
- .../src/spec/powerpcle_unknown_linux_gnu.rs       | 15 +++++++++++++++
- .../src/spec/powerpcle_unknown_linux_musl.rs      | 15 +++++++++++++++
- vendor/target-lexicon/src/targets.rs              |  7 +++++++
- vendor/tikv-jemallocator/benches/roundtrip.rs     |  3 ++-
- vendor/tikv-jemallocator/src/lib.rs               |  3 ++-
- 37 files changed, 111 insertions(+), 6 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
- create mode 100644 vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
- create mode 100644 vendor/rustc-ap-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 c2e9dba6..8147a3c3 100644
+index 0c1ab67cc..8d4e5f3cb 100644
 --- a/compiler/rustc_middle/src/ty/layout.rs
 +++ b/compiler/rustc_middle/src/ty/layout.rs
-@@ -2753,6 +2753,8 @@ where
+@@ -3057,6 +3057,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;
@@ -56,7 +11,7 @@ index c2e9dba6..8147a3c3 100644
          use SpecAbi::*;
          let rust_abi = matches!(sig.abi, RustIntrinsic | PlatformIntrinsic | Rust | RustCall);
  
-@@ -2850,7 +2852,8 @@ where
+@@ -3165,7 +3167,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
                      || (!win_x64_gnu
                          && !linux_s390x_gnu_like
                          && !linux_sparc64_gnu_like
@@ -67,10 +22,10 @@ index c2e9dba6..8147a3c3 100644
                      arg.mode = PassMode::Ignore;
                  }
 diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
-index 2af46693..986d84e0 100644
+index bd5b712c1..f60be010c 100644
 --- a/compiler/rustc_target/src/spec/mod.rs
 +++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -716,6 +716,8 @@ supported_targets! {
+@@ -824,6 +824,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),
@@ -81,7 +36,7 @@ index 2af46693..986d84e0 100644
      ("powerpc64le-unknown-linux-gnu", powerpc64le_unknown_linux_gnu),
 diff --git a/compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
 new file mode 100644
-index 00000000..780c20a3
+index 000000000..b7148a2fc
 --- /dev/null
 +++ b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
 @@ -0,0 +1,15 @@
@@ -89,20 +44,20 @@ index 00000000..780c20a3
 +
 +pub fn target() -> Target {
 +    let mut base = super::linux_gnu_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
++    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".into());
 +    base.max_atomic_width = Some(32);
 +
 +    Target {
-+        llvm_target: "powerpcle-unknown-linux-gnu".to_string(),
++        llvm_target: "powerpcle-unknown-linux-gnu".into(),
 +        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
++        data_layout: "e-m:e-p:32:32-i64:64-n32".into(),
++        arch: "powerpc".into(),
++        options: TargetOptions { mcount: "_mcount".into(), ..base },
 +    }
 +}
 diff --git a/compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
 new file mode 100644
-index 00000000..9b848ccf
+index 000000000..a826b6e47
 --- /dev/null
 +++ b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
 @@ -0,0 +1,15 @@
@@ -110,24 +65,24 @@ index 00000000..9b848ccf
 +
 +pub fn target() -> Target {
 +    let mut base = super::linux_musl_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
++    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".into());
 +    base.max_atomic_width = Some(32);
 +
 +    Target {
-+        llvm_target: "powerpcle-unknown-linux-musl".to_string(),
++        llvm_target: "powerpcle-unknown-linux-musl".into(),
 +        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
++        data_layout: "e-m:e-p:32:32-i64:64-n32".into(),
++        arch: "powerpc".into(),
++        options: TargetOptions { mcount: "_mcount".into(), ..base },
 +    }
 +}
 diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 4111420e..cd69a8ec 100644
+index 71b8f3c45..1505c12e4 100644
 --- a/src/bootstrap/bootstrap.py
 +++ b/src/bootstrap/bootstrap.py
-@@ -289,9 +289,11 @@ def default_build_triple(verbose):
-         'i686': 'i686',
+@@ -320,9 +320,11 @@ def default_build_triple(verbose):
          'i786': 'i686',
+         'm68k': 'm68k',
          'powerpc': 'powerpc',
 +        'powerpcle': 'powerpcle',
          'powerpc64': 'powerpc64',
@@ -136,9 +91,9 @@ index 4111420e..cd69a8ec 100644
 +        'ppcle': 'powerpcle',
          'ppc64': 'powerpc64',
          'ppc64le': 'powerpc64le',
-         's390x': 's390x',
+         'riscv64': 'riscv64gc',
 diff --git a/src/test/codegen/abi-main-signature-16bit-c-int.rs b/src/test/codegen/abi-main-signature-16bit-c-int.rs
-index 4ed491df..82ec7755 100644
+index 4ed491dfb..82ec7755d 100644
 --- a/src/test/codegen/abi-main-signature-16bit-c-int.rs
 +++ b/src/test/codegen/abi-main-signature-16bit-c-int.rs
 @@ -9,6 +9,7 @@
@@ -149,20 +104,8 @@ index 4ed491df..82ec7755 100644
  // ignore-powerpc64
  // ignore-riscv64
  // ignore-s390x
-diff --git a/src/test/codegen/fastcall-inreg.rs b/src/test/codegen/fastcall-inreg.rs
-index adbeae45..0fd0a9e6 100644
---- a/src/test/codegen/fastcall-inreg.rs
-+++ b/src/test/codegen/fastcall-inreg.rs
-@@ -16,6 +16,7 @@
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-r600
- // ignore-riscv64
- // ignore-amdgcn
 diff --git a/src/test/codegen/global_asm.rs b/src/test/codegen/global_asm.rs
-index 57d8aeb1..e0b1b692 100644
+index fab84868f..104d93d01 100644
 --- a/src/test/codegen/global_asm.rs
 +++ b/src/test/codegen/global_asm.rs
 @@ -12,6 +12,7 @@
@@ -174,7 +117,7 @@ index 57d8aeb1..e0b1b692 100644
  // ignore-amdgcn
  // ignore-sparc
 diff --git a/src/test/codegen/global_asm_include.rs b/src/test/codegen/global_asm_include.rs
-index 44402619..62ecfa6d 100644
+index 02ee91645..13f303332 100644
 --- a/src/test/codegen/global_asm_include.rs
 +++ b/src/test/codegen/global_asm_include.rs
 @@ -12,6 +12,7 @@
@@ -186,7 +129,7 @@ index 44402619..62ecfa6d 100644
  // ignore-amdgcn
  // ignore-sparc
 diff --git a/src/test/codegen/global_asm_x2.rs b/src/test/codegen/global_asm_x2.rs
-index d632d0dd..29f97775 100644
+index bdcf0ea84..1e2ff8b8d 100644
 --- a/src/test/codegen/global_asm_x2.rs
 +++ b/src/test/codegen/global_asm_x2.rs
 @@ -12,6 +12,7 @@
@@ -198,10 +141,10 @@ index d632d0dd..29f97775 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 3017adb4..632565bb 100644
+index 4ad3642c0..fca31c0c6 100644
 --- a/src/test/codegen/repr-transparent-aggregates-1.rs
 +++ b/src/test/codegen/repr-transparent-aggregates-1.rs
-@@ -7,6 +7,7 @@
+@@ -6,6 +6,7 @@
  // ignore-mips
  // ignore-mips64
  // ignore-powerpc
@@ -210,10 +153,10 @@ index 3017adb4..632565bb 100644
  // ignore-riscv64 see codegen/riscv-abi
  // ignore-windows
 diff --git a/src/test/codegen/repr-transparent-aggregates-2.rs b/src/test/codegen/repr-transparent-aggregates-2.rs
-index 429d760b..57e75f95 100644
+index b68e8e9eb..97c509b1b 100644
 --- a/src/test/codegen/repr-transparent-aggregates-2.rs
 +++ b/src/test/codegen/repr-transparent-aggregates-2.rs
-@@ -6,6 +6,7 @@
+@@ -5,6 +5,7 @@
  // ignore-emscripten
  // ignore-mips64
  // ignore-powerpc
@@ -222,7 +165,7 @@ index 429d760b..57e75f95 100644
  // ignore-powerpc64le
  // ignore-riscv64 see codegen/riscv-abi
 diff --git a/src/test/codegen/stack-probes.rs b/src/test/codegen/stack-probes.rs
-index 9bd351df..29073eb5 100644
+index 9bd351df3..29073eb56 100644
 --- a/src/test/codegen/stack-probes.rs
 +++ b/src/test/codegen/stack-probes.rs
 @@ -3,6 +3,7 @@
@@ -234,7 +177,7 @@ index 9bd351df..29073eb5 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/test/run-make-fulldeps/atomic-lock-free/Makefile b/src/test/run-make-fulldeps/atomic-lock-free/Makefile
-index 9e8b4fab..402d37a4 100644
+index 9e8b4fabf..402d37a45 100644
 --- a/src/test/run-make-fulldeps/atomic-lock-free/Makefile
 +++ b/src/test/run-make-fulldeps/atomic-lock-free/Makefile
 @@ -36,6 +36,8 @@ ifeq ($(filter powerpc,$(LLVM_COMPONENTS)),powerpc)
@@ -247,7 +190,7 @@ index 9e8b4fab..402d37a4 100644
  	nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
  	$(RUSTC) --target=powerpc64le-unknown-linux-gnu atomic_lock_free.rs
 diff --git a/src/test/ui/abi/stack-probes-lto.rs b/src/test/ui/abi/stack-probes-lto.rs
-index 90df1f3f..8c6dda8b 100644
+index 90df1f3f5..8c6dda8b8 100644
 --- a/src/test/ui/abi/stack-probes-lto.rs
 +++ b/src/test/ui/abi/stack-probes-lto.rs
 @@ -4,6 +4,7 @@
@@ -259,7 +202,7 @@ index 90df1f3f..8c6dda8b 100644
  // ignore-sparc
  // ignore-sparc64
 diff --git a/src/test/ui/abi/stack-probes.rs b/src/test/ui/abi/stack-probes.rs
-index e998dd0f..9472e538 100644
+index e998dd0f8..9472e5387 100644
 --- a/src/test/ui/abi/stack-probes.rs
 +++ b/src/test/ui/abi/stack-probes.rs
 @@ -4,6 +4,7 @@
@@ -270,92 +213,8 @@ index e998dd0f..9472e538 100644
  // ignore-s390x
  // ignore-sparc
  // ignore-sparc64
-diff --git a/src/test/ui/borrowck/borrowck-asm.rs b/src/test/ui/borrowck/borrowck-asm.rs
-index a3f64524..faf9adb4 100644
---- a/src/test/ui/borrowck/borrowck-asm.rs
-+++ b/src/test/ui/borrowck/borrowck-asm.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs b/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs
-index 2868d3d3..5c6e325b 100644
---- a/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs
-@@ -4,6 +4,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs b/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs
-index e3bc7d29..49f53f67 100644
---- a/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs b/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs
-index daae0c81..fd505c86 100644
---- a/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs
-@@ -5,6 +5,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs b/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs
-index 9c62532c..baa1c1ba 100644
---- a/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs b/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs
-index 72edb339..2fec991d 100644
---- a/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs b/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs
-index acf4cf9f..dfad0775 100644
---- a/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
 diff --git a/src/test/ui/target-feature/gate.rs b/src/test/ui/target-feature/gate.rs
-index 164830fe..531a4b45 100644
+index 2382c98f8..e6fe855d7 100644
 --- a/src/test/ui/target-feature/gate.rs
 +++ b/src/test/ui/target-feature/gate.rs
 @@ -5,6 +5,7 @@
@@ -367,7 +226,7 @@ index 164830fe..531a4b45 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/test/ui/target-feature/invalid-attribute.rs b/src/test/ui/target-feature/invalid-attribute.rs
-index 5ea78215..47e7887a 100644
+index ad1b6e96b..122d59a57 100644
 --- a/src/test/ui/target-feature/invalid-attribute.rs
 +++ b/src/test/ui/target-feature/invalid-attribute.rs
 @@ -5,6 +5,7 @@
@@ -379,10 +238,10 @@ index 5ea78215..47e7887a 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
-index 7dbd7094..08c9de3c 100644
+index bed509d77..8bc817897 100644
 --- a/src/tools/compiletest/src/util.rs
 +++ b/src/tools/compiletest/src/util.rs
-@@ -67,6 +67,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
+@@ -70,6 +70,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
      ("msp430", "msp430"),
      ("nvptx64", "nvptx64"),
      ("powerpc", "powerpc"),
@@ -391,10 +250,10 @@ index 7dbd7094..08c9de3c 100644
      ("powerpc64le", "powerpc64"),
      ("riscv64gc", "riscv64"),
 diff --git a/vendor/cc/src/lib.rs b/vendor/cc/src/lib.rs
-index 5051b296..286c2fb7 100644
+index e3a2b98b0..0236729fd 100644
 --- a/vendor/cc/src/lib.rs
 +++ b/vendor/cc/src/lib.rs
-@@ -2409,6 +2409,7 @@ impl Build {
+@@ -2594,6 +2594,7 @@ impl Build {
              "powerpc-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
              "powerpc-unknown-linux-gnuspe" => Some("powerpc-linux-gnuspe"),
              "powerpc-unknown-netbsd" => Some("powerpc--netbsd"),
@@ -402,66 +261,11 @@ index 5051b296..286c2fb7 100644
              "powerpc64-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
              "powerpc64le-unknown-linux-gnu" => Some("powerpc64le-linux-gnu"),
              "riscv32i-unknown-none-elf" => self.find_working_gnu_prefix(&[
-diff --git a/vendor/rustc-ap-rustc_target/src/spec/mod.rs b/vendor/rustc-ap-rustc_target/src/spec/mod.rs
-index 2af46693..986d84e0 100644
---- a/vendor/rustc-ap-rustc_target/src/spec/mod.rs
-+++ b/vendor/rustc-ap-rustc_target/src/spec/mod.rs
-@@ -716,6 +716,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),
-+    ("powerpcle-unknown-linux-gnu", powerpcle_unknown_linux_gnu),
-+    ("powerpcle-unknown-linux-musl", powerpcle_unknown_linux_musl),
-     ("powerpc64-unknown-linux-gnu", powerpc64_unknown_linux_gnu),
-     ("powerpc64-unknown-linux-musl", powerpc64_unknown_linux_musl),
-     ("powerpc64le-unknown-linux-gnu", powerpc64le_unknown_linux_gnu),
-diff --git a/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
-new file mode 100644
-index 00000000..780c20a3
---- /dev/null
-+++ b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
-@@ -0,0 +1,15 @@
-+use crate::spec::{LinkerFlavor, Target, TargetOptions};
-+
-+pub fn target() -> Target {
-+    let mut base = super::linux_gnu_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
-+    base.max_atomic_width = Some(32);
-+
-+    Target {
-+        llvm_target: "powerpcle-unknown-linux-gnu".to_string(),
-+        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
-+    }
-+}
-diff --git a/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_musl.rs b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
-new file mode 100644
-index 00000000..9b848ccf
---- /dev/null
-+++ b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
-@@ -0,0 +1,15 @@
-+use crate::spec::{LinkerFlavor, Target, TargetOptions};
-+
-+pub fn target() -> Target {
-+    let mut base = super::linux_musl_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
-+    base.max_atomic_width = Some(32);
-+
-+    Target {
-+        llvm_target: "powerpcle-unknown-linux-musl".to_string(),
-+        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
-+    }
-+}
 diff --git a/vendor/target-lexicon/src/targets.rs b/vendor/target-lexicon/src/targets.rs
-index 87c237aa..dc694010 100644
+index 22cc95cc3..46167e34e 100644
 --- a/vendor/target-lexicon/src/targets.rs
 +++ b/vendor/target-lexicon/src/targets.rs
-@@ -26,6 +26,7 @@ pub enum Architecture {
+@@ -29,6 +29,7 @@ pub enum Architecture {
      Msp430,
      Nvptx64,
      Powerpc,
@@ -469,7 +273,7 @@ index 87c237aa..dc694010 100644
      Powerpc64,
      Powerpc64le,
      Riscv32(Riscv32Architecture),
-@@ -517,6 +518,7 @@ impl Architecture {
+@@ -533,6 +534,7 @@ impl Architecture {
              | Mips64(Mips64Architecture::Mipsisa64r6el)
              | Msp430
              | Nvptx64
@@ -477,15 +281,15 @@ index 87c237aa..dc694010 100644
              | Powerpc64le
              | Riscv32(_)
              | Riscv64(_)
-@@ -553,6 +555,7 @@ impl Architecture {
-             | Sparc
-             | Wasm32
+@@ -574,6 +576,7 @@ impl Architecture {
+             | M68k
              | Mips32(_)
+             | Powerpc
 +            | Powerpcle
-             | Powerpc => Ok(PointerWidth::U32),
+             | XTensa => Ok(PointerWidth::U32),
              AmdGcn
-             | Powerpc64le
-@@ -737,6 +740,7 @@ impl fmt::Display for Architecture {
+             | Bpfeb
+@@ -763,6 +766,7 @@ impl fmt::Display for Architecture {
              Msp430 => f.write_str("msp430"),
              Nvptx64 => f.write_str("nvptx64"),
              Powerpc => f.write_str("powerpc"),
@@ -493,7 +297,7 @@ index 87c237aa..dc694010 100644
              Powerpc64 => f.write_str("powerpc64"),
              Powerpc64le => f.write_str("powerpc64le"),
              Riscv32(riscv32) => riscv32.fmt(f),
-@@ -913,6 +917,7 @@ impl FromStr for Architecture {
+@@ -943,6 +947,7 @@ impl FromStr for Architecture {
              "msp430" => Msp430,
              "nvptx64" => Nvptx64,
              "powerpc" => Powerpc,
@@ -501,8 +305,8 @@ index 87c237aa..dc694010 100644
              "powerpc64" => Powerpc64,
              "powerpc64le" => Powerpc64le,
              "s390x" => S390x,
-@@ -1380,6 +1385,8 @@ mod tests {
-             "powerpc-unknown-netbsd",
+@@ -1445,6 +1450,8 @@ mod tests {
+             "powerpc-unknown-openbsd",
              "powerpc-wrs-vxworks",
              "powerpc-wrs-vxworks-spe",
 +            "powerpcle-unknown-linux-gnu",
@@ -511,7 +315,7 @@ index 87c237aa..dc694010 100644
              "powerpc64-unknown-linux-gnu",
              "powerpc64-unknown-linux-musl",
 diff --git a/vendor/tikv-jemallocator/benches/roundtrip.rs b/vendor/tikv-jemallocator/benches/roundtrip.rs
-index 40b8005f..bc4df023 100644
+index 767abe8d4..704bf955a 100644
 --- a/vendor/tikv-jemallocator/benches/roundtrip.rs
 +++ b/vendor/tikv-jemallocator/benches/roundtrip.rs
 @@ -22,7 +22,8 @@ static A: Jemalloc = Jemalloc;
@@ -525,19 +329,16 @@ index 40b8005f..bc4df023 100644
  const MIN_ALIGN: usize = 8;
  #[cfg(all(any(
 diff --git a/vendor/tikv-jemallocator/src/lib.rs b/vendor/tikv-jemallocator/src/lib.rs
-index 9a489b62..1ed12b26 100644
+index 4a9397331..4cf47c05d 100644
 --- a/vendor/tikv-jemallocator/src/lib.rs
 +++ b/vendor/tikv-jemallocator/src/lib.rs
-@@ -44,7 +44,8 @@ use libc::{c_int, c_void};
+@@ -46,7 +46,8 @@ use libc::{c_int, c_void};
      target_arch = "arm",
      target_arch = "mips",
      target_arch = "mipsel",
 -    target_arch = "powerpc"
 +    target_arch = "powerpc",
-+    target_arch = "powerpcle"
++    target_arch = "powerpcle",
  )))]
  const ALIGNOF_MAX_ALIGN_T: usize = 8;
  #[cfg(all(any(
--- 
-2.32.0
-
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index 560a629f3da2..53ef4333cc52 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -8,7 +8,7 @@
 # uploaded to https://alpha.de.repo.voidlinux.org/distfiles/
 #
 pkgname=rust
-version=1.57.0
+version=1.61.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=3546f9c3b91b1f8b8efd26c94d6b50312c08210397b4072ed2748e2bd4445c1a
+checksum=ad0b4351675aa9abdf4c7e066613bd274c4391c5506db152983426376101daed
 lib32disabled=yes
 make_check=no # CBA for now
 
@@ -61,7 +61,6 @@ post_patch() {
 	_clear_vendor_checksums libc
 	_clear_vendor_checksums typenum
 	_clear_vendor_checksums cc
-	_clear_vendor_checksums rustc-ap-rustc_target
 	_clear_vendor_checksums target-lexicon
 	_clear_vendor_checksums tikv-jemallocator
 }
@@ -216,14 +215,8 @@ do_install() {
 
 	cd ${DESTDIR}/usr/lib
 	# symlinks instead of copies
-	mv *.so rustlib/${RUST_TARGET}/lib
+	rm *.so
 	ln -sf rustlib/${RUST_TARGET}/lib/*.so .
-
-	# executable used for split dwarf, currently unstable on linux.
-	# it's copied directly from the local llvm package, but
-	# FIXME: cross builds are installing the version from the build machine,
-	# it shouldn't be necessary to remove it
-	rm rustlib/${RUST_TARGET}/bin/rust-llvm-dwp
 }
 
 rust-doc_package() {

From 296a3e4eb7797a606adccd7349cb4ce8a251a01b Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:14:23 +0200
Subject: [PATCH 4/4] cargo: update to 1.61.0

---
 srcpkgs/cargo/template | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index c512e7005833..e3c30f625acd 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -1,8 +1,8 @@
 # Template file for 'cargo'
 pkgname=cargo
-version=0.58.0
+version=1.61.0
 revision=1
-wrksrc="cargo-${version}"
+wrksrc="cargo-rust-${version}"
 build_helper=rust
 hostmakedepends="cargo-bootstrap rust python3 curl cmake pkg-config zlib-devel"
 makedepends="rust libcurl-devel openssl-devel"
@@ -11,10 +11,10 @@ short_desc="Rust package manager"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://crates.io/"
-distfiles="https://github.com/rust-lang/cargo/archive/${version}.tar.gz
- https://github.com/crossbeam-rs/crossbeam/archive/refs/tags/crossbeam-utils-0.8.5.tar.gz"
-checksum="e1d6f55414a29906d24b13c687996b5220e08ccce9c682e4c02851138fc7093f
- 57db07eb38b0aaf7951c79b4639819cb84bc4269507091afea7267e10a54e079"
+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
+ 52c451910203cd9002cc4b85cff95f45c6ba245392801e80d7898ca5c3c3ab29"
 replaces="cargo-tree>=0"
 
 build_options="static bindist"
@@ -28,7 +28,7 @@ if [ -z "$_build_static" ]; then
 	makedepends+=" libgit2-devel"
 fi
 
-post_extract() {
+pre_patch() {
 	mv ../crossbeam-* crossbeam-utils
 }
 

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

* Re: [PR PATCH] [Updated] Update Rust toolchain to 1.61.0
  2022-05-21 21:09 [PR PATCH] Update Rust toolchain to 1.61.0 tranzystorek-io
  2022-05-21 21:14 ` tranzystorek-io
  2022-05-21 23:18 ` [PR PATCH] [Updated] " tranzystorek-io
@ 2022-05-22  8:13 ` tranzystorek-io
  2022-05-22  8:14 ` tranzystorek-io
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tranzystorek-io @ 2022-05-22  8:13 UTC (permalink / raw)
  To: ml

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

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

https://github.com/tranzystorek-io/void-packages rust-toolchain
https://github.com/void-linux/void-packages/pull/37232

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

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-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)


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

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

From ec9645e312bf708668bc2ee12948d3a912bec5a6 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:03:26 +0200
Subject: [PATCH 1/4] rust-bootstrap: update to 1.61.0

---
 srcpkgs/rust-bootstrap/template | 37 +++++++++++++++++----------------
 1 file changed, 19 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/rust-bootstrap/template b/srcpkgs/rust-bootstrap/template
index bbedb66430b6..2645bd580d74 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.57.0
+version=1.61.0
 revision=1
 create_wrksrc=yes
 short_desc="Rust programming language bootstrap toolchain"
@@ -17,8 +17,8 @@ fi
 
 _bootstrap_url="https://static.rust-lang.org/dist"
 
-case "$XBPS_MACHINE" in
-	x86_64*|i686|ppc64le|ppc) ;;
+case "$XBPS_TARGET_MACHINE" in
+	x86_64*|i686|ppc64le|ppc|ppc64) ;;
 	*) _bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles";;
 esac
 
@@ -29,40 +29,40 @@ distfiles="
 case "$XBPS_TARGET_MACHINE" in
 	i686)
 		checksum="
-		 9bade3fcd246b0ad6859fcf5d0a80d3eb833e5410efa3a5552c241865562461e
-		 586e7fd521a058cbf4778abb67d7d078dd4820d356351d0b6a719e21d00966db"
+		 8af0ec3eb470e7e28439fedf9ebdadf90df8c58da544cc643033e6fc0ccf0bea
+		 ab223fcec35183bc0fe630403537cd7dae55c403103df29b25077db4882cb88e"
 		;;
 	x86_64)
 		checksum="
-		 c42f40c5279a3a9d539cae93dbcab9d333777ad9a60a5b9f1086b874ef63db86
-		 ccdc72d06c90841b7227ec3630337881eeda3da5fbe87328d2e9d705f6f8016c"
+		 21c4613f389ed130fbaaf88f1e984319f72b5fc10734569a5ba19e22ebb03abd
+		 270b07aa5f2de52255a117e1e587138d77375ce0d09a1d7fead085f29b3977e9"
 		;;
 	x86_64-musl)
 		checksum="
-		 5b04e0e0bbf140f7c49baa6280114c28f59f6de50481bdd45074eebf629c174c
-		 818213a6444503ed6adf0231d3c71de990d4c26926c62e8c602bb7e2d636fb94"
+		 89cb72cbc493cb5cd8e43830009b4a1a5bfd472246ae184157868c9b0607bf6c
+		 1f4f2e4c5dd0f9b0dac7c8888f4a49ef16a6fe8992f39895823d2a442f0fe408"
 		;;
 	ppc64le)
 		checksum="
-		 f43cb99109c3438c77c7079cdce4673df3320e310158e0b4d949c1babc4300fc
-		 fc07eb3e9f3d227428cc5b53ca868e3de375bc198ce4dce7b87a9246e6fec81a"
+		 dc54893d747e4f3330515caa75e404f78c6c5475a1216d1428f5e7ce1c2e9602
+		 36c0ccff14c80419507561db050f9533f0abd43fc50f3ddb859c10df74b1c351"
 		;;
 	ppc64le-musl)
 		checksum="
-		 6b48e521ba8a070a7b992595e82c5a164cc01c93bbd9a7b3d4db362f4b060df8
-		 d7876e817fc95df2e81858fc9ddb95b10fb83b413277ea6dbdfa9a80fa0d990e"
+		 badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb
+		 badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
 	ppc64)
 		checksum="
-		 2ea5b66d2cd8b9c251590fd5bd3e23cedec658b61f541e2824ce3fdcda263982
-		 e9c1394771b1b24241d8938ad75c4a6ed8bfa043522c74767b3528f2289095c0"
+		 d75d9565033cdbf1b55ea129a515a961199d9414efae3bb88011d3e6957eb89a
+		 1d816e4b02b45a6a4ccb3a4b6ef8dbd83255845c49e46cc77de06385d6a91c52"
 		;;
 	ppc)
 		checksum="
-		 a1d7611b2d39224ba9a915009ae2a6639def42767370f50effd57770b3eb2150
-		 bc117ce5f0c81d2e14ea2d1832c0e908b1153caf49f295a9d28af2128f5fae44"
+		 f28a8c2986fce5015c67823e39ad4b53e2db06603b6ea4a1217ac961cbbfb073
+		 7d2f7f900c8c05616fba8e99ab041d847af3653c259b99445edd788acddf878c"
 		;;
-	*) broken="rust bootstrap binaries unavailable for ${XBPS_MACHINE}";;
+	*) broken="rust bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac
 
 do_install() {
@@ -76,5 +76,6 @@ do_install() {
 	vlicense rustc-${version}-${RUST_TARGET}/LICENSE-APACHE
 	vlicense rustc-${version}-${RUST_TARGET}/LICENSE-MIT
 
+	rm -rf ${DESTDIR}/usr/share/doc/rust
 	rm -f ${DESTDIR}/usr/lib/rustlib/${RUST_TARGET}/bin/rust-ll*
 }

From eeec29116f4795b1bcadde4ff0ee1026ed5cbfbb Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:12:56 +0200
Subject: [PATCH 2/4] cargo-bootstrap: update to 1.61.0

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

diff --git a/srcpkgs/cargo-bootstrap/template b/srcpkgs/cargo-bootstrap/template
index e75f8763b5b8..a2c365cbe00d 100644
--- a/srcpkgs/cargo-bootstrap/template
+++ b/srcpkgs/cargo-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo-bootstrap'
 pkgname=cargo-bootstrap
-version=0.58.0
+version=1.61.0
 revision=1
 short_desc="Bootstrap binaries of Rust package manager"
 maintainer="q66 <daniel@octaforge.org>"
@@ -11,45 +11,41 @@ lib32disabled=yes
 nostrip=yes
 
 _bootstrap_url="https://static.rust-lang.org/dist"
-_bootver=1.57.0
 
 # we don't use upstream cargo binaries for ppc32, as they are busted (probably
 # a dependency is wrong, which results in failed signature verification when
 # updating the crates.io index)
 case "$XBPS_TARGET_MACHINE" in
 	x86_64*|i686|ppc64le) ;;
-	*)
-		_bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles"
-		_bootver=${version}
-		;;
+	*) _bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles" ;;
 esac
 
-wrksrc="cargo-${_bootver}-${RUST_TARGET}"
-distfiles="${_bootstrap_url}/cargo-${_bootver}-${RUST_TARGET}.tar.xz"
+wrksrc="cargo-${version}-${RUST_TARGET}"
+distfiles="${_bootstrap_url}/cargo-${version}-${RUST_TARGET}.tar.xz"
 
 case "$XBPS_TARGET_MACHINE" in
 	i686)
-		checksum="9898a1fae2647f930fa14b9c160a1d22e67ccc70ac0d2d8f79ef1ffcf8d89af7"
+		checksum="fe258b85ef0644ff08c2095e329399dd4de0e1b2e51f4f4e90cb956d40dc61de"
 		;;
 	x86_64)
-		checksum="ed2013713ae742895af5df8d91c5430ba9ba3c781e3bc7f3471b220cc06d565d"
+		checksum="9461727d754f865ef2a87479d40bbe4c5176f80963b7c50b7797bc8940d7a0a0"
 		;;
 	x86_64-musl)
-		checksum="0d8564d0348843d6c08d98990d9eac50b7b7ab790f89d514b4f45079e786d932"
+		checksum="db4b4423c2843b6e27737664cf8085afcba670374110ca24b9c8d341045e748c"
 		;;
 	ppc64le)
-		checksum="599cf1b5a8cdbf76d591621bc9222aefa60e2f5fd378ae71c4dcf4514c47122e"
+		checksum="09817011ff1ef4b7006387c7cabb6a059731792a9372533dec7d87e7f014444b"
 		;;
 	ppc64le-musl)
-		checksum="99ae7661c62617ac42adacb50cce9ae8d019bcf85e987b98fbc27240bceb1dd9"
+		checksum="badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
 	ppc64)
-		checksum="c64b9cce7a3ceaf5c310fad70be33077f1e6dea1384767fcf744732c0daa7473"
+		checksum="badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
 	ppc)
-		checksum="e67c2a7d16b3c732a1dcb663d031daf6eaca4b74d1d15196086c53c0c3a5b0a2"
+		checksum="badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
-	*) broken="cargo bootstrap binaries unavailable for ${XBPS_MACHINE}";;
+	*) broken="cargo bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac
 
 do_install() {

From 4e683de26ec14de5ce571a9e0d94c117b9180251 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:09:02 +0200
Subject: [PATCH 3/4] rust: update to 1.61.0

---
 .../rust/patches/0001-musl-void-setup.patch   | 135 +++-----
 ...007-fix-rustdoc-when-cross-compiling.patch |  12 +-
 ... 0010-do-not-export-LD_LIBRARY_PATH.patch} |   0
 ...kage-of-musl-libc-for-the-libc-crate.patch |   8 +-
 srcpkgs/rust/patches/native-sysroot.patch     |  41 +--
 srcpkgs/rust/patches/xxx-ppcle.patch          | 309 ++++--------------
 srcpkgs/rust/template                         |  13 +-
 7 files changed, 138 insertions(+), 380 deletions(-)
 rename srcpkgs/rust/patches/{ld-library-path.patch => 0010-do-not-export-LD_LIBRARY_PATH.patch} (100%)

diff --git a/srcpkgs/rust/patches/0001-musl-void-setup.patch b/srcpkgs/rust/patches/0001-musl-void-setup.patch
index 427581c48f54..c13cb1730986 100644
--- a/srcpkgs/rust/patches/0001-musl-void-setup.patch
+++ b/srcpkgs/rust/patches/0001-musl-void-setup.patch
@@ -1,8 +1,8 @@
 diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
-index 2fc9ab29f92..27673615968 100644
+index 51f392a6..62560658 100644
 --- a/compiler/rustc_target/src/spec/crt_objects.rs
 +++ b/compiler/rustc_target/src/spec/crt_objects.rs
-@@ -62,28 +62,6 @@ pub(super) fn all(obj: &str) -> CrtObjects {
+@@ -63,28 +63,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects {
      ])
  }
  
@@ -32,7 +32,7 @@ index 2fc9ab29f92..27673615968 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 5038a967d0a..b3c0e5bc416 100644
+index 207a87ab..88f807a5 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 @@
@@ -42,7 +42,7 @@ index 5038a967d0a..b3c0e5bc416 100644
  pub fn opts() -> TargetOptions {
      let mut base = super::linux_base::opts();
  
-     base.env = "musl".to_string();
+     base.env = "musl".into();
 -    base.pre_link_objects_fallback = crt_objects::pre_musl_fallback();
 -    base.post_link_objects_fallback = crt_objects::post_musl_fallback();
 -    base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
@@ -53,30 +53,29 @@ index 5038a967d0a..b3c0e5bc416 100644
      base
  }
 diff --git a/config.toml.example b/config.toml.example
-index 61e57eee782..77943129204 100644
+index 6e53d9b4..74980d2c 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -668,15 +668,6 @@ changelog-seen = 2
- # only use static libraries. If unset, the target's default linkage is used.
- #crt-static = <platform-specific> (bool)
+@@ -511,14 +511,6 @@ changelog-seen = 2
+ # supplementary build information, like distro-specific package versions.
+ #description = <none> (string)
  
 -# The root location of the musl installation directory. The library directory
 -# will also need to contain libunwind.a for an unwinding implementation. Note
 -# that this option only makes sense for musl targets that produce statically
 -# linked binaries.
--#musl-root = build.musl-root (path)
+-#
+-# Defaults to /usr on musl hosts. Has no default otherwise.
+-#musl-root = <platform specific> (path)
 -
--# The full path to the musl libdir.
--#musl-libdir = musl-root/lib
--
- # The root location of the `wasm32-wasi` sysroot. Only used for the
- # `wasm32-wasi` target. If you are building wasm32-wasi target, make sure to
- # create a `[target.wasm32-wasi]` section and move this field there.
+ # By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
+ # platforms to ensure that the compiler is usable by default from the build
+ # directory (as it links to a number of dynamic libraries). This may not be
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index e750c2963dd..f6ba3032b0d 100644
+index 7ce44687..4e7507ae 100644
 --- a/src/bootstrap/cc_detect.rs
 +++ b/src/bootstrap/cc_detect.rs
-@@ -98,7 +98,7 @@ pub fn find(build: &mut Build) {
+@@ -97,7 +97,7 @@ pub fn find(build: &mut Build) {
          if let Some(cc) = config.and_then(|c| c.cc.as_ref()) {
              cfg.compiler(cc);
          } else {
@@ -85,7 +84,7 @@ index e750c2963dd..f6ba3032b0d 100644
          }
  
          let compiler = cfg.get_compiler();
-@@ -126,7 +126,7 @@ pub fn find(build: &mut Build) {
+@@ -125,7 +125,7 @@ pub fn find(build: &mut Build) {
              cfg.compiler(cxx);
              true
          } else if build.hosts.contains(&target) || build.build == target {
@@ -130,13 +129,14 @@ index e750c2963dd..f6ba3032b0d 100644
      }
  }
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index e9cc7662e63..4971534ba0e 100644
+index afc333b5..9d67ab56 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -199,36 +199,7 @@ fn copy_self_contained_objects(
+@@ -197,39 +197,7 @@ fn copy_self_contained_objects(
+     let mut target_deps = vec![];
  
-     // Copies the CRT objects.
-     //
+     // Copies the libc and CRT objects.
+-    //
 -    // rustc historically provides a more self-contained installation for musl targets
 -    // not requiring the presence of a native musl toolchain. For example, it can fall back
 -    // to using gcc from a glibc-targeting toolchain for linking.
@@ -146,7 +146,7 @@ index e9cc7662e63..4971534ba0e 100644
 -        let srcdir = builder.musl_libdir(target).unwrap_or_else(|| {
 -            panic!("Target {:?} does not have a \"musl-libdir\" key", target.triple)
 -        });
--        for &obj in &["crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
+-        for &obj in &["libc.a", "crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
 -            copy_and_stamp(
 -                builder,
 -                &libdir_self_contained,
@@ -164,14 +164,16 @@ index e9cc7662e63..4971534ba0e 100644
 -            target_deps.push((target, DependencyType::TargetSelfContained));
 -        }
 -
--        let libunwind_path = copy_llvm_libunwind(builder, target, &libdir_self_contained);
--        target_deps.push((libunwind_path, DependencyType::TargetSelfContained));
+-        if !target.starts_with("s390x") {
+-            let libunwind_path = copy_llvm_libunwind(builder, target, &libdir_self_contained);
+-            target_deps.push((libunwind_path, DependencyType::TargetSelfContained));
+-        }
 -    } else if target.ends_with("-wasi") {
 +    if target.ends_with("-wasi") {
          let srcdir = builder
              .wasi_root(target)
              .unwrap_or_else(|| {
-@@ -312,15 +283,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+@@ -313,15 +281,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
              .arg("--manifest-path")
              .arg(builder.src.join("library/test/Cargo.toml"));
  
@@ -188,7 +190,7 @@ index e9cc7662e63..4971534ba0e 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 e658d958d0a..914b1390b37 100644
+index 9534cc5f..642a5c24 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
 @@ -172,7 +172,6 @@ pub struct Config {
@@ -199,7 +201,7 @@ index e658d958d0a..914b1390b37 100644
      pub prefix: Option<PathBuf>,
      pub sysconfdir: Option<PathBuf>,
      pub datadir: Option<PathBuf>,
-@@ -298,8 +297,6 @@ pub struct Target {
+@@ -299,8 +298,6 @@ pub struct Target {
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
      pub crt_static: Option<bool>,
@@ -208,24 +210,24 @@ index e658d958d0a..914b1390b37 100644
      pub wasi_root: Option<PathBuf>,
      pub qemu_rootfs: Option<PathBuf>,
      pub no_std: bool,
-@@ -493,7 +490,6 @@ struct Rust {
-     default_linker: Option<String>,
-     channel: Option<String>,
-     description: Option<String>,
--    musl_root: Option<String>,
-     rpath: Option<bool>,
-     verbose_tests: Option<bool>,
-     optimize_tests: Option<bool>,
-@@ -536,8 +532,6 @@ struct TomlTarget {
-     sanitizers: Option<bool>,
-     profiler: Option<bool>,
-     crt_static: Option<bool>,
--    musl_root: Option<String>,
--    musl_libdir: Option<String>,
-     wasi_root: Option<String>,
-     qemu_rootfs: Option<String>,
-     no_std: Option<bool>,
-@@ -872,7 +866,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -587,7 +584,6 @@ struct Rust {
+         default_linker: Option<String> = "default-linker",
+         channel: Option<String> = "channel",
+         description: Option<String> = "description",
+-        musl_root: Option<String> = "musl-root",
+         rpath: Option<bool> = "rpath",
+         verbose_tests: Option<bool> = "verbose-tests",
+         optimize_tests: Option<bool> = "optimize-tests",
+@@ -631,8 +627,6 @@ struct TomlTarget {
+         sanitizers: Option<bool> = "sanitizers",
+         profiler: Option<bool> = "profiler",
+         crt_static: Option<bool> = "crt-static",
+-        musl_root: Option<String> = "musl-root",
+-        musl_libdir: Option<String> = "musl-libdir",
+         wasi_root: Option<String> = "wasi-root",
+         qemu_rootfs: Option<String> = "qemu-rootfs",
+         no_std: Option<bool> = "no-std",
+@@ -1013,7 +1007,6 @@ pub fn parse(args: &[String]) -> Config {
              set(&mut config.llvm_tools_enabled, rust.llvm_tools);
              config.rustc_parallel = rust.parallel_compiler.unwrap_or(false);
              config.rustc_default_linker = rust.default_linker;
@@ -233,7 +235,7 @@ index e658d958d0a..914b1390b37 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);
-@@ -918,8 +911,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1059,8 +1052,6 @@ pub fn parse(args: &[String]) -> Config {
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
                  target.crt_static = cfg.crt_static;
@@ -243,7 +245,7 @@ index e658d958d0a..914b1390b37 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 94424cb4548..9ae0cc053e3 100755
+index 87a130a0..bd4c9197 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",
@@ -282,18 +284,10 @@ index 94424cb4548..9ae0cc053e3 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 2d4e1527897..3abe9f4a143 100644
+index 570a6174..f3d5f308 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -277,7 +277,6 @@ pub struct Build {
- struct Crate {
-     name: Interned<String>,
-     deps: HashSet<Interned<String>>,
--    id: String,
-     path: PathBuf,
- }
- 
-@@ -1056,25 +1055,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1125,25 +1125,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
          }
      }
  
@@ -319,29 +313,8 @@ index 2d4e1527897..3abe9f4a143 100644
      /// Returns the sysroot for the wasi target, if defined
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
          self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
-diff --git a/src/bootstrap/metadata.rs b/src/bootstrap/metadata.rs
-index a38391c7b88..65e229697dc 100644
---- a/src/bootstrap/metadata.rs
-+++ b/src/bootstrap/metadata.rs
-@@ -14,7 +14,6 @@ struct Output {
- 
- #[derive(Deserialize)]
- struct Package {
--    id: String,
-     name: String,
-     source: Option<String>,
-     manifest_path: String,
-@@ -50,7 +49,7 @@ pub fn build(build: &mut Build) {
-                 .filter(|dep| dep.source.is_none())
-                 .map(|dep| INTERNER.intern_string(dep.name))
-                 .collect();
--            build.crates.insert(name, Crate { name, id: package.id, deps, path });
-+            build.crates.insert(name, Crate { name, deps, path });
-         }
-     }
- }
 diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index d7db2cef24f..a791177956d 100644
+index 8c2899c1..dda15d76 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
 @@ -11,7 +11,6 @@
@@ -352,7 +325,7 @@ index d7db2cef24f..a791177956d 100644
  use std::path::PathBuf;
  use std::process::Command;
  
-@@ -178,28 +177,6 @@ pub fn check(build: &mut Build) {
+@@ -177,28 +176,6 @@ pub fn check(build: &mut Build) {
              }
          }
  
diff --git a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch b/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
index adaf86f2f451..2cc1f6b900d3 100644
--- a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
+++ b/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
@@ -11,26 +11,26 @@ diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
 index e4396d530..cb2312028 100644
 --- a/src/bootstrap/bin/rustdoc.rs
 +++ b/src/bootstrap/bin/rustdoc.rs
-@@ -20,14 +20,11 @@ fn main() {
+@@ -22,14 +22,11 @@ fn main() {
          Err(_) => 0,
      };
  
--    let mut dylib_path = bootstrap::util::dylib_path();
+-    let mut dylib_path = dylib_path();
 -    dylib_path.insert(0, PathBuf::from(libdir.clone()));
 -
      let mut cmd = Command::new(rustdoc);
      cmd.args(&args)
          .arg("--sysroot")
          .arg(&sysroot)
--        .env(bootstrap::util::dylib_path_var(), env::join_paths(&dylib_path).unwrap());
-+        .env(bootstrap::util::dylib_path_var(), PathBuf::from(libdir.clone()));
+-        .env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
++        .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
-@@ -60,7 +57,7 @@ fn main() {
+@@ -62,7 +59,7 @@ fn main() {
          eprintln!(
              "rustdoc command: {:?}={:?} {:?}",
-             bootstrap::util::dylib_path_var(),
+             dylib_path_var(),
 -            env::join_paths(&dylib_path).unwrap(),
 +            PathBuf::from(libdir.clone()),
              cmd,
diff --git a/srcpkgs/rust/patches/ld-library-path.patch b/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
similarity index 100%
rename from srcpkgs/rust/patches/ld-library-path.patch
rename to srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
diff --git a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch b/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
index a9ca5f6c7bba..8a18e414e209 100644
--- a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
+++ b/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
@@ -12,14 +12,14 @@ diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs
 index 238da24b..ffb05ee7 100644
 --- a/vendor/libc/src/unix/mod.rs
 +++ b/vendor/libc/src/unix/mod.rs
-@@ -299,11 +299,11 @@ cfg_if! {
-         // cargo build, don't pull in anything extra as the libstd dep
-         // already pulls in all libs.
+@@ -329,11 +329,11 @@ cfg_if! {
+         #[link(name = "c", cfg(not(target_feature = "crt-static")))]
+         extern {}
      } else if #[cfg(target_env = "musl")] {
 +        #[link(name = "c")]
 +        extern {}
          #[cfg_attr(feature = "rustc-dep-of-std",
--                   link(name = "c", kind = "static",
+-                   link(name = "c", kind = "static", modifiers = "-bundle",
 +                   link(name = "gcc", kind = "static-nobundle",
                          cfg(target_feature = "crt-static")))]
 -        #[cfg_attr(feature = "rustc-dep-of-std",
diff --git a/srcpkgs/rust/patches/native-sysroot.patch b/srcpkgs/rust/patches/native-sysroot.patch
index a23046220e9c..6826b114b6b7 100644
--- a/srcpkgs/rust/patches/native-sysroot.patch
+++ b/srcpkgs/rust/patches/native-sysroot.patch
@@ -1,17 +1,8 @@
-commit 57ed964d186212739fa436f103bd923a2309f341
-Author: Daniel Kolesa <daniel@octaforge.org>
-Date:   Tue Dec 21 02:46:30 2021 +0100
-
-    allow specifying native sysroot to use for linkage
-    
-    This allows us to get around the linker attempting to use
-    incompatible libs.
-
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index de771280e..5faaf9439 100644
+index e816f9b4..a2668fa9 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1166,6 +1166,10 @@ impl<'a> Builder<'a> {
+@@ -1313,6 +1313,10 @@ pub fn cargo(
              }
          }
  
@@ -23,26 +14,26 @@ index de771280e..5faaf9439 100644
              cargo.env("RUSTC_HOST_LINKER", host_linker);
          }
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 06b7a8c55..d8e9275ad 100644
+index 642a5c24..0dd4f879 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -292,6 +292,7 @@ pub struct Target {
-     pub ar: Option<PathBuf>,
+@@ -294,6 +294,7 @@ pub struct Target {
      pub ranlib: Option<PathBuf>,
+     pub default_linker: Option<PathBuf>,
      pub linker: Option<PathBuf>,
 +    pub sysroot: Option<PathBuf>,
      pub ndk: Option<PathBuf>,
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
-@@ -525,6 +526,7 @@ struct TomlTarget {
-     ar: Option<String>,
-     ranlib: Option<String>,
-     linker: Option<String>,
-+    sysroot: Option<String>,
-     llvm_config: Option<String>,
-     llvm_filecheck: Option<String>,
-     android_ndk: Option<String>,
-@@ -909,6 +911,7 @@ impl Config {
+@@ -621,6 +622,7 @@ struct TomlTarget {
+         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 {
                  target.ar = cfg.ar.map(PathBuf::from);
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
@@ -51,10 +42,10 @@ index 06b7a8c55..d8e9275ad 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 b930f3cd7..06e782520 100644
+index f3d5f308..7f8b9b27 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1056,6 +1056,10 @@ impl Build {
+@@ -1125,6 +1125,10 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
          }
      }
  
diff --git a/srcpkgs/rust/patches/xxx-ppcle.patch b/srcpkgs/rust/patches/xxx-ppcle.patch
index 9473e7ad98f3..c0522f0eaafc 100644
--- a/srcpkgs/rust/patches/xxx-ppcle.patch
+++ b/srcpkgs/rust/patches/xxx-ppcle.patch
@@ -1,53 +1,8 @@
-From b92ce1ed0ac8d95831a43f4395544c17a0816c9b Mon Sep 17 00:00:00 2001
-From: Daniel Kolesa <daniel@octaforge.org>
-Date: Sat, 3 Jul 2021 21:02:03 +0200
-Subject: [PATCH] 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/fastcall-inreg.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/borrowck/borrowck-asm.rs              |  1 +
- src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs      |  1 +
- src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs  |  1 +
- src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs |  1 +
- src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs   |  1 +
- src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs  |  1 +
- src/test/ui/llvm-asm/llvm-asm-out-read-uninit.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/rustc-ap-rustc_target/src/spec/mod.rs      |  2 ++
- .../src/spec/powerpcle_unknown_linux_gnu.rs       | 15 +++++++++++++++
- .../src/spec/powerpcle_unknown_linux_musl.rs      | 15 +++++++++++++++
- vendor/target-lexicon/src/targets.rs              |  7 +++++++
- vendor/tikv-jemallocator/benches/roundtrip.rs     |  3 ++-
- vendor/tikv-jemallocator/src/lib.rs               |  3 ++-
- 37 files changed, 111 insertions(+), 6 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
- create mode 100644 vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
- create mode 100644 vendor/rustc-ap-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 c2e9dba6..8147a3c3 100644
+index 0c1ab67cc..8d4e5f3cb 100644
 --- a/compiler/rustc_middle/src/ty/layout.rs
 +++ b/compiler/rustc_middle/src/ty/layout.rs
-@@ -2753,6 +2753,8 @@ where
+@@ -3057,6 +3057,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;
@@ -56,7 +11,7 @@ index c2e9dba6..8147a3c3 100644
          use SpecAbi::*;
          let rust_abi = matches!(sig.abi, RustIntrinsic | PlatformIntrinsic | Rust | RustCall);
  
-@@ -2850,7 +2852,8 @@ where
+@@ -3165,7 +3167,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
                      || (!win_x64_gnu
                          && !linux_s390x_gnu_like
                          && !linux_sparc64_gnu_like
@@ -67,10 +22,10 @@ index c2e9dba6..8147a3c3 100644
                      arg.mode = PassMode::Ignore;
                  }
 diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
-index 2af46693..986d84e0 100644
+index bd5b712c1..f60be010c 100644
 --- a/compiler/rustc_target/src/spec/mod.rs
 +++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -716,6 +716,8 @@ supported_targets! {
+@@ -824,6 +824,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),
@@ -81,7 +36,7 @@ index 2af46693..986d84e0 100644
      ("powerpc64le-unknown-linux-gnu", powerpc64le_unknown_linux_gnu),
 diff --git a/compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
 new file mode 100644
-index 00000000..780c20a3
+index 000000000..b7148a2fc
 --- /dev/null
 +++ b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
 @@ -0,0 +1,15 @@
@@ -89,20 +44,20 @@ index 00000000..780c20a3
 +
 +pub fn target() -> Target {
 +    let mut base = super::linux_gnu_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
++    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".into());
 +    base.max_atomic_width = Some(32);
 +
 +    Target {
-+        llvm_target: "powerpcle-unknown-linux-gnu".to_string(),
++        llvm_target: "powerpcle-unknown-linux-gnu".into(),
 +        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
++        data_layout: "e-m:e-p:32:32-i64:64-n32".into(),
++        arch: "powerpc".into(),
++        options: TargetOptions { mcount: "_mcount".into(), ..base },
 +    }
 +}
 diff --git a/compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
 new file mode 100644
-index 00000000..9b848ccf
+index 000000000..a826b6e47
 --- /dev/null
 +++ b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
 @@ -0,0 +1,15 @@
@@ -110,24 +65,24 @@ index 00000000..9b848ccf
 +
 +pub fn target() -> Target {
 +    let mut base = super::linux_musl_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
++    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".into());
 +    base.max_atomic_width = Some(32);
 +
 +    Target {
-+        llvm_target: "powerpcle-unknown-linux-musl".to_string(),
++        llvm_target: "powerpcle-unknown-linux-musl".into(),
 +        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
++        data_layout: "e-m:e-p:32:32-i64:64-n32".into(),
++        arch: "powerpc".into(),
++        options: TargetOptions { mcount: "_mcount".into(), ..base },
 +    }
 +}
 diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 4111420e..cd69a8ec 100644
+index 71b8f3c45..1505c12e4 100644
 --- a/src/bootstrap/bootstrap.py
 +++ b/src/bootstrap/bootstrap.py
-@@ -289,9 +289,11 @@ def default_build_triple(verbose):
-         'i686': 'i686',
+@@ -320,9 +320,11 @@ def default_build_triple(verbose):
          'i786': 'i686',
+         'm68k': 'm68k',
          'powerpc': 'powerpc',
 +        'powerpcle': 'powerpcle',
          'powerpc64': 'powerpc64',
@@ -136,9 +91,9 @@ index 4111420e..cd69a8ec 100644
 +        'ppcle': 'powerpcle',
          'ppc64': 'powerpc64',
          'ppc64le': 'powerpc64le',
-         's390x': 's390x',
+         'riscv64': 'riscv64gc',
 diff --git a/src/test/codegen/abi-main-signature-16bit-c-int.rs b/src/test/codegen/abi-main-signature-16bit-c-int.rs
-index 4ed491df..82ec7755 100644
+index 4ed491dfb..82ec7755d 100644
 --- a/src/test/codegen/abi-main-signature-16bit-c-int.rs
 +++ b/src/test/codegen/abi-main-signature-16bit-c-int.rs
 @@ -9,6 +9,7 @@
@@ -149,20 +104,8 @@ index 4ed491df..82ec7755 100644
  // ignore-powerpc64
  // ignore-riscv64
  // ignore-s390x
-diff --git a/src/test/codegen/fastcall-inreg.rs b/src/test/codegen/fastcall-inreg.rs
-index adbeae45..0fd0a9e6 100644
---- a/src/test/codegen/fastcall-inreg.rs
-+++ b/src/test/codegen/fastcall-inreg.rs
-@@ -16,6 +16,7 @@
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-r600
- // ignore-riscv64
- // ignore-amdgcn
 diff --git a/src/test/codegen/global_asm.rs b/src/test/codegen/global_asm.rs
-index 57d8aeb1..e0b1b692 100644
+index fab84868f..104d93d01 100644
 --- a/src/test/codegen/global_asm.rs
 +++ b/src/test/codegen/global_asm.rs
 @@ -12,6 +12,7 @@
@@ -174,7 +117,7 @@ index 57d8aeb1..e0b1b692 100644
  // ignore-amdgcn
  // ignore-sparc
 diff --git a/src/test/codegen/global_asm_include.rs b/src/test/codegen/global_asm_include.rs
-index 44402619..62ecfa6d 100644
+index 02ee91645..13f303332 100644
 --- a/src/test/codegen/global_asm_include.rs
 +++ b/src/test/codegen/global_asm_include.rs
 @@ -12,6 +12,7 @@
@@ -186,7 +129,7 @@ index 44402619..62ecfa6d 100644
  // ignore-amdgcn
  // ignore-sparc
 diff --git a/src/test/codegen/global_asm_x2.rs b/src/test/codegen/global_asm_x2.rs
-index d632d0dd..29f97775 100644
+index bdcf0ea84..1e2ff8b8d 100644
 --- a/src/test/codegen/global_asm_x2.rs
 +++ b/src/test/codegen/global_asm_x2.rs
 @@ -12,6 +12,7 @@
@@ -198,10 +141,10 @@ index d632d0dd..29f97775 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 3017adb4..632565bb 100644
+index 4ad3642c0..fca31c0c6 100644
 --- a/src/test/codegen/repr-transparent-aggregates-1.rs
 +++ b/src/test/codegen/repr-transparent-aggregates-1.rs
-@@ -7,6 +7,7 @@
+@@ -6,6 +6,7 @@
  // ignore-mips
  // ignore-mips64
  // ignore-powerpc
@@ -210,10 +153,10 @@ index 3017adb4..632565bb 100644
  // ignore-riscv64 see codegen/riscv-abi
  // ignore-windows
 diff --git a/src/test/codegen/repr-transparent-aggregates-2.rs b/src/test/codegen/repr-transparent-aggregates-2.rs
-index 429d760b..57e75f95 100644
+index b68e8e9eb..97c509b1b 100644
 --- a/src/test/codegen/repr-transparent-aggregates-2.rs
 +++ b/src/test/codegen/repr-transparent-aggregates-2.rs
-@@ -6,6 +6,7 @@
+@@ -5,6 +5,7 @@
  // ignore-emscripten
  // ignore-mips64
  // ignore-powerpc
@@ -222,7 +165,7 @@ index 429d760b..57e75f95 100644
  // ignore-powerpc64le
  // ignore-riscv64 see codegen/riscv-abi
 diff --git a/src/test/codegen/stack-probes.rs b/src/test/codegen/stack-probes.rs
-index 9bd351df..29073eb5 100644
+index 9bd351df3..29073eb56 100644
 --- a/src/test/codegen/stack-probes.rs
 +++ b/src/test/codegen/stack-probes.rs
 @@ -3,6 +3,7 @@
@@ -234,7 +177,7 @@ index 9bd351df..29073eb5 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/test/run-make-fulldeps/atomic-lock-free/Makefile b/src/test/run-make-fulldeps/atomic-lock-free/Makefile
-index 9e8b4fab..402d37a4 100644
+index 9e8b4fabf..402d37a45 100644
 --- a/src/test/run-make-fulldeps/atomic-lock-free/Makefile
 +++ b/src/test/run-make-fulldeps/atomic-lock-free/Makefile
 @@ -36,6 +36,8 @@ ifeq ($(filter powerpc,$(LLVM_COMPONENTS)),powerpc)
@@ -247,7 +190,7 @@ index 9e8b4fab..402d37a4 100644
  	nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
  	$(RUSTC) --target=powerpc64le-unknown-linux-gnu atomic_lock_free.rs
 diff --git a/src/test/ui/abi/stack-probes-lto.rs b/src/test/ui/abi/stack-probes-lto.rs
-index 90df1f3f..8c6dda8b 100644
+index 90df1f3f5..8c6dda8b8 100644
 --- a/src/test/ui/abi/stack-probes-lto.rs
 +++ b/src/test/ui/abi/stack-probes-lto.rs
 @@ -4,6 +4,7 @@
@@ -259,7 +202,7 @@ index 90df1f3f..8c6dda8b 100644
  // ignore-sparc
  // ignore-sparc64
 diff --git a/src/test/ui/abi/stack-probes.rs b/src/test/ui/abi/stack-probes.rs
-index e998dd0f..9472e538 100644
+index e998dd0f8..9472e5387 100644
 --- a/src/test/ui/abi/stack-probes.rs
 +++ b/src/test/ui/abi/stack-probes.rs
 @@ -4,6 +4,7 @@
@@ -270,92 +213,8 @@ index e998dd0f..9472e538 100644
  // ignore-s390x
  // ignore-sparc
  // ignore-sparc64
-diff --git a/src/test/ui/borrowck/borrowck-asm.rs b/src/test/ui/borrowck/borrowck-asm.rs
-index a3f64524..faf9adb4 100644
---- a/src/test/ui/borrowck/borrowck-asm.rs
-+++ b/src/test/ui/borrowck/borrowck-asm.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs b/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs
-index 2868d3d3..5c6e325b 100644
---- a/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs
-@@ -4,6 +4,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs b/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs
-index e3bc7d29..49f53f67 100644
---- a/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs b/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs
-index daae0c81..fd505c86 100644
---- a/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs
-@@ -5,6 +5,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs b/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs
-index 9c62532c..baa1c1ba 100644
---- a/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs b/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs
-index 72edb339..2fec991d 100644
---- a/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs b/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs
-index acf4cf9f..dfad0775 100644
---- a/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
 diff --git a/src/test/ui/target-feature/gate.rs b/src/test/ui/target-feature/gate.rs
-index 164830fe..531a4b45 100644
+index 2382c98f8..e6fe855d7 100644
 --- a/src/test/ui/target-feature/gate.rs
 +++ b/src/test/ui/target-feature/gate.rs
 @@ -5,6 +5,7 @@
@@ -367,7 +226,7 @@ index 164830fe..531a4b45 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/test/ui/target-feature/invalid-attribute.rs b/src/test/ui/target-feature/invalid-attribute.rs
-index 5ea78215..47e7887a 100644
+index ad1b6e96b..122d59a57 100644
 --- a/src/test/ui/target-feature/invalid-attribute.rs
 +++ b/src/test/ui/target-feature/invalid-attribute.rs
 @@ -5,6 +5,7 @@
@@ -379,10 +238,10 @@ index 5ea78215..47e7887a 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
-index 7dbd7094..08c9de3c 100644
+index bed509d77..8bc817897 100644
 --- a/src/tools/compiletest/src/util.rs
 +++ b/src/tools/compiletest/src/util.rs
-@@ -67,6 +67,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
+@@ -70,6 +70,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
      ("msp430", "msp430"),
      ("nvptx64", "nvptx64"),
      ("powerpc", "powerpc"),
@@ -391,10 +250,10 @@ index 7dbd7094..08c9de3c 100644
      ("powerpc64le", "powerpc64"),
      ("riscv64gc", "riscv64"),
 diff --git a/vendor/cc/src/lib.rs b/vendor/cc/src/lib.rs
-index 5051b296..286c2fb7 100644
+index e3a2b98b0..0236729fd 100644
 --- a/vendor/cc/src/lib.rs
 +++ b/vendor/cc/src/lib.rs
-@@ -2409,6 +2409,7 @@ impl Build {
+@@ -2594,6 +2594,7 @@ impl Build {
              "powerpc-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
              "powerpc-unknown-linux-gnuspe" => Some("powerpc-linux-gnuspe"),
              "powerpc-unknown-netbsd" => Some("powerpc--netbsd"),
@@ -402,66 +261,11 @@ index 5051b296..286c2fb7 100644
              "powerpc64-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
              "powerpc64le-unknown-linux-gnu" => Some("powerpc64le-linux-gnu"),
              "riscv32i-unknown-none-elf" => self.find_working_gnu_prefix(&[
-diff --git a/vendor/rustc-ap-rustc_target/src/spec/mod.rs b/vendor/rustc-ap-rustc_target/src/spec/mod.rs
-index 2af46693..986d84e0 100644
---- a/vendor/rustc-ap-rustc_target/src/spec/mod.rs
-+++ b/vendor/rustc-ap-rustc_target/src/spec/mod.rs
-@@ -716,6 +716,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),
-+    ("powerpcle-unknown-linux-gnu", powerpcle_unknown_linux_gnu),
-+    ("powerpcle-unknown-linux-musl", powerpcle_unknown_linux_musl),
-     ("powerpc64-unknown-linux-gnu", powerpc64_unknown_linux_gnu),
-     ("powerpc64-unknown-linux-musl", powerpc64_unknown_linux_musl),
-     ("powerpc64le-unknown-linux-gnu", powerpc64le_unknown_linux_gnu),
-diff --git a/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
-new file mode 100644
-index 00000000..780c20a3
---- /dev/null
-+++ b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
-@@ -0,0 +1,15 @@
-+use crate::spec::{LinkerFlavor, Target, TargetOptions};
-+
-+pub fn target() -> Target {
-+    let mut base = super::linux_gnu_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
-+    base.max_atomic_width = Some(32);
-+
-+    Target {
-+        llvm_target: "powerpcle-unknown-linux-gnu".to_string(),
-+        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
-+    }
-+}
-diff --git a/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_musl.rs b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
-new file mode 100644
-index 00000000..9b848ccf
---- /dev/null
-+++ b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
-@@ -0,0 +1,15 @@
-+use crate::spec::{LinkerFlavor, Target, TargetOptions};
-+
-+pub fn target() -> Target {
-+    let mut base = super::linux_musl_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
-+    base.max_atomic_width = Some(32);
-+
-+    Target {
-+        llvm_target: "powerpcle-unknown-linux-musl".to_string(),
-+        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
-+    }
-+}
 diff --git a/vendor/target-lexicon/src/targets.rs b/vendor/target-lexicon/src/targets.rs
-index 87c237aa..dc694010 100644
+index 22cc95cc3..46167e34e 100644
 --- a/vendor/target-lexicon/src/targets.rs
 +++ b/vendor/target-lexicon/src/targets.rs
-@@ -26,6 +26,7 @@ pub enum Architecture {
+@@ -29,6 +29,7 @@ pub enum Architecture {
      Msp430,
      Nvptx64,
      Powerpc,
@@ -469,7 +273,7 @@ index 87c237aa..dc694010 100644
      Powerpc64,
      Powerpc64le,
      Riscv32(Riscv32Architecture),
-@@ -517,6 +518,7 @@ impl Architecture {
+@@ -533,6 +534,7 @@ impl Architecture {
              | Mips64(Mips64Architecture::Mipsisa64r6el)
              | Msp430
              | Nvptx64
@@ -477,15 +281,15 @@ index 87c237aa..dc694010 100644
              | Powerpc64le
              | Riscv32(_)
              | Riscv64(_)
-@@ -553,6 +555,7 @@ impl Architecture {
-             | Sparc
-             | Wasm32
+@@ -574,6 +576,7 @@ impl Architecture {
+             | M68k
              | Mips32(_)
+             | Powerpc
 +            | Powerpcle
-             | Powerpc => Ok(PointerWidth::U32),
+             | XTensa => Ok(PointerWidth::U32),
              AmdGcn
-             | Powerpc64le
-@@ -737,6 +740,7 @@ impl fmt::Display for Architecture {
+             | Bpfeb
+@@ -763,6 +766,7 @@ impl fmt::Display for Architecture {
              Msp430 => f.write_str("msp430"),
              Nvptx64 => f.write_str("nvptx64"),
              Powerpc => f.write_str("powerpc"),
@@ -493,7 +297,7 @@ index 87c237aa..dc694010 100644
              Powerpc64 => f.write_str("powerpc64"),
              Powerpc64le => f.write_str("powerpc64le"),
              Riscv32(riscv32) => riscv32.fmt(f),
-@@ -913,6 +917,7 @@ impl FromStr for Architecture {
+@@ -943,6 +947,7 @@ impl FromStr for Architecture {
              "msp430" => Msp430,
              "nvptx64" => Nvptx64,
              "powerpc" => Powerpc,
@@ -501,8 +305,8 @@ index 87c237aa..dc694010 100644
              "powerpc64" => Powerpc64,
              "powerpc64le" => Powerpc64le,
              "s390x" => S390x,
-@@ -1380,6 +1385,8 @@ mod tests {
-             "powerpc-unknown-netbsd",
+@@ -1445,6 +1450,8 @@ mod tests {
+             "powerpc-unknown-openbsd",
              "powerpc-wrs-vxworks",
              "powerpc-wrs-vxworks-spe",
 +            "powerpcle-unknown-linux-gnu",
@@ -511,7 +315,7 @@ index 87c237aa..dc694010 100644
              "powerpc64-unknown-linux-gnu",
              "powerpc64-unknown-linux-musl",
 diff --git a/vendor/tikv-jemallocator/benches/roundtrip.rs b/vendor/tikv-jemallocator/benches/roundtrip.rs
-index 40b8005f..bc4df023 100644
+index 767abe8d4..704bf955a 100644
 --- a/vendor/tikv-jemallocator/benches/roundtrip.rs
 +++ b/vendor/tikv-jemallocator/benches/roundtrip.rs
 @@ -22,7 +22,8 @@ static A: Jemalloc = Jemalloc;
@@ -525,19 +329,16 @@ index 40b8005f..bc4df023 100644
  const MIN_ALIGN: usize = 8;
  #[cfg(all(any(
 diff --git a/vendor/tikv-jemallocator/src/lib.rs b/vendor/tikv-jemallocator/src/lib.rs
-index 9a489b62..1ed12b26 100644
+index 4a9397331..4cf47c05d 100644
 --- a/vendor/tikv-jemallocator/src/lib.rs
 +++ b/vendor/tikv-jemallocator/src/lib.rs
-@@ -44,7 +44,8 @@ use libc::{c_int, c_void};
+@@ -46,7 +46,8 @@ use libc::{c_int, c_void};
      target_arch = "arm",
      target_arch = "mips",
      target_arch = "mipsel",
 -    target_arch = "powerpc"
 +    target_arch = "powerpc",
-+    target_arch = "powerpcle"
++    target_arch = "powerpcle",
  )))]
  const ALIGNOF_MAX_ALIGN_T: usize = 8;
  #[cfg(all(any(
--- 
-2.32.0
-
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index 560a629f3da2..53ef4333cc52 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -8,7 +8,7 @@
 # uploaded to https://alpha.de.repo.voidlinux.org/distfiles/
 #
 pkgname=rust
-version=1.57.0
+version=1.61.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=3546f9c3b91b1f8b8efd26c94d6b50312c08210397b4072ed2748e2bd4445c1a
+checksum=ad0b4351675aa9abdf4c7e066613bd274c4391c5506db152983426376101daed
 lib32disabled=yes
 make_check=no # CBA for now
 
@@ -61,7 +61,6 @@ post_patch() {
 	_clear_vendor_checksums libc
 	_clear_vendor_checksums typenum
 	_clear_vendor_checksums cc
-	_clear_vendor_checksums rustc-ap-rustc_target
 	_clear_vendor_checksums target-lexicon
 	_clear_vendor_checksums tikv-jemallocator
 }
@@ -216,14 +215,8 @@ do_install() {
 
 	cd ${DESTDIR}/usr/lib
 	# symlinks instead of copies
-	mv *.so rustlib/${RUST_TARGET}/lib
+	rm *.so
 	ln -sf rustlib/${RUST_TARGET}/lib/*.so .
-
-	# executable used for split dwarf, currently unstable on linux.
-	# it's copied directly from the local llvm package, but
-	# FIXME: cross builds are installing the version from the build machine,
-	# it shouldn't be necessary to remove it
-	rm rustlib/${RUST_TARGET}/bin/rust-llvm-dwp
 }
 
 rust-doc_package() {

From abf14e4bf8607398237b1834e1be8294152c3904 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:14:23 +0200
Subject: [PATCH 4/4] cargo: update to 1.61.0

---
 srcpkgs/cargo/template | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index c512e7005833..e3c30f625acd 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -1,8 +1,8 @@
 # Template file for 'cargo'
 pkgname=cargo
-version=0.58.0
+version=1.61.0
 revision=1
-wrksrc="cargo-${version}"
+wrksrc="cargo-rust-${version}"
 build_helper=rust
 hostmakedepends="cargo-bootstrap rust python3 curl cmake pkg-config zlib-devel"
 makedepends="rust libcurl-devel openssl-devel"
@@ -11,10 +11,10 @@ short_desc="Rust package manager"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://crates.io/"
-distfiles="https://github.com/rust-lang/cargo/archive/${version}.tar.gz
- https://github.com/crossbeam-rs/crossbeam/archive/refs/tags/crossbeam-utils-0.8.5.tar.gz"
-checksum="e1d6f55414a29906d24b13c687996b5220e08ccce9c682e4c02851138fc7093f
- 57db07eb38b0aaf7951c79b4639819cb84bc4269507091afea7267e10a54e079"
+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
+ 52c451910203cd9002cc4b85cff95f45c6ba245392801e80d7898ca5c3c3ab29"
 replaces="cargo-tree>=0"
 
 build_options="static bindist"
@@ -28,7 +28,7 @@ if [ -z "$_build_static" ]; then
 	makedepends+=" libgit2-devel"
 fi
 
-post_extract() {
+pre_patch() {
 	mv ../crossbeam-* crossbeam-utils
 }
 

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

* Re: Update Rust toolchain to 1.61.0
  2022-05-21 21:09 [PR PATCH] Update Rust toolchain to 1.61.0 tranzystorek-io
                   ` (2 preceding siblings ...)
  2022-05-22  8:13 ` tranzystorek-io
@ 2022-05-22  8:14 ` tranzystorek-io
  2022-05-22  8:21 ` [PR PATCH] [Updated] " tranzystorek-io
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tranzystorek-io @ 2022-05-22  8:14 UTC (permalink / raw)
  To: ml

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

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/37232#issuecomment-1133769262

Comment:
@q66 Could I ask for the following binaries:

- rust-bootstrap for ppc64le-musl, ~~ppc64~~
- cargo-bootstrap for ppc64le-musl, ppc64, ppc

EDIT: rust-bootstrap/ppc64 is available upstream, I'm not sure why it was excluded?

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

* Re: [PR PATCH] [Updated] Update Rust toolchain to 1.61.0
  2022-05-21 21:09 [PR PATCH] Update Rust toolchain to 1.61.0 tranzystorek-io
                   ` (3 preceding siblings ...)
  2022-05-22  8:14 ` tranzystorek-io
@ 2022-05-22  8:21 ` tranzystorek-io
  2022-05-22  8:23 ` tranzystorek-io
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tranzystorek-io @ 2022-05-22  8:21 UTC (permalink / raw)
  To: ml

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

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

https://github.com/tranzystorek-io/void-packages rust-toolchain
https://github.com/void-linux/void-packages/pull/37232

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

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-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)


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

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

From ec9645e312bf708668bc2ee12948d3a912bec5a6 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:03:26 +0200
Subject: [PATCH 1/4] rust-bootstrap: update to 1.61.0

---
 srcpkgs/rust-bootstrap/template | 37 +++++++++++++++++----------------
 1 file changed, 19 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/rust-bootstrap/template b/srcpkgs/rust-bootstrap/template
index bbedb66430b6..2645bd580d74 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.57.0
+version=1.61.0
 revision=1
 create_wrksrc=yes
 short_desc="Rust programming language bootstrap toolchain"
@@ -17,8 +17,8 @@ fi
 
 _bootstrap_url="https://static.rust-lang.org/dist"
 
-case "$XBPS_MACHINE" in
-	x86_64*|i686|ppc64le|ppc) ;;
+case "$XBPS_TARGET_MACHINE" in
+	x86_64*|i686|ppc64le|ppc|ppc64) ;;
 	*) _bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles";;
 esac
 
@@ -29,40 +29,40 @@ distfiles="
 case "$XBPS_TARGET_MACHINE" in
 	i686)
 		checksum="
-		 9bade3fcd246b0ad6859fcf5d0a80d3eb833e5410efa3a5552c241865562461e
-		 586e7fd521a058cbf4778abb67d7d078dd4820d356351d0b6a719e21d00966db"
+		 8af0ec3eb470e7e28439fedf9ebdadf90df8c58da544cc643033e6fc0ccf0bea
+		 ab223fcec35183bc0fe630403537cd7dae55c403103df29b25077db4882cb88e"
 		;;
 	x86_64)
 		checksum="
-		 c42f40c5279a3a9d539cae93dbcab9d333777ad9a60a5b9f1086b874ef63db86
-		 ccdc72d06c90841b7227ec3630337881eeda3da5fbe87328d2e9d705f6f8016c"
+		 21c4613f389ed130fbaaf88f1e984319f72b5fc10734569a5ba19e22ebb03abd
+		 270b07aa5f2de52255a117e1e587138d77375ce0d09a1d7fead085f29b3977e9"
 		;;
 	x86_64-musl)
 		checksum="
-		 5b04e0e0bbf140f7c49baa6280114c28f59f6de50481bdd45074eebf629c174c
-		 818213a6444503ed6adf0231d3c71de990d4c26926c62e8c602bb7e2d636fb94"
+		 89cb72cbc493cb5cd8e43830009b4a1a5bfd472246ae184157868c9b0607bf6c
+		 1f4f2e4c5dd0f9b0dac7c8888f4a49ef16a6fe8992f39895823d2a442f0fe408"
 		;;
 	ppc64le)
 		checksum="
-		 f43cb99109c3438c77c7079cdce4673df3320e310158e0b4d949c1babc4300fc
-		 fc07eb3e9f3d227428cc5b53ca868e3de375bc198ce4dce7b87a9246e6fec81a"
+		 dc54893d747e4f3330515caa75e404f78c6c5475a1216d1428f5e7ce1c2e9602
+		 36c0ccff14c80419507561db050f9533f0abd43fc50f3ddb859c10df74b1c351"
 		;;
 	ppc64le-musl)
 		checksum="
-		 6b48e521ba8a070a7b992595e82c5a164cc01c93bbd9a7b3d4db362f4b060df8
-		 d7876e817fc95df2e81858fc9ddb95b10fb83b413277ea6dbdfa9a80fa0d990e"
+		 badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb
+		 badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
 	ppc64)
 		checksum="
-		 2ea5b66d2cd8b9c251590fd5bd3e23cedec658b61f541e2824ce3fdcda263982
-		 e9c1394771b1b24241d8938ad75c4a6ed8bfa043522c74767b3528f2289095c0"
+		 d75d9565033cdbf1b55ea129a515a961199d9414efae3bb88011d3e6957eb89a
+		 1d816e4b02b45a6a4ccb3a4b6ef8dbd83255845c49e46cc77de06385d6a91c52"
 		;;
 	ppc)
 		checksum="
-		 a1d7611b2d39224ba9a915009ae2a6639def42767370f50effd57770b3eb2150
-		 bc117ce5f0c81d2e14ea2d1832c0e908b1153caf49f295a9d28af2128f5fae44"
+		 f28a8c2986fce5015c67823e39ad4b53e2db06603b6ea4a1217ac961cbbfb073
+		 7d2f7f900c8c05616fba8e99ab041d847af3653c259b99445edd788acddf878c"
 		;;
-	*) broken="rust bootstrap binaries unavailable for ${XBPS_MACHINE}";;
+	*) broken="rust bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac
 
 do_install() {
@@ -76,5 +76,6 @@ do_install() {
 	vlicense rustc-${version}-${RUST_TARGET}/LICENSE-APACHE
 	vlicense rustc-${version}-${RUST_TARGET}/LICENSE-MIT
 
+	rm -rf ${DESTDIR}/usr/share/doc/rust
 	rm -f ${DESTDIR}/usr/lib/rustlib/${RUST_TARGET}/bin/rust-ll*
 }

From cbfacf0bd8e27e16f2be42045051de003268770d Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:12:56 +0200
Subject: [PATCH 2/4] cargo-bootstrap: update to 1.61.0

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

diff --git a/srcpkgs/cargo-bootstrap/template b/srcpkgs/cargo-bootstrap/template
index e75f8763b5b8..17b915396f5e 100644
--- a/srcpkgs/cargo-bootstrap/template
+++ b/srcpkgs/cargo-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo-bootstrap'
 pkgname=cargo-bootstrap
-version=0.58.0
+version=1.61.0
 revision=1
 short_desc="Bootstrap binaries of Rust package manager"
 maintainer="q66 <daniel@octaforge.org>"
@@ -11,45 +11,41 @@ lib32disabled=yes
 nostrip=yes
 
 _bootstrap_url="https://static.rust-lang.org/dist"
-_bootver=1.57.0
 
 # we don't use upstream cargo binaries for ppc32, as they are busted (probably
 # a dependency is wrong, which results in failed signature verification when
 # updating the crates.io index)
 case "$XBPS_TARGET_MACHINE" in
-	x86_64*|i686|ppc64le) ;;
-	*)
-		_bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles"
-		_bootver=${version}
-		;;
+	x86_64*|i686|ppc64le|ppc64) ;;
+	*) _bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles" ;;
 esac
 
-wrksrc="cargo-${_bootver}-${RUST_TARGET}"
-distfiles="${_bootstrap_url}/cargo-${_bootver}-${RUST_TARGET}.tar.xz"
+wrksrc="cargo-${version}-${RUST_TARGET}"
+distfiles="${_bootstrap_url}/cargo-${version}-${RUST_TARGET}.tar.xz"
 
 case "$XBPS_TARGET_MACHINE" in
 	i686)
-		checksum="9898a1fae2647f930fa14b9c160a1d22e67ccc70ac0d2d8f79ef1ffcf8d89af7"
+		checksum="fe258b85ef0644ff08c2095e329399dd4de0e1b2e51f4f4e90cb956d40dc61de"
 		;;
 	x86_64)
-		checksum="ed2013713ae742895af5df8d91c5430ba9ba3c781e3bc7f3471b220cc06d565d"
+		checksum="9461727d754f865ef2a87479d40bbe4c5176f80963b7c50b7797bc8940d7a0a0"
 		;;
 	x86_64-musl)
-		checksum="0d8564d0348843d6c08d98990d9eac50b7b7ab790f89d514b4f45079e786d932"
+		checksum="db4b4423c2843b6e27737664cf8085afcba670374110ca24b9c8d341045e748c"
 		;;
 	ppc64le)
-		checksum="599cf1b5a8cdbf76d591621bc9222aefa60e2f5fd378ae71c4dcf4514c47122e"
+		checksum="09817011ff1ef4b7006387c7cabb6a059731792a9372533dec7d87e7f014444b"
 		;;
 	ppc64le-musl)
-		checksum="99ae7661c62617ac42adacb50cce9ae8d019bcf85e987b98fbc27240bceb1dd9"
+		checksum="badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
 	ppc64)
-		checksum="c64b9cce7a3ceaf5c310fad70be33077f1e6dea1384767fcf744732c0daa7473"
+		checksum="d8e2da0f18fb57aab1a085a5e8c99b8e6d954f61f352baabce1c39e26b36faab"
 		;;
 	ppc)
-		checksum="e67c2a7d16b3c732a1dcb663d031daf6eaca4b74d1d15196086c53c0c3a5b0a2"
+		checksum="badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
-	*) broken="cargo bootstrap binaries unavailable for ${XBPS_MACHINE}";;
+	*) broken="cargo bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac
 
 do_install() {

From de439cd7313e32e076932af93746cac9eead0eea Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:09:02 +0200
Subject: [PATCH 3/4] rust: update to 1.61.0

---
 .../rust/patches/0001-musl-void-setup.patch   | 135 +++-----
 ...007-fix-rustdoc-when-cross-compiling.patch |  12 +-
 ... 0010-do-not-export-LD_LIBRARY_PATH.patch} |   0
 ...kage-of-musl-libc-for-the-libc-crate.patch |   8 +-
 srcpkgs/rust/patches/native-sysroot.patch     |  41 +--
 srcpkgs/rust/patches/xxx-ppcle.patch          | 309 ++++--------------
 srcpkgs/rust/template                         |  13 +-
 7 files changed, 138 insertions(+), 380 deletions(-)
 rename srcpkgs/rust/patches/{ld-library-path.patch => 0010-do-not-export-LD_LIBRARY_PATH.patch} (100%)

diff --git a/srcpkgs/rust/patches/0001-musl-void-setup.patch b/srcpkgs/rust/patches/0001-musl-void-setup.patch
index 427581c48f54..c13cb1730986 100644
--- a/srcpkgs/rust/patches/0001-musl-void-setup.patch
+++ b/srcpkgs/rust/patches/0001-musl-void-setup.patch
@@ -1,8 +1,8 @@
 diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
-index 2fc9ab29f92..27673615968 100644
+index 51f392a6..62560658 100644
 --- a/compiler/rustc_target/src/spec/crt_objects.rs
 +++ b/compiler/rustc_target/src/spec/crt_objects.rs
-@@ -62,28 +62,6 @@ pub(super) fn all(obj: &str) -> CrtObjects {
+@@ -63,28 +63,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects {
      ])
  }
  
@@ -32,7 +32,7 @@ index 2fc9ab29f92..27673615968 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 5038a967d0a..b3c0e5bc416 100644
+index 207a87ab..88f807a5 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 @@
@@ -42,7 +42,7 @@ index 5038a967d0a..b3c0e5bc416 100644
  pub fn opts() -> TargetOptions {
      let mut base = super::linux_base::opts();
  
-     base.env = "musl".to_string();
+     base.env = "musl".into();
 -    base.pre_link_objects_fallback = crt_objects::pre_musl_fallback();
 -    base.post_link_objects_fallback = crt_objects::post_musl_fallback();
 -    base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
@@ -53,30 +53,29 @@ index 5038a967d0a..b3c0e5bc416 100644
      base
  }
 diff --git a/config.toml.example b/config.toml.example
-index 61e57eee782..77943129204 100644
+index 6e53d9b4..74980d2c 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -668,15 +668,6 @@ changelog-seen = 2
- # only use static libraries. If unset, the target's default linkage is used.
- #crt-static = <platform-specific> (bool)
+@@ -511,14 +511,6 @@ changelog-seen = 2
+ # supplementary build information, like distro-specific package versions.
+ #description = <none> (string)
  
 -# The root location of the musl installation directory. The library directory
 -# will also need to contain libunwind.a for an unwinding implementation. Note
 -# that this option only makes sense for musl targets that produce statically
 -# linked binaries.
--#musl-root = build.musl-root (path)
+-#
+-# Defaults to /usr on musl hosts. Has no default otherwise.
+-#musl-root = <platform specific> (path)
 -
--# The full path to the musl libdir.
--#musl-libdir = musl-root/lib
--
- # The root location of the `wasm32-wasi` sysroot. Only used for the
- # `wasm32-wasi` target. If you are building wasm32-wasi target, make sure to
- # create a `[target.wasm32-wasi]` section and move this field there.
+ # By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
+ # platforms to ensure that the compiler is usable by default from the build
+ # directory (as it links to a number of dynamic libraries). This may not be
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index e750c2963dd..f6ba3032b0d 100644
+index 7ce44687..4e7507ae 100644
 --- a/src/bootstrap/cc_detect.rs
 +++ b/src/bootstrap/cc_detect.rs
-@@ -98,7 +98,7 @@ pub fn find(build: &mut Build) {
+@@ -97,7 +97,7 @@ pub fn find(build: &mut Build) {
          if let Some(cc) = config.and_then(|c| c.cc.as_ref()) {
              cfg.compiler(cc);
          } else {
@@ -85,7 +84,7 @@ index e750c2963dd..f6ba3032b0d 100644
          }
  
          let compiler = cfg.get_compiler();
-@@ -126,7 +126,7 @@ pub fn find(build: &mut Build) {
+@@ -125,7 +125,7 @@ pub fn find(build: &mut Build) {
              cfg.compiler(cxx);
              true
          } else if build.hosts.contains(&target) || build.build == target {
@@ -130,13 +129,14 @@ index e750c2963dd..f6ba3032b0d 100644
      }
  }
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index e9cc7662e63..4971534ba0e 100644
+index afc333b5..9d67ab56 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -199,36 +199,7 @@ fn copy_self_contained_objects(
+@@ -197,39 +197,7 @@ fn copy_self_contained_objects(
+     let mut target_deps = vec![];
  
-     // Copies the CRT objects.
-     //
+     // Copies the libc and CRT objects.
+-    //
 -    // rustc historically provides a more self-contained installation for musl targets
 -    // not requiring the presence of a native musl toolchain. For example, it can fall back
 -    // to using gcc from a glibc-targeting toolchain for linking.
@@ -146,7 +146,7 @@ index e9cc7662e63..4971534ba0e 100644
 -        let srcdir = builder.musl_libdir(target).unwrap_or_else(|| {
 -            panic!("Target {:?} does not have a \"musl-libdir\" key", target.triple)
 -        });
--        for &obj in &["crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
+-        for &obj in &["libc.a", "crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
 -            copy_and_stamp(
 -                builder,
 -                &libdir_self_contained,
@@ -164,14 +164,16 @@ index e9cc7662e63..4971534ba0e 100644
 -            target_deps.push((target, DependencyType::TargetSelfContained));
 -        }
 -
--        let libunwind_path = copy_llvm_libunwind(builder, target, &libdir_self_contained);
--        target_deps.push((libunwind_path, DependencyType::TargetSelfContained));
+-        if !target.starts_with("s390x") {
+-            let libunwind_path = copy_llvm_libunwind(builder, target, &libdir_self_contained);
+-            target_deps.push((libunwind_path, DependencyType::TargetSelfContained));
+-        }
 -    } else if target.ends_with("-wasi") {
 +    if target.ends_with("-wasi") {
          let srcdir = builder
              .wasi_root(target)
              .unwrap_or_else(|| {
-@@ -312,15 +283,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+@@ -313,15 +281,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
              .arg("--manifest-path")
              .arg(builder.src.join("library/test/Cargo.toml"));
  
@@ -188,7 +190,7 @@ index e9cc7662e63..4971534ba0e 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 e658d958d0a..914b1390b37 100644
+index 9534cc5f..642a5c24 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
 @@ -172,7 +172,6 @@ pub struct Config {
@@ -199,7 +201,7 @@ index e658d958d0a..914b1390b37 100644
      pub prefix: Option<PathBuf>,
      pub sysconfdir: Option<PathBuf>,
      pub datadir: Option<PathBuf>,
-@@ -298,8 +297,6 @@ pub struct Target {
+@@ -299,8 +298,6 @@ pub struct Target {
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
      pub crt_static: Option<bool>,
@@ -208,24 +210,24 @@ index e658d958d0a..914b1390b37 100644
      pub wasi_root: Option<PathBuf>,
      pub qemu_rootfs: Option<PathBuf>,
      pub no_std: bool,
-@@ -493,7 +490,6 @@ struct Rust {
-     default_linker: Option<String>,
-     channel: Option<String>,
-     description: Option<String>,
--    musl_root: Option<String>,
-     rpath: Option<bool>,
-     verbose_tests: Option<bool>,
-     optimize_tests: Option<bool>,
-@@ -536,8 +532,6 @@ struct TomlTarget {
-     sanitizers: Option<bool>,
-     profiler: Option<bool>,
-     crt_static: Option<bool>,
--    musl_root: Option<String>,
--    musl_libdir: Option<String>,
-     wasi_root: Option<String>,
-     qemu_rootfs: Option<String>,
-     no_std: Option<bool>,
-@@ -872,7 +866,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -587,7 +584,6 @@ struct Rust {
+         default_linker: Option<String> = "default-linker",
+         channel: Option<String> = "channel",
+         description: Option<String> = "description",
+-        musl_root: Option<String> = "musl-root",
+         rpath: Option<bool> = "rpath",
+         verbose_tests: Option<bool> = "verbose-tests",
+         optimize_tests: Option<bool> = "optimize-tests",
+@@ -631,8 +627,6 @@ struct TomlTarget {
+         sanitizers: Option<bool> = "sanitizers",
+         profiler: Option<bool> = "profiler",
+         crt_static: Option<bool> = "crt-static",
+-        musl_root: Option<String> = "musl-root",
+-        musl_libdir: Option<String> = "musl-libdir",
+         wasi_root: Option<String> = "wasi-root",
+         qemu_rootfs: Option<String> = "qemu-rootfs",
+         no_std: Option<bool> = "no-std",
+@@ -1013,7 +1007,6 @@ pub fn parse(args: &[String]) -> Config {
              set(&mut config.llvm_tools_enabled, rust.llvm_tools);
              config.rustc_parallel = rust.parallel_compiler.unwrap_or(false);
              config.rustc_default_linker = rust.default_linker;
@@ -233,7 +235,7 @@ index e658d958d0a..914b1390b37 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);
-@@ -918,8 +911,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1059,8 +1052,6 @@ pub fn parse(args: &[String]) -> Config {
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
                  target.crt_static = cfg.crt_static;
@@ -243,7 +245,7 @@ index e658d958d0a..914b1390b37 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 94424cb4548..9ae0cc053e3 100755
+index 87a130a0..bd4c9197 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",
@@ -282,18 +284,10 @@ index 94424cb4548..9ae0cc053e3 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 2d4e1527897..3abe9f4a143 100644
+index 570a6174..f3d5f308 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -277,7 +277,6 @@ pub struct Build {
- struct Crate {
-     name: Interned<String>,
-     deps: HashSet<Interned<String>>,
--    id: String,
-     path: PathBuf,
- }
- 
-@@ -1056,25 +1055,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1125,25 +1125,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
          }
      }
  
@@ -319,29 +313,8 @@ index 2d4e1527897..3abe9f4a143 100644
      /// Returns the sysroot for the wasi target, if defined
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
          self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
-diff --git a/src/bootstrap/metadata.rs b/src/bootstrap/metadata.rs
-index a38391c7b88..65e229697dc 100644
---- a/src/bootstrap/metadata.rs
-+++ b/src/bootstrap/metadata.rs
-@@ -14,7 +14,6 @@ struct Output {
- 
- #[derive(Deserialize)]
- struct Package {
--    id: String,
-     name: String,
-     source: Option<String>,
-     manifest_path: String,
-@@ -50,7 +49,7 @@ pub fn build(build: &mut Build) {
-                 .filter(|dep| dep.source.is_none())
-                 .map(|dep| INTERNER.intern_string(dep.name))
-                 .collect();
--            build.crates.insert(name, Crate { name, id: package.id, deps, path });
-+            build.crates.insert(name, Crate { name, deps, path });
-         }
-     }
- }
 diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index d7db2cef24f..a791177956d 100644
+index 8c2899c1..dda15d76 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
 @@ -11,7 +11,6 @@
@@ -352,7 +325,7 @@ index d7db2cef24f..a791177956d 100644
  use std::path::PathBuf;
  use std::process::Command;
  
-@@ -178,28 +177,6 @@ pub fn check(build: &mut Build) {
+@@ -177,28 +176,6 @@ pub fn check(build: &mut Build) {
              }
          }
  
diff --git a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch b/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
index adaf86f2f451..2cc1f6b900d3 100644
--- a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
+++ b/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
@@ -11,26 +11,26 @@ diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
 index e4396d530..cb2312028 100644
 --- a/src/bootstrap/bin/rustdoc.rs
 +++ b/src/bootstrap/bin/rustdoc.rs
-@@ -20,14 +20,11 @@ fn main() {
+@@ -22,14 +22,11 @@ fn main() {
          Err(_) => 0,
      };
  
--    let mut dylib_path = bootstrap::util::dylib_path();
+-    let mut dylib_path = dylib_path();
 -    dylib_path.insert(0, PathBuf::from(libdir.clone()));
 -
      let mut cmd = Command::new(rustdoc);
      cmd.args(&args)
          .arg("--sysroot")
          .arg(&sysroot)
--        .env(bootstrap::util::dylib_path_var(), env::join_paths(&dylib_path).unwrap());
-+        .env(bootstrap::util::dylib_path_var(), PathBuf::from(libdir.clone()));
+-        .env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
++        .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
-@@ -60,7 +57,7 @@ fn main() {
+@@ -62,7 +59,7 @@ fn main() {
          eprintln!(
              "rustdoc command: {:?}={:?} {:?}",
-             bootstrap::util::dylib_path_var(),
+             dylib_path_var(),
 -            env::join_paths(&dylib_path).unwrap(),
 +            PathBuf::from(libdir.clone()),
              cmd,
diff --git a/srcpkgs/rust/patches/ld-library-path.patch b/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
similarity index 100%
rename from srcpkgs/rust/patches/ld-library-path.patch
rename to srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
diff --git a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch b/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
index a9ca5f6c7bba..8a18e414e209 100644
--- a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
+++ b/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
@@ -12,14 +12,14 @@ diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs
 index 238da24b..ffb05ee7 100644
 --- a/vendor/libc/src/unix/mod.rs
 +++ b/vendor/libc/src/unix/mod.rs
-@@ -299,11 +299,11 @@ cfg_if! {
-         // cargo build, don't pull in anything extra as the libstd dep
-         // already pulls in all libs.
+@@ -329,11 +329,11 @@ cfg_if! {
+         #[link(name = "c", cfg(not(target_feature = "crt-static")))]
+         extern {}
      } else if #[cfg(target_env = "musl")] {
 +        #[link(name = "c")]
 +        extern {}
          #[cfg_attr(feature = "rustc-dep-of-std",
--                   link(name = "c", kind = "static",
+-                   link(name = "c", kind = "static", modifiers = "-bundle",
 +                   link(name = "gcc", kind = "static-nobundle",
                          cfg(target_feature = "crt-static")))]
 -        #[cfg_attr(feature = "rustc-dep-of-std",
diff --git a/srcpkgs/rust/patches/native-sysroot.patch b/srcpkgs/rust/patches/native-sysroot.patch
index a23046220e9c..6826b114b6b7 100644
--- a/srcpkgs/rust/patches/native-sysroot.patch
+++ b/srcpkgs/rust/patches/native-sysroot.patch
@@ -1,17 +1,8 @@
-commit 57ed964d186212739fa436f103bd923a2309f341
-Author: Daniel Kolesa <daniel@octaforge.org>
-Date:   Tue Dec 21 02:46:30 2021 +0100
-
-    allow specifying native sysroot to use for linkage
-    
-    This allows us to get around the linker attempting to use
-    incompatible libs.
-
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index de771280e..5faaf9439 100644
+index e816f9b4..a2668fa9 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1166,6 +1166,10 @@ impl<'a> Builder<'a> {
+@@ -1313,6 +1313,10 @@ pub fn cargo(
              }
          }
  
@@ -23,26 +14,26 @@ index de771280e..5faaf9439 100644
              cargo.env("RUSTC_HOST_LINKER", host_linker);
          }
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 06b7a8c55..d8e9275ad 100644
+index 642a5c24..0dd4f879 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -292,6 +292,7 @@ pub struct Target {
-     pub ar: Option<PathBuf>,
+@@ -294,6 +294,7 @@ pub struct Target {
      pub ranlib: Option<PathBuf>,
+     pub default_linker: Option<PathBuf>,
      pub linker: Option<PathBuf>,
 +    pub sysroot: Option<PathBuf>,
      pub ndk: Option<PathBuf>,
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
-@@ -525,6 +526,7 @@ struct TomlTarget {
-     ar: Option<String>,
-     ranlib: Option<String>,
-     linker: Option<String>,
-+    sysroot: Option<String>,
-     llvm_config: Option<String>,
-     llvm_filecheck: Option<String>,
-     android_ndk: Option<String>,
-@@ -909,6 +911,7 @@ impl Config {
+@@ -621,6 +622,7 @@ struct TomlTarget {
+         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 {
                  target.ar = cfg.ar.map(PathBuf::from);
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
@@ -51,10 +42,10 @@ index 06b7a8c55..d8e9275ad 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 b930f3cd7..06e782520 100644
+index f3d5f308..7f8b9b27 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1056,6 +1056,10 @@ impl Build {
+@@ -1125,6 +1125,10 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
          }
      }
  
diff --git a/srcpkgs/rust/patches/xxx-ppcle.patch b/srcpkgs/rust/patches/xxx-ppcle.patch
index 9473e7ad98f3..c0522f0eaafc 100644
--- a/srcpkgs/rust/patches/xxx-ppcle.patch
+++ b/srcpkgs/rust/patches/xxx-ppcle.patch
@@ -1,53 +1,8 @@
-From b92ce1ed0ac8d95831a43f4395544c17a0816c9b Mon Sep 17 00:00:00 2001
-From: Daniel Kolesa <daniel@octaforge.org>
-Date: Sat, 3 Jul 2021 21:02:03 +0200
-Subject: [PATCH] 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/fastcall-inreg.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/borrowck/borrowck-asm.rs              |  1 +
- src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs      |  1 +
- src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs  |  1 +
- src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs |  1 +
- src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs   |  1 +
- src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs  |  1 +
- src/test/ui/llvm-asm/llvm-asm-out-read-uninit.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/rustc-ap-rustc_target/src/spec/mod.rs      |  2 ++
- .../src/spec/powerpcle_unknown_linux_gnu.rs       | 15 +++++++++++++++
- .../src/spec/powerpcle_unknown_linux_musl.rs      | 15 +++++++++++++++
- vendor/target-lexicon/src/targets.rs              |  7 +++++++
- vendor/tikv-jemallocator/benches/roundtrip.rs     |  3 ++-
- vendor/tikv-jemallocator/src/lib.rs               |  3 ++-
- 37 files changed, 111 insertions(+), 6 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
- create mode 100644 vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
- create mode 100644 vendor/rustc-ap-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 c2e9dba6..8147a3c3 100644
+index 0c1ab67cc..8d4e5f3cb 100644
 --- a/compiler/rustc_middle/src/ty/layout.rs
 +++ b/compiler/rustc_middle/src/ty/layout.rs
-@@ -2753,6 +2753,8 @@ where
+@@ -3057,6 +3057,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;
@@ -56,7 +11,7 @@ index c2e9dba6..8147a3c3 100644
          use SpecAbi::*;
          let rust_abi = matches!(sig.abi, RustIntrinsic | PlatformIntrinsic | Rust | RustCall);
  
-@@ -2850,7 +2852,8 @@ where
+@@ -3165,7 +3167,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
                      || (!win_x64_gnu
                          && !linux_s390x_gnu_like
                          && !linux_sparc64_gnu_like
@@ -67,10 +22,10 @@ index c2e9dba6..8147a3c3 100644
                      arg.mode = PassMode::Ignore;
                  }
 diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
-index 2af46693..986d84e0 100644
+index bd5b712c1..f60be010c 100644
 --- a/compiler/rustc_target/src/spec/mod.rs
 +++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -716,6 +716,8 @@ supported_targets! {
+@@ -824,6 +824,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),
@@ -81,7 +36,7 @@ index 2af46693..986d84e0 100644
      ("powerpc64le-unknown-linux-gnu", powerpc64le_unknown_linux_gnu),
 diff --git a/compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
 new file mode 100644
-index 00000000..780c20a3
+index 000000000..b7148a2fc
 --- /dev/null
 +++ b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
 @@ -0,0 +1,15 @@
@@ -89,20 +44,20 @@ index 00000000..780c20a3
 +
 +pub fn target() -> Target {
 +    let mut base = super::linux_gnu_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
++    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".into());
 +    base.max_atomic_width = Some(32);
 +
 +    Target {
-+        llvm_target: "powerpcle-unknown-linux-gnu".to_string(),
++        llvm_target: "powerpcle-unknown-linux-gnu".into(),
 +        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
++        data_layout: "e-m:e-p:32:32-i64:64-n32".into(),
++        arch: "powerpc".into(),
++        options: TargetOptions { mcount: "_mcount".into(), ..base },
 +    }
 +}
 diff --git a/compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
 new file mode 100644
-index 00000000..9b848ccf
+index 000000000..a826b6e47
 --- /dev/null
 +++ b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
 @@ -0,0 +1,15 @@
@@ -110,24 +65,24 @@ index 00000000..9b848ccf
 +
 +pub fn target() -> Target {
 +    let mut base = super::linux_musl_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
++    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".into());
 +    base.max_atomic_width = Some(32);
 +
 +    Target {
-+        llvm_target: "powerpcle-unknown-linux-musl".to_string(),
++        llvm_target: "powerpcle-unknown-linux-musl".into(),
 +        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
++        data_layout: "e-m:e-p:32:32-i64:64-n32".into(),
++        arch: "powerpc".into(),
++        options: TargetOptions { mcount: "_mcount".into(), ..base },
 +    }
 +}
 diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 4111420e..cd69a8ec 100644
+index 71b8f3c45..1505c12e4 100644
 --- a/src/bootstrap/bootstrap.py
 +++ b/src/bootstrap/bootstrap.py
-@@ -289,9 +289,11 @@ def default_build_triple(verbose):
-         'i686': 'i686',
+@@ -320,9 +320,11 @@ def default_build_triple(verbose):
          'i786': 'i686',
+         'm68k': 'm68k',
          'powerpc': 'powerpc',
 +        'powerpcle': 'powerpcle',
          'powerpc64': 'powerpc64',
@@ -136,9 +91,9 @@ index 4111420e..cd69a8ec 100644
 +        'ppcle': 'powerpcle',
          'ppc64': 'powerpc64',
          'ppc64le': 'powerpc64le',
-         's390x': 's390x',
+         'riscv64': 'riscv64gc',
 diff --git a/src/test/codegen/abi-main-signature-16bit-c-int.rs b/src/test/codegen/abi-main-signature-16bit-c-int.rs
-index 4ed491df..82ec7755 100644
+index 4ed491dfb..82ec7755d 100644
 --- a/src/test/codegen/abi-main-signature-16bit-c-int.rs
 +++ b/src/test/codegen/abi-main-signature-16bit-c-int.rs
 @@ -9,6 +9,7 @@
@@ -149,20 +104,8 @@ index 4ed491df..82ec7755 100644
  // ignore-powerpc64
  // ignore-riscv64
  // ignore-s390x
-diff --git a/src/test/codegen/fastcall-inreg.rs b/src/test/codegen/fastcall-inreg.rs
-index adbeae45..0fd0a9e6 100644
---- a/src/test/codegen/fastcall-inreg.rs
-+++ b/src/test/codegen/fastcall-inreg.rs
-@@ -16,6 +16,7 @@
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-r600
- // ignore-riscv64
- // ignore-amdgcn
 diff --git a/src/test/codegen/global_asm.rs b/src/test/codegen/global_asm.rs
-index 57d8aeb1..e0b1b692 100644
+index fab84868f..104d93d01 100644
 --- a/src/test/codegen/global_asm.rs
 +++ b/src/test/codegen/global_asm.rs
 @@ -12,6 +12,7 @@
@@ -174,7 +117,7 @@ index 57d8aeb1..e0b1b692 100644
  // ignore-amdgcn
  // ignore-sparc
 diff --git a/src/test/codegen/global_asm_include.rs b/src/test/codegen/global_asm_include.rs
-index 44402619..62ecfa6d 100644
+index 02ee91645..13f303332 100644
 --- a/src/test/codegen/global_asm_include.rs
 +++ b/src/test/codegen/global_asm_include.rs
 @@ -12,6 +12,7 @@
@@ -186,7 +129,7 @@ index 44402619..62ecfa6d 100644
  // ignore-amdgcn
  // ignore-sparc
 diff --git a/src/test/codegen/global_asm_x2.rs b/src/test/codegen/global_asm_x2.rs
-index d632d0dd..29f97775 100644
+index bdcf0ea84..1e2ff8b8d 100644
 --- a/src/test/codegen/global_asm_x2.rs
 +++ b/src/test/codegen/global_asm_x2.rs
 @@ -12,6 +12,7 @@
@@ -198,10 +141,10 @@ index d632d0dd..29f97775 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 3017adb4..632565bb 100644
+index 4ad3642c0..fca31c0c6 100644
 --- a/src/test/codegen/repr-transparent-aggregates-1.rs
 +++ b/src/test/codegen/repr-transparent-aggregates-1.rs
-@@ -7,6 +7,7 @@
+@@ -6,6 +6,7 @@
  // ignore-mips
  // ignore-mips64
  // ignore-powerpc
@@ -210,10 +153,10 @@ index 3017adb4..632565bb 100644
  // ignore-riscv64 see codegen/riscv-abi
  // ignore-windows
 diff --git a/src/test/codegen/repr-transparent-aggregates-2.rs b/src/test/codegen/repr-transparent-aggregates-2.rs
-index 429d760b..57e75f95 100644
+index b68e8e9eb..97c509b1b 100644
 --- a/src/test/codegen/repr-transparent-aggregates-2.rs
 +++ b/src/test/codegen/repr-transparent-aggregates-2.rs
-@@ -6,6 +6,7 @@
+@@ -5,6 +5,7 @@
  // ignore-emscripten
  // ignore-mips64
  // ignore-powerpc
@@ -222,7 +165,7 @@ index 429d760b..57e75f95 100644
  // ignore-powerpc64le
  // ignore-riscv64 see codegen/riscv-abi
 diff --git a/src/test/codegen/stack-probes.rs b/src/test/codegen/stack-probes.rs
-index 9bd351df..29073eb5 100644
+index 9bd351df3..29073eb56 100644
 --- a/src/test/codegen/stack-probes.rs
 +++ b/src/test/codegen/stack-probes.rs
 @@ -3,6 +3,7 @@
@@ -234,7 +177,7 @@ index 9bd351df..29073eb5 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/test/run-make-fulldeps/atomic-lock-free/Makefile b/src/test/run-make-fulldeps/atomic-lock-free/Makefile
-index 9e8b4fab..402d37a4 100644
+index 9e8b4fabf..402d37a45 100644
 --- a/src/test/run-make-fulldeps/atomic-lock-free/Makefile
 +++ b/src/test/run-make-fulldeps/atomic-lock-free/Makefile
 @@ -36,6 +36,8 @@ ifeq ($(filter powerpc,$(LLVM_COMPONENTS)),powerpc)
@@ -247,7 +190,7 @@ index 9e8b4fab..402d37a4 100644
  	nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
  	$(RUSTC) --target=powerpc64le-unknown-linux-gnu atomic_lock_free.rs
 diff --git a/src/test/ui/abi/stack-probes-lto.rs b/src/test/ui/abi/stack-probes-lto.rs
-index 90df1f3f..8c6dda8b 100644
+index 90df1f3f5..8c6dda8b8 100644
 --- a/src/test/ui/abi/stack-probes-lto.rs
 +++ b/src/test/ui/abi/stack-probes-lto.rs
 @@ -4,6 +4,7 @@
@@ -259,7 +202,7 @@ index 90df1f3f..8c6dda8b 100644
  // ignore-sparc
  // ignore-sparc64
 diff --git a/src/test/ui/abi/stack-probes.rs b/src/test/ui/abi/stack-probes.rs
-index e998dd0f..9472e538 100644
+index e998dd0f8..9472e5387 100644
 --- a/src/test/ui/abi/stack-probes.rs
 +++ b/src/test/ui/abi/stack-probes.rs
 @@ -4,6 +4,7 @@
@@ -270,92 +213,8 @@ index e998dd0f..9472e538 100644
  // ignore-s390x
  // ignore-sparc
  // ignore-sparc64
-diff --git a/src/test/ui/borrowck/borrowck-asm.rs b/src/test/ui/borrowck/borrowck-asm.rs
-index a3f64524..faf9adb4 100644
---- a/src/test/ui/borrowck/borrowck-asm.rs
-+++ b/src/test/ui/borrowck/borrowck-asm.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs b/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs
-index 2868d3d3..5c6e325b 100644
---- a/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs
-@@ -4,6 +4,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs b/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs
-index e3bc7d29..49f53f67 100644
---- a/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs b/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs
-index daae0c81..fd505c86 100644
---- a/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs
-@@ -5,6 +5,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs b/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs
-index 9c62532c..baa1c1ba 100644
---- a/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs b/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs
-index 72edb339..2fec991d 100644
---- a/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs b/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs
-index acf4cf9f..dfad0775 100644
---- a/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
 diff --git a/src/test/ui/target-feature/gate.rs b/src/test/ui/target-feature/gate.rs
-index 164830fe..531a4b45 100644
+index 2382c98f8..e6fe855d7 100644
 --- a/src/test/ui/target-feature/gate.rs
 +++ b/src/test/ui/target-feature/gate.rs
 @@ -5,6 +5,7 @@
@@ -367,7 +226,7 @@ index 164830fe..531a4b45 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/test/ui/target-feature/invalid-attribute.rs b/src/test/ui/target-feature/invalid-attribute.rs
-index 5ea78215..47e7887a 100644
+index ad1b6e96b..122d59a57 100644
 --- a/src/test/ui/target-feature/invalid-attribute.rs
 +++ b/src/test/ui/target-feature/invalid-attribute.rs
 @@ -5,6 +5,7 @@
@@ -379,10 +238,10 @@ index 5ea78215..47e7887a 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
-index 7dbd7094..08c9de3c 100644
+index bed509d77..8bc817897 100644
 --- a/src/tools/compiletest/src/util.rs
 +++ b/src/tools/compiletest/src/util.rs
-@@ -67,6 +67,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
+@@ -70,6 +70,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
      ("msp430", "msp430"),
      ("nvptx64", "nvptx64"),
      ("powerpc", "powerpc"),
@@ -391,10 +250,10 @@ index 7dbd7094..08c9de3c 100644
      ("powerpc64le", "powerpc64"),
      ("riscv64gc", "riscv64"),
 diff --git a/vendor/cc/src/lib.rs b/vendor/cc/src/lib.rs
-index 5051b296..286c2fb7 100644
+index e3a2b98b0..0236729fd 100644
 --- a/vendor/cc/src/lib.rs
 +++ b/vendor/cc/src/lib.rs
-@@ -2409,6 +2409,7 @@ impl Build {
+@@ -2594,6 +2594,7 @@ impl Build {
              "powerpc-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
              "powerpc-unknown-linux-gnuspe" => Some("powerpc-linux-gnuspe"),
              "powerpc-unknown-netbsd" => Some("powerpc--netbsd"),
@@ -402,66 +261,11 @@ index 5051b296..286c2fb7 100644
              "powerpc64-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
              "powerpc64le-unknown-linux-gnu" => Some("powerpc64le-linux-gnu"),
              "riscv32i-unknown-none-elf" => self.find_working_gnu_prefix(&[
-diff --git a/vendor/rustc-ap-rustc_target/src/spec/mod.rs b/vendor/rustc-ap-rustc_target/src/spec/mod.rs
-index 2af46693..986d84e0 100644
---- a/vendor/rustc-ap-rustc_target/src/spec/mod.rs
-+++ b/vendor/rustc-ap-rustc_target/src/spec/mod.rs
-@@ -716,6 +716,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),
-+    ("powerpcle-unknown-linux-gnu", powerpcle_unknown_linux_gnu),
-+    ("powerpcle-unknown-linux-musl", powerpcle_unknown_linux_musl),
-     ("powerpc64-unknown-linux-gnu", powerpc64_unknown_linux_gnu),
-     ("powerpc64-unknown-linux-musl", powerpc64_unknown_linux_musl),
-     ("powerpc64le-unknown-linux-gnu", powerpc64le_unknown_linux_gnu),
-diff --git a/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
-new file mode 100644
-index 00000000..780c20a3
---- /dev/null
-+++ b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
-@@ -0,0 +1,15 @@
-+use crate::spec::{LinkerFlavor, Target, TargetOptions};
-+
-+pub fn target() -> Target {
-+    let mut base = super::linux_gnu_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
-+    base.max_atomic_width = Some(32);
-+
-+    Target {
-+        llvm_target: "powerpcle-unknown-linux-gnu".to_string(),
-+        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
-+    }
-+}
-diff --git a/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_musl.rs b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
-new file mode 100644
-index 00000000..9b848ccf
---- /dev/null
-+++ b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
-@@ -0,0 +1,15 @@
-+use crate::spec::{LinkerFlavor, Target, TargetOptions};
-+
-+pub fn target() -> Target {
-+    let mut base = super::linux_musl_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
-+    base.max_atomic_width = Some(32);
-+
-+    Target {
-+        llvm_target: "powerpcle-unknown-linux-musl".to_string(),
-+        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
-+    }
-+}
 diff --git a/vendor/target-lexicon/src/targets.rs b/vendor/target-lexicon/src/targets.rs
-index 87c237aa..dc694010 100644
+index 22cc95cc3..46167e34e 100644
 --- a/vendor/target-lexicon/src/targets.rs
 +++ b/vendor/target-lexicon/src/targets.rs
-@@ -26,6 +26,7 @@ pub enum Architecture {
+@@ -29,6 +29,7 @@ pub enum Architecture {
      Msp430,
      Nvptx64,
      Powerpc,
@@ -469,7 +273,7 @@ index 87c237aa..dc694010 100644
      Powerpc64,
      Powerpc64le,
      Riscv32(Riscv32Architecture),
-@@ -517,6 +518,7 @@ impl Architecture {
+@@ -533,6 +534,7 @@ impl Architecture {
              | Mips64(Mips64Architecture::Mipsisa64r6el)
              | Msp430
              | Nvptx64
@@ -477,15 +281,15 @@ index 87c237aa..dc694010 100644
              | Powerpc64le
              | Riscv32(_)
              | Riscv64(_)
-@@ -553,6 +555,7 @@ impl Architecture {
-             | Sparc
-             | Wasm32
+@@ -574,6 +576,7 @@ impl Architecture {
+             | M68k
              | Mips32(_)
+             | Powerpc
 +            | Powerpcle
-             | Powerpc => Ok(PointerWidth::U32),
+             | XTensa => Ok(PointerWidth::U32),
              AmdGcn
-             | Powerpc64le
-@@ -737,6 +740,7 @@ impl fmt::Display for Architecture {
+             | Bpfeb
+@@ -763,6 +766,7 @@ impl fmt::Display for Architecture {
              Msp430 => f.write_str("msp430"),
              Nvptx64 => f.write_str("nvptx64"),
              Powerpc => f.write_str("powerpc"),
@@ -493,7 +297,7 @@ index 87c237aa..dc694010 100644
              Powerpc64 => f.write_str("powerpc64"),
              Powerpc64le => f.write_str("powerpc64le"),
              Riscv32(riscv32) => riscv32.fmt(f),
-@@ -913,6 +917,7 @@ impl FromStr for Architecture {
+@@ -943,6 +947,7 @@ impl FromStr for Architecture {
              "msp430" => Msp430,
              "nvptx64" => Nvptx64,
              "powerpc" => Powerpc,
@@ -501,8 +305,8 @@ index 87c237aa..dc694010 100644
              "powerpc64" => Powerpc64,
              "powerpc64le" => Powerpc64le,
              "s390x" => S390x,
-@@ -1380,6 +1385,8 @@ mod tests {
-             "powerpc-unknown-netbsd",
+@@ -1445,6 +1450,8 @@ mod tests {
+             "powerpc-unknown-openbsd",
              "powerpc-wrs-vxworks",
              "powerpc-wrs-vxworks-spe",
 +            "powerpcle-unknown-linux-gnu",
@@ -511,7 +315,7 @@ index 87c237aa..dc694010 100644
              "powerpc64-unknown-linux-gnu",
              "powerpc64-unknown-linux-musl",
 diff --git a/vendor/tikv-jemallocator/benches/roundtrip.rs b/vendor/tikv-jemallocator/benches/roundtrip.rs
-index 40b8005f..bc4df023 100644
+index 767abe8d4..704bf955a 100644
 --- a/vendor/tikv-jemallocator/benches/roundtrip.rs
 +++ b/vendor/tikv-jemallocator/benches/roundtrip.rs
 @@ -22,7 +22,8 @@ static A: Jemalloc = Jemalloc;
@@ -525,19 +329,16 @@ index 40b8005f..bc4df023 100644
  const MIN_ALIGN: usize = 8;
  #[cfg(all(any(
 diff --git a/vendor/tikv-jemallocator/src/lib.rs b/vendor/tikv-jemallocator/src/lib.rs
-index 9a489b62..1ed12b26 100644
+index 4a9397331..4cf47c05d 100644
 --- a/vendor/tikv-jemallocator/src/lib.rs
 +++ b/vendor/tikv-jemallocator/src/lib.rs
-@@ -44,7 +44,8 @@ use libc::{c_int, c_void};
+@@ -46,7 +46,8 @@ use libc::{c_int, c_void};
      target_arch = "arm",
      target_arch = "mips",
      target_arch = "mipsel",
 -    target_arch = "powerpc"
 +    target_arch = "powerpc",
-+    target_arch = "powerpcle"
++    target_arch = "powerpcle",
  )))]
  const ALIGNOF_MAX_ALIGN_T: usize = 8;
  #[cfg(all(any(
--- 
-2.32.0
-
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index 560a629f3da2..53ef4333cc52 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -8,7 +8,7 @@
 # uploaded to https://alpha.de.repo.voidlinux.org/distfiles/
 #
 pkgname=rust
-version=1.57.0
+version=1.61.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=3546f9c3b91b1f8b8efd26c94d6b50312c08210397b4072ed2748e2bd4445c1a
+checksum=ad0b4351675aa9abdf4c7e066613bd274c4391c5506db152983426376101daed
 lib32disabled=yes
 make_check=no # CBA for now
 
@@ -61,7 +61,6 @@ post_patch() {
 	_clear_vendor_checksums libc
 	_clear_vendor_checksums typenum
 	_clear_vendor_checksums cc
-	_clear_vendor_checksums rustc-ap-rustc_target
 	_clear_vendor_checksums target-lexicon
 	_clear_vendor_checksums tikv-jemallocator
 }
@@ -216,14 +215,8 @@ do_install() {
 
 	cd ${DESTDIR}/usr/lib
 	# symlinks instead of copies
-	mv *.so rustlib/${RUST_TARGET}/lib
+	rm *.so
 	ln -sf rustlib/${RUST_TARGET}/lib/*.so .
-
-	# executable used for split dwarf, currently unstable on linux.
-	# it's copied directly from the local llvm package, but
-	# FIXME: cross builds are installing the version from the build machine,
-	# it shouldn't be necessary to remove it
-	rm rustlib/${RUST_TARGET}/bin/rust-llvm-dwp
 }
 
 rust-doc_package() {

From ec3533f9b458c8e73fffb2aa29d85c6ddf55cc11 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:14:23 +0200
Subject: [PATCH 4/4] cargo: update to 1.61.0

---
 srcpkgs/cargo/template | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index c512e7005833..e3c30f625acd 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -1,8 +1,8 @@
 # Template file for 'cargo'
 pkgname=cargo
-version=0.58.0
+version=1.61.0
 revision=1
-wrksrc="cargo-${version}"
+wrksrc="cargo-rust-${version}"
 build_helper=rust
 hostmakedepends="cargo-bootstrap rust python3 curl cmake pkg-config zlib-devel"
 makedepends="rust libcurl-devel openssl-devel"
@@ -11,10 +11,10 @@ short_desc="Rust package manager"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://crates.io/"
-distfiles="https://github.com/rust-lang/cargo/archive/${version}.tar.gz
- https://github.com/crossbeam-rs/crossbeam/archive/refs/tags/crossbeam-utils-0.8.5.tar.gz"
-checksum="e1d6f55414a29906d24b13c687996b5220e08ccce9c682e4c02851138fc7093f
- 57db07eb38b0aaf7951c79b4639819cb84bc4269507091afea7267e10a54e079"
+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
+ 52c451910203cd9002cc4b85cff95f45c6ba245392801e80d7898ca5c3c3ab29"
 replaces="cargo-tree>=0"
 
 build_options="static bindist"
@@ -28,7 +28,7 @@ if [ -z "$_build_static" ]; then
 	makedepends+=" libgit2-devel"
 fi
 
-post_extract() {
+pre_patch() {
 	mv ../crossbeam-* crossbeam-utils
 }
 

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

* Re: Update Rust toolchain to 1.61.0
  2022-05-21 21:09 [PR PATCH] Update Rust toolchain to 1.61.0 tranzystorek-io
                   ` (4 preceding siblings ...)
  2022-05-22  8:21 ` [PR PATCH] [Updated] " tranzystorek-io
@ 2022-05-22  8:23 ` tranzystorek-io
  2022-05-22  8:36 ` tranzystorek-io
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tranzystorek-io @ 2022-05-22  8:23 UTC (permalink / raw)
  To: ml

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

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/37232#issuecomment-1133769262

Comment:
@q66 Could I ask for the following binaries:

- rust-bootstrap for ppc64le-musl, ~~ppc64~~
- cargo-bootstrap for ppc64le-musl, ~~ppc64~~, ppc

EDIT: ppc64 is available upstream, I'm not sure why it was excluded?

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

* Re: Update Rust toolchain to 1.61.0
  2022-05-21 21:09 [PR PATCH] Update Rust toolchain to 1.61.0 tranzystorek-io
                   ` (5 preceding siblings ...)
  2022-05-22  8:23 ` tranzystorek-io
@ 2022-05-22  8:36 ` tranzystorek-io
  2022-05-22  9:00 ` q66
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tranzystorek-io @ 2022-05-22  8:36 UTC (permalink / raw)
  To: ml

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

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/37232#issuecomment-1133845090

Comment:
Also I see upstream distfiles for rust-bootstrap for armv7l and aarch64, any reason they are excluded as well?

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

* Re: Update Rust toolchain to 1.61.0
  2022-05-21 21:09 [PR PATCH] Update Rust toolchain to 1.61.0 tranzystorek-io
                   ` (6 preceding siblings ...)
  2022-05-22  8:36 ` tranzystorek-io
@ 2022-05-22  9:00 ` q66
  2022-05-22 10:20 ` [PR PATCH] [Updated] " tranzystorek-io
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: q66 @ 2022-05-22  9:00 UTC (permalink / raw)
  To: ml

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

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/37232#issuecomment-1133850715

Comment:
ppc64 upstream binaries won't work because they use a different ABI

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

* Re: [PR PATCH] [Updated] Update Rust toolchain to 1.61.0
  2022-05-21 21:09 [PR PATCH] Update Rust toolchain to 1.61.0 tranzystorek-io
                   ` (7 preceding siblings ...)
  2022-05-22  9:00 ` q66
@ 2022-05-22 10:20 ` tranzystorek-io
  2022-05-28  6:47 ` tranzystorek-io
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tranzystorek-io @ 2022-05-22 10:20 UTC (permalink / raw)
  To: ml

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

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

https://github.com/tranzystorek-io/void-packages rust-toolchain
https://github.com/void-linux/void-packages/pull/37232

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

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-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)


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

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

From 8a601a192604c4629b28738806bd4f8742e3a189 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:03:26 +0200
Subject: [PATCH 1/4] rust-bootstrap: update to 1.61.0

---
 srcpkgs/rust-bootstrap/template | 35 +++++++++++++++++----------------
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/srcpkgs/rust-bootstrap/template b/srcpkgs/rust-bootstrap/template
index bbedb66430b6..0af9b2a58604 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.57.0
+version=1.61.0
 revision=1
 create_wrksrc=yes
 short_desc="Rust programming language bootstrap toolchain"
@@ -17,7 +17,7 @@ fi
 
 _bootstrap_url="https://static.rust-lang.org/dist"
 
-case "$XBPS_MACHINE" in
+case "$XBPS_TARGET_MACHINE" in
 	x86_64*|i686|ppc64le|ppc) ;;
 	*) _bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles";;
 esac
@@ -29,40 +29,40 @@ distfiles="
 case "$XBPS_TARGET_MACHINE" in
 	i686)
 		checksum="
-		 9bade3fcd246b0ad6859fcf5d0a80d3eb833e5410efa3a5552c241865562461e
-		 586e7fd521a058cbf4778abb67d7d078dd4820d356351d0b6a719e21d00966db"
+		 8af0ec3eb470e7e28439fedf9ebdadf90df8c58da544cc643033e6fc0ccf0bea
+		 ab223fcec35183bc0fe630403537cd7dae55c403103df29b25077db4882cb88e"
 		;;
 	x86_64)
 		checksum="
-		 c42f40c5279a3a9d539cae93dbcab9d333777ad9a60a5b9f1086b874ef63db86
-		 ccdc72d06c90841b7227ec3630337881eeda3da5fbe87328d2e9d705f6f8016c"
+		 21c4613f389ed130fbaaf88f1e984319f72b5fc10734569a5ba19e22ebb03abd
+		 270b07aa5f2de52255a117e1e587138d77375ce0d09a1d7fead085f29b3977e9"
 		;;
 	x86_64-musl)
 		checksum="
-		 5b04e0e0bbf140f7c49baa6280114c28f59f6de50481bdd45074eebf629c174c
-		 818213a6444503ed6adf0231d3c71de990d4c26926c62e8c602bb7e2d636fb94"
+		 89cb72cbc493cb5cd8e43830009b4a1a5bfd472246ae184157868c9b0607bf6c
+		 1f4f2e4c5dd0f9b0dac7c8888f4a49ef16a6fe8992f39895823d2a442f0fe408"
 		;;
 	ppc64le)
 		checksum="
-		 f43cb99109c3438c77c7079cdce4673df3320e310158e0b4d949c1babc4300fc
-		 fc07eb3e9f3d227428cc5b53ca868e3de375bc198ce4dce7b87a9246e6fec81a"
+		 dc54893d747e4f3330515caa75e404f78c6c5475a1216d1428f5e7ce1c2e9602
+		 36c0ccff14c80419507561db050f9533f0abd43fc50f3ddb859c10df74b1c351"
 		;;
 	ppc64le-musl)
 		checksum="
-		 6b48e521ba8a070a7b992595e82c5a164cc01c93bbd9a7b3d4db362f4b060df8
-		 d7876e817fc95df2e81858fc9ddb95b10fb83b413277ea6dbdfa9a80fa0d990e"
+		 badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb
+		 badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
 	ppc64)
 		checksum="
-		 2ea5b66d2cd8b9c251590fd5bd3e23cedec658b61f541e2824ce3fdcda263982
-		 e9c1394771b1b24241d8938ad75c4a6ed8bfa043522c74767b3528f2289095c0"
+		 badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb
+		 badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
 	ppc)
 		checksum="
-		 a1d7611b2d39224ba9a915009ae2a6639def42767370f50effd57770b3eb2150
-		 bc117ce5f0c81d2e14ea2d1832c0e908b1153caf49f295a9d28af2128f5fae44"
+		 f28a8c2986fce5015c67823e39ad4b53e2db06603b6ea4a1217ac961cbbfb073
+		 7d2f7f900c8c05616fba8e99ab041d847af3653c259b99445edd788acddf878c"
 		;;
-	*) broken="rust bootstrap binaries unavailable for ${XBPS_MACHINE}";;
+	*) broken="rust bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac
 
 do_install() {
@@ -76,5 +76,6 @@ do_install() {
 	vlicense rustc-${version}-${RUST_TARGET}/LICENSE-APACHE
 	vlicense rustc-${version}-${RUST_TARGET}/LICENSE-MIT
 
+	rm -rf ${DESTDIR}/usr/share/doc/rust
 	rm -f ${DESTDIR}/usr/lib/rustlib/${RUST_TARGET}/bin/rust-ll*
 }

From 5c7abe55f1c45eb98d48833fa8e0f26cc5a1cf03 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:12:56 +0200
Subject: [PATCH 2/4] cargo-bootstrap: update to 1.61.0

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

diff --git a/srcpkgs/cargo-bootstrap/template b/srcpkgs/cargo-bootstrap/template
index e75f8763b5b8..53657ba28505 100644
--- a/srcpkgs/cargo-bootstrap/template
+++ b/srcpkgs/cargo-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo-bootstrap'
 pkgname=cargo-bootstrap
-version=0.58.0
+version=1.61.0
 revision=1
 short_desc="Bootstrap binaries of Rust package manager"
 maintainer="q66 <daniel@octaforge.org>"
@@ -11,45 +11,42 @@ lib32disabled=yes
 nostrip=yes
 
 _bootstrap_url="https://static.rust-lang.org/dist"
-_bootver=1.57.0
 
 # we don't use upstream cargo binaries for ppc32, as they are busted (probably
 # a dependency is wrong, which results in failed signature verification when
 # updating the crates.io index)
+# ppc64 is excluded because of ABI incompatibility
 case "$XBPS_TARGET_MACHINE" in
 	x86_64*|i686|ppc64le) ;;
-	*)
-		_bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles"
-		_bootver=${version}
-		;;
+	*) _bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles" ;;
 esac
 
-wrksrc="cargo-${_bootver}-${RUST_TARGET}"
-distfiles="${_bootstrap_url}/cargo-${_bootver}-${RUST_TARGET}.tar.xz"
+wrksrc="cargo-${version}-${RUST_TARGET}"
+distfiles="${_bootstrap_url}/cargo-${version}-${RUST_TARGET}.tar.xz"
 
 case "$XBPS_TARGET_MACHINE" in
 	i686)
-		checksum="9898a1fae2647f930fa14b9c160a1d22e67ccc70ac0d2d8f79ef1ffcf8d89af7"
+		checksum="fe258b85ef0644ff08c2095e329399dd4de0e1b2e51f4f4e90cb956d40dc61de"
 		;;
 	x86_64)
-		checksum="ed2013713ae742895af5df8d91c5430ba9ba3c781e3bc7f3471b220cc06d565d"
+		checksum="9461727d754f865ef2a87479d40bbe4c5176f80963b7c50b7797bc8940d7a0a0"
 		;;
 	x86_64-musl)
-		checksum="0d8564d0348843d6c08d98990d9eac50b7b7ab790f89d514b4f45079e786d932"
+		checksum="db4b4423c2843b6e27737664cf8085afcba670374110ca24b9c8d341045e748c"
 		;;
 	ppc64le)
-		checksum="599cf1b5a8cdbf76d591621bc9222aefa60e2f5fd378ae71c4dcf4514c47122e"
+		checksum="09817011ff1ef4b7006387c7cabb6a059731792a9372533dec7d87e7f014444b"
 		;;
 	ppc64le-musl)
-		checksum="99ae7661c62617ac42adacb50cce9ae8d019bcf85e987b98fbc27240bceb1dd9"
+		checksum="badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
 	ppc64)
-		checksum="c64b9cce7a3ceaf5c310fad70be33077f1e6dea1384767fcf744732c0daa7473"
+		checksum="badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
 	ppc)
-		checksum="e67c2a7d16b3c732a1dcb663d031daf6eaca4b74d1d15196086c53c0c3a5b0a2"
+		checksum="badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
-	*) broken="cargo bootstrap binaries unavailable for ${XBPS_MACHINE}";;
+	*) broken="cargo bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac
 
 do_install() {

From 95ef2ffa3c861e1615f51a9741e24b3f799f8cfc Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:09:02 +0200
Subject: [PATCH 3/4] rust: update to 1.61.0

---
 .../rust/patches/0001-musl-void-setup.patch   | 135 +++-----
 ...007-fix-rustdoc-when-cross-compiling.patch |  12 +-
 ... 0010-do-not-export-LD_LIBRARY_PATH.patch} |   0
 ...kage-of-musl-libc-for-the-libc-crate.patch |   8 +-
 srcpkgs/rust/patches/native-sysroot.patch     |  41 +--
 srcpkgs/rust/patches/xxx-ppcle.patch          | 309 ++++--------------
 srcpkgs/rust/template                         |  13 +-
 7 files changed, 138 insertions(+), 380 deletions(-)
 rename srcpkgs/rust/patches/{ld-library-path.patch => 0010-do-not-export-LD_LIBRARY_PATH.patch} (100%)

diff --git a/srcpkgs/rust/patches/0001-musl-void-setup.patch b/srcpkgs/rust/patches/0001-musl-void-setup.patch
index 427581c48f54..c13cb1730986 100644
--- a/srcpkgs/rust/patches/0001-musl-void-setup.patch
+++ b/srcpkgs/rust/patches/0001-musl-void-setup.patch
@@ -1,8 +1,8 @@
 diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
-index 2fc9ab29f92..27673615968 100644
+index 51f392a6..62560658 100644
 --- a/compiler/rustc_target/src/spec/crt_objects.rs
 +++ b/compiler/rustc_target/src/spec/crt_objects.rs
-@@ -62,28 +62,6 @@ pub(super) fn all(obj: &str) -> CrtObjects {
+@@ -63,28 +63,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects {
      ])
  }
  
@@ -32,7 +32,7 @@ index 2fc9ab29f92..27673615968 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 5038a967d0a..b3c0e5bc416 100644
+index 207a87ab..88f807a5 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 @@
@@ -42,7 +42,7 @@ index 5038a967d0a..b3c0e5bc416 100644
  pub fn opts() -> TargetOptions {
      let mut base = super::linux_base::opts();
  
-     base.env = "musl".to_string();
+     base.env = "musl".into();
 -    base.pre_link_objects_fallback = crt_objects::pre_musl_fallback();
 -    base.post_link_objects_fallback = crt_objects::post_musl_fallback();
 -    base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
@@ -53,30 +53,29 @@ index 5038a967d0a..b3c0e5bc416 100644
      base
  }
 diff --git a/config.toml.example b/config.toml.example
-index 61e57eee782..77943129204 100644
+index 6e53d9b4..74980d2c 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -668,15 +668,6 @@ changelog-seen = 2
- # only use static libraries. If unset, the target's default linkage is used.
- #crt-static = <platform-specific> (bool)
+@@ -511,14 +511,6 @@ changelog-seen = 2
+ # supplementary build information, like distro-specific package versions.
+ #description = <none> (string)
  
 -# The root location of the musl installation directory. The library directory
 -# will also need to contain libunwind.a for an unwinding implementation. Note
 -# that this option only makes sense for musl targets that produce statically
 -# linked binaries.
--#musl-root = build.musl-root (path)
+-#
+-# Defaults to /usr on musl hosts. Has no default otherwise.
+-#musl-root = <platform specific> (path)
 -
--# The full path to the musl libdir.
--#musl-libdir = musl-root/lib
--
- # The root location of the `wasm32-wasi` sysroot. Only used for the
- # `wasm32-wasi` target. If you are building wasm32-wasi target, make sure to
- # create a `[target.wasm32-wasi]` section and move this field there.
+ # By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
+ # platforms to ensure that the compiler is usable by default from the build
+ # directory (as it links to a number of dynamic libraries). This may not be
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index e750c2963dd..f6ba3032b0d 100644
+index 7ce44687..4e7507ae 100644
 --- a/src/bootstrap/cc_detect.rs
 +++ b/src/bootstrap/cc_detect.rs
-@@ -98,7 +98,7 @@ pub fn find(build: &mut Build) {
+@@ -97,7 +97,7 @@ pub fn find(build: &mut Build) {
          if let Some(cc) = config.and_then(|c| c.cc.as_ref()) {
              cfg.compiler(cc);
          } else {
@@ -85,7 +84,7 @@ index e750c2963dd..f6ba3032b0d 100644
          }
  
          let compiler = cfg.get_compiler();
-@@ -126,7 +126,7 @@ pub fn find(build: &mut Build) {
+@@ -125,7 +125,7 @@ pub fn find(build: &mut Build) {
              cfg.compiler(cxx);
              true
          } else if build.hosts.contains(&target) || build.build == target {
@@ -130,13 +129,14 @@ index e750c2963dd..f6ba3032b0d 100644
      }
  }
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index e9cc7662e63..4971534ba0e 100644
+index afc333b5..9d67ab56 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -199,36 +199,7 @@ fn copy_self_contained_objects(
+@@ -197,39 +197,7 @@ fn copy_self_contained_objects(
+     let mut target_deps = vec![];
  
-     // Copies the CRT objects.
-     //
+     // Copies the libc and CRT objects.
+-    //
 -    // rustc historically provides a more self-contained installation for musl targets
 -    // not requiring the presence of a native musl toolchain. For example, it can fall back
 -    // to using gcc from a glibc-targeting toolchain for linking.
@@ -146,7 +146,7 @@ index e9cc7662e63..4971534ba0e 100644
 -        let srcdir = builder.musl_libdir(target).unwrap_or_else(|| {
 -            panic!("Target {:?} does not have a \"musl-libdir\" key", target.triple)
 -        });
--        for &obj in &["crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
+-        for &obj in &["libc.a", "crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
 -            copy_and_stamp(
 -                builder,
 -                &libdir_self_contained,
@@ -164,14 +164,16 @@ index e9cc7662e63..4971534ba0e 100644
 -            target_deps.push((target, DependencyType::TargetSelfContained));
 -        }
 -
--        let libunwind_path = copy_llvm_libunwind(builder, target, &libdir_self_contained);
--        target_deps.push((libunwind_path, DependencyType::TargetSelfContained));
+-        if !target.starts_with("s390x") {
+-            let libunwind_path = copy_llvm_libunwind(builder, target, &libdir_self_contained);
+-            target_deps.push((libunwind_path, DependencyType::TargetSelfContained));
+-        }
 -    } else if target.ends_with("-wasi") {
 +    if target.ends_with("-wasi") {
          let srcdir = builder
              .wasi_root(target)
              .unwrap_or_else(|| {
-@@ -312,15 +283,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+@@ -313,15 +281,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
              .arg("--manifest-path")
              .arg(builder.src.join("library/test/Cargo.toml"));
  
@@ -188,7 +190,7 @@ index e9cc7662e63..4971534ba0e 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 e658d958d0a..914b1390b37 100644
+index 9534cc5f..642a5c24 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
 @@ -172,7 +172,6 @@ pub struct Config {
@@ -199,7 +201,7 @@ index e658d958d0a..914b1390b37 100644
      pub prefix: Option<PathBuf>,
      pub sysconfdir: Option<PathBuf>,
      pub datadir: Option<PathBuf>,
-@@ -298,8 +297,6 @@ pub struct Target {
+@@ -299,8 +298,6 @@ pub struct Target {
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
      pub crt_static: Option<bool>,
@@ -208,24 +210,24 @@ index e658d958d0a..914b1390b37 100644
      pub wasi_root: Option<PathBuf>,
      pub qemu_rootfs: Option<PathBuf>,
      pub no_std: bool,
-@@ -493,7 +490,6 @@ struct Rust {
-     default_linker: Option<String>,
-     channel: Option<String>,
-     description: Option<String>,
--    musl_root: Option<String>,
-     rpath: Option<bool>,
-     verbose_tests: Option<bool>,
-     optimize_tests: Option<bool>,
-@@ -536,8 +532,6 @@ struct TomlTarget {
-     sanitizers: Option<bool>,
-     profiler: Option<bool>,
-     crt_static: Option<bool>,
--    musl_root: Option<String>,
--    musl_libdir: Option<String>,
-     wasi_root: Option<String>,
-     qemu_rootfs: Option<String>,
-     no_std: Option<bool>,
-@@ -872,7 +866,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -587,7 +584,6 @@ struct Rust {
+         default_linker: Option<String> = "default-linker",
+         channel: Option<String> = "channel",
+         description: Option<String> = "description",
+-        musl_root: Option<String> = "musl-root",
+         rpath: Option<bool> = "rpath",
+         verbose_tests: Option<bool> = "verbose-tests",
+         optimize_tests: Option<bool> = "optimize-tests",
+@@ -631,8 +627,6 @@ struct TomlTarget {
+         sanitizers: Option<bool> = "sanitizers",
+         profiler: Option<bool> = "profiler",
+         crt_static: Option<bool> = "crt-static",
+-        musl_root: Option<String> = "musl-root",
+-        musl_libdir: Option<String> = "musl-libdir",
+         wasi_root: Option<String> = "wasi-root",
+         qemu_rootfs: Option<String> = "qemu-rootfs",
+         no_std: Option<bool> = "no-std",
+@@ -1013,7 +1007,6 @@ pub fn parse(args: &[String]) -> Config {
              set(&mut config.llvm_tools_enabled, rust.llvm_tools);
              config.rustc_parallel = rust.parallel_compiler.unwrap_or(false);
              config.rustc_default_linker = rust.default_linker;
@@ -233,7 +235,7 @@ index e658d958d0a..914b1390b37 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);
-@@ -918,8 +911,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1059,8 +1052,6 @@ pub fn parse(args: &[String]) -> Config {
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
                  target.crt_static = cfg.crt_static;
@@ -243,7 +245,7 @@ index e658d958d0a..914b1390b37 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 94424cb4548..9ae0cc053e3 100755
+index 87a130a0..bd4c9197 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",
@@ -282,18 +284,10 @@ index 94424cb4548..9ae0cc053e3 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 2d4e1527897..3abe9f4a143 100644
+index 570a6174..f3d5f308 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -277,7 +277,6 @@ pub struct Build {
- struct Crate {
-     name: Interned<String>,
-     deps: HashSet<Interned<String>>,
--    id: String,
-     path: PathBuf,
- }
- 
-@@ -1056,25 +1055,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1125,25 +1125,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
          }
      }
  
@@ -319,29 +313,8 @@ index 2d4e1527897..3abe9f4a143 100644
      /// Returns the sysroot for the wasi target, if defined
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
          self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
-diff --git a/src/bootstrap/metadata.rs b/src/bootstrap/metadata.rs
-index a38391c7b88..65e229697dc 100644
---- a/src/bootstrap/metadata.rs
-+++ b/src/bootstrap/metadata.rs
-@@ -14,7 +14,6 @@ struct Output {
- 
- #[derive(Deserialize)]
- struct Package {
--    id: String,
-     name: String,
-     source: Option<String>,
-     manifest_path: String,
-@@ -50,7 +49,7 @@ pub fn build(build: &mut Build) {
-                 .filter(|dep| dep.source.is_none())
-                 .map(|dep| INTERNER.intern_string(dep.name))
-                 .collect();
--            build.crates.insert(name, Crate { name, id: package.id, deps, path });
-+            build.crates.insert(name, Crate { name, deps, path });
-         }
-     }
- }
 diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index d7db2cef24f..a791177956d 100644
+index 8c2899c1..dda15d76 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
 @@ -11,7 +11,6 @@
@@ -352,7 +325,7 @@ index d7db2cef24f..a791177956d 100644
  use std::path::PathBuf;
  use std::process::Command;
  
-@@ -178,28 +177,6 @@ pub fn check(build: &mut Build) {
+@@ -177,28 +176,6 @@ pub fn check(build: &mut Build) {
              }
          }
  
diff --git a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch b/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
index adaf86f2f451..2cc1f6b900d3 100644
--- a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
+++ b/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
@@ -11,26 +11,26 @@ diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
 index e4396d530..cb2312028 100644
 --- a/src/bootstrap/bin/rustdoc.rs
 +++ b/src/bootstrap/bin/rustdoc.rs
-@@ -20,14 +20,11 @@ fn main() {
+@@ -22,14 +22,11 @@ fn main() {
          Err(_) => 0,
      };
  
--    let mut dylib_path = bootstrap::util::dylib_path();
+-    let mut dylib_path = dylib_path();
 -    dylib_path.insert(0, PathBuf::from(libdir.clone()));
 -
      let mut cmd = Command::new(rustdoc);
      cmd.args(&args)
          .arg("--sysroot")
          .arg(&sysroot)
--        .env(bootstrap::util::dylib_path_var(), env::join_paths(&dylib_path).unwrap());
-+        .env(bootstrap::util::dylib_path_var(), PathBuf::from(libdir.clone()));
+-        .env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
++        .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
-@@ -60,7 +57,7 @@ fn main() {
+@@ -62,7 +59,7 @@ fn main() {
          eprintln!(
              "rustdoc command: {:?}={:?} {:?}",
-             bootstrap::util::dylib_path_var(),
+             dylib_path_var(),
 -            env::join_paths(&dylib_path).unwrap(),
 +            PathBuf::from(libdir.clone()),
              cmd,
diff --git a/srcpkgs/rust/patches/ld-library-path.patch b/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
similarity index 100%
rename from srcpkgs/rust/patches/ld-library-path.patch
rename to srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
diff --git a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch b/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
index a9ca5f6c7bba..8a18e414e209 100644
--- a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
+++ b/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
@@ -12,14 +12,14 @@ diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs
 index 238da24b..ffb05ee7 100644
 --- a/vendor/libc/src/unix/mod.rs
 +++ b/vendor/libc/src/unix/mod.rs
-@@ -299,11 +299,11 @@ cfg_if! {
-         // cargo build, don't pull in anything extra as the libstd dep
-         // already pulls in all libs.
+@@ -329,11 +329,11 @@ cfg_if! {
+         #[link(name = "c", cfg(not(target_feature = "crt-static")))]
+         extern {}
      } else if #[cfg(target_env = "musl")] {
 +        #[link(name = "c")]
 +        extern {}
          #[cfg_attr(feature = "rustc-dep-of-std",
--                   link(name = "c", kind = "static",
+-                   link(name = "c", kind = "static", modifiers = "-bundle",
 +                   link(name = "gcc", kind = "static-nobundle",
                          cfg(target_feature = "crt-static")))]
 -        #[cfg_attr(feature = "rustc-dep-of-std",
diff --git a/srcpkgs/rust/patches/native-sysroot.patch b/srcpkgs/rust/patches/native-sysroot.patch
index a23046220e9c..6826b114b6b7 100644
--- a/srcpkgs/rust/patches/native-sysroot.patch
+++ b/srcpkgs/rust/patches/native-sysroot.patch
@@ -1,17 +1,8 @@
-commit 57ed964d186212739fa436f103bd923a2309f341
-Author: Daniel Kolesa <daniel@octaforge.org>
-Date:   Tue Dec 21 02:46:30 2021 +0100
-
-    allow specifying native sysroot to use for linkage
-    
-    This allows us to get around the linker attempting to use
-    incompatible libs.
-
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index de771280e..5faaf9439 100644
+index e816f9b4..a2668fa9 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1166,6 +1166,10 @@ impl<'a> Builder<'a> {
+@@ -1313,6 +1313,10 @@ pub fn cargo(
              }
          }
  
@@ -23,26 +14,26 @@ index de771280e..5faaf9439 100644
              cargo.env("RUSTC_HOST_LINKER", host_linker);
          }
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 06b7a8c55..d8e9275ad 100644
+index 642a5c24..0dd4f879 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -292,6 +292,7 @@ pub struct Target {
-     pub ar: Option<PathBuf>,
+@@ -294,6 +294,7 @@ pub struct Target {
      pub ranlib: Option<PathBuf>,
+     pub default_linker: Option<PathBuf>,
      pub linker: Option<PathBuf>,
 +    pub sysroot: Option<PathBuf>,
      pub ndk: Option<PathBuf>,
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
-@@ -525,6 +526,7 @@ struct TomlTarget {
-     ar: Option<String>,
-     ranlib: Option<String>,
-     linker: Option<String>,
-+    sysroot: Option<String>,
-     llvm_config: Option<String>,
-     llvm_filecheck: Option<String>,
-     android_ndk: Option<String>,
-@@ -909,6 +911,7 @@ impl Config {
+@@ -621,6 +622,7 @@ struct TomlTarget {
+         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 {
                  target.ar = cfg.ar.map(PathBuf::from);
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
@@ -51,10 +42,10 @@ index 06b7a8c55..d8e9275ad 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 b930f3cd7..06e782520 100644
+index f3d5f308..7f8b9b27 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1056,6 +1056,10 @@ impl Build {
+@@ -1125,6 +1125,10 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
          }
      }
  
diff --git a/srcpkgs/rust/patches/xxx-ppcle.patch b/srcpkgs/rust/patches/xxx-ppcle.patch
index 9473e7ad98f3..c0522f0eaafc 100644
--- a/srcpkgs/rust/patches/xxx-ppcle.patch
+++ b/srcpkgs/rust/patches/xxx-ppcle.patch
@@ -1,53 +1,8 @@
-From b92ce1ed0ac8d95831a43f4395544c17a0816c9b Mon Sep 17 00:00:00 2001
-From: Daniel Kolesa <daniel@octaforge.org>
-Date: Sat, 3 Jul 2021 21:02:03 +0200
-Subject: [PATCH] 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/fastcall-inreg.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/borrowck/borrowck-asm.rs              |  1 +
- src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs      |  1 +
- src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs  |  1 +
- src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs |  1 +
- src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs   |  1 +
- src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs  |  1 +
- src/test/ui/llvm-asm/llvm-asm-out-read-uninit.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/rustc-ap-rustc_target/src/spec/mod.rs      |  2 ++
- .../src/spec/powerpcle_unknown_linux_gnu.rs       | 15 +++++++++++++++
- .../src/spec/powerpcle_unknown_linux_musl.rs      | 15 +++++++++++++++
- vendor/target-lexicon/src/targets.rs              |  7 +++++++
- vendor/tikv-jemallocator/benches/roundtrip.rs     |  3 ++-
- vendor/tikv-jemallocator/src/lib.rs               |  3 ++-
- 37 files changed, 111 insertions(+), 6 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
- create mode 100644 vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
- create mode 100644 vendor/rustc-ap-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 c2e9dba6..8147a3c3 100644
+index 0c1ab67cc..8d4e5f3cb 100644
 --- a/compiler/rustc_middle/src/ty/layout.rs
 +++ b/compiler/rustc_middle/src/ty/layout.rs
-@@ -2753,6 +2753,8 @@ where
+@@ -3057,6 +3057,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;
@@ -56,7 +11,7 @@ index c2e9dba6..8147a3c3 100644
          use SpecAbi::*;
          let rust_abi = matches!(sig.abi, RustIntrinsic | PlatformIntrinsic | Rust | RustCall);
  
-@@ -2850,7 +2852,8 @@ where
+@@ -3165,7 +3167,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
                      || (!win_x64_gnu
                          && !linux_s390x_gnu_like
                          && !linux_sparc64_gnu_like
@@ -67,10 +22,10 @@ index c2e9dba6..8147a3c3 100644
                      arg.mode = PassMode::Ignore;
                  }
 diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
-index 2af46693..986d84e0 100644
+index bd5b712c1..f60be010c 100644
 --- a/compiler/rustc_target/src/spec/mod.rs
 +++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -716,6 +716,8 @@ supported_targets! {
+@@ -824,6 +824,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),
@@ -81,7 +36,7 @@ index 2af46693..986d84e0 100644
      ("powerpc64le-unknown-linux-gnu", powerpc64le_unknown_linux_gnu),
 diff --git a/compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
 new file mode 100644
-index 00000000..780c20a3
+index 000000000..b7148a2fc
 --- /dev/null
 +++ b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
 @@ -0,0 +1,15 @@
@@ -89,20 +44,20 @@ index 00000000..780c20a3
 +
 +pub fn target() -> Target {
 +    let mut base = super::linux_gnu_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
++    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".into());
 +    base.max_atomic_width = Some(32);
 +
 +    Target {
-+        llvm_target: "powerpcle-unknown-linux-gnu".to_string(),
++        llvm_target: "powerpcle-unknown-linux-gnu".into(),
 +        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
++        data_layout: "e-m:e-p:32:32-i64:64-n32".into(),
++        arch: "powerpc".into(),
++        options: TargetOptions { mcount: "_mcount".into(), ..base },
 +    }
 +}
 diff --git a/compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
 new file mode 100644
-index 00000000..9b848ccf
+index 000000000..a826b6e47
 --- /dev/null
 +++ b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
 @@ -0,0 +1,15 @@
@@ -110,24 +65,24 @@ index 00000000..9b848ccf
 +
 +pub fn target() -> Target {
 +    let mut base = super::linux_musl_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
++    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".into());
 +    base.max_atomic_width = Some(32);
 +
 +    Target {
-+        llvm_target: "powerpcle-unknown-linux-musl".to_string(),
++        llvm_target: "powerpcle-unknown-linux-musl".into(),
 +        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
++        data_layout: "e-m:e-p:32:32-i64:64-n32".into(),
++        arch: "powerpc".into(),
++        options: TargetOptions { mcount: "_mcount".into(), ..base },
 +    }
 +}
 diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 4111420e..cd69a8ec 100644
+index 71b8f3c45..1505c12e4 100644
 --- a/src/bootstrap/bootstrap.py
 +++ b/src/bootstrap/bootstrap.py
-@@ -289,9 +289,11 @@ def default_build_triple(verbose):
-         'i686': 'i686',
+@@ -320,9 +320,11 @@ def default_build_triple(verbose):
          'i786': 'i686',
+         'm68k': 'm68k',
          'powerpc': 'powerpc',
 +        'powerpcle': 'powerpcle',
          'powerpc64': 'powerpc64',
@@ -136,9 +91,9 @@ index 4111420e..cd69a8ec 100644
 +        'ppcle': 'powerpcle',
          'ppc64': 'powerpc64',
          'ppc64le': 'powerpc64le',
-         's390x': 's390x',
+         'riscv64': 'riscv64gc',
 diff --git a/src/test/codegen/abi-main-signature-16bit-c-int.rs b/src/test/codegen/abi-main-signature-16bit-c-int.rs
-index 4ed491df..82ec7755 100644
+index 4ed491dfb..82ec7755d 100644
 --- a/src/test/codegen/abi-main-signature-16bit-c-int.rs
 +++ b/src/test/codegen/abi-main-signature-16bit-c-int.rs
 @@ -9,6 +9,7 @@
@@ -149,20 +104,8 @@ index 4ed491df..82ec7755 100644
  // ignore-powerpc64
  // ignore-riscv64
  // ignore-s390x
-diff --git a/src/test/codegen/fastcall-inreg.rs b/src/test/codegen/fastcall-inreg.rs
-index adbeae45..0fd0a9e6 100644
---- a/src/test/codegen/fastcall-inreg.rs
-+++ b/src/test/codegen/fastcall-inreg.rs
-@@ -16,6 +16,7 @@
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-r600
- // ignore-riscv64
- // ignore-amdgcn
 diff --git a/src/test/codegen/global_asm.rs b/src/test/codegen/global_asm.rs
-index 57d8aeb1..e0b1b692 100644
+index fab84868f..104d93d01 100644
 --- a/src/test/codegen/global_asm.rs
 +++ b/src/test/codegen/global_asm.rs
 @@ -12,6 +12,7 @@
@@ -174,7 +117,7 @@ index 57d8aeb1..e0b1b692 100644
  // ignore-amdgcn
  // ignore-sparc
 diff --git a/src/test/codegen/global_asm_include.rs b/src/test/codegen/global_asm_include.rs
-index 44402619..62ecfa6d 100644
+index 02ee91645..13f303332 100644
 --- a/src/test/codegen/global_asm_include.rs
 +++ b/src/test/codegen/global_asm_include.rs
 @@ -12,6 +12,7 @@
@@ -186,7 +129,7 @@ index 44402619..62ecfa6d 100644
  // ignore-amdgcn
  // ignore-sparc
 diff --git a/src/test/codegen/global_asm_x2.rs b/src/test/codegen/global_asm_x2.rs
-index d632d0dd..29f97775 100644
+index bdcf0ea84..1e2ff8b8d 100644
 --- a/src/test/codegen/global_asm_x2.rs
 +++ b/src/test/codegen/global_asm_x2.rs
 @@ -12,6 +12,7 @@
@@ -198,10 +141,10 @@ index d632d0dd..29f97775 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 3017adb4..632565bb 100644
+index 4ad3642c0..fca31c0c6 100644
 --- a/src/test/codegen/repr-transparent-aggregates-1.rs
 +++ b/src/test/codegen/repr-transparent-aggregates-1.rs
-@@ -7,6 +7,7 @@
+@@ -6,6 +6,7 @@
  // ignore-mips
  // ignore-mips64
  // ignore-powerpc
@@ -210,10 +153,10 @@ index 3017adb4..632565bb 100644
  // ignore-riscv64 see codegen/riscv-abi
  // ignore-windows
 diff --git a/src/test/codegen/repr-transparent-aggregates-2.rs b/src/test/codegen/repr-transparent-aggregates-2.rs
-index 429d760b..57e75f95 100644
+index b68e8e9eb..97c509b1b 100644
 --- a/src/test/codegen/repr-transparent-aggregates-2.rs
 +++ b/src/test/codegen/repr-transparent-aggregates-2.rs
-@@ -6,6 +6,7 @@
+@@ -5,6 +5,7 @@
  // ignore-emscripten
  // ignore-mips64
  // ignore-powerpc
@@ -222,7 +165,7 @@ index 429d760b..57e75f95 100644
  // ignore-powerpc64le
  // ignore-riscv64 see codegen/riscv-abi
 diff --git a/src/test/codegen/stack-probes.rs b/src/test/codegen/stack-probes.rs
-index 9bd351df..29073eb5 100644
+index 9bd351df3..29073eb56 100644
 --- a/src/test/codegen/stack-probes.rs
 +++ b/src/test/codegen/stack-probes.rs
 @@ -3,6 +3,7 @@
@@ -234,7 +177,7 @@ index 9bd351df..29073eb5 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/test/run-make-fulldeps/atomic-lock-free/Makefile b/src/test/run-make-fulldeps/atomic-lock-free/Makefile
-index 9e8b4fab..402d37a4 100644
+index 9e8b4fabf..402d37a45 100644
 --- a/src/test/run-make-fulldeps/atomic-lock-free/Makefile
 +++ b/src/test/run-make-fulldeps/atomic-lock-free/Makefile
 @@ -36,6 +36,8 @@ ifeq ($(filter powerpc,$(LLVM_COMPONENTS)),powerpc)
@@ -247,7 +190,7 @@ index 9e8b4fab..402d37a4 100644
  	nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
  	$(RUSTC) --target=powerpc64le-unknown-linux-gnu atomic_lock_free.rs
 diff --git a/src/test/ui/abi/stack-probes-lto.rs b/src/test/ui/abi/stack-probes-lto.rs
-index 90df1f3f..8c6dda8b 100644
+index 90df1f3f5..8c6dda8b8 100644
 --- a/src/test/ui/abi/stack-probes-lto.rs
 +++ b/src/test/ui/abi/stack-probes-lto.rs
 @@ -4,6 +4,7 @@
@@ -259,7 +202,7 @@ index 90df1f3f..8c6dda8b 100644
  // ignore-sparc
  // ignore-sparc64
 diff --git a/src/test/ui/abi/stack-probes.rs b/src/test/ui/abi/stack-probes.rs
-index e998dd0f..9472e538 100644
+index e998dd0f8..9472e5387 100644
 --- a/src/test/ui/abi/stack-probes.rs
 +++ b/src/test/ui/abi/stack-probes.rs
 @@ -4,6 +4,7 @@
@@ -270,92 +213,8 @@ index e998dd0f..9472e538 100644
  // ignore-s390x
  // ignore-sparc
  // ignore-sparc64
-diff --git a/src/test/ui/borrowck/borrowck-asm.rs b/src/test/ui/borrowck/borrowck-asm.rs
-index a3f64524..faf9adb4 100644
---- a/src/test/ui/borrowck/borrowck-asm.rs
-+++ b/src/test/ui/borrowck/borrowck-asm.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs b/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs
-index 2868d3d3..5c6e325b 100644
---- a/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs
-@@ -4,6 +4,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs b/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs
-index e3bc7d29..49f53f67 100644
---- a/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs b/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs
-index daae0c81..fd505c86 100644
---- a/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs
-@@ -5,6 +5,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs b/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs
-index 9c62532c..baa1c1ba 100644
---- a/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs b/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs
-index 72edb339..2fec991d 100644
---- a/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs b/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs
-index acf4cf9f..dfad0775 100644
---- a/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
 diff --git a/src/test/ui/target-feature/gate.rs b/src/test/ui/target-feature/gate.rs
-index 164830fe..531a4b45 100644
+index 2382c98f8..e6fe855d7 100644
 --- a/src/test/ui/target-feature/gate.rs
 +++ b/src/test/ui/target-feature/gate.rs
 @@ -5,6 +5,7 @@
@@ -367,7 +226,7 @@ index 164830fe..531a4b45 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/test/ui/target-feature/invalid-attribute.rs b/src/test/ui/target-feature/invalid-attribute.rs
-index 5ea78215..47e7887a 100644
+index ad1b6e96b..122d59a57 100644
 --- a/src/test/ui/target-feature/invalid-attribute.rs
 +++ b/src/test/ui/target-feature/invalid-attribute.rs
 @@ -5,6 +5,7 @@
@@ -379,10 +238,10 @@ index 5ea78215..47e7887a 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
-index 7dbd7094..08c9de3c 100644
+index bed509d77..8bc817897 100644
 --- a/src/tools/compiletest/src/util.rs
 +++ b/src/tools/compiletest/src/util.rs
-@@ -67,6 +67,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
+@@ -70,6 +70,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
      ("msp430", "msp430"),
      ("nvptx64", "nvptx64"),
      ("powerpc", "powerpc"),
@@ -391,10 +250,10 @@ index 7dbd7094..08c9de3c 100644
      ("powerpc64le", "powerpc64"),
      ("riscv64gc", "riscv64"),
 diff --git a/vendor/cc/src/lib.rs b/vendor/cc/src/lib.rs
-index 5051b296..286c2fb7 100644
+index e3a2b98b0..0236729fd 100644
 --- a/vendor/cc/src/lib.rs
 +++ b/vendor/cc/src/lib.rs
-@@ -2409,6 +2409,7 @@ impl Build {
+@@ -2594,6 +2594,7 @@ impl Build {
              "powerpc-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
              "powerpc-unknown-linux-gnuspe" => Some("powerpc-linux-gnuspe"),
              "powerpc-unknown-netbsd" => Some("powerpc--netbsd"),
@@ -402,66 +261,11 @@ index 5051b296..286c2fb7 100644
              "powerpc64-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
              "powerpc64le-unknown-linux-gnu" => Some("powerpc64le-linux-gnu"),
              "riscv32i-unknown-none-elf" => self.find_working_gnu_prefix(&[
-diff --git a/vendor/rustc-ap-rustc_target/src/spec/mod.rs b/vendor/rustc-ap-rustc_target/src/spec/mod.rs
-index 2af46693..986d84e0 100644
---- a/vendor/rustc-ap-rustc_target/src/spec/mod.rs
-+++ b/vendor/rustc-ap-rustc_target/src/spec/mod.rs
-@@ -716,6 +716,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),
-+    ("powerpcle-unknown-linux-gnu", powerpcle_unknown_linux_gnu),
-+    ("powerpcle-unknown-linux-musl", powerpcle_unknown_linux_musl),
-     ("powerpc64-unknown-linux-gnu", powerpc64_unknown_linux_gnu),
-     ("powerpc64-unknown-linux-musl", powerpc64_unknown_linux_musl),
-     ("powerpc64le-unknown-linux-gnu", powerpc64le_unknown_linux_gnu),
-diff --git a/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
-new file mode 100644
-index 00000000..780c20a3
---- /dev/null
-+++ b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
-@@ -0,0 +1,15 @@
-+use crate::spec::{LinkerFlavor, Target, TargetOptions};
-+
-+pub fn target() -> Target {
-+    let mut base = super::linux_gnu_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
-+    base.max_atomic_width = Some(32);
-+
-+    Target {
-+        llvm_target: "powerpcle-unknown-linux-gnu".to_string(),
-+        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
-+    }
-+}
-diff --git a/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_musl.rs b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
-new file mode 100644
-index 00000000..9b848ccf
---- /dev/null
-+++ b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
-@@ -0,0 +1,15 @@
-+use crate::spec::{LinkerFlavor, Target, TargetOptions};
-+
-+pub fn target() -> Target {
-+    let mut base = super::linux_musl_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
-+    base.max_atomic_width = Some(32);
-+
-+    Target {
-+        llvm_target: "powerpcle-unknown-linux-musl".to_string(),
-+        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
-+    }
-+}
 diff --git a/vendor/target-lexicon/src/targets.rs b/vendor/target-lexicon/src/targets.rs
-index 87c237aa..dc694010 100644
+index 22cc95cc3..46167e34e 100644
 --- a/vendor/target-lexicon/src/targets.rs
 +++ b/vendor/target-lexicon/src/targets.rs
-@@ -26,6 +26,7 @@ pub enum Architecture {
+@@ -29,6 +29,7 @@ pub enum Architecture {
      Msp430,
      Nvptx64,
      Powerpc,
@@ -469,7 +273,7 @@ index 87c237aa..dc694010 100644
      Powerpc64,
      Powerpc64le,
      Riscv32(Riscv32Architecture),
-@@ -517,6 +518,7 @@ impl Architecture {
+@@ -533,6 +534,7 @@ impl Architecture {
              | Mips64(Mips64Architecture::Mipsisa64r6el)
              | Msp430
              | Nvptx64
@@ -477,15 +281,15 @@ index 87c237aa..dc694010 100644
              | Powerpc64le
              | Riscv32(_)
              | Riscv64(_)
-@@ -553,6 +555,7 @@ impl Architecture {
-             | Sparc
-             | Wasm32
+@@ -574,6 +576,7 @@ impl Architecture {
+             | M68k
              | Mips32(_)
+             | Powerpc
 +            | Powerpcle
-             | Powerpc => Ok(PointerWidth::U32),
+             | XTensa => Ok(PointerWidth::U32),
              AmdGcn
-             | Powerpc64le
-@@ -737,6 +740,7 @@ impl fmt::Display for Architecture {
+             | Bpfeb
+@@ -763,6 +766,7 @@ impl fmt::Display for Architecture {
              Msp430 => f.write_str("msp430"),
              Nvptx64 => f.write_str("nvptx64"),
              Powerpc => f.write_str("powerpc"),
@@ -493,7 +297,7 @@ index 87c237aa..dc694010 100644
              Powerpc64 => f.write_str("powerpc64"),
              Powerpc64le => f.write_str("powerpc64le"),
              Riscv32(riscv32) => riscv32.fmt(f),
-@@ -913,6 +917,7 @@ impl FromStr for Architecture {
+@@ -943,6 +947,7 @@ impl FromStr for Architecture {
              "msp430" => Msp430,
              "nvptx64" => Nvptx64,
              "powerpc" => Powerpc,
@@ -501,8 +305,8 @@ index 87c237aa..dc694010 100644
              "powerpc64" => Powerpc64,
              "powerpc64le" => Powerpc64le,
              "s390x" => S390x,
-@@ -1380,6 +1385,8 @@ mod tests {
-             "powerpc-unknown-netbsd",
+@@ -1445,6 +1450,8 @@ mod tests {
+             "powerpc-unknown-openbsd",
              "powerpc-wrs-vxworks",
              "powerpc-wrs-vxworks-spe",
 +            "powerpcle-unknown-linux-gnu",
@@ -511,7 +315,7 @@ index 87c237aa..dc694010 100644
              "powerpc64-unknown-linux-gnu",
              "powerpc64-unknown-linux-musl",
 diff --git a/vendor/tikv-jemallocator/benches/roundtrip.rs b/vendor/tikv-jemallocator/benches/roundtrip.rs
-index 40b8005f..bc4df023 100644
+index 767abe8d4..704bf955a 100644
 --- a/vendor/tikv-jemallocator/benches/roundtrip.rs
 +++ b/vendor/tikv-jemallocator/benches/roundtrip.rs
 @@ -22,7 +22,8 @@ static A: Jemalloc = Jemalloc;
@@ -525,19 +329,16 @@ index 40b8005f..bc4df023 100644
  const MIN_ALIGN: usize = 8;
  #[cfg(all(any(
 diff --git a/vendor/tikv-jemallocator/src/lib.rs b/vendor/tikv-jemallocator/src/lib.rs
-index 9a489b62..1ed12b26 100644
+index 4a9397331..4cf47c05d 100644
 --- a/vendor/tikv-jemallocator/src/lib.rs
 +++ b/vendor/tikv-jemallocator/src/lib.rs
-@@ -44,7 +44,8 @@ use libc::{c_int, c_void};
+@@ -46,7 +46,8 @@ use libc::{c_int, c_void};
      target_arch = "arm",
      target_arch = "mips",
      target_arch = "mipsel",
 -    target_arch = "powerpc"
 +    target_arch = "powerpc",
-+    target_arch = "powerpcle"
++    target_arch = "powerpcle",
  )))]
  const ALIGNOF_MAX_ALIGN_T: usize = 8;
  #[cfg(all(any(
--- 
-2.32.0
-
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index 560a629f3da2..53ef4333cc52 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -8,7 +8,7 @@
 # uploaded to https://alpha.de.repo.voidlinux.org/distfiles/
 #
 pkgname=rust
-version=1.57.0
+version=1.61.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=3546f9c3b91b1f8b8efd26c94d6b50312c08210397b4072ed2748e2bd4445c1a
+checksum=ad0b4351675aa9abdf4c7e066613bd274c4391c5506db152983426376101daed
 lib32disabled=yes
 make_check=no # CBA for now
 
@@ -61,7 +61,6 @@ post_patch() {
 	_clear_vendor_checksums libc
 	_clear_vendor_checksums typenum
 	_clear_vendor_checksums cc
-	_clear_vendor_checksums rustc-ap-rustc_target
 	_clear_vendor_checksums target-lexicon
 	_clear_vendor_checksums tikv-jemallocator
 }
@@ -216,14 +215,8 @@ do_install() {
 
 	cd ${DESTDIR}/usr/lib
 	# symlinks instead of copies
-	mv *.so rustlib/${RUST_TARGET}/lib
+	rm *.so
 	ln -sf rustlib/${RUST_TARGET}/lib/*.so .
-
-	# executable used for split dwarf, currently unstable on linux.
-	# it's copied directly from the local llvm package, but
-	# FIXME: cross builds are installing the version from the build machine,
-	# it shouldn't be necessary to remove it
-	rm rustlib/${RUST_TARGET}/bin/rust-llvm-dwp
 }
 
 rust-doc_package() {

From aa3c3644832bb36e5695b88d8f2a49f34ac3cc5c Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:14:23 +0200
Subject: [PATCH 4/4] cargo: update to 1.61.0

---
 srcpkgs/cargo/template | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index c512e7005833..e3c30f625acd 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -1,8 +1,8 @@
 # Template file for 'cargo'
 pkgname=cargo
-version=0.58.0
+version=1.61.0
 revision=1
-wrksrc="cargo-${version}"
+wrksrc="cargo-rust-${version}"
 build_helper=rust
 hostmakedepends="cargo-bootstrap rust python3 curl cmake pkg-config zlib-devel"
 makedepends="rust libcurl-devel openssl-devel"
@@ -11,10 +11,10 @@ short_desc="Rust package manager"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://crates.io/"
-distfiles="https://github.com/rust-lang/cargo/archive/${version}.tar.gz
- https://github.com/crossbeam-rs/crossbeam/archive/refs/tags/crossbeam-utils-0.8.5.tar.gz"
-checksum="e1d6f55414a29906d24b13c687996b5220e08ccce9c682e4c02851138fc7093f
- 57db07eb38b0aaf7951c79b4639819cb84bc4269507091afea7267e10a54e079"
+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
+ 52c451910203cd9002cc4b85cff95f45c6ba245392801e80d7898ca5c3c3ab29"
 replaces="cargo-tree>=0"
 
 build_options="static bindist"
@@ -28,7 +28,7 @@ if [ -z "$_build_static" ]; then
 	makedepends+=" libgit2-devel"
 fi
 
-post_extract() {
+pre_patch() {
 	mv ../crossbeam-* crossbeam-utils
 }
 

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

* Re: [PR PATCH] [Updated] Update Rust toolchain to 1.61.0
  2022-05-21 21:09 [PR PATCH] Update Rust toolchain to 1.61.0 tranzystorek-io
                   ` (8 preceding siblings ...)
  2022-05-22 10:20 ` [PR PATCH] [Updated] " tranzystorek-io
@ 2022-05-28  6:47 ` tranzystorek-io
  2022-06-04 19:32 ` q66
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tranzystorek-io @ 2022-05-28  6:47 UTC (permalink / raw)
  To: ml

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

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

https://github.com/tranzystorek-io/void-packages rust-toolchain
https://github.com/void-linux/void-packages/pull/37232

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

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-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)


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

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

From ade43242128d1e36a458f8044a703b8103b43ddd Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:03:26 +0200
Subject: [PATCH 1/4] rust-bootstrap: update to 1.61.0

---
 srcpkgs/rust-bootstrap/template | 35 +++++++++++++++++----------------
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/srcpkgs/rust-bootstrap/template b/srcpkgs/rust-bootstrap/template
index 5d3fb3832038..9d1148e0c5a7 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.57.0
+version=1.61.0
 revision=1
 create_wrksrc=yes
 short_desc="Rust programming language bootstrap toolchain"
@@ -17,7 +17,7 @@ fi
 
 _bootstrap_url="https://static.rust-lang.org/dist"
 
-case "$XBPS_MACHINE" in
+case "$XBPS_TARGET_MACHINE" in
 	x86_64*|i686|ppc64le|ppc) ;;
 	*) _bootstrap_url="https://repo-default.voidlinux.org/distfiles";;
 esac
@@ -29,40 +29,40 @@ distfiles="
 case "$XBPS_TARGET_MACHINE" in
 	i686)
 		checksum="
-		 9bade3fcd246b0ad6859fcf5d0a80d3eb833e5410efa3a5552c241865562461e
-		 586e7fd521a058cbf4778abb67d7d078dd4820d356351d0b6a719e21d00966db"
+		 8af0ec3eb470e7e28439fedf9ebdadf90df8c58da544cc643033e6fc0ccf0bea
+		 ab223fcec35183bc0fe630403537cd7dae55c403103df29b25077db4882cb88e"
 		;;
 	x86_64)
 		checksum="
-		 c42f40c5279a3a9d539cae93dbcab9d333777ad9a60a5b9f1086b874ef63db86
-		 ccdc72d06c90841b7227ec3630337881eeda3da5fbe87328d2e9d705f6f8016c"
+		 21c4613f389ed130fbaaf88f1e984319f72b5fc10734569a5ba19e22ebb03abd
+		 270b07aa5f2de52255a117e1e587138d77375ce0d09a1d7fead085f29b3977e9"
 		;;
 	x86_64-musl)
 		checksum="
-		 5b04e0e0bbf140f7c49baa6280114c28f59f6de50481bdd45074eebf629c174c
-		 818213a6444503ed6adf0231d3c71de990d4c26926c62e8c602bb7e2d636fb94"
+		 89cb72cbc493cb5cd8e43830009b4a1a5bfd472246ae184157868c9b0607bf6c
+		 1f4f2e4c5dd0f9b0dac7c8888f4a49ef16a6fe8992f39895823d2a442f0fe408"
 		;;
 	ppc64le)
 		checksum="
-		 f43cb99109c3438c77c7079cdce4673df3320e310158e0b4d949c1babc4300fc
-		 fc07eb3e9f3d227428cc5b53ca868e3de375bc198ce4dce7b87a9246e6fec81a"
+		 dc54893d747e4f3330515caa75e404f78c6c5475a1216d1428f5e7ce1c2e9602
+		 36c0ccff14c80419507561db050f9533f0abd43fc50f3ddb859c10df74b1c351"
 		;;
 	ppc64le-musl)
 		checksum="
-		 6b48e521ba8a070a7b992595e82c5a164cc01c93bbd9a7b3d4db362f4b060df8
-		 d7876e817fc95df2e81858fc9ddb95b10fb83b413277ea6dbdfa9a80fa0d990e"
+		 badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb
+		 badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
 	ppc64)
 		checksum="
-		 2ea5b66d2cd8b9c251590fd5bd3e23cedec658b61f541e2824ce3fdcda263982
-		 e9c1394771b1b24241d8938ad75c4a6ed8bfa043522c74767b3528f2289095c0"
+		 badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb
+		 badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
 	ppc)
 		checksum="
-		 a1d7611b2d39224ba9a915009ae2a6639def42767370f50effd57770b3eb2150
-		 bc117ce5f0c81d2e14ea2d1832c0e908b1153caf49f295a9d28af2128f5fae44"
+		 f28a8c2986fce5015c67823e39ad4b53e2db06603b6ea4a1217ac961cbbfb073
+		 7d2f7f900c8c05616fba8e99ab041d847af3653c259b99445edd788acddf878c"
 		;;
-	*) broken="rust bootstrap binaries unavailable for ${XBPS_MACHINE}";;
+	*) broken="rust bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac
 
 do_install() {
@@ -76,5 +76,6 @@ do_install() {
 	vlicense rustc-${version}-${RUST_TARGET}/LICENSE-APACHE
 	vlicense rustc-${version}-${RUST_TARGET}/LICENSE-MIT
 
+	rm -rf ${DESTDIR}/usr/share/doc/rust
 	rm -f ${DESTDIR}/usr/lib/rustlib/${RUST_TARGET}/bin/rust-ll*
 }

From 6e899eb8180c63b8ba0a9dc56cc2103670411535 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:12:56 +0200
Subject: [PATCH 2/4] cargo-bootstrap: update to 1.61.0

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

diff --git a/srcpkgs/cargo-bootstrap/template b/srcpkgs/cargo-bootstrap/template
index f5fb65f1d4c8..2261f6df824c 100644
--- a/srcpkgs/cargo-bootstrap/template
+++ b/srcpkgs/cargo-bootstrap/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo-bootstrap'
 pkgname=cargo-bootstrap
-version=0.58.0
+version=1.61.0
 revision=1
 short_desc="Bootstrap binaries of Rust package manager"
 maintainer="q66 <daniel@octaforge.org>"
@@ -11,45 +11,42 @@ lib32disabled=yes
 nostrip=yes
 
 _bootstrap_url="https://static.rust-lang.org/dist"
-_bootver=1.57.0
 
 # we don't use upstream cargo binaries for ppc32, as they are busted (probably
 # a dependency is wrong, which results in failed signature verification when
 # updating the crates.io index)
+# ppc64 is excluded because of ABI incompatibility
 case "$XBPS_TARGET_MACHINE" in
 	x86_64*|i686|ppc64le) ;;
-	*)
-		_bootstrap_url="https://repo-default.voidlinux.org/distfiles"
-		_bootver=${version}
-		;;
+	*) _bootstrap_url="https://repo-default.voidlinux.org/distfiles" ;;
 esac
 
-wrksrc="cargo-${_bootver}-${RUST_TARGET}"
-distfiles="${_bootstrap_url}/cargo-${_bootver}-${RUST_TARGET}.tar.xz"
+wrksrc="cargo-${version}-${RUST_TARGET}"
+distfiles="${_bootstrap_url}/cargo-${version}-${RUST_TARGET}.tar.xz"
 
 case "$XBPS_TARGET_MACHINE" in
 	i686)
-		checksum="9898a1fae2647f930fa14b9c160a1d22e67ccc70ac0d2d8f79ef1ffcf8d89af7"
+		checksum="fe258b85ef0644ff08c2095e329399dd4de0e1b2e51f4f4e90cb956d40dc61de"
 		;;
 	x86_64)
-		checksum="ed2013713ae742895af5df8d91c5430ba9ba3c781e3bc7f3471b220cc06d565d"
+		checksum="9461727d754f865ef2a87479d40bbe4c5176f80963b7c50b7797bc8940d7a0a0"
 		;;
 	x86_64-musl)
-		checksum="0d8564d0348843d6c08d98990d9eac50b7b7ab790f89d514b4f45079e786d932"
+		checksum="db4b4423c2843b6e27737664cf8085afcba670374110ca24b9c8d341045e748c"
 		;;
 	ppc64le)
-		checksum="599cf1b5a8cdbf76d591621bc9222aefa60e2f5fd378ae71c4dcf4514c47122e"
+		checksum="09817011ff1ef4b7006387c7cabb6a059731792a9372533dec7d87e7f014444b"
 		;;
 	ppc64le-musl)
-		checksum="99ae7661c62617ac42adacb50cce9ae8d019bcf85e987b98fbc27240bceb1dd9"
+		checksum="badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
 	ppc64)
-		checksum="c64b9cce7a3ceaf5c310fad70be33077f1e6dea1384767fcf744732c0daa7473"
+		checksum="badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
 	ppc)
-		checksum="e67c2a7d16b3c732a1dcb663d031daf6eaca4b74d1d15196086c53c0c3a5b0a2"
+		checksum="badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb"
 		;;
-	*) broken="cargo bootstrap binaries unavailable for ${XBPS_MACHINE}";;
+	*) broken="cargo bootstrap binaries unavailable for ${XBPS_TARGET_MACHINE}";;
 esac
 
 do_install() {

From ae7848a907519ab30c268e60d412bbd1e3046c79 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:09:02 +0200
Subject: [PATCH 3/4] rust: update to 1.61.0

---
 .../rust/patches/0001-musl-void-setup.patch   | 135 +++-----
 ...007-fix-rustdoc-when-cross-compiling.patch |  12 +-
 ... 0010-do-not-export-LD_LIBRARY_PATH.patch} |   0
 ...kage-of-musl-libc-for-the-libc-crate.patch |   8 +-
 srcpkgs/rust/patches/native-sysroot.patch     |  41 +--
 srcpkgs/rust/patches/xxx-ppcle.patch          | 309 ++++--------------
 srcpkgs/rust/template                         |  13 +-
 7 files changed, 138 insertions(+), 380 deletions(-)
 rename srcpkgs/rust/patches/{ld-library-path.patch => 0010-do-not-export-LD_LIBRARY_PATH.patch} (100%)

diff --git a/srcpkgs/rust/patches/0001-musl-void-setup.patch b/srcpkgs/rust/patches/0001-musl-void-setup.patch
index 427581c48f54..c13cb1730986 100644
--- a/srcpkgs/rust/patches/0001-musl-void-setup.patch
+++ b/srcpkgs/rust/patches/0001-musl-void-setup.patch
@@ -1,8 +1,8 @@
 diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
-index 2fc9ab29f92..27673615968 100644
+index 51f392a6..62560658 100644
 --- a/compiler/rustc_target/src/spec/crt_objects.rs
 +++ b/compiler/rustc_target/src/spec/crt_objects.rs
-@@ -62,28 +62,6 @@ pub(super) fn all(obj: &str) -> CrtObjects {
+@@ -63,28 +63,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects {
      ])
  }
  
@@ -32,7 +32,7 @@ index 2fc9ab29f92..27673615968 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 5038a967d0a..b3c0e5bc416 100644
+index 207a87ab..88f807a5 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 @@
@@ -42,7 +42,7 @@ index 5038a967d0a..b3c0e5bc416 100644
  pub fn opts() -> TargetOptions {
      let mut base = super::linux_base::opts();
  
-     base.env = "musl".to_string();
+     base.env = "musl".into();
 -    base.pre_link_objects_fallback = crt_objects::pre_musl_fallback();
 -    base.post_link_objects_fallback = crt_objects::post_musl_fallback();
 -    base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
@@ -53,30 +53,29 @@ index 5038a967d0a..b3c0e5bc416 100644
      base
  }
 diff --git a/config.toml.example b/config.toml.example
-index 61e57eee782..77943129204 100644
+index 6e53d9b4..74980d2c 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -668,15 +668,6 @@ changelog-seen = 2
- # only use static libraries. If unset, the target's default linkage is used.
- #crt-static = <platform-specific> (bool)
+@@ -511,14 +511,6 @@ changelog-seen = 2
+ # supplementary build information, like distro-specific package versions.
+ #description = <none> (string)
  
 -# The root location of the musl installation directory. The library directory
 -# will also need to contain libunwind.a for an unwinding implementation. Note
 -# that this option only makes sense for musl targets that produce statically
 -# linked binaries.
--#musl-root = build.musl-root (path)
+-#
+-# Defaults to /usr on musl hosts. Has no default otherwise.
+-#musl-root = <platform specific> (path)
 -
--# The full path to the musl libdir.
--#musl-libdir = musl-root/lib
--
- # The root location of the `wasm32-wasi` sysroot. Only used for the
- # `wasm32-wasi` target. If you are building wasm32-wasi target, make sure to
- # create a `[target.wasm32-wasi]` section and move this field there.
+ # By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
+ # platforms to ensure that the compiler is usable by default from the build
+ # directory (as it links to a number of dynamic libraries). This may not be
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index e750c2963dd..f6ba3032b0d 100644
+index 7ce44687..4e7507ae 100644
 --- a/src/bootstrap/cc_detect.rs
 +++ b/src/bootstrap/cc_detect.rs
-@@ -98,7 +98,7 @@ pub fn find(build: &mut Build) {
+@@ -97,7 +97,7 @@ pub fn find(build: &mut Build) {
          if let Some(cc) = config.and_then(|c| c.cc.as_ref()) {
              cfg.compiler(cc);
          } else {
@@ -85,7 +84,7 @@ index e750c2963dd..f6ba3032b0d 100644
          }
  
          let compiler = cfg.get_compiler();
-@@ -126,7 +126,7 @@ pub fn find(build: &mut Build) {
+@@ -125,7 +125,7 @@ pub fn find(build: &mut Build) {
              cfg.compiler(cxx);
              true
          } else if build.hosts.contains(&target) || build.build == target {
@@ -130,13 +129,14 @@ index e750c2963dd..f6ba3032b0d 100644
      }
  }
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index e9cc7662e63..4971534ba0e 100644
+index afc333b5..9d67ab56 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -199,36 +199,7 @@ fn copy_self_contained_objects(
+@@ -197,39 +197,7 @@ fn copy_self_contained_objects(
+     let mut target_deps = vec![];
  
-     // Copies the CRT objects.
-     //
+     // Copies the libc and CRT objects.
+-    //
 -    // rustc historically provides a more self-contained installation for musl targets
 -    // not requiring the presence of a native musl toolchain. For example, it can fall back
 -    // to using gcc from a glibc-targeting toolchain for linking.
@@ -146,7 +146,7 @@ index e9cc7662e63..4971534ba0e 100644
 -        let srcdir = builder.musl_libdir(target).unwrap_or_else(|| {
 -            panic!("Target {:?} does not have a \"musl-libdir\" key", target.triple)
 -        });
--        for &obj in &["crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
+-        for &obj in &["libc.a", "crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
 -            copy_and_stamp(
 -                builder,
 -                &libdir_self_contained,
@@ -164,14 +164,16 @@ index e9cc7662e63..4971534ba0e 100644
 -            target_deps.push((target, DependencyType::TargetSelfContained));
 -        }
 -
--        let libunwind_path = copy_llvm_libunwind(builder, target, &libdir_self_contained);
--        target_deps.push((libunwind_path, DependencyType::TargetSelfContained));
+-        if !target.starts_with("s390x") {
+-            let libunwind_path = copy_llvm_libunwind(builder, target, &libdir_self_contained);
+-            target_deps.push((libunwind_path, DependencyType::TargetSelfContained));
+-        }
 -    } else if target.ends_with("-wasi") {
 +    if target.ends_with("-wasi") {
          let srcdir = builder
              .wasi_root(target)
              .unwrap_or_else(|| {
-@@ -312,15 +283,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+@@ -313,15 +281,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
              .arg("--manifest-path")
              .arg(builder.src.join("library/test/Cargo.toml"));
  
@@ -188,7 +190,7 @@ index e9cc7662e63..4971534ba0e 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 e658d958d0a..914b1390b37 100644
+index 9534cc5f..642a5c24 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
 @@ -172,7 +172,6 @@ pub struct Config {
@@ -199,7 +201,7 @@ index e658d958d0a..914b1390b37 100644
      pub prefix: Option<PathBuf>,
      pub sysconfdir: Option<PathBuf>,
      pub datadir: Option<PathBuf>,
-@@ -298,8 +297,6 @@ pub struct Target {
+@@ -299,8 +298,6 @@ pub struct Target {
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
      pub crt_static: Option<bool>,
@@ -208,24 +210,24 @@ index e658d958d0a..914b1390b37 100644
      pub wasi_root: Option<PathBuf>,
      pub qemu_rootfs: Option<PathBuf>,
      pub no_std: bool,
-@@ -493,7 +490,6 @@ struct Rust {
-     default_linker: Option<String>,
-     channel: Option<String>,
-     description: Option<String>,
--    musl_root: Option<String>,
-     rpath: Option<bool>,
-     verbose_tests: Option<bool>,
-     optimize_tests: Option<bool>,
-@@ -536,8 +532,6 @@ struct TomlTarget {
-     sanitizers: Option<bool>,
-     profiler: Option<bool>,
-     crt_static: Option<bool>,
--    musl_root: Option<String>,
--    musl_libdir: Option<String>,
-     wasi_root: Option<String>,
-     qemu_rootfs: Option<String>,
-     no_std: Option<bool>,
-@@ -872,7 +866,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -587,7 +584,6 @@ struct Rust {
+         default_linker: Option<String> = "default-linker",
+         channel: Option<String> = "channel",
+         description: Option<String> = "description",
+-        musl_root: Option<String> = "musl-root",
+         rpath: Option<bool> = "rpath",
+         verbose_tests: Option<bool> = "verbose-tests",
+         optimize_tests: Option<bool> = "optimize-tests",
+@@ -631,8 +627,6 @@ struct TomlTarget {
+         sanitizers: Option<bool> = "sanitizers",
+         profiler: Option<bool> = "profiler",
+         crt_static: Option<bool> = "crt-static",
+-        musl_root: Option<String> = "musl-root",
+-        musl_libdir: Option<String> = "musl-libdir",
+         wasi_root: Option<String> = "wasi-root",
+         qemu_rootfs: Option<String> = "qemu-rootfs",
+         no_std: Option<bool> = "no-std",
+@@ -1013,7 +1007,6 @@ pub fn parse(args: &[String]) -> Config {
              set(&mut config.llvm_tools_enabled, rust.llvm_tools);
              config.rustc_parallel = rust.parallel_compiler.unwrap_or(false);
              config.rustc_default_linker = rust.default_linker;
@@ -233,7 +235,7 @@ index e658d958d0a..914b1390b37 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);
-@@ -918,8 +911,6 @@ pub fn parse(args: &[String]) -> Config {
+@@ -1059,8 +1052,6 @@ pub fn parse(args: &[String]) -> Config {
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
                  target.crt_static = cfg.crt_static;
@@ -243,7 +245,7 @@ index e658d958d0a..914b1390b37 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 94424cb4548..9ae0cc053e3 100755
+index 87a130a0..bd4c9197 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",
@@ -282,18 +284,10 @@ index 94424cb4548..9ae0cc053e3 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 2d4e1527897..3abe9f4a143 100644
+index 570a6174..f3d5f308 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -277,7 +277,6 @@ pub struct Build {
- struct Crate {
-     name: Interned<String>,
-     deps: HashSet<Interned<String>>,
--    id: String,
-     path: PathBuf,
- }
- 
-@@ -1056,25 +1055,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
+@@ -1125,25 +1125,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
          }
      }
  
@@ -319,29 +313,8 @@ index 2d4e1527897..3abe9f4a143 100644
      /// Returns the sysroot for the wasi target, if defined
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
          self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
-diff --git a/src/bootstrap/metadata.rs b/src/bootstrap/metadata.rs
-index a38391c7b88..65e229697dc 100644
---- a/src/bootstrap/metadata.rs
-+++ b/src/bootstrap/metadata.rs
-@@ -14,7 +14,6 @@ struct Output {
- 
- #[derive(Deserialize)]
- struct Package {
--    id: String,
-     name: String,
-     source: Option<String>,
-     manifest_path: String,
-@@ -50,7 +49,7 @@ pub fn build(build: &mut Build) {
-                 .filter(|dep| dep.source.is_none())
-                 .map(|dep| INTERNER.intern_string(dep.name))
-                 .collect();
--            build.crates.insert(name, Crate { name, id: package.id, deps, path });
-+            build.crates.insert(name, Crate { name, deps, path });
-         }
-     }
- }
 diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index d7db2cef24f..a791177956d 100644
+index 8c2899c1..dda15d76 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
 @@ -11,7 +11,6 @@
@@ -352,7 +325,7 @@ index d7db2cef24f..a791177956d 100644
  use std::path::PathBuf;
  use std::process::Command;
  
-@@ -178,28 +177,6 @@ pub fn check(build: &mut Build) {
+@@ -177,28 +176,6 @@ pub fn check(build: &mut Build) {
              }
          }
  
diff --git a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch b/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
index adaf86f2f451..2cc1f6b900d3 100644
--- a/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
+++ b/srcpkgs/rust/patches/0007-fix-rustdoc-when-cross-compiling.patch
@@ -11,26 +11,26 @@ diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
 index e4396d530..cb2312028 100644
 --- a/src/bootstrap/bin/rustdoc.rs
 +++ b/src/bootstrap/bin/rustdoc.rs
-@@ -20,14 +20,11 @@ fn main() {
+@@ -22,14 +22,11 @@ fn main() {
          Err(_) => 0,
      };
  
--    let mut dylib_path = bootstrap::util::dylib_path();
+-    let mut dylib_path = dylib_path();
 -    dylib_path.insert(0, PathBuf::from(libdir.clone()));
 -
      let mut cmd = Command::new(rustdoc);
      cmd.args(&args)
          .arg("--sysroot")
          .arg(&sysroot)
--        .env(bootstrap::util::dylib_path_var(), env::join_paths(&dylib_path).unwrap());
-+        .env(bootstrap::util::dylib_path_var(), PathBuf::from(libdir.clone()));
+-        .env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
++        .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
-@@ -60,7 +57,7 @@ fn main() {
+@@ -62,7 +59,7 @@ fn main() {
          eprintln!(
              "rustdoc command: {:?}={:?} {:?}",
-             bootstrap::util::dylib_path_var(),
+             dylib_path_var(),
 -            env::join_paths(&dylib_path).unwrap(),
 +            PathBuf::from(libdir.clone()),
              cmd,
diff --git a/srcpkgs/rust/patches/ld-library-path.patch b/srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
similarity index 100%
rename from srcpkgs/rust/patches/ld-library-path.patch
rename to srcpkgs/rust/patches/0010-do-not-export-LD_LIBRARY_PATH.patch
diff --git a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch b/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
index a9ca5f6c7bba..8a18e414e209 100644
--- a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
+++ b/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch
@@ -12,14 +12,14 @@ diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs
 index 238da24b..ffb05ee7 100644
 --- a/vendor/libc/src/unix/mod.rs
 +++ b/vendor/libc/src/unix/mod.rs
-@@ -299,11 +299,11 @@ cfg_if! {
-         // cargo build, don't pull in anything extra as the libstd dep
-         // already pulls in all libs.
+@@ -329,11 +329,11 @@ cfg_if! {
+         #[link(name = "c", cfg(not(target_feature = "crt-static")))]
+         extern {}
      } else if #[cfg(target_env = "musl")] {
 +        #[link(name = "c")]
 +        extern {}
          #[cfg_attr(feature = "rustc-dep-of-std",
--                   link(name = "c", kind = "static",
+-                   link(name = "c", kind = "static", modifiers = "-bundle",
 +                   link(name = "gcc", kind = "static-nobundle",
                          cfg(target_feature = "crt-static")))]
 -        #[cfg_attr(feature = "rustc-dep-of-std",
diff --git a/srcpkgs/rust/patches/native-sysroot.patch b/srcpkgs/rust/patches/native-sysroot.patch
index a23046220e9c..6826b114b6b7 100644
--- a/srcpkgs/rust/patches/native-sysroot.patch
+++ b/srcpkgs/rust/patches/native-sysroot.patch
@@ -1,17 +1,8 @@
-commit 57ed964d186212739fa436f103bd923a2309f341
-Author: Daniel Kolesa <daniel@octaforge.org>
-Date:   Tue Dec 21 02:46:30 2021 +0100
-
-    allow specifying native sysroot to use for linkage
-    
-    This allows us to get around the linker attempting to use
-    incompatible libs.
-
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index de771280e..5faaf9439 100644
+index e816f9b4..a2668fa9 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1166,6 +1166,10 @@ impl<'a> Builder<'a> {
+@@ -1313,6 +1313,10 @@ pub fn cargo(
              }
          }
  
@@ -23,26 +14,26 @@ index de771280e..5faaf9439 100644
              cargo.env("RUSTC_HOST_LINKER", host_linker);
          }
 diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
-index 06b7a8c55..d8e9275ad 100644
+index 642a5c24..0dd4f879 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -292,6 +292,7 @@ pub struct Target {
-     pub ar: Option<PathBuf>,
+@@ -294,6 +294,7 @@ pub struct Target {
      pub ranlib: Option<PathBuf>,
+     pub default_linker: Option<PathBuf>,
      pub linker: Option<PathBuf>,
 +    pub sysroot: Option<PathBuf>,
      pub ndk: Option<PathBuf>,
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
-@@ -525,6 +526,7 @@ struct TomlTarget {
-     ar: Option<String>,
-     ranlib: Option<String>,
-     linker: Option<String>,
-+    sysroot: Option<String>,
-     llvm_config: Option<String>,
-     llvm_filecheck: Option<String>,
-     android_ndk: Option<String>,
-@@ -909,6 +911,7 @@ impl Config {
+@@ -621,6 +622,7 @@ struct TomlTarget {
+         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 {
                  target.ar = cfg.ar.map(PathBuf::from);
                  target.ranlib = cfg.ranlib.map(PathBuf::from);
                  target.linker = cfg.linker.map(PathBuf::from);
@@ -51,10 +42,10 @@ index 06b7a8c55..d8e9275ad 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 b930f3cd7..06e782520 100644
+index f3d5f308..7f8b9b27 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -1056,6 +1056,10 @@ impl Build {
+@@ -1125,6 +1125,10 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
          }
      }
  
diff --git a/srcpkgs/rust/patches/xxx-ppcle.patch b/srcpkgs/rust/patches/xxx-ppcle.patch
index 9473e7ad98f3..c0522f0eaafc 100644
--- a/srcpkgs/rust/patches/xxx-ppcle.patch
+++ b/srcpkgs/rust/patches/xxx-ppcle.patch
@@ -1,53 +1,8 @@
-From b92ce1ed0ac8d95831a43f4395544c17a0816c9b Mon Sep 17 00:00:00 2001
-From: Daniel Kolesa <daniel@octaforge.org>
-Date: Sat, 3 Jul 2021 21:02:03 +0200
-Subject: [PATCH] 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/fastcall-inreg.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/borrowck/borrowck-asm.rs              |  1 +
- src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs      |  1 +
- src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs  |  1 +
- src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs |  1 +
- src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs   |  1 +
- src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs  |  1 +
- src/test/ui/llvm-asm/llvm-asm-out-read-uninit.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/rustc-ap-rustc_target/src/spec/mod.rs      |  2 ++
- .../src/spec/powerpcle_unknown_linux_gnu.rs       | 15 +++++++++++++++
- .../src/spec/powerpcle_unknown_linux_musl.rs      | 15 +++++++++++++++
- vendor/target-lexicon/src/targets.rs              |  7 +++++++
- vendor/tikv-jemallocator/benches/roundtrip.rs     |  3 ++-
- vendor/tikv-jemallocator/src/lib.rs               |  3 ++-
- 37 files changed, 111 insertions(+), 6 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
- create mode 100644 vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
- create mode 100644 vendor/rustc-ap-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 c2e9dba6..8147a3c3 100644
+index 0c1ab67cc..8d4e5f3cb 100644
 --- a/compiler/rustc_middle/src/ty/layout.rs
 +++ b/compiler/rustc_middle/src/ty/layout.rs
-@@ -2753,6 +2753,8 @@ where
+@@ -3057,6 +3057,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;
@@ -56,7 +11,7 @@ index c2e9dba6..8147a3c3 100644
          use SpecAbi::*;
          let rust_abi = matches!(sig.abi, RustIntrinsic | PlatformIntrinsic | Rust | RustCall);
  
-@@ -2850,7 +2852,8 @@ where
+@@ -3165,7 +3167,8 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
                      || (!win_x64_gnu
                          && !linux_s390x_gnu_like
                          && !linux_sparc64_gnu_like
@@ -67,10 +22,10 @@ index c2e9dba6..8147a3c3 100644
                      arg.mode = PassMode::Ignore;
                  }
 diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
-index 2af46693..986d84e0 100644
+index bd5b712c1..f60be010c 100644
 --- a/compiler/rustc_target/src/spec/mod.rs
 +++ b/compiler/rustc_target/src/spec/mod.rs
-@@ -716,6 +716,8 @@ supported_targets! {
+@@ -824,6 +824,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),
@@ -81,7 +36,7 @@ index 2af46693..986d84e0 100644
      ("powerpc64le-unknown-linux-gnu", powerpc64le_unknown_linux_gnu),
 diff --git a/compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
 new file mode 100644
-index 00000000..780c20a3
+index 000000000..b7148a2fc
 --- /dev/null
 +++ b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
 @@ -0,0 +1,15 @@
@@ -89,20 +44,20 @@ index 00000000..780c20a3
 +
 +pub fn target() -> Target {
 +    let mut base = super::linux_gnu_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
++    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".into());
 +    base.max_atomic_width = Some(32);
 +
 +    Target {
-+        llvm_target: "powerpcle-unknown-linux-gnu".to_string(),
++        llvm_target: "powerpcle-unknown-linux-gnu".into(),
 +        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
++        data_layout: "e-m:e-p:32:32-i64:64-n32".into(),
++        arch: "powerpc".into(),
++        options: TargetOptions { mcount: "_mcount".into(), ..base },
 +    }
 +}
 diff --git a/compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
 new file mode 100644
-index 00000000..9b848ccf
+index 000000000..a826b6e47
 --- /dev/null
 +++ b/compiler/rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
 @@ -0,0 +1,15 @@
@@ -110,24 +65,24 @@ index 00000000..9b848ccf
 +
 +pub fn target() -> Target {
 +    let mut base = super::linux_musl_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
++    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".into());
 +    base.max_atomic_width = Some(32);
 +
 +    Target {
-+        llvm_target: "powerpcle-unknown-linux-musl".to_string(),
++        llvm_target: "powerpcle-unknown-linux-musl".into(),
 +        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
++        data_layout: "e-m:e-p:32:32-i64:64-n32".into(),
++        arch: "powerpc".into(),
++        options: TargetOptions { mcount: "_mcount".into(), ..base },
 +    }
 +}
 diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 4111420e..cd69a8ec 100644
+index 71b8f3c45..1505c12e4 100644
 --- a/src/bootstrap/bootstrap.py
 +++ b/src/bootstrap/bootstrap.py
-@@ -289,9 +289,11 @@ def default_build_triple(verbose):
-         'i686': 'i686',
+@@ -320,9 +320,11 @@ def default_build_triple(verbose):
          'i786': 'i686',
+         'm68k': 'm68k',
          'powerpc': 'powerpc',
 +        'powerpcle': 'powerpcle',
          'powerpc64': 'powerpc64',
@@ -136,9 +91,9 @@ index 4111420e..cd69a8ec 100644
 +        'ppcle': 'powerpcle',
          'ppc64': 'powerpc64',
          'ppc64le': 'powerpc64le',
-         's390x': 's390x',
+         'riscv64': 'riscv64gc',
 diff --git a/src/test/codegen/abi-main-signature-16bit-c-int.rs b/src/test/codegen/abi-main-signature-16bit-c-int.rs
-index 4ed491df..82ec7755 100644
+index 4ed491dfb..82ec7755d 100644
 --- a/src/test/codegen/abi-main-signature-16bit-c-int.rs
 +++ b/src/test/codegen/abi-main-signature-16bit-c-int.rs
 @@ -9,6 +9,7 @@
@@ -149,20 +104,8 @@ index 4ed491df..82ec7755 100644
  // ignore-powerpc64
  // ignore-riscv64
  // ignore-s390x
-diff --git a/src/test/codegen/fastcall-inreg.rs b/src/test/codegen/fastcall-inreg.rs
-index adbeae45..0fd0a9e6 100644
---- a/src/test/codegen/fastcall-inreg.rs
-+++ b/src/test/codegen/fastcall-inreg.rs
-@@ -16,6 +16,7 @@
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-r600
- // ignore-riscv64
- // ignore-amdgcn
 diff --git a/src/test/codegen/global_asm.rs b/src/test/codegen/global_asm.rs
-index 57d8aeb1..e0b1b692 100644
+index fab84868f..104d93d01 100644
 --- a/src/test/codegen/global_asm.rs
 +++ b/src/test/codegen/global_asm.rs
 @@ -12,6 +12,7 @@
@@ -174,7 +117,7 @@ index 57d8aeb1..e0b1b692 100644
  // ignore-amdgcn
  // ignore-sparc
 diff --git a/src/test/codegen/global_asm_include.rs b/src/test/codegen/global_asm_include.rs
-index 44402619..62ecfa6d 100644
+index 02ee91645..13f303332 100644
 --- a/src/test/codegen/global_asm_include.rs
 +++ b/src/test/codegen/global_asm_include.rs
 @@ -12,6 +12,7 @@
@@ -186,7 +129,7 @@ index 44402619..62ecfa6d 100644
  // ignore-amdgcn
  // ignore-sparc
 diff --git a/src/test/codegen/global_asm_x2.rs b/src/test/codegen/global_asm_x2.rs
-index d632d0dd..29f97775 100644
+index bdcf0ea84..1e2ff8b8d 100644
 --- a/src/test/codegen/global_asm_x2.rs
 +++ b/src/test/codegen/global_asm_x2.rs
 @@ -12,6 +12,7 @@
@@ -198,10 +141,10 @@ index d632d0dd..29f97775 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 3017adb4..632565bb 100644
+index 4ad3642c0..fca31c0c6 100644
 --- a/src/test/codegen/repr-transparent-aggregates-1.rs
 +++ b/src/test/codegen/repr-transparent-aggregates-1.rs
-@@ -7,6 +7,7 @@
+@@ -6,6 +6,7 @@
  // ignore-mips
  // ignore-mips64
  // ignore-powerpc
@@ -210,10 +153,10 @@ index 3017adb4..632565bb 100644
  // ignore-riscv64 see codegen/riscv-abi
  // ignore-windows
 diff --git a/src/test/codegen/repr-transparent-aggregates-2.rs b/src/test/codegen/repr-transparent-aggregates-2.rs
-index 429d760b..57e75f95 100644
+index b68e8e9eb..97c509b1b 100644
 --- a/src/test/codegen/repr-transparent-aggregates-2.rs
 +++ b/src/test/codegen/repr-transparent-aggregates-2.rs
-@@ -6,6 +6,7 @@
+@@ -5,6 +5,7 @@
  // ignore-emscripten
  // ignore-mips64
  // ignore-powerpc
@@ -222,7 +165,7 @@ index 429d760b..57e75f95 100644
  // ignore-powerpc64le
  // ignore-riscv64 see codegen/riscv-abi
 diff --git a/src/test/codegen/stack-probes.rs b/src/test/codegen/stack-probes.rs
-index 9bd351df..29073eb5 100644
+index 9bd351df3..29073eb56 100644
 --- a/src/test/codegen/stack-probes.rs
 +++ b/src/test/codegen/stack-probes.rs
 @@ -3,6 +3,7 @@
@@ -234,7 +177,7 @@ index 9bd351df..29073eb5 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/test/run-make-fulldeps/atomic-lock-free/Makefile b/src/test/run-make-fulldeps/atomic-lock-free/Makefile
-index 9e8b4fab..402d37a4 100644
+index 9e8b4fabf..402d37a45 100644
 --- a/src/test/run-make-fulldeps/atomic-lock-free/Makefile
 +++ b/src/test/run-make-fulldeps/atomic-lock-free/Makefile
 @@ -36,6 +36,8 @@ ifeq ($(filter powerpc,$(LLVM_COMPONENTS)),powerpc)
@@ -247,7 +190,7 @@ index 9e8b4fab..402d37a4 100644
  	nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
  	$(RUSTC) --target=powerpc64le-unknown-linux-gnu atomic_lock_free.rs
 diff --git a/src/test/ui/abi/stack-probes-lto.rs b/src/test/ui/abi/stack-probes-lto.rs
-index 90df1f3f..8c6dda8b 100644
+index 90df1f3f5..8c6dda8b8 100644
 --- a/src/test/ui/abi/stack-probes-lto.rs
 +++ b/src/test/ui/abi/stack-probes-lto.rs
 @@ -4,6 +4,7 @@
@@ -259,7 +202,7 @@ index 90df1f3f..8c6dda8b 100644
  // ignore-sparc
  // ignore-sparc64
 diff --git a/src/test/ui/abi/stack-probes.rs b/src/test/ui/abi/stack-probes.rs
-index e998dd0f..9472e538 100644
+index e998dd0f8..9472e5387 100644
 --- a/src/test/ui/abi/stack-probes.rs
 +++ b/src/test/ui/abi/stack-probes.rs
 @@ -4,6 +4,7 @@
@@ -270,92 +213,8 @@ index e998dd0f..9472e538 100644
  // ignore-s390x
  // ignore-sparc
  // ignore-sparc64
-diff --git a/src/test/ui/borrowck/borrowck-asm.rs b/src/test/ui/borrowck/borrowck-asm.rs
-index a3f64524..faf9adb4 100644
---- a/src/test/ui/borrowck/borrowck-asm.rs
-+++ b/src/test/ui/borrowck/borrowck-asm.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs b/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs
-index 2868d3d3..5c6e325b 100644
---- a/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs
-@@ -4,6 +4,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs b/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs
-index e3bc7d29..49f53f67 100644
---- a/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs b/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs
-index daae0c81..fd505c86 100644
---- a/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs
-@@ -5,6 +5,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs b/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs
-index 9c62532c..baa1c1ba 100644
---- a/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs b/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs
-index 72edb339..2fec991d 100644
---- a/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
-diff --git a/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs b/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs
-index acf4cf9f..dfad0775 100644
---- a/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs
-+++ b/src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs
-@@ -1,6 +1,7 @@
- // ignore-s390x
- // ignore-emscripten
- // ignore-powerpc
-+// ignore-powerpcle
- // ignore-powerpc64
- // ignore-powerpc64le
- // ignore-riscv64
 diff --git a/src/test/ui/target-feature/gate.rs b/src/test/ui/target-feature/gate.rs
-index 164830fe..531a4b45 100644
+index 2382c98f8..e6fe855d7 100644
 --- a/src/test/ui/target-feature/gate.rs
 +++ b/src/test/ui/target-feature/gate.rs
 @@ -5,6 +5,7 @@
@@ -367,7 +226,7 @@ index 164830fe..531a4b45 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/test/ui/target-feature/invalid-attribute.rs b/src/test/ui/target-feature/invalid-attribute.rs
-index 5ea78215..47e7887a 100644
+index ad1b6e96b..122d59a57 100644
 --- a/src/test/ui/target-feature/invalid-attribute.rs
 +++ b/src/test/ui/target-feature/invalid-attribute.rs
 @@ -5,6 +5,7 @@
@@ -379,10 +238,10 @@ index 5ea78215..47e7887a 100644
  // ignore-powerpc64le
  // ignore-riscv64
 diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
-index 7dbd7094..08c9de3c 100644
+index bed509d77..8bc817897 100644
 --- a/src/tools/compiletest/src/util.rs
 +++ b/src/tools/compiletest/src/util.rs
-@@ -67,6 +67,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
+@@ -70,6 +70,7 @@ const ARCH_TABLE: &[(&str, &str)] = &[
      ("msp430", "msp430"),
      ("nvptx64", "nvptx64"),
      ("powerpc", "powerpc"),
@@ -391,10 +250,10 @@ index 7dbd7094..08c9de3c 100644
      ("powerpc64le", "powerpc64"),
      ("riscv64gc", "riscv64"),
 diff --git a/vendor/cc/src/lib.rs b/vendor/cc/src/lib.rs
-index 5051b296..286c2fb7 100644
+index e3a2b98b0..0236729fd 100644
 --- a/vendor/cc/src/lib.rs
 +++ b/vendor/cc/src/lib.rs
-@@ -2409,6 +2409,7 @@ impl Build {
+@@ -2594,6 +2594,7 @@ impl Build {
              "powerpc-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
              "powerpc-unknown-linux-gnuspe" => Some("powerpc-linux-gnuspe"),
              "powerpc-unknown-netbsd" => Some("powerpc--netbsd"),
@@ -402,66 +261,11 @@ index 5051b296..286c2fb7 100644
              "powerpc64-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
              "powerpc64le-unknown-linux-gnu" => Some("powerpc64le-linux-gnu"),
              "riscv32i-unknown-none-elf" => self.find_working_gnu_prefix(&[
-diff --git a/vendor/rustc-ap-rustc_target/src/spec/mod.rs b/vendor/rustc-ap-rustc_target/src/spec/mod.rs
-index 2af46693..986d84e0 100644
---- a/vendor/rustc-ap-rustc_target/src/spec/mod.rs
-+++ b/vendor/rustc-ap-rustc_target/src/spec/mod.rs
-@@ -716,6 +716,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),
-+    ("powerpcle-unknown-linux-gnu", powerpcle_unknown_linux_gnu),
-+    ("powerpcle-unknown-linux-musl", powerpcle_unknown_linux_musl),
-     ("powerpc64-unknown-linux-gnu", powerpc64_unknown_linux_gnu),
-     ("powerpc64-unknown-linux-musl", powerpc64_unknown_linux_musl),
-     ("powerpc64le-unknown-linux-gnu", powerpc64le_unknown_linux_gnu),
-diff --git a/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
-new file mode 100644
-index 00000000..780c20a3
---- /dev/null
-+++ b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_gnu.rs
-@@ -0,0 +1,15 @@
-+use crate::spec::{LinkerFlavor, Target, TargetOptions};
-+
-+pub fn target() -> Target {
-+    let mut base = super::linux_gnu_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
-+    base.max_atomic_width = Some(32);
-+
-+    Target {
-+        llvm_target: "powerpcle-unknown-linux-gnu".to_string(),
-+        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
-+    }
-+}
-diff --git a/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_musl.rs b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
-new file mode 100644
-index 00000000..9b848ccf
---- /dev/null
-+++ b/vendor/rustc-ap-rustc_target/src/spec/powerpcle_unknown_linux_musl.rs
-@@ -0,0 +1,15 @@
-+use crate::spec::{LinkerFlavor, Target, TargetOptions};
-+
-+pub fn target() -> Target {
-+    let mut base = super::linux_musl_base::opts();
-+    base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string());
-+    base.max_atomic_width = Some(32);
-+
-+    Target {
-+        llvm_target: "powerpcle-unknown-linux-musl".to_string(),
-+        pointer_width: 32,
-+        data_layout: "e-m:e-p:32:32-i64:64-n32".to_string(),
-+        arch: "powerpc".to_string(),
-+        options: TargetOptions { mcount: "_mcount".to_string(), ..base },
-+    }
-+}
 diff --git a/vendor/target-lexicon/src/targets.rs b/vendor/target-lexicon/src/targets.rs
-index 87c237aa..dc694010 100644
+index 22cc95cc3..46167e34e 100644
 --- a/vendor/target-lexicon/src/targets.rs
 +++ b/vendor/target-lexicon/src/targets.rs
-@@ -26,6 +26,7 @@ pub enum Architecture {
+@@ -29,6 +29,7 @@ pub enum Architecture {
      Msp430,
      Nvptx64,
      Powerpc,
@@ -469,7 +273,7 @@ index 87c237aa..dc694010 100644
      Powerpc64,
      Powerpc64le,
      Riscv32(Riscv32Architecture),
-@@ -517,6 +518,7 @@ impl Architecture {
+@@ -533,6 +534,7 @@ impl Architecture {
              | Mips64(Mips64Architecture::Mipsisa64r6el)
              | Msp430
              | Nvptx64
@@ -477,15 +281,15 @@ index 87c237aa..dc694010 100644
              | Powerpc64le
              | Riscv32(_)
              | Riscv64(_)
-@@ -553,6 +555,7 @@ impl Architecture {
-             | Sparc
-             | Wasm32
+@@ -574,6 +576,7 @@ impl Architecture {
+             | M68k
              | Mips32(_)
+             | Powerpc
 +            | Powerpcle
-             | Powerpc => Ok(PointerWidth::U32),
+             | XTensa => Ok(PointerWidth::U32),
              AmdGcn
-             | Powerpc64le
-@@ -737,6 +740,7 @@ impl fmt::Display for Architecture {
+             | Bpfeb
+@@ -763,6 +766,7 @@ impl fmt::Display for Architecture {
              Msp430 => f.write_str("msp430"),
              Nvptx64 => f.write_str("nvptx64"),
              Powerpc => f.write_str("powerpc"),
@@ -493,7 +297,7 @@ index 87c237aa..dc694010 100644
              Powerpc64 => f.write_str("powerpc64"),
              Powerpc64le => f.write_str("powerpc64le"),
              Riscv32(riscv32) => riscv32.fmt(f),
-@@ -913,6 +917,7 @@ impl FromStr for Architecture {
+@@ -943,6 +947,7 @@ impl FromStr for Architecture {
              "msp430" => Msp430,
              "nvptx64" => Nvptx64,
              "powerpc" => Powerpc,
@@ -501,8 +305,8 @@ index 87c237aa..dc694010 100644
              "powerpc64" => Powerpc64,
              "powerpc64le" => Powerpc64le,
              "s390x" => S390x,
-@@ -1380,6 +1385,8 @@ mod tests {
-             "powerpc-unknown-netbsd",
+@@ -1445,6 +1450,8 @@ mod tests {
+             "powerpc-unknown-openbsd",
              "powerpc-wrs-vxworks",
              "powerpc-wrs-vxworks-spe",
 +            "powerpcle-unknown-linux-gnu",
@@ -511,7 +315,7 @@ index 87c237aa..dc694010 100644
              "powerpc64-unknown-linux-gnu",
              "powerpc64-unknown-linux-musl",
 diff --git a/vendor/tikv-jemallocator/benches/roundtrip.rs b/vendor/tikv-jemallocator/benches/roundtrip.rs
-index 40b8005f..bc4df023 100644
+index 767abe8d4..704bf955a 100644
 --- a/vendor/tikv-jemallocator/benches/roundtrip.rs
 +++ b/vendor/tikv-jemallocator/benches/roundtrip.rs
 @@ -22,7 +22,8 @@ static A: Jemalloc = Jemalloc;
@@ -525,19 +329,16 @@ index 40b8005f..bc4df023 100644
  const MIN_ALIGN: usize = 8;
  #[cfg(all(any(
 diff --git a/vendor/tikv-jemallocator/src/lib.rs b/vendor/tikv-jemallocator/src/lib.rs
-index 9a489b62..1ed12b26 100644
+index 4a9397331..4cf47c05d 100644
 --- a/vendor/tikv-jemallocator/src/lib.rs
 +++ b/vendor/tikv-jemallocator/src/lib.rs
-@@ -44,7 +44,8 @@ use libc::{c_int, c_void};
+@@ -46,7 +46,8 @@ use libc::{c_int, c_void};
      target_arch = "arm",
      target_arch = "mips",
      target_arch = "mipsel",
 -    target_arch = "powerpc"
 +    target_arch = "powerpc",
-+    target_arch = "powerpcle"
++    target_arch = "powerpcle",
  )))]
  const ALIGNOF_MAX_ALIGN_T: usize = 8;
  #[cfg(all(any(
--- 
-2.32.0
-
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index b48c1d5ba988..da3ca779e7c6 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.57.0
+version=1.61.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=3546f9c3b91b1f8b8efd26c94d6b50312c08210397b4072ed2748e2bd4445c1a
+checksum=ad0b4351675aa9abdf4c7e066613bd274c4391c5506db152983426376101daed
 lib32disabled=yes
 make_check=no # CBA for now
 
@@ -61,7 +61,6 @@ post_patch() {
 	_clear_vendor_checksums libc
 	_clear_vendor_checksums typenum
 	_clear_vendor_checksums cc
-	_clear_vendor_checksums rustc-ap-rustc_target
 	_clear_vendor_checksums target-lexicon
 	_clear_vendor_checksums tikv-jemallocator
 }
@@ -216,14 +215,8 @@ do_install() {
 
 	cd ${DESTDIR}/usr/lib
 	# symlinks instead of copies
-	mv *.so rustlib/${RUST_TARGET}/lib
+	rm *.so
 	ln -sf rustlib/${RUST_TARGET}/lib/*.so .
-
-	# executable used for split dwarf, currently unstable on linux.
-	# it's copied directly from the local llvm package, but
-	# FIXME: cross builds are installing the version from the build machine,
-	# it shouldn't be necessary to remove it
-	rm rustlib/${RUST_TARGET}/bin/rust-llvm-dwp
 }
 
 rust-doc_package() {

From 307830602008cc8db738a4b99e6f1ebfa30d2628 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 21 May 2022 12:14:23 +0200
Subject: [PATCH 4/4] cargo: update to 1.61.0

---
 srcpkgs/cargo/template | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index c512e7005833..e3c30f625acd 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -1,8 +1,8 @@
 # Template file for 'cargo'
 pkgname=cargo
-version=0.58.0
+version=1.61.0
 revision=1
-wrksrc="cargo-${version}"
+wrksrc="cargo-rust-${version}"
 build_helper=rust
 hostmakedepends="cargo-bootstrap rust python3 curl cmake pkg-config zlib-devel"
 makedepends="rust libcurl-devel openssl-devel"
@@ -11,10 +11,10 @@ short_desc="Rust package manager"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://crates.io/"
-distfiles="https://github.com/rust-lang/cargo/archive/${version}.tar.gz
- https://github.com/crossbeam-rs/crossbeam/archive/refs/tags/crossbeam-utils-0.8.5.tar.gz"
-checksum="e1d6f55414a29906d24b13c687996b5220e08ccce9c682e4c02851138fc7093f
- 57db07eb38b0aaf7951c79b4639819cb84bc4269507091afea7267e10a54e079"
+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
+ 52c451910203cd9002cc4b85cff95f45c6ba245392801e80d7898ca5c3c3ab29"
 replaces="cargo-tree>=0"
 
 build_options="static bindist"
@@ -28,7 +28,7 @@ if [ -z "$_build_static" ]; then
 	makedepends+=" libgit2-devel"
 fi
 
-post_extract() {
+pre_patch() {
 	mv ../crossbeam-* crossbeam-utils
 }
 

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

* Re: Update Rust toolchain to 1.61.0
  2022-05-21 21:09 [PR PATCH] Update Rust toolchain to 1.61.0 tranzystorek-io
                   ` (9 preceding siblings ...)
  2022-05-28  6:47 ` tranzystorek-io
@ 2022-06-04 19:32 ` q66
  2022-06-04 19:43 ` Duncaen
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: q66 @ 2022-06-04 19:32 UTC (permalink / raw)
  To: ml

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

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/37232#issuecomment-1146673940

Comment:
apologies for taking a while with this, i will make the binaries over the next few days

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

* Re: Update Rust toolchain to 1.61.0
  2022-05-21 21:09 [PR PATCH] Update Rust toolchain to 1.61.0 tranzystorek-io
                   ` (10 preceding siblings ...)
  2022-06-04 19:32 ` q66
@ 2022-06-04 19:43 ` Duncaen
  2022-06-07 14:57 ` [PR PATCH] [Closed]: " q66
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: Duncaen @ 2022-06-04 19:43 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/37232#issuecomment-1146675410

Comment:
Thanks, need a newer rust release for the new firefox.

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

* Re: [PR PATCH] [Closed]: Update Rust toolchain to 1.61.0
  2022-05-21 21:09 [PR PATCH] Update Rust toolchain to 1.61.0 tranzystorek-io
                   ` (11 preceding siblings ...)
  2022-06-04 19:43 ` Duncaen
@ 2022-06-07 14:57 ` q66
  2022-06-07 15:01 ` tranzystorek-io
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: q66 @ 2022-06-07 14:57 UTC (permalink / raw)
  To: ml

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

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

Update Rust toolchain to 1.61.0
https://github.com/void-linux/void-packages/pull/37232

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

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-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)


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

* Re: Update Rust toolchain to 1.61.0
  2022-05-21 21:09 [PR PATCH] Update Rust toolchain to 1.61.0 tranzystorek-io
                   ` (12 preceding siblings ...)
  2022-06-07 14:57 ` [PR PATCH] [Closed]: " q66
@ 2022-06-07 15:01 ` tranzystorek-io
  2022-06-07 15:02 ` tranzystorek-io
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tranzystorek-io @ 2022-06-07 15:01 UTC (permalink / raw)
  To: ml

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

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/37232#issuecomment-1148794214

Comment:
Was this closed by mistake

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

* Re: Update Rust toolchain to 1.61.0
  2022-05-21 21:09 [PR PATCH] Update Rust toolchain to 1.61.0 tranzystorek-io
                   ` (13 preceding siblings ...)
  2022-06-07 15:01 ` tranzystorek-io
@ 2022-06-07 15:02 ` tranzystorek-io
  2022-06-07 15:11 ` q66
  2022-06-07 19:23 ` tranzystorek-io
  16 siblings, 0 replies; 18+ messages in thread
From: tranzystorek-io @ 2022-06-07 15:02 UTC (permalink / raw)
  To: ml

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

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/37232#issuecomment-1148794214

Comment:
Was this closed by mistake?

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

* Re: Update Rust toolchain to 1.61.0
  2022-05-21 21:09 [PR PATCH] Update Rust toolchain to 1.61.0 tranzystorek-io
                   ` (14 preceding siblings ...)
  2022-06-07 15:02 ` tranzystorek-io
@ 2022-06-07 15:11 ` q66
  2022-06-07 19:23 ` tranzystorek-io
  16 siblings, 0 replies; 18+ messages in thread
From: q66 @ 2022-06-07 15:11 UTC (permalink / raw)
  To: ml

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

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/37232#issuecomment-1148806516

Comment:
no, check master

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

* Re: Update Rust toolchain to 1.61.0
  2022-05-21 21:09 [PR PATCH] Update Rust toolchain to 1.61.0 tranzystorek-io
                   ` (15 preceding siblings ...)
  2022-06-07 15:11 ` q66
@ 2022-06-07 19:23 ` tranzystorek-io
  16 siblings, 0 replies; 18+ messages in thread
From: tranzystorek-io @ 2022-06-07 19:23 UTC (permalink / raw)
  To: ml

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

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/37232#issuecomment-1149074017

Comment:
Thank you @subnut for all the prior art! ☺️

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

end of thread, other threads:[~2022-06-07 19:23 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-21 21:09 [PR PATCH] Update Rust toolchain to 1.61.0 tranzystorek-io
2022-05-21 21:14 ` tranzystorek-io
2022-05-21 23:18 ` [PR PATCH] [Updated] " tranzystorek-io
2022-05-22  8:13 ` tranzystorek-io
2022-05-22  8:14 ` tranzystorek-io
2022-05-22  8:21 ` [PR PATCH] [Updated] " tranzystorek-io
2022-05-22  8:23 ` tranzystorek-io
2022-05-22  8:36 ` tranzystorek-io
2022-05-22  9:00 ` q66
2022-05-22 10:20 ` [PR PATCH] [Updated] " tranzystorek-io
2022-05-28  6:47 ` tranzystorek-io
2022-06-04 19:32 ` q66
2022-06-04 19:43 ` Duncaen
2022-06-07 14:57 ` [PR PATCH] [Closed]: " q66
2022-06-07 15:01 ` tranzystorek-io
2022-06-07 15:02 ` tranzystorek-io
2022-06-07 15:11 ` q66
2022-06-07 19:23 ` tranzystorek-io

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).