Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [WIP] Rust 1.54.0
@ 2021-08-17 21:13 ericonr
  2021-08-18  1:18 ` ericonr
                   ` (38 more replies)
  0 siblings, 39 replies; 40+ messages in thread
From: ericonr @ 2021-08-17 21:13 UTC (permalink / raw)
  To: ml

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

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

https://github.com/ericonr/void-packages rust
https://github.com/void-linux/void-packages/pull/32555

[WIP] Rust 1.54.0
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

musl build (at least) is currently broken, accepting help:

```
Rustbook (x86_64-unknown-linux-musl) - unstable-book
Building stage0 std artifacts (x86_64-unknown-linux-musl -> x86_64-unknown-linux-musl)
   Compiling compiler_builtins v0.1.45
   Compiling core v0.0.0 (/builddir/rustc-1.54.0-src/library/core)
   Compiling libc v0.2.93
   Compiling cc v1.0.68
   Compiling std v0.0.0 (/builddir/rustc-1.54.0-src/library/std)
   Compiling unwind v0.0.0 (/builddir/rustc-1.54.0-src/library/unwind)
   Compiling rustc-std-workspace-core v1.99.0 (/builddir/rustc-1.54.0-src/library/rustc-std-workspace-core)
   Compiling alloc v0.0.0 (/builddir/rustc-1.54.0-src/library/alloc)
   Compiling cfg-if v0.1.10
   Compiling adler v0.2.3
   Compiling rustc-demangle v0.1.18
error: could not find native static library `c`, perhaps an -L flag is missing?

error: aborting due to previous error

error: could not compile `libc`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
command did not execute successfully: "/builddir/rustc-1.54.0-src/stage0-bootstrap/bin/cargo" "build" "--target" "x86_64-unknown-linux-musl" "-Zbinary-dep-depinfo" "-j" "8" "--release" "--locked" "--frozen" "--features" "panic-unwind backtrace" "--manifest-path" "/builddir/rustc-1.54.0-src/library/test/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit status: 101
failed to run: /builddir/rustc-1.54.0-src/build/bootstrap/debug/bootstrap dist --jobs 8
Build completed unsuccessfully in 0:02:40
```

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

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

From cf80b914d8aa548f711d8a8f40a86f15b90ff8d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Tue, 17 Aug 2021 18:02:42 -0300
Subject: [PATCH 1/2] rust: update to 1.54.0.

---
 ...ative-libraries-when-linking-static-.patch | 39 ++++-----
 ...dlib-and-musl_root-from-musl-targets.patch | 32 +++----
 ...fer-libgcc_eh-over-libunwind-on-musl.patch | 83 ++++++++++++-------
 srcpkgs/rust/patches/xxx-ppcle-ccrs.patch     | 29 -------
 srcpkgs/rust/patches/xxx-ppcle-gcc.patch      | 25 ------
 srcpkgs/rust/patches/xxx-ppcle.patch          | 60 +-------------
 srcpkgs/rust/template                         |  7 +-
 7 files changed, 86 insertions(+), 189 deletions(-)
 delete mode 100644 srcpkgs/rust/patches/xxx-ppcle-ccrs.patch
 delete mode 100644 srcpkgs/rust/patches/xxx-ppcle-gcc.patch

diff --git a/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch b/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch
index 0fd1ca7d2dfa..88e29d9ebc58 100644
--- a/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch
+++ b/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch
@@ -12,28 +12,16 @@ executables.
 
 Fixes #54243
 ---
- src/librustc_codegen_ssa/back/link.rs | 18 ++++++++++++++----
- 1 file changed, 14 insertions(+), 4 deletions(-)
-
 diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
-index 8bc4e6442..52ff7a52e 100644
+index 6c9ec9e7b0d..60f43f70e4e 100644
 --- a/compiler/rustc_codegen_ssa/src/back/link.rs
 +++ b/compiler/rustc_codegen_ssa/src/back/link.rs
-@@ -2081,8 +2081,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(
-     }
- }
+@@ -2396,10 +2396,23 @@ fn add_upstream_native_libraries(
  
--/// Link in all of our upstream crates' native dependencies. Remember that all of these upstream
--/// native dependencies are all non-static dependencies. We've got two cases then:
-+/// Link in all of our upstream crates' native dependencies. We have two cases:
- ///
- /// 1. The upstream crate is an rlib. In this case we *must* link in the native dependency because
- /// the rlib is just an archive.
-@@ -2015,7 +2013,19 @@
-                 continue;
-             }
+             let verbatim = lib.verbatim.unwrap_or(false);
              match lib.kind {
--                NativeLibKind::Dylib | NativeLibKind::Unspecified => cmd.link_dylib(name),
+-                NativeLibKind::Dylib { as_needed } => {
+-                    cmd.link_dylib(name, verbatim, as_needed.unwrap_or(true))
 +                NativeLibKind::Dylib | NativeLibKind::Unspecified => {
 +                    // On some targets, like Linux, linking a static executable inhibits using
 +                    // dylibs at all. Force native libraries to be static, even if for example
@@ -42,11 +30,16 @@ index 8bc4e6442..52ff7a52e 100644
 +                        && sess.crt_static(Some(crate_type))
 +                        && !sess.target.options.crt_static_allows_dylibs
 +                    {
-+                        cmd.link_staticlib(name)
++                        cmd.link_staticlib(name, verbatim)
 +                    } else {
-+                        cmd.link_dylib(name)
++                        cmd.link_dylib(name, verbatim,
++                                       match lib.kind {
++                                           NativeLibKind::Dylib => as_needed.unwrap_or(true),
++                                           NativeLibKind::Unspecified => true
++                                       })
 +                    }
-+                },
-                 NativeLibKind::Framework => cmd.link_framework(name),
-                 NativeLibKind::StaticNoBundle => {
-                     // Link "static-nobundle" native libs only if the crate they originate from
+                 }
+-                NativeLibKind::Unspecified => cmd.link_dylib(name, verbatim, true),
+                 NativeLibKind::Framework { as_needed } => {
+                     cmd.link_framework(name, as_needed.unwrap_or(true))
+                 }
diff --git a/srcpkgs/rust/patches/0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch b/srcpkgs/rust/patches/0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch
index 85a8806e010b..112d012e11e5 100644
--- a/srcpkgs/rust/patches/0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch
+++ b/srcpkgs/rust/patches/0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch
@@ -1,5 +1,5 @@
 diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
-index 2fc9ab29f..276736159 100644
+index 2fc9ab29f92..27673615968 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 {
@@ -32,7 +32,7 @@ index 2fc9ab29f..276736159 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 5038a967d..b3c0e5bc4 100644
+index 5038a967d0a..b3c0e5bc416 100644
 --- a/compiler/rustc_target/src/spec/linux_musl_base.rs
 +++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
 @@ -1,16 +1,9 @@
@@ -53,10 +53,10 @@ index 5038a967d..b3c0e5bc4 100644
      base
  }
 diff --git a/config.toml.example b/config.toml.example
-index 6e5584797..5be9882a8 100644
+index 7fa5353d09b..98afe3743c0 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -638,15 +638,6 @@ changelog-seen = 2
+@@ -644,15 +644,6 @@ changelog-seen = 2
  # only use static libraries. If unset, the target's default linkage is used.
  #crt-static = <platform-specific> (bool)
  
@@ -73,7 +73,7 @@ index 6e5584797..5be9882a8 100644
  # `wasm32-wasi` target. If you are building wasm32-wasi target, make sure to
  # create a `[target.wasm32-wasi]` section and move this field there.
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index e750c2963..f6ba3032b 100644
+index e750c2963dd..f6ba3032b0d 100644
 --- a/src/bootstrap/cc_detect.rs
 +++ b/src/bootstrap/cc_detect.rs
 @@ -98,7 +98,7 @@ pub fn find(build: &mut Build) {
@@ -130,7 +130,7 @@ index e750c2963..f6ba3032b 100644
      }
  }
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index ee3527b6b..0a8b78327 100644
+index 112a6ea9398..4e42bcbbdad 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
 @@ -179,34 +179,7 @@ fn copy_self_contained_objects(
@@ -169,7 +169,7 @@ index ee3527b6b..0a8b78327 100644
          let srcdir = builder
              .wasi_root(target)
              .unwrap_or_else(|| {
-@@ -288,15 +261,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+@@ -290,15 +263,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
              .arg("--manifest-path")
              .arg(builder.src.join("library/test/Cargo.toml"));
  
@@ -186,7 +186,7 @@ index ee3527b6b..0a8b78327 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 483816b98..7517d757c 100644
+index 483816b98d6..7517d757cc0 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
 @@ -165,7 +165,6 @@ pub struct Config {
@@ -223,7 +223,7 @@ index 483816b98..7517d757c 100644
      wasi_root: Option<String>,
      qemu_rootfs: Option<String>,
      no_std: Option<bool>,
-@@ -846,7 +840,6 @@ impl Config {
+@@ -846,7 +840,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;
@@ -231,7 +231,7 @@ index 483816b98..7517d757c 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);
-@@ -892,8 +885,6 @@ impl Config {
+@@ -892,8 +885,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;
@@ -241,7 +241,7 @@ index 483816b98..7517d757c 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 999882a1c..7ccc2b73c 100755
+index 999882a1c04..7ccc2b73c5d 100755
 --- a/src/bootstrap/configure.py
 +++ b/src/bootstrap/configure.py
 @@ -109,34 +109,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
@@ -280,10 +280,10 @@ index 999882a1c..7ccc2b73c 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 24da44b93..c08bc6d94 100644
+index 347236c655a..1285fddb780 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -927,25 +927,6 @@ impl Build {
+@@ -947,25 +947,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
          }
      }
  
@@ -310,10 +310,10 @@ index 24da44b93..c08bc6d94 100644
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
          self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
 diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index ed0cbdf97..44937aed9 100644
+index a28762ac485..bf52ff0ae9a 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
-@@ -182,28 +182,6 @@ pub fn check(build: &mut Build) {
+@@ -183,28 +183,6 @@ pub fn check(build: &mut Build) {
              }
          }
  
@@ -339,6 +339,6 @@ index ed0cbdf97..44937aed9 100644
 -            }
 -        }
 -
-         if target.contains("msvc") {
+         if need_cmake && target.contains("msvc") {
              // There are three builds of cmake on windows: MSVC, MinGW, and
              // Cygwin. The Cygwin build does not have generators for Visual
diff --git a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch b/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
index 58ffd0776912..f5dd8cbd9132 100644
--- a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
+++ b/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
@@ -6,27 +6,12 @@ Date: Sat, 9 Sep 2017 00:14:16 -0500
 Subject: [PATCH 06/16] Prefer libgcc_eh over libunwind for musl
 
 ---
- src/libunwind/lib.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs
-index 9182e349b19..0377fbb58fc 100644
---- a/library/unwind/src/lib.rs
-+++ b/library/unwind/src/lib.rs
-@@ -23,6 +23,6 @@ cfg_if::cfg_if! {
- }
- 
- #[cfg(target_env = "musl")]
--#[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
-+#[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
- #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
- extern {}
-diff --git a/src/libunwind/build.rs b/src/libunwind/build.rs
-index f24d957..28828e5 100644
+diff --git a/library/unwind/build.rs b/library/unwind/build.rs
+index 0529d24a274..5ef3e67d47f 100644
 --- a/library/unwind/build.rs
 +++ b/library/unwind/build.rs
-@@ -5,17 +5,12 @@
-     let target = env::var("TARGET").expect("TARGET was not set");
+@@ -10,31 +10,12 @@ fn main() {
+     }
  
      if cfg!(feature = "llvm-libunwind")
 -        && ((target.contains("linux") && !target.contains("musl")) || target.contains("fuchsia"))
@@ -40,24 +25,58 @@ index f24d957..28828e5 100644
 -        // linking for Linux is handled in lib.rs
 -        if target.contains("musl") {
 -            llvm_libunwind::compile();
+-        } else if target.contains("android") {
+-            let build = cc::Build::new();
+-
+-            // Since ndk r23 beta 3 `libgcc` was replaced with `libunwind` thus
+-            // check if we have `libunwind` available and if so use it. Otherwise
+-            // fall back to `libgcc` to support older ndk versions.
+-            let has_unwind =
+-                build.is_flag_supported("-lunwind").expect("Unable to invoke compiler");
+-
+-            if has_unwind {
+-                println!("cargo:rustc-link-lib=unwind");
+-            } else {
+-                println!("cargo:rustc-link-lib=gcc");
+-            }
 -        }
      } else if target.contains("freebsd") {
          println!("cargo:rustc-link-lib=gcc_s");
-     } else if target.contains("rumprun") {
-@@ -143,15 +138,6 @@
-             cfg.file(root.join("src").join(src));
+     } else if target.contains("netbsd") {
+@@ -71,7 +52,6 @@ mod llvm_libunwind {
+     /// Compile the libunwind C/C++ source code.
+     pub fn compile() {
+         let target = env::var("TARGET").expect("TARGET was not set");
+-        let target_env = env::var("CARGO_CFG_TARGET_ENV").unwrap();
+         let mut cc_cfg = cc::Build::new();
+         let mut cpp_cfg = cc::Build::new();
+         let root = Path::new("../../src/llvm-project/libunwind");
+@@ -92,15 +72,6 @@ pub fn compile() {
+             cc_cfg.flag("-std=c99");
          }
  
--        if target_env == "musl" {
--            // use the same C compiler command to compile C++ code so we do not need to setup the
--            // C++ compiler env variables on the builders
--            cfg.cpp(false);
--            // linking for musl is handled in lib.rs
--            cfg.cargo_metadata(false);
--            println!("cargo:rustc-link-search=native={}", env::var("OUT_DIR").unwrap());
+-        if target.contains("x86_64-fortanix-unknown-sgx") || target_env == "musl" {
+-            // use the same GCC C compiler command to compile C++ code so we do not need to setup the
+-            // C++ compiler env variables on the builders.
+-            // Don't set this for clang++, as clang++ is able to compile this without libc++.
+-            if cpp_cfg.get_compiler().is_like_gnu() {
+-                cpp_cfg.cpp(false);
+-            }
 -        }
 -
-         cfg.compile("unwind");
+         for cfg in [&mut cc_cfg, &mut cpp_cfg].iter_mut() {
+             cfg.warnings(false);
+             cfg.flag("-fstrict-aliasing");
+diff --git a/library/unwind/src/lib.rs b/library/unwind/src/lib.rs
+index eaeec72fbb5..4cc721031a3 100644
+--- a/library/unwind/src/lib.rs
++++ b/library/unwind/src/lib.rs
+@@ -48,7 +48,7 @@
+         #[link(name = "unwind", cfg(not(target_feature = "crt-static")))]
+         extern "C" {}
+     } else {
+-        #[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
++        #[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
+         #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
+         extern "C" {}
      }
- }
-
diff --git a/srcpkgs/rust/patches/xxx-ppcle-ccrs.patch b/srcpkgs/rust/patches/xxx-ppcle-ccrs.patch
deleted file mode 100644
index 06f57aaec5cf..000000000000
--- a/srcpkgs/rust/patches/xxx-ppcle-ccrs.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From dc1de5be2b7908adb493b36f5079064083ed9507 Mon Sep 17 00:00:00 2001
-From: q66 <daniel@octaforge.org>
-Date: Sat, 3 Jul 2021 19:00:46 +0200
-Subject: [PATCH 1/2] cc-1.0.60: fix powerpcle being matched as as msvc
-
----
- vendor/cc-1.0.60/src/lib.rs | 6 +-----
- 1 file changed, 1 insertion(+), 5 deletions(-)
-
-diff --git a/vendor/cc-1.0.60/src/lib.rs b/vendor/cc-1.0.60/src/lib.rs
-index aff6be86..f428ecbb 100644
---- a/vendor/cc-1.0.60/src/lib.rs
-+++ b/vendor/cc-1.0.60/src/lib.rs
-@@ -2556,11 +2556,7 @@ impl Tool {
-         let family = if let Some(fname) = path.file_name().and_then(|p| p.to_str()) {
-             if fname.contains("clang-cl") {
-                 ToolFamily::Msvc { clang_cl: true }
--            } else if fname.contains("cl")
--                && !fname.contains("cloudabi")
--                && !fname.contains("uclibc")
--                && !fname.contains("clang")
--            {
-+            } else if fname.ends_with("cl") || fname == "cl.exe" {
-                 ToolFamily::Msvc { clang_cl: false }
-             } else if fname.contains("clang") {
-                 match clang_driver {
--- 
-2.31.1
-
diff --git a/srcpkgs/rust/patches/xxx-ppcle-gcc.patch b/srcpkgs/rust/patches/xxx-ppcle-gcc.patch
deleted file mode 100644
index b4150fcd8269..000000000000
--- a/srcpkgs/rust/patches/xxx-ppcle-gcc.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From bf983e79364d2d1c4a22857fadae8fcdc6646ef3 Mon Sep 17 00:00:00 2001
-From: q66 <daniel@octaforge.org>
-Date: Sun, 4 Jul 2021 02:17:26 +0200
-Subject: [PATCH] gcc: fix powerpcle being matched as msvc
-
----
- vendor/gcc/src/lib.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/vendor/gcc/src/lib.rs b/vendor/gcc/src/lib.rs
-index 7980281f..05787ceb 100644
---- a/vendor/gcc/src/lib.rs
-+++ b/vendor/gcc/src/lib.rs
-@@ -1549,7 +1549,7 @@ impl Tool {
-         let family = if let Some(fname) = path.file_name().and_then(|p| p.to_str()) {
-             if fname.contains("clang") {
-                 ToolFamily::Clang
--            } else if fname.contains("cl") && !fname.contains("uclibc") {
-+            } else if fname.ends_with("cl") || fname == "cl.exe" {
-                 ToolFamily::Msvc
-             } else {
-                 ToolFamily::Gnu
--- 
-2.31.1
-
diff --git a/srcpkgs/rust/patches/xxx-ppcle.patch b/srcpkgs/rust/patches/xxx-ppcle.patch
index ab5c0c56c925..9473e7ad98f3 100644
--- a/srcpkgs/rust/patches/xxx-ppcle.patch
+++ b/srcpkgs/rust/patches/xxx-ppcle.patch
@@ -30,11 +30,7 @@ Subject: [PATCH] initial ppcle port
  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-1.0.60/src/lib.rs                       |  1 +
  vendor/cc/src/lib.rs                              |  1 +
- vendor/gcc/src/lib.rs                             |  3 ++-
- vendor/jemallocator/benches/roundtrip.rs          |  3 ++-
- vendor/jemallocator/src/lib.rs                    |  3 ++-
  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 +++++++++++++++
@@ -57,9 +53,9 @@ index c2e9dba6..8147a3c3 100644
              target.os == "linux" && target.arch == "powerpc" && target_env_gnu_like;
 +        let linux_powerpcle_gnu_like =
 +            target.os == "linux" && target.arch == "powerpcle" && target_env_gnu_like;
+         use SpecAbi::*;
          let rust_abi = matches!(sig.abi, RustIntrinsic | PlatformIntrinsic | Rust | RustCall);
  
-         // Handle safe Rust thin and fat pointers.
 @@ -2850,7 +2852,8 @@ where
                      || (!win_x64_gnu
                          && !linux_s390x_gnu_like
@@ -394,18 +390,6 @@ index 7dbd7094..08c9de3c 100644
      ("powerpc64", "powerpc64"),
      ("powerpc64le", "powerpc64"),
      ("riscv64gc", "riscv64"),
-diff --git a/vendor/cc-1.0.60/src/lib.rs b/vendor/cc-1.0.60/src/lib.rs
-index f428ecbb..841e459a 100644
---- a/vendor/cc-1.0.60/src/lib.rs
-+++ b/vendor/cc-1.0.60/src/lib.rs
-@@ -2302,6 +2302,7 @@ impl Build {
-             "mipsisa64r6-unknown-linux-gnuabi64" => Some("mipsisa64r6-linux-gnuabi64"),
-             "mipsisa64r6el-unknown-linux-gnuabi64" => Some("mipsisa64r6el-linux-gnuabi64"),
-             "powerpc-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
-+            "powerpcle-unknown-linux-gnu" => Some("powerpcle-linux-gnu"),
-             "powerpc-unknown-linux-gnuspe" => Some("powerpc-linux-gnuspe"),
-             "powerpc-unknown-netbsd" => Some("powerpc--netbsd"),
-             "powerpc64-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
 diff --git a/vendor/cc/src/lib.rs b/vendor/cc/src/lib.rs
 index 5051b296..286c2fb7 100644
 --- a/vendor/cc/src/lib.rs
@@ -418,48 +402,6 @@ 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/gcc/src/lib.rs b/vendor/gcc/src/lib.rs
-index 1fe73012..7980281f 100644
---- a/vendor/gcc/src/lib.rs
-+++ b/vendor/gcc/src/lib.rs
-@@ -1367,7 +1367,8 @@ impl Build {
-                         "mips64el-unknown-linux-gnuabi64" => Some("mips64el-linux-gnuabi64"),
-                         "powerpc-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
-                         "powerpc-unknown-netbsd" => Some("powerpc--netbsd"),
--                        "powerpc64-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
-+                        "powerpcle-unknown-linux-gnu" => Some("powerpcle-linux-gnu"),
-+                        "powerpc64-unknown-linux-gnu" => Some("powerpc64-linux-gnu"),
-                         "powerpc64le-unknown-linux-gnu" => Some("powerpc64le-linux-gnu"),
-                         "s390x-unknown-linux-gnu" => Some("s390x-linux-gnu"),
-                         "sparc64-unknown-netbsd" => Some("sparc64--netbsd"),
-diff --git a/vendor/jemallocator/benches/roundtrip.rs b/vendor/jemallocator/benches/roundtrip.rs
-index eddbb6bb..db81596b 100644
---- a/vendor/jemallocator/benches/roundtrip.rs
-+++ b/vendor/jemallocator/benches/roundtrip.rs
-@@ -26,7 +26,8 @@ static A: Jemalloc = Jemalloc;
-     target_arch = "arm",
-     target_arch = "mips",
-     target_arch = "mipsel",
--    target_arch = "powerpc"
-+    target_arch = "powerpc",
-+    target_arch = "powerpcle"
- )))]
- const MIN_ALIGN: usize = 8;
- #[cfg(all(any(
-diff --git a/vendor/jemallocator/src/lib.rs b/vendor/jemallocator/src/lib.rs
-index f0a3692d..43889c55 100644
---- a/vendor/jemallocator/src/lib.rs
-+++ b/vendor/jemallocator/src/lib.rs
-@@ -37,7 +37,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"
- )))]
- const MIN_ALIGN: usize = 8;
- #[cfg(all(any(
 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
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index f31ea7b87b81..dea0d893f041 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.53.0
+version=1.54.0
 revision=1
 _rust_dist_version=1.53.0
 wrksrc="rustc-${version}-src"
@@ -20,7 +20,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=5cf7ca39a10f6bf4e0b0bd15e3b9a61ce721f301e12d148262e5ba968ab825b9
+checksum=ac8511633e9b5a65ad030a1a2e5bdaa841fdfe3132f2baaa52cc04e71c6c6976
 lib32disabled=yes
 
 build_options="bindist"
@@ -189,10 +189,7 @@ post_patch() {
 	# clear out all the checksum nonsense of patched vendor crates
 	_clear_vendor_checksums libc
 	_clear_vendor_checksums typenum
-	_clear_vendor_checksums cc-1.0.60
-	_clear_vendor_checksums gcc
 	_clear_vendor_checksums cc
-	_clear_vendor_checksums jemallocator
 	_clear_vendor_checksums rustc-ap-rustc_target
 	_clear_vendor_checksums target-lexicon
 	_clear_vendor_checksums tikv-jemallocator

From b47aac88f0468276116ce35f54ae0fffed49c80e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Tue, 17 Aug 2021 18:02:46 -0300
Subject: [PATCH 2/2] cargo: update to 0.55.0.

---
 srcpkgs/cargo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index 075646348d9f..46f1eda30693 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo'
 pkgname=cargo
-version=0.54.0
+version=0.55.0
 revision=1
 wrksrc="cargo-${version}"
 build_helper=rust

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
@ 2021-08-18  1:18 ` ericonr
  2021-08-18 21:54 ` ifreund
                   ` (37 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: ericonr @ 2021-08-18  1:18 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-900740070

Comment:
Welp, glibc also fails:

```
Compiling rustc_codegen_ssa v0.0.0 (/builddir/rustc-1.54.0-src/compiler/rustc_codegen_ssa)
error[E0532]: expected unit struct, unit variant or constant, found struct variant `NativeLibKind::Dylib`
    --> compiler/rustc_codegen_ssa/src/back/link.rs:2399:17
     |
2399 |                 NativeLibKind::Dylib | NativeLibKind::Unspecified => {
     |                 ^^^^^^^^^^^^^^^^^^^^
     |
    ::: /builddir/rustc-1.54.0-src/compiler/rustc_session/src/utils.rs:31:5
     |
31   |     Dylib {
     |     ----- `NativeLibKind::Dylib` defined here
     |
help: use struct pattern syntax instead
     |
2399 |                 NativeLibKind::Dylib { /* fields */ } | NativeLibKind::Unspecified => {
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider importing this unit variant instead
     |
1    | use rustc_session::config::CrateType::Dylib;
     |

error: aborting due to previous error

For more information about this error, try `rustc --explain E0532`.
error: could not compile `rustc_codegen_ssa`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
command did not execute successfully: "/builddir/rustc-1.54.0-src/stage0-bootstrap/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "8" "--release" "--locked" "--frozen" "--features" " llvm max_level_info" "--manifest-path" "/builddir/rustc-1.54.0-src/compiler/rustc/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit status: 101
failed to run: /builddir/rustc-1.54.0-src/build/bootstrap/debug/bootstrap dist --jobs 8
Build completed unsuccessfully in 0:08:30
=> ERROR: rust-1.54.0_1: do_build: 'env CFLAGS_${RUST_BUILD}="${CFLAGS_host}" python3 x.py dist --jobs $XBPS_MAKEJOBS' exited with 1
```

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
  2021-08-18  1:18 ` ericonr
@ 2021-08-18 21:54 ` ifreund
  2021-08-18 21:54 ` ifreund
                   ` (36 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: ifreund @ 2021-08-18 21:54 UTC (permalink / raw)
  To: ml

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

New comment by ifreund on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-901454842

Comment:
@ericonr Here's a fix for that patch:
```diff
diff --git a/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch b/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch
index 88e29d9ebc..b2e61ddb0b 100644
--- a/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch
+++ b/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch
@@ -16,13 +16,13 @@ diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codege
 index 6c9ec9e7b0d..60f43f70e4e 100644
 --- a/compiler/rustc_codegen_ssa/src/back/link.rs
 +++ b/compiler/rustc_codegen_ssa/src/back/link.rs
-@@ -2396,10 +2396,23 @@ fn add_upstream_native_libraries(
+@@ -2396,10 +2396,24 @@ fn add_upstream_native_libraries(
  
              let verbatim = lib.verbatim.unwrap_or(false);
              match lib.kind {
 -                NativeLibKind::Dylib { as_needed } => {
 -                    cmd.link_dylib(name, verbatim, as_needed.unwrap_or(true))
-+                NativeLibKind::Dylib | NativeLibKind::Unspecified => {
++                NativeLibKind::Dylib { .. } | NativeLibKind::Unspecified => {
 +                    // On some targets, like Linux, linking a static executable inhibits using
 +                    // dylibs at all. Force native libraries to be static, even if for example
 +                    // an upstream rlib was originally linked against a native shared library.
@@ -34,8 +34,9 @@ index 6c9ec9e7b0d..60f43f70e4e 100644
 +                    } else {
 +                        cmd.link_dylib(name, verbatim,
 +                                       match lib.kind {
-+                                           NativeLibKind::Dylib => as_needed.unwrap_or(true),
-+                                           NativeLibKind::Unspecified => true
++                                           NativeLibKind::Dylib { as_needed } => as_needed.unwrap_or(true),
++                                           NativeLibKind::Unspecified => true,
++                                           _ => unreachable!()
 +                                       })
 +                    }
                  }
```

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
  2021-08-18  1:18 ` ericonr
  2021-08-18 21:54 ` ifreund
@ 2021-08-18 21:54 ` ifreund
  2021-08-19  2:47 ` [PR PATCH] [Updated] " ericonr
                   ` (35 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: ifreund @ 2021-08-18 21:54 UTC (permalink / raw)
  To: ml

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

New comment by ifreund on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-901454842

Comment:
@ericonr Here's a patch for that patch:
```diff
diff --git a/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch b/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch
index 88e29d9ebc..b2e61ddb0b 100644
--- a/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch
+++ b/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch
@@ -16,13 +16,13 @@ diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codege
 index 6c9ec9e7b0d..60f43f70e4e 100644
 --- a/compiler/rustc_codegen_ssa/src/back/link.rs
 +++ b/compiler/rustc_codegen_ssa/src/back/link.rs
-@@ -2396,10 +2396,23 @@ fn add_upstream_native_libraries(
+@@ -2396,10 +2396,24 @@ fn add_upstream_native_libraries(
  
              let verbatim = lib.verbatim.unwrap_or(false);
              match lib.kind {
 -                NativeLibKind::Dylib { as_needed } => {
 -                    cmd.link_dylib(name, verbatim, as_needed.unwrap_or(true))
-+                NativeLibKind::Dylib | NativeLibKind::Unspecified => {
++                NativeLibKind::Dylib { .. } | NativeLibKind::Unspecified => {
 +                    // On some targets, like Linux, linking a static executable inhibits using
 +                    // dylibs at all. Force native libraries to be static, even if for example
 +                    // an upstream rlib was originally linked against a native shared library.
@@ -34,8 +34,9 @@ index 6c9ec9e7b0d..60f43f70e4e 100644
 +                    } else {
 +                        cmd.link_dylib(name, verbatim,
 +                                       match lib.kind {
-+                                           NativeLibKind::Dylib => as_needed.unwrap_or(true),
-+                                           NativeLibKind::Unspecified => true
++                                           NativeLibKind::Dylib { as_needed } => as_needed.unwrap_or(true),
++                                           NativeLibKind::Unspecified => true,
++                                           _ => unreachable!()
 +                                       })
 +                    }
                  }
```

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

* Re: [PR PATCH] [Updated] [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (2 preceding siblings ...)
  2021-08-18 21:54 ` ifreund
@ 2021-08-19  2:47 ` ericonr
  2021-08-19  5:31 ` ericonr
                   ` (34 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: ericonr @ 2021-08-19  2:47 UTC (permalink / raw)
  To: ml

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

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

https://github.com/ericonr/void-packages rust
https://github.com/void-linux/void-packages/pull/32555

[WIP] Rust 1.54.0
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

musl build (at least) is currently broken, accepting help:

```
Rustbook (x86_64-unknown-linux-musl) - unstable-book
Building stage0 std artifacts (x86_64-unknown-linux-musl -> x86_64-unknown-linux-musl)
   Compiling compiler_builtins v0.1.45
   Compiling core v0.0.0 (/builddir/rustc-1.54.0-src/library/core)
   Compiling libc v0.2.93
   Compiling cc v1.0.68
   Compiling std v0.0.0 (/builddir/rustc-1.54.0-src/library/std)
   Compiling unwind v0.0.0 (/builddir/rustc-1.54.0-src/library/unwind)
   Compiling rustc-std-workspace-core v1.99.0 (/builddir/rustc-1.54.0-src/library/rustc-std-workspace-core)
   Compiling alloc v0.0.0 (/builddir/rustc-1.54.0-src/library/alloc)
   Compiling cfg-if v0.1.10
   Compiling adler v0.2.3
   Compiling rustc-demangle v0.1.18
error: could not find native static library `c`, perhaps an -L flag is missing?

error: aborting due to previous error

error: could not compile `libc`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
command did not execute successfully: "/builddir/rustc-1.54.0-src/stage0-bootstrap/bin/cargo" "build" "--target" "x86_64-unknown-linux-musl" "-Zbinary-dep-depinfo" "-j" "8" "--release" "--locked" "--frozen" "--features" "panic-unwind backtrace" "--manifest-path" "/builddir/rustc-1.54.0-src/library/test/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit status: 101
failed to run: /builddir/rustc-1.54.0-src/build/bootstrap/debug/bootstrap dist --jobs 8
Build completed unsuccessfully in 0:02:40
```

[ci skip]

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

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

From 92cc3d234a3cde44bfb881f03336a67729d11dd6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Tue, 17 Aug 2021 18:02:42 -0300
Subject: [PATCH 1/2] rust: update to 1.54.0.

Co-authored-by: Isaac Freund <ifreund@ifreund.xyz>
---
 ...ative-libraries-when-linking-static-.patch | 42 ++++------
 ...dlib-and-musl_root-from-musl-targets.patch | 32 +++----
 ...fer-libgcc_eh-over-libunwind-on-musl.patch | 83 ++++++++++++-------
 srcpkgs/rust/patches/xxx-ppcle-ccrs.patch     | 29 -------
 srcpkgs/rust/patches/xxx-ppcle-gcc.patch      | 25 ------
 srcpkgs/rust/patches/xxx-ppcle.patch          | 60 +-------------
 srcpkgs/rust/template                         |  7 +-
 7 files changed, 88 insertions(+), 190 deletions(-)
 delete mode 100644 srcpkgs/rust/patches/xxx-ppcle-ccrs.patch
 delete mode 100644 srcpkgs/rust/patches/xxx-ppcle-gcc.patch

diff --git a/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch b/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch
index 0fd1ca7d2dfa..b2e61ddb0bad 100644
--- a/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch
+++ b/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch
@@ -12,29 +12,17 @@ executables.
 
 Fixes #54243
 ---
- src/librustc_codegen_ssa/back/link.rs | 18 ++++++++++++++----
- 1 file changed, 14 insertions(+), 4 deletions(-)
-
 diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
-index 8bc4e6442..52ff7a52e 100644
+index 6c9ec9e7b0d..60f43f70e4e 100644
 --- a/compiler/rustc_codegen_ssa/src/back/link.rs
 +++ b/compiler/rustc_codegen_ssa/src/back/link.rs
-@@ -2081,8 +2081,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(
-     }
- }
+@@ -2396,10 +2396,24 @@ fn add_upstream_native_libraries(
  
--/// Link in all of our upstream crates' native dependencies. Remember that all of these upstream
--/// native dependencies are all non-static dependencies. We've got two cases then:
-+/// Link in all of our upstream crates' native dependencies. We have two cases:
- ///
- /// 1. The upstream crate is an rlib. In this case we *must* link in the native dependency because
- /// the rlib is just an archive.
-@@ -2015,7 +2013,19 @@
-                 continue;
-             }
+             let verbatim = lib.verbatim.unwrap_or(false);
              match lib.kind {
--                NativeLibKind::Dylib | NativeLibKind::Unspecified => cmd.link_dylib(name),
-+                NativeLibKind::Dylib | NativeLibKind::Unspecified => {
+-                NativeLibKind::Dylib { as_needed } => {
+-                    cmd.link_dylib(name, verbatim, as_needed.unwrap_or(true))
++                NativeLibKind::Dylib { .. } | NativeLibKind::Unspecified => {
 +                    // On some targets, like Linux, linking a static executable inhibits using
 +                    // dylibs at all. Force native libraries to be static, even if for example
 +                    // an upstream rlib was originally linked against a native shared library.
@@ -42,11 +30,17 @@ index 8bc4e6442..52ff7a52e 100644
 +                        && sess.crt_static(Some(crate_type))
 +                        && !sess.target.options.crt_static_allows_dylibs
 +                    {
-+                        cmd.link_staticlib(name)
++                        cmd.link_staticlib(name, verbatim)
 +                    } else {
-+                        cmd.link_dylib(name)
++                        cmd.link_dylib(name, verbatim,
++                                       match lib.kind {
++                                           NativeLibKind::Dylib { as_needed } => as_needed.unwrap_or(true),
++                                           NativeLibKind::Unspecified => true,
++                                           _ => unreachable!()
++                                       })
 +                    }
-+                },
-                 NativeLibKind::Framework => cmd.link_framework(name),
-                 NativeLibKind::StaticNoBundle => {
-                     // Link "static-nobundle" native libs only if the crate they originate from
+                 }
+-                NativeLibKind::Unspecified => cmd.link_dylib(name, verbatim, true),
+                 NativeLibKind::Framework { as_needed } => {
+                     cmd.link_framework(name, as_needed.unwrap_or(true))
+                 }
diff --git a/srcpkgs/rust/patches/0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch b/srcpkgs/rust/patches/0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch
index 85a8806e010b..112d012e11e5 100644
--- a/srcpkgs/rust/patches/0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch
+++ b/srcpkgs/rust/patches/0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch
@@ -1,5 +1,5 @@
 diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
-index 2fc9ab29f..276736159 100644
+index 2fc9ab29f92..27673615968 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 {
@@ -32,7 +32,7 @@ index 2fc9ab29f..276736159 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 5038a967d..b3c0e5bc4 100644
+index 5038a967d0a..b3c0e5bc416 100644
 --- a/compiler/rustc_target/src/spec/linux_musl_base.rs
 +++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
 @@ -1,16 +1,9 @@
@@ -53,10 +53,10 @@ index 5038a967d..b3c0e5bc4 100644
      base
  }
 diff --git a/config.toml.example b/config.toml.example
-index 6e5584797..5be9882a8 100644
+index 7fa5353d09b..98afe3743c0 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -638,15 +638,6 @@ changelog-seen = 2
+@@ -644,15 +644,6 @@ changelog-seen = 2
  # only use static libraries. If unset, the target's default linkage is used.
  #crt-static = <platform-specific> (bool)
  
@@ -73,7 +73,7 @@ index 6e5584797..5be9882a8 100644
  # `wasm32-wasi` target. If you are building wasm32-wasi target, make sure to
  # create a `[target.wasm32-wasi]` section and move this field there.
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index e750c2963..f6ba3032b 100644
+index e750c2963dd..f6ba3032b0d 100644
 --- a/src/bootstrap/cc_detect.rs
 +++ b/src/bootstrap/cc_detect.rs
 @@ -98,7 +98,7 @@ pub fn find(build: &mut Build) {
@@ -130,7 +130,7 @@ index e750c2963..f6ba3032b 100644
      }
  }
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index ee3527b6b..0a8b78327 100644
+index 112a6ea9398..4e42bcbbdad 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
 @@ -179,34 +179,7 @@ fn copy_self_contained_objects(
@@ -169,7 +169,7 @@ index ee3527b6b..0a8b78327 100644
          let srcdir = builder
              .wasi_root(target)
              .unwrap_or_else(|| {
-@@ -288,15 +261,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+@@ -290,15 +263,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
              .arg("--manifest-path")
              .arg(builder.src.join("library/test/Cargo.toml"));
  
@@ -186,7 +186,7 @@ index ee3527b6b..0a8b78327 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 483816b98..7517d757c 100644
+index 483816b98d6..7517d757cc0 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
 @@ -165,7 +165,6 @@ pub struct Config {
@@ -223,7 +223,7 @@ index 483816b98..7517d757c 100644
      wasi_root: Option<String>,
      qemu_rootfs: Option<String>,
      no_std: Option<bool>,
-@@ -846,7 +840,6 @@ impl Config {
+@@ -846,7 +840,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;
@@ -231,7 +231,7 @@ index 483816b98..7517d757c 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);
-@@ -892,8 +885,6 @@ impl Config {
+@@ -892,8 +885,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;
@@ -241,7 +241,7 @@ index 483816b98..7517d757c 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 999882a1c..7ccc2b73c 100755
+index 999882a1c04..7ccc2b73c5d 100755
 --- a/src/bootstrap/configure.py
 +++ b/src/bootstrap/configure.py
 @@ -109,34 +109,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
@@ -280,10 +280,10 @@ index 999882a1c..7ccc2b73c 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 24da44b93..c08bc6d94 100644
+index 347236c655a..1285fddb780 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -927,25 +927,6 @@ impl Build {
+@@ -947,25 +947,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
          }
      }
  
@@ -310,10 +310,10 @@ index 24da44b93..c08bc6d94 100644
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
          self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
 diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index ed0cbdf97..44937aed9 100644
+index a28762ac485..bf52ff0ae9a 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
-@@ -182,28 +182,6 @@ pub fn check(build: &mut Build) {
+@@ -183,28 +183,6 @@ pub fn check(build: &mut Build) {
              }
          }
  
@@ -339,6 +339,6 @@ index ed0cbdf97..44937aed9 100644
 -            }
 -        }
 -
-         if target.contains("msvc") {
+         if need_cmake && target.contains("msvc") {
              // There are three builds of cmake on windows: MSVC, MinGW, and
              // Cygwin. The Cygwin build does not have generators for Visual
diff --git a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch b/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
index 58ffd0776912..f5dd8cbd9132 100644
--- a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
+++ b/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
@@ -6,27 +6,12 @@ Date: Sat, 9 Sep 2017 00:14:16 -0500
 Subject: [PATCH 06/16] Prefer libgcc_eh over libunwind for musl
 
 ---
- src/libunwind/lib.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs
-index 9182e349b19..0377fbb58fc 100644
---- a/library/unwind/src/lib.rs
-+++ b/library/unwind/src/lib.rs
-@@ -23,6 +23,6 @@ cfg_if::cfg_if! {
- }
- 
- #[cfg(target_env = "musl")]
--#[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
-+#[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
- #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
- extern {}
-diff --git a/src/libunwind/build.rs b/src/libunwind/build.rs
-index f24d957..28828e5 100644
+diff --git a/library/unwind/build.rs b/library/unwind/build.rs
+index 0529d24a274..5ef3e67d47f 100644
 --- a/library/unwind/build.rs
 +++ b/library/unwind/build.rs
-@@ -5,17 +5,12 @@
-     let target = env::var("TARGET").expect("TARGET was not set");
+@@ -10,31 +10,12 @@ fn main() {
+     }
  
      if cfg!(feature = "llvm-libunwind")
 -        && ((target.contains("linux") && !target.contains("musl")) || target.contains("fuchsia"))
@@ -40,24 +25,58 @@ index f24d957..28828e5 100644
 -        // linking for Linux is handled in lib.rs
 -        if target.contains("musl") {
 -            llvm_libunwind::compile();
+-        } else if target.contains("android") {
+-            let build = cc::Build::new();
+-
+-            // Since ndk r23 beta 3 `libgcc` was replaced with `libunwind` thus
+-            // check if we have `libunwind` available and if so use it. Otherwise
+-            // fall back to `libgcc` to support older ndk versions.
+-            let has_unwind =
+-                build.is_flag_supported("-lunwind").expect("Unable to invoke compiler");
+-
+-            if has_unwind {
+-                println!("cargo:rustc-link-lib=unwind");
+-            } else {
+-                println!("cargo:rustc-link-lib=gcc");
+-            }
 -        }
      } else if target.contains("freebsd") {
          println!("cargo:rustc-link-lib=gcc_s");
-     } else if target.contains("rumprun") {
-@@ -143,15 +138,6 @@
-             cfg.file(root.join("src").join(src));
+     } else if target.contains("netbsd") {
+@@ -71,7 +52,6 @@ mod llvm_libunwind {
+     /// Compile the libunwind C/C++ source code.
+     pub fn compile() {
+         let target = env::var("TARGET").expect("TARGET was not set");
+-        let target_env = env::var("CARGO_CFG_TARGET_ENV").unwrap();
+         let mut cc_cfg = cc::Build::new();
+         let mut cpp_cfg = cc::Build::new();
+         let root = Path::new("../../src/llvm-project/libunwind");
+@@ -92,15 +72,6 @@ pub fn compile() {
+             cc_cfg.flag("-std=c99");
          }
  
--        if target_env == "musl" {
--            // use the same C compiler command to compile C++ code so we do not need to setup the
--            // C++ compiler env variables on the builders
--            cfg.cpp(false);
--            // linking for musl is handled in lib.rs
--            cfg.cargo_metadata(false);
--            println!("cargo:rustc-link-search=native={}", env::var("OUT_DIR").unwrap());
+-        if target.contains("x86_64-fortanix-unknown-sgx") || target_env == "musl" {
+-            // use the same GCC C compiler command to compile C++ code so we do not need to setup the
+-            // C++ compiler env variables on the builders.
+-            // Don't set this for clang++, as clang++ is able to compile this without libc++.
+-            if cpp_cfg.get_compiler().is_like_gnu() {
+-                cpp_cfg.cpp(false);
+-            }
 -        }
 -
-         cfg.compile("unwind");
+         for cfg in [&mut cc_cfg, &mut cpp_cfg].iter_mut() {
+             cfg.warnings(false);
+             cfg.flag("-fstrict-aliasing");
+diff --git a/library/unwind/src/lib.rs b/library/unwind/src/lib.rs
+index eaeec72fbb5..4cc721031a3 100644
+--- a/library/unwind/src/lib.rs
++++ b/library/unwind/src/lib.rs
+@@ -48,7 +48,7 @@
+         #[link(name = "unwind", cfg(not(target_feature = "crt-static")))]
+         extern "C" {}
+     } else {
+-        #[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
++        #[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
+         #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
+         extern "C" {}
      }
- }
-
diff --git a/srcpkgs/rust/patches/xxx-ppcle-ccrs.patch b/srcpkgs/rust/patches/xxx-ppcle-ccrs.patch
deleted file mode 100644
index 06f57aaec5cf..000000000000
--- a/srcpkgs/rust/patches/xxx-ppcle-ccrs.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From dc1de5be2b7908adb493b36f5079064083ed9507 Mon Sep 17 00:00:00 2001
-From: q66 <daniel@octaforge.org>
-Date: Sat, 3 Jul 2021 19:00:46 +0200
-Subject: [PATCH 1/2] cc-1.0.60: fix powerpcle being matched as as msvc
-
----
- vendor/cc-1.0.60/src/lib.rs | 6 +-----
- 1 file changed, 1 insertion(+), 5 deletions(-)
-
-diff --git a/vendor/cc-1.0.60/src/lib.rs b/vendor/cc-1.0.60/src/lib.rs
-index aff6be86..f428ecbb 100644
---- a/vendor/cc-1.0.60/src/lib.rs
-+++ b/vendor/cc-1.0.60/src/lib.rs
-@@ -2556,11 +2556,7 @@ impl Tool {
-         let family = if let Some(fname) = path.file_name().and_then(|p| p.to_str()) {
-             if fname.contains("clang-cl") {
-                 ToolFamily::Msvc { clang_cl: true }
--            } else if fname.contains("cl")
--                && !fname.contains("cloudabi")
--                && !fname.contains("uclibc")
--                && !fname.contains("clang")
--            {
-+            } else if fname.ends_with("cl") || fname == "cl.exe" {
-                 ToolFamily::Msvc { clang_cl: false }
-             } else if fname.contains("clang") {
-                 match clang_driver {
--- 
-2.31.1
-
diff --git a/srcpkgs/rust/patches/xxx-ppcle-gcc.patch b/srcpkgs/rust/patches/xxx-ppcle-gcc.patch
deleted file mode 100644
index b4150fcd8269..000000000000
--- a/srcpkgs/rust/patches/xxx-ppcle-gcc.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From bf983e79364d2d1c4a22857fadae8fcdc6646ef3 Mon Sep 17 00:00:00 2001
-From: q66 <daniel@octaforge.org>
-Date: Sun, 4 Jul 2021 02:17:26 +0200
-Subject: [PATCH] gcc: fix powerpcle being matched as msvc
-
----
- vendor/gcc/src/lib.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/vendor/gcc/src/lib.rs b/vendor/gcc/src/lib.rs
-index 7980281f..05787ceb 100644
---- a/vendor/gcc/src/lib.rs
-+++ b/vendor/gcc/src/lib.rs
-@@ -1549,7 +1549,7 @@ impl Tool {
-         let family = if let Some(fname) = path.file_name().and_then(|p| p.to_str()) {
-             if fname.contains("clang") {
-                 ToolFamily::Clang
--            } else if fname.contains("cl") && !fname.contains("uclibc") {
-+            } else if fname.ends_with("cl") || fname == "cl.exe" {
-                 ToolFamily::Msvc
-             } else {
-                 ToolFamily::Gnu
--- 
-2.31.1
-
diff --git a/srcpkgs/rust/patches/xxx-ppcle.patch b/srcpkgs/rust/patches/xxx-ppcle.patch
index ab5c0c56c925..9473e7ad98f3 100644
--- a/srcpkgs/rust/patches/xxx-ppcle.patch
+++ b/srcpkgs/rust/patches/xxx-ppcle.patch
@@ -30,11 +30,7 @@ Subject: [PATCH] initial ppcle port
  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-1.0.60/src/lib.rs                       |  1 +
  vendor/cc/src/lib.rs                              |  1 +
- vendor/gcc/src/lib.rs                             |  3 ++-
- vendor/jemallocator/benches/roundtrip.rs          |  3 ++-
- vendor/jemallocator/src/lib.rs                    |  3 ++-
  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 +++++++++++++++
@@ -57,9 +53,9 @@ index c2e9dba6..8147a3c3 100644
              target.os == "linux" && target.arch == "powerpc" && target_env_gnu_like;
 +        let linux_powerpcle_gnu_like =
 +            target.os == "linux" && target.arch == "powerpcle" && target_env_gnu_like;
+         use SpecAbi::*;
          let rust_abi = matches!(sig.abi, RustIntrinsic | PlatformIntrinsic | Rust | RustCall);
  
-         // Handle safe Rust thin and fat pointers.
 @@ -2850,7 +2852,8 @@ where
                      || (!win_x64_gnu
                          && !linux_s390x_gnu_like
@@ -394,18 +390,6 @@ index 7dbd7094..08c9de3c 100644
      ("powerpc64", "powerpc64"),
      ("powerpc64le", "powerpc64"),
      ("riscv64gc", "riscv64"),
-diff --git a/vendor/cc-1.0.60/src/lib.rs b/vendor/cc-1.0.60/src/lib.rs
-index f428ecbb..841e459a 100644
---- a/vendor/cc-1.0.60/src/lib.rs
-+++ b/vendor/cc-1.0.60/src/lib.rs
-@@ -2302,6 +2302,7 @@ impl Build {
-             "mipsisa64r6-unknown-linux-gnuabi64" => Some("mipsisa64r6-linux-gnuabi64"),
-             "mipsisa64r6el-unknown-linux-gnuabi64" => Some("mipsisa64r6el-linux-gnuabi64"),
-             "powerpc-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
-+            "powerpcle-unknown-linux-gnu" => Some("powerpcle-linux-gnu"),
-             "powerpc-unknown-linux-gnuspe" => Some("powerpc-linux-gnuspe"),
-             "powerpc-unknown-netbsd" => Some("powerpc--netbsd"),
-             "powerpc64-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
 diff --git a/vendor/cc/src/lib.rs b/vendor/cc/src/lib.rs
 index 5051b296..286c2fb7 100644
 --- a/vendor/cc/src/lib.rs
@@ -418,48 +402,6 @@ 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/gcc/src/lib.rs b/vendor/gcc/src/lib.rs
-index 1fe73012..7980281f 100644
---- a/vendor/gcc/src/lib.rs
-+++ b/vendor/gcc/src/lib.rs
-@@ -1367,7 +1367,8 @@ impl Build {
-                         "mips64el-unknown-linux-gnuabi64" => Some("mips64el-linux-gnuabi64"),
-                         "powerpc-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
-                         "powerpc-unknown-netbsd" => Some("powerpc--netbsd"),
--                        "powerpc64-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
-+                        "powerpcle-unknown-linux-gnu" => Some("powerpcle-linux-gnu"),
-+                        "powerpc64-unknown-linux-gnu" => Some("powerpc64-linux-gnu"),
-                         "powerpc64le-unknown-linux-gnu" => Some("powerpc64le-linux-gnu"),
-                         "s390x-unknown-linux-gnu" => Some("s390x-linux-gnu"),
-                         "sparc64-unknown-netbsd" => Some("sparc64--netbsd"),
-diff --git a/vendor/jemallocator/benches/roundtrip.rs b/vendor/jemallocator/benches/roundtrip.rs
-index eddbb6bb..db81596b 100644
---- a/vendor/jemallocator/benches/roundtrip.rs
-+++ b/vendor/jemallocator/benches/roundtrip.rs
-@@ -26,7 +26,8 @@ static A: Jemalloc = Jemalloc;
-     target_arch = "arm",
-     target_arch = "mips",
-     target_arch = "mipsel",
--    target_arch = "powerpc"
-+    target_arch = "powerpc",
-+    target_arch = "powerpcle"
- )))]
- const MIN_ALIGN: usize = 8;
- #[cfg(all(any(
-diff --git a/vendor/jemallocator/src/lib.rs b/vendor/jemallocator/src/lib.rs
-index f0a3692d..43889c55 100644
---- a/vendor/jemallocator/src/lib.rs
-+++ b/vendor/jemallocator/src/lib.rs
-@@ -37,7 +37,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"
- )))]
- const MIN_ALIGN: usize = 8;
- #[cfg(all(any(
 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
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index f31ea7b87b81..dea0d893f041 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.53.0
+version=1.54.0
 revision=1
 _rust_dist_version=1.53.0
 wrksrc="rustc-${version}-src"
@@ -20,7 +20,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=5cf7ca39a10f6bf4e0b0bd15e3b9a61ce721f301e12d148262e5ba968ab825b9
+checksum=ac8511633e9b5a65ad030a1a2e5bdaa841fdfe3132f2baaa52cc04e71c6c6976
 lib32disabled=yes
 
 build_options="bindist"
@@ -189,10 +189,7 @@ post_patch() {
 	# clear out all the checksum nonsense of patched vendor crates
 	_clear_vendor_checksums libc
 	_clear_vendor_checksums typenum
-	_clear_vendor_checksums cc-1.0.60
-	_clear_vendor_checksums gcc
 	_clear_vendor_checksums cc
-	_clear_vendor_checksums jemallocator
 	_clear_vendor_checksums rustc-ap-rustc_target
 	_clear_vendor_checksums target-lexicon
 	_clear_vendor_checksums tikv-jemallocator

From cac188a15a66a276ce123b0f21ac87d76083f0a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Tue, 17 Aug 2021 18:02:46 -0300
Subject: [PATCH 2/2] cargo: update to 0.55.0.

---
 srcpkgs/cargo/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index 075646348d9f..46f1eda30693 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo'
 pkgname=cargo
-version=0.54.0
+version=0.55.0
 revision=1
 wrksrc="cargo-${version}"
 build_helper=rust

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

* Re: [PR PATCH] [Updated] [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (3 preceding siblings ...)
  2021-08-19  2:47 ` [PR PATCH] [Updated] " ericonr
@ 2021-08-19  5:31 ` ericonr
  2021-09-17 14:18 ` ram02z
                   ` (33 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: ericonr @ 2021-08-19  5:31 UTC (permalink / raw)
  To: ml

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

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

https://github.com/ericonr/void-packages rust
https://github.com/void-linux/void-packages/pull/32555

[WIP] Rust 1.54.0
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

musl build (at least) is currently broken, accepting help:

```
Rustbook (x86_64-unknown-linux-musl) - unstable-book
Building stage0 std artifacts (x86_64-unknown-linux-musl -> x86_64-unknown-linux-musl)
   Compiling compiler_builtins v0.1.45
   Compiling core v0.0.0 (/builddir/rustc-1.54.0-src/library/core)
   Compiling libc v0.2.93
   Compiling cc v1.0.68
   Compiling std v0.0.0 (/builddir/rustc-1.54.0-src/library/std)
   Compiling unwind v0.0.0 (/builddir/rustc-1.54.0-src/library/unwind)
   Compiling rustc-std-workspace-core v1.99.0 (/builddir/rustc-1.54.0-src/library/rustc-std-workspace-core)
   Compiling alloc v0.0.0 (/builddir/rustc-1.54.0-src/library/alloc)
   Compiling cfg-if v0.1.10
   Compiling adler v0.2.3
   Compiling rustc-demangle v0.1.18
error: could not find native static library `c`, perhaps an -L flag is missing?

error: aborting due to previous error

error: could not compile `libc`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
command did not execute successfully: "/builddir/rustc-1.54.0-src/stage0-bootstrap/bin/cargo" "build" "--target" "x86_64-unknown-linux-musl" "-Zbinary-dep-depinfo" "-j" "8" "--release" "--locked" "--frozen" "--features" "panic-unwind backtrace" "--manifest-path" "/builddir/rustc-1.54.0-src/library/test/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit status: 101
failed to run: /builddir/rustc-1.54.0-src/build/bootstrap/debug/bootstrap dist --jobs 8
Build completed unsuccessfully in 0:02:40
```

[ci skip]

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

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

From 92cc3d234a3cde44bfb881f03336a67729d11dd6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Tue, 17 Aug 2021 18:02:42 -0300
Subject: [PATCH 1/2] rust: update to 1.54.0.

Co-authored-by: Isaac Freund <ifreund@ifreund.xyz>
---
 ...ative-libraries-when-linking-static-.patch | 42 ++++------
 ...dlib-and-musl_root-from-musl-targets.patch | 32 +++----
 ...fer-libgcc_eh-over-libunwind-on-musl.patch | 83 ++++++++++++-------
 srcpkgs/rust/patches/xxx-ppcle-ccrs.patch     | 29 -------
 srcpkgs/rust/patches/xxx-ppcle-gcc.patch      | 25 ------
 srcpkgs/rust/patches/xxx-ppcle.patch          | 60 +-------------
 srcpkgs/rust/template                         |  7 +-
 7 files changed, 88 insertions(+), 190 deletions(-)
 delete mode 100644 srcpkgs/rust/patches/xxx-ppcle-ccrs.patch
 delete mode 100644 srcpkgs/rust/patches/xxx-ppcle-gcc.patch

diff --git a/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch b/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch
index 0fd1ca7d2dfa..b2e61ddb0bad 100644
--- a/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch
+++ b/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch
@@ -12,29 +12,17 @@ executables.
 
 Fixes #54243
 ---
- src/librustc_codegen_ssa/back/link.rs | 18 ++++++++++++++----
- 1 file changed, 14 insertions(+), 4 deletions(-)
-
 diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
-index 8bc4e6442..52ff7a52e 100644
+index 6c9ec9e7b0d..60f43f70e4e 100644
 --- a/compiler/rustc_codegen_ssa/src/back/link.rs
 +++ b/compiler/rustc_codegen_ssa/src/back/link.rs
-@@ -2081,8 +2081,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(
-     }
- }
+@@ -2396,10 +2396,24 @@ fn add_upstream_native_libraries(
  
--/// Link in all of our upstream crates' native dependencies. Remember that all of these upstream
--/// native dependencies are all non-static dependencies. We've got two cases then:
-+/// Link in all of our upstream crates' native dependencies. We have two cases:
- ///
- /// 1. The upstream crate is an rlib. In this case we *must* link in the native dependency because
- /// the rlib is just an archive.
-@@ -2015,7 +2013,19 @@
-                 continue;
-             }
+             let verbatim = lib.verbatim.unwrap_or(false);
              match lib.kind {
--                NativeLibKind::Dylib | NativeLibKind::Unspecified => cmd.link_dylib(name),
-+                NativeLibKind::Dylib | NativeLibKind::Unspecified => {
+-                NativeLibKind::Dylib { as_needed } => {
+-                    cmd.link_dylib(name, verbatim, as_needed.unwrap_or(true))
++                NativeLibKind::Dylib { .. } | NativeLibKind::Unspecified => {
 +                    // On some targets, like Linux, linking a static executable inhibits using
 +                    // dylibs at all. Force native libraries to be static, even if for example
 +                    // an upstream rlib was originally linked against a native shared library.
@@ -42,11 +30,17 @@ index 8bc4e6442..52ff7a52e 100644
 +                        && sess.crt_static(Some(crate_type))
 +                        && !sess.target.options.crt_static_allows_dylibs
 +                    {
-+                        cmd.link_staticlib(name)
++                        cmd.link_staticlib(name, verbatim)
 +                    } else {
-+                        cmd.link_dylib(name)
++                        cmd.link_dylib(name, verbatim,
++                                       match lib.kind {
++                                           NativeLibKind::Dylib { as_needed } => as_needed.unwrap_or(true),
++                                           NativeLibKind::Unspecified => true,
++                                           _ => unreachable!()
++                                       })
 +                    }
-+                },
-                 NativeLibKind::Framework => cmd.link_framework(name),
-                 NativeLibKind::StaticNoBundle => {
-                     // Link "static-nobundle" native libs only if the crate they originate from
+                 }
+-                NativeLibKind::Unspecified => cmd.link_dylib(name, verbatim, true),
+                 NativeLibKind::Framework { as_needed } => {
+                     cmd.link_framework(name, as_needed.unwrap_or(true))
+                 }
diff --git a/srcpkgs/rust/patches/0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch b/srcpkgs/rust/patches/0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch
index 85a8806e010b..112d012e11e5 100644
--- a/srcpkgs/rust/patches/0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch
+++ b/srcpkgs/rust/patches/0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch
@@ -1,5 +1,5 @@
 diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
-index 2fc9ab29f..276736159 100644
+index 2fc9ab29f92..27673615968 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 {
@@ -32,7 +32,7 @@ index 2fc9ab29f..276736159 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 5038a967d..b3c0e5bc4 100644
+index 5038a967d0a..b3c0e5bc416 100644
 --- a/compiler/rustc_target/src/spec/linux_musl_base.rs
 +++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
 @@ -1,16 +1,9 @@
@@ -53,10 +53,10 @@ index 5038a967d..b3c0e5bc4 100644
      base
  }
 diff --git a/config.toml.example b/config.toml.example
-index 6e5584797..5be9882a8 100644
+index 7fa5353d09b..98afe3743c0 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -638,15 +638,6 @@ changelog-seen = 2
+@@ -644,15 +644,6 @@ changelog-seen = 2
  # only use static libraries. If unset, the target's default linkage is used.
  #crt-static = <platform-specific> (bool)
  
@@ -73,7 +73,7 @@ index 6e5584797..5be9882a8 100644
  # `wasm32-wasi` target. If you are building wasm32-wasi target, make sure to
  # create a `[target.wasm32-wasi]` section and move this field there.
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index e750c2963..f6ba3032b 100644
+index e750c2963dd..f6ba3032b0d 100644
 --- a/src/bootstrap/cc_detect.rs
 +++ b/src/bootstrap/cc_detect.rs
 @@ -98,7 +98,7 @@ pub fn find(build: &mut Build) {
@@ -130,7 +130,7 @@ index e750c2963..f6ba3032b 100644
      }
  }
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index ee3527b6b..0a8b78327 100644
+index 112a6ea9398..4e42bcbbdad 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
 @@ -179,34 +179,7 @@ fn copy_self_contained_objects(
@@ -169,7 +169,7 @@ index ee3527b6b..0a8b78327 100644
          let srcdir = builder
              .wasi_root(target)
              .unwrap_or_else(|| {
-@@ -288,15 +261,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+@@ -290,15 +263,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
              .arg("--manifest-path")
              .arg(builder.src.join("library/test/Cargo.toml"));
  
@@ -186,7 +186,7 @@ index ee3527b6b..0a8b78327 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 483816b98..7517d757c 100644
+index 483816b98d6..7517d757cc0 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
 @@ -165,7 +165,6 @@ pub struct Config {
@@ -223,7 +223,7 @@ index 483816b98..7517d757c 100644
      wasi_root: Option<String>,
      qemu_rootfs: Option<String>,
      no_std: Option<bool>,
-@@ -846,7 +840,6 @@ impl Config {
+@@ -846,7 +840,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;
@@ -231,7 +231,7 @@ index 483816b98..7517d757c 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);
-@@ -892,8 +885,6 @@ impl Config {
+@@ -892,8 +885,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;
@@ -241,7 +241,7 @@ index 483816b98..7517d757c 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 999882a1c..7ccc2b73c 100755
+index 999882a1c04..7ccc2b73c5d 100755
 --- a/src/bootstrap/configure.py
 +++ b/src/bootstrap/configure.py
 @@ -109,34 +109,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
@@ -280,10 +280,10 @@ index 999882a1c..7ccc2b73c 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 24da44b93..c08bc6d94 100644
+index 347236c655a..1285fddb780 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -927,25 +927,6 @@ impl Build {
+@@ -947,25 +947,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
          }
      }
  
@@ -310,10 +310,10 @@ index 24da44b93..c08bc6d94 100644
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
          self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
 diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index ed0cbdf97..44937aed9 100644
+index a28762ac485..bf52ff0ae9a 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
-@@ -182,28 +182,6 @@ pub fn check(build: &mut Build) {
+@@ -183,28 +183,6 @@ pub fn check(build: &mut Build) {
              }
          }
  
@@ -339,6 +339,6 @@ index ed0cbdf97..44937aed9 100644
 -            }
 -        }
 -
-         if target.contains("msvc") {
+         if need_cmake && target.contains("msvc") {
              // There are three builds of cmake on windows: MSVC, MinGW, and
              // Cygwin. The Cygwin build does not have generators for Visual
diff --git a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch b/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
index 58ffd0776912..f5dd8cbd9132 100644
--- a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
+++ b/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
@@ -6,27 +6,12 @@ Date: Sat, 9 Sep 2017 00:14:16 -0500
 Subject: [PATCH 06/16] Prefer libgcc_eh over libunwind for musl
 
 ---
- src/libunwind/lib.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs
-index 9182e349b19..0377fbb58fc 100644
---- a/library/unwind/src/lib.rs
-+++ b/library/unwind/src/lib.rs
-@@ -23,6 +23,6 @@ cfg_if::cfg_if! {
- }
- 
- #[cfg(target_env = "musl")]
--#[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
-+#[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
- #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
- extern {}
-diff --git a/src/libunwind/build.rs b/src/libunwind/build.rs
-index f24d957..28828e5 100644
+diff --git a/library/unwind/build.rs b/library/unwind/build.rs
+index 0529d24a274..5ef3e67d47f 100644
 --- a/library/unwind/build.rs
 +++ b/library/unwind/build.rs
-@@ -5,17 +5,12 @@
-     let target = env::var("TARGET").expect("TARGET was not set");
+@@ -10,31 +10,12 @@ fn main() {
+     }
  
      if cfg!(feature = "llvm-libunwind")
 -        && ((target.contains("linux") && !target.contains("musl")) || target.contains("fuchsia"))
@@ -40,24 +25,58 @@ index f24d957..28828e5 100644
 -        // linking for Linux is handled in lib.rs
 -        if target.contains("musl") {
 -            llvm_libunwind::compile();
+-        } else if target.contains("android") {
+-            let build = cc::Build::new();
+-
+-            // Since ndk r23 beta 3 `libgcc` was replaced with `libunwind` thus
+-            // check if we have `libunwind` available and if so use it. Otherwise
+-            // fall back to `libgcc` to support older ndk versions.
+-            let has_unwind =
+-                build.is_flag_supported("-lunwind").expect("Unable to invoke compiler");
+-
+-            if has_unwind {
+-                println!("cargo:rustc-link-lib=unwind");
+-            } else {
+-                println!("cargo:rustc-link-lib=gcc");
+-            }
 -        }
      } else if target.contains("freebsd") {
          println!("cargo:rustc-link-lib=gcc_s");
-     } else if target.contains("rumprun") {
-@@ -143,15 +138,6 @@
-             cfg.file(root.join("src").join(src));
+     } else if target.contains("netbsd") {
+@@ -71,7 +52,6 @@ mod llvm_libunwind {
+     /// Compile the libunwind C/C++ source code.
+     pub fn compile() {
+         let target = env::var("TARGET").expect("TARGET was not set");
+-        let target_env = env::var("CARGO_CFG_TARGET_ENV").unwrap();
+         let mut cc_cfg = cc::Build::new();
+         let mut cpp_cfg = cc::Build::new();
+         let root = Path::new("../../src/llvm-project/libunwind");
+@@ -92,15 +72,6 @@ pub fn compile() {
+             cc_cfg.flag("-std=c99");
          }
  
--        if target_env == "musl" {
--            // use the same C compiler command to compile C++ code so we do not need to setup the
--            // C++ compiler env variables on the builders
--            cfg.cpp(false);
--            // linking for musl is handled in lib.rs
--            cfg.cargo_metadata(false);
--            println!("cargo:rustc-link-search=native={}", env::var("OUT_DIR").unwrap());
+-        if target.contains("x86_64-fortanix-unknown-sgx") || target_env == "musl" {
+-            // use the same GCC C compiler command to compile C++ code so we do not need to setup the
+-            // C++ compiler env variables on the builders.
+-            // Don't set this for clang++, as clang++ is able to compile this without libc++.
+-            if cpp_cfg.get_compiler().is_like_gnu() {
+-                cpp_cfg.cpp(false);
+-            }
 -        }
 -
-         cfg.compile("unwind");
+         for cfg in [&mut cc_cfg, &mut cpp_cfg].iter_mut() {
+             cfg.warnings(false);
+             cfg.flag("-fstrict-aliasing");
+diff --git a/library/unwind/src/lib.rs b/library/unwind/src/lib.rs
+index eaeec72fbb5..4cc721031a3 100644
+--- a/library/unwind/src/lib.rs
++++ b/library/unwind/src/lib.rs
+@@ -48,7 +48,7 @@
+         #[link(name = "unwind", cfg(not(target_feature = "crt-static")))]
+         extern "C" {}
+     } else {
+-        #[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
++        #[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
+         #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
+         extern "C" {}
      }
- }
-
diff --git a/srcpkgs/rust/patches/xxx-ppcle-ccrs.patch b/srcpkgs/rust/patches/xxx-ppcle-ccrs.patch
deleted file mode 100644
index 06f57aaec5cf..000000000000
--- a/srcpkgs/rust/patches/xxx-ppcle-ccrs.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From dc1de5be2b7908adb493b36f5079064083ed9507 Mon Sep 17 00:00:00 2001
-From: q66 <daniel@octaforge.org>
-Date: Sat, 3 Jul 2021 19:00:46 +0200
-Subject: [PATCH 1/2] cc-1.0.60: fix powerpcle being matched as as msvc
-
----
- vendor/cc-1.0.60/src/lib.rs | 6 +-----
- 1 file changed, 1 insertion(+), 5 deletions(-)
-
-diff --git a/vendor/cc-1.0.60/src/lib.rs b/vendor/cc-1.0.60/src/lib.rs
-index aff6be86..f428ecbb 100644
---- a/vendor/cc-1.0.60/src/lib.rs
-+++ b/vendor/cc-1.0.60/src/lib.rs
-@@ -2556,11 +2556,7 @@ impl Tool {
-         let family = if let Some(fname) = path.file_name().and_then(|p| p.to_str()) {
-             if fname.contains("clang-cl") {
-                 ToolFamily::Msvc { clang_cl: true }
--            } else if fname.contains("cl")
--                && !fname.contains("cloudabi")
--                && !fname.contains("uclibc")
--                && !fname.contains("clang")
--            {
-+            } else if fname.ends_with("cl") || fname == "cl.exe" {
-                 ToolFamily::Msvc { clang_cl: false }
-             } else if fname.contains("clang") {
-                 match clang_driver {
--- 
-2.31.1
-
diff --git a/srcpkgs/rust/patches/xxx-ppcle-gcc.patch b/srcpkgs/rust/patches/xxx-ppcle-gcc.patch
deleted file mode 100644
index b4150fcd8269..000000000000
--- a/srcpkgs/rust/patches/xxx-ppcle-gcc.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From bf983e79364d2d1c4a22857fadae8fcdc6646ef3 Mon Sep 17 00:00:00 2001
-From: q66 <daniel@octaforge.org>
-Date: Sun, 4 Jul 2021 02:17:26 +0200
-Subject: [PATCH] gcc: fix powerpcle being matched as msvc
-
----
- vendor/gcc/src/lib.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/vendor/gcc/src/lib.rs b/vendor/gcc/src/lib.rs
-index 7980281f..05787ceb 100644
---- a/vendor/gcc/src/lib.rs
-+++ b/vendor/gcc/src/lib.rs
-@@ -1549,7 +1549,7 @@ impl Tool {
-         let family = if let Some(fname) = path.file_name().and_then(|p| p.to_str()) {
-             if fname.contains("clang") {
-                 ToolFamily::Clang
--            } else if fname.contains("cl") && !fname.contains("uclibc") {
-+            } else if fname.ends_with("cl") || fname == "cl.exe" {
-                 ToolFamily::Msvc
-             } else {
-                 ToolFamily::Gnu
--- 
-2.31.1
-
diff --git a/srcpkgs/rust/patches/xxx-ppcle.patch b/srcpkgs/rust/patches/xxx-ppcle.patch
index ab5c0c56c925..9473e7ad98f3 100644
--- a/srcpkgs/rust/patches/xxx-ppcle.patch
+++ b/srcpkgs/rust/patches/xxx-ppcle.patch
@@ -30,11 +30,7 @@ Subject: [PATCH] initial ppcle port
  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-1.0.60/src/lib.rs                       |  1 +
  vendor/cc/src/lib.rs                              |  1 +
- vendor/gcc/src/lib.rs                             |  3 ++-
- vendor/jemallocator/benches/roundtrip.rs          |  3 ++-
- vendor/jemallocator/src/lib.rs                    |  3 ++-
  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 +++++++++++++++
@@ -57,9 +53,9 @@ index c2e9dba6..8147a3c3 100644
              target.os == "linux" && target.arch == "powerpc" && target_env_gnu_like;
 +        let linux_powerpcle_gnu_like =
 +            target.os == "linux" && target.arch == "powerpcle" && target_env_gnu_like;
+         use SpecAbi::*;
          let rust_abi = matches!(sig.abi, RustIntrinsic | PlatformIntrinsic | Rust | RustCall);
  
-         // Handle safe Rust thin and fat pointers.
 @@ -2850,7 +2852,8 @@ where
                      || (!win_x64_gnu
                          && !linux_s390x_gnu_like
@@ -394,18 +390,6 @@ index 7dbd7094..08c9de3c 100644
      ("powerpc64", "powerpc64"),
      ("powerpc64le", "powerpc64"),
      ("riscv64gc", "riscv64"),
-diff --git a/vendor/cc-1.0.60/src/lib.rs b/vendor/cc-1.0.60/src/lib.rs
-index f428ecbb..841e459a 100644
---- a/vendor/cc-1.0.60/src/lib.rs
-+++ b/vendor/cc-1.0.60/src/lib.rs
-@@ -2302,6 +2302,7 @@ impl Build {
-             "mipsisa64r6-unknown-linux-gnuabi64" => Some("mipsisa64r6-linux-gnuabi64"),
-             "mipsisa64r6el-unknown-linux-gnuabi64" => Some("mipsisa64r6el-linux-gnuabi64"),
-             "powerpc-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
-+            "powerpcle-unknown-linux-gnu" => Some("powerpcle-linux-gnu"),
-             "powerpc-unknown-linux-gnuspe" => Some("powerpc-linux-gnuspe"),
-             "powerpc-unknown-netbsd" => Some("powerpc--netbsd"),
-             "powerpc64-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
 diff --git a/vendor/cc/src/lib.rs b/vendor/cc/src/lib.rs
 index 5051b296..286c2fb7 100644
 --- a/vendor/cc/src/lib.rs
@@ -418,48 +402,6 @@ 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/gcc/src/lib.rs b/vendor/gcc/src/lib.rs
-index 1fe73012..7980281f 100644
---- a/vendor/gcc/src/lib.rs
-+++ b/vendor/gcc/src/lib.rs
-@@ -1367,7 +1367,8 @@ impl Build {
-                         "mips64el-unknown-linux-gnuabi64" => Some("mips64el-linux-gnuabi64"),
-                         "powerpc-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
-                         "powerpc-unknown-netbsd" => Some("powerpc--netbsd"),
--                        "powerpc64-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
-+                        "powerpcle-unknown-linux-gnu" => Some("powerpcle-linux-gnu"),
-+                        "powerpc64-unknown-linux-gnu" => Some("powerpc64-linux-gnu"),
-                         "powerpc64le-unknown-linux-gnu" => Some("powerpc64le-linux-gnu"),
-                         "s390x-unknown-linux-gnu" => Some("s390x-linux-gnu"),
-                         "sparc64-unknown-netbsd" => Some("sparc64--netbsd"),
-diff --git a/vendor/jemallocator/benches/roundtrip.rs b/vendor/jemallocator/benches/roundtrip.rs
-index eddbb6bb..db81596b 100644
---- a/vendor/jemallocator/benches/roundtrip.rs
-+++ b/vendor/jemallocator/benches/roundtrip.rs
-@@ -26,7 +26,8 @@ static A: Jemalloc = Jemalloc;
-     target_arch = "arm",
-     target_arch = "mips",
-     target_arch = "mipsel",
--    target_arch = "powerpc"
-+    target_arch = "powerpc",
-+    target_arch = "powerpcle"
- )))]
- const MIN_ALIGN: usize = 8;
- #[cfg(all(any(
-diff --git a/vendor/jemallocator/src/lib.rs b/vendor/jemallocator/src/lib.rs
-index f0a3692d..43889c55 100644
---- a/vendor/jemallocator/src/lib.rs
-+++ b/vendor/jemallocator/src/lib.rs
-@@ -37,7 +37,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"
- )))]
- const MIN_ALIGN: usize = 8;
- #[cfg(all(any(
 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
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index f31ea7b87b81..dea0d893f041 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.53.0
+version=1.54.0
 revision=1
 _rust_dist_version=1.53.0
 wrksrc="rustc-${version}-src"
@@ -20,7 +20,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=5cf7ca39a10f6bf4e0b0bd15e3b9a61ce721f301e12d148262e5ba968ab825b9
+checksum=ac8511633e9b5a65ad030a1a2e5bdaa841fdfe3132f2baaa52cc04e71c6c6976
 lib32disabled=yes
 
 build_options="bindist"
@@ -189,10 +189,7 @@ post_patch() {
 	# clear out all the checksum nonsense of patched vendor crates
 	_clear_vendor_checksums libc
 	_clear_vendor_checksums typenum
-	_clear_vendor_checksums cc-1.0.60
-	_clear_vendor_checksums gcc
 	_clear_vendor_checksums cc
-	_clear_vendor_checksums jemallocator
 	_clear_vendor_checksums rustc-ap-rustc_target
 	_clear_vendor_checksums target-lexicon
 	_clear_vendor_checksums tikv-jemallocator

From dd0ed9238cb5467c6102dc6577377d4e9834a3e4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Tue, 17 Aug 2021 18:02:46 -0300
Subject: [PATCH 2/2] cargo: update to 0.55.0.

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

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index 075646348d9f..77b804d61249 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo'
 pkgname=cargo
-version=0.54.0
+version=0.55.0
 revision=1
 wrksrc="cargo-${version}"
 build_helper=rust
@@ -13,7 +13,7 @@ license="MIT, Apache-2.0"
 homepage="https://crates.io/"
 distfiles="https://github.com/rust-lang/cargo/archive/${version}.tar.gz
  https://github.com/crossbeam-rs/crossbeam/archive/refs/tags/crossbeam-utils-0.8.5.tar.gz"
-checksum="4627e7eb0be3150d878ed695a1ef874885ff84325019499af61f5e3ade410d4b
+checksum="dd4cf593aee4114b73234d36e9899784c1fa037b266a29ad9de3e9d4a928b577
  57db07eb38b0aaf7951c79b4639819cb84bc4269507091afea7267e10a54e079"
 replaces="cargo-tree>=0"
 

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (4 preceding siblings ...)
  2021-08-19  5:31 ` ericonr
@ 2021-09-17 14:18 ` ram02z
  2021-09-17 23:01 ` cinerea0
                   ` (32 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: ram02z @ 2021-09-17 14:18 UTC (permalink / raw)
  To: ml

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

New comment by ram02z on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-921835111

Comment:
Rust packages that have bumped the `clap` crate to v3.0.0-beta4 require Rust 1.54.0

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (5 preceding siblings ...)
  2021-09-17 14:18 ` ram02z
@ 2021-09-17 23:01 ` cinerea0
  2021-10-04  1:53 ` uninhm
                   ` (31 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: cinerea0 @ 2021-09-17 23:01 UTC (permalink / raw)
  To: ml

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

New comment by cinerea0 on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-922124447

Comment:
Also, the current stable Rust version is 1.55.0.

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (6 preceding siblings ...)
  2021-09-17 23:01 ` cinerea0
@ 2021-10-04  1:53 ` uninhm
  2021-10-14 17:51 ` cinerea0
                   ` (30 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: uninhm @ 2021-10-04  1:53 UTC (permalink / raw)
  To: ml

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

New comment by uninhm on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-933083512

Comment:
I need this to update the Kooha package :)

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (7 preceding siblings ...)
  2021-10-04  1:53 ` uninhm
@ 2021-10-14 17:51 ` cinerea0
  2021-10-21 17:49 ` cinerea0
                   ` (29 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: cinerea0 @ 2021-10-14 17:51 UTC (permalink / raw)
  To: ml

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

New comment by cinerea0 on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-943585097

Comment:
`dua-cli` and `nushell` also require a newer rust for them to be updated.

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (8 preceding siblings ...)
  2021-10-14 17:51 ` cinerea0
@ 2021-10-21 17:49 ` cinerea0
  2021-10-21 17:57 ` cinerea0
                   ` (28 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: cinerea0 @ 2021-10-21 17:49 UTC (permalink / raw)
  To: ml

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

New comment by cinerea0 on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-922124447

Comment:
Also, the current stable Rust version is 1.56.0.

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (9 preceding siblings ...)
  2021-10-21 17:49 ` cinerea0
@ 2021-10-21 17:57 ` cinerea0
  2021-10-22  1:38 ` cinerea0
                   ` (27 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: cinerea0 @ 2021-10-21 17:57 UTC (permalink / raw)
  To: ml

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

New comment by cinerea0 on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-943585097

Comment:
Other packages I've found that require a newer rust:
* dua-cli
* nushell
* zoxide

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (10 preceding siblings ...)
  2021-10-21 17:57 ` cinerea0
@ 2021-10-22  1:38 ` cinerea0
  2021-10-30  5:14 ` cinerea0
                   ` (26 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: cinerea0 @ 2021-10-22  1:38 UTC (permalink / raw)
  To: ml

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

New comment by cinerea0 on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-943585097

Comment:
Other packages I've found that require a newer rust:
* dua-cli
* nushell
* pueue
* zoxide

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (11 preceding siblings ...)
  2021-10-22  1:38 ` cinerea0
@ 2021-10-30  5:14 ` cinerea0
  2021-11-01  5:39 ` cinerea0
                   ` (25 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: cinerea0 @ 2021-10-30  5:14 UTC (permalink / raw)
  To: ml

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

New comment by cinerea0 on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-943585097

Comment:
Other packages I've found that require a newer rust:
* dua-cli
* nushell
* pueue
* rdedup
* zoxide

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (12 preceding siblings ...)
  2021-10-30  5:14 ` cinerea0
@ 2021-11-01  5:39 ` cinerea0
  2021-11-02  5:27 ` ericonr
                   ` (24 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: cinerea0 @ 2021-11-01  5:39 UTC (permalink / raw)
  To: ml

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

New comment by cinerea0 on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-955948558

Comment:
Versions of Rust up to and including 1.56.0 have apparently been affected by [a CVE dealing with "bidirectional override" unicode codepoints](https://blog.rust-lang.org/2021/11/01/cve-2021-42574.html). As such, this PR should target version 1.56.1, which includes compiler warnings to stop people from triggering the vulnerability.

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (13 preceding siblings ...)
  2021-11-01  5:39 ` cinerea0
@ 2021-11-02  5:27 ` ericonr
  2021-11-04  3:59 ` cinerea0
                   ` (23 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: ericonr @ 2021-11-02  5:27 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-957112778

Comment:
@cinerea0 that's fortunately mostly irrelevant as far as the compiler goes, just feels like them jumping the gun so they can be the first to claim protection...

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (14 preceding siblings ...)
  2021-11-02  5:27 ` ericonr
@ 2021-11-04  3:59 ` cinerea0
  2021-11-11  2:26 ` cinerea0
                   ` (22 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: cinerea0 @ 2021-11-04  3:59 UTC (permalink / raw)
  To: ml

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

New comment by cinerea0 on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-943585097

Comment:
Other packages I've found that require a newer rust:
* broot
* dua-cli
* nushell
* pueue
* rdedup
* zoxide

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (15 preceding siblings ...)
  2021-11-04  3:59 ` cinerea0
@ 2021-11-11  2:26 ` cinerea0
  2021-11-14  8:04 ` kartikynwa
                   ` (21 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: cinerea0 @ 2021-11-11  2:26 UTC (permalink / raw)
  To: ml

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

New comment by cinerea0 on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-943585097

Comment:
Other packages I've found that require a newer rust:
* broot
* dua-cli
* nushell
* pueue
* rdedup
* starship
* zoxide

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (16 preceding siblings ...)
  2021-11-11  2:26 ` cinerea0
@ 2021-11-14  8:04 ` kartikynwa
  2021-11-23 23:29 ` cinerea0
                   ` (20 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: kartikynwa @ 2021-11-14  8:04 UTC (permalink / raw)
  To: ml

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

New comment by kartikynwa on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-968243229

Comment:
Maybe someone could ask the people from Alpine for help. Their edge repositories are using version 1.56.0-rc{something} of rust.

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (17 preceding siblings ...)
  2021-11-14  8:04 ` kartikynwa
@ 2021-11-23 23:29 ` cinerea0
  2021-12-03  3:33 ` cinerea0
                   ` (19 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: cinerea0 @ 2021-11-23 23:29 UTC (permalink / raw)
  To: ml

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

New comment by cinerea0 on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-943585097

Comment:
Other packages I've found that require a newer rust:
* broot
* dua-cli
* fselect
* nushell
* pueue
* rdedup
* starship
* zoxide

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (18 preceding siblings ...)
  2021-11-23 23:29 ` cinerea0
@ 2021-12-03  3:33 ` cinerea0
  2021-12-06  1:11 ` flyxi121
                   ` (18 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: cinerea0 @ 2021-12-03  3:33 UTC (permalink / raw)
  To: ml

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

New comment by cinerea0 on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-985187222

Comment:
Ugh, 1.57 is already out -_-

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (19 preceding siblings ...)
  2021-12-03  3:33 ` cinerea0
@ 2021-12-06  1:11 ` flyxi121
  2021-12-06  1:55 ` ericonr
                   ` (17 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: flyxi121 @ 2021-12-06  1:11 UTC (permalink / raw)
  To: ml

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

New comment by flyxi121 on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-986351583

Comment:
I could spend some time looking into this but I'm not sure about some things. Can I try and bump rust to version 1.57 directly or is the formality to first support rust 1.54 bootstrapping it from 1.53 and working the way up? 

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (20 preceding siblings ...)
  2021-12-06  1:11 ` flyxi121
@ 2021-12-06  1:55 ` ericonr
  2021-12-06 23:06 ` flyxi121
                   ` (16 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: ericonr @ 2021-12-06  1:55 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-986368866

Comment:
Nope, we use their pre-built compilers, because otherwise that way lies insanity. You're welcome to try it!

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (21 preceding siblings ...)
  2021-12-06  1:55 ` ericonr
@ 2021-12-06 23:06 ` flyxi121
  2021-12-07 17:52 ` flyxi121
                   ` (15 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: flyxi121 @ 2021-12-06 23:06 UTC (permalink / raw)
  To: ml

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

New comment by flyxi121 on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-987338061

Comment:
Does it have to compile on each architecture by itself or is it enough if x86_64 and x86_64-musl can cross compile to every other architecture?

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (22 preceding siblings ...)
  2021-12-06 23:06 ` flyxi121
@ 2021-12-07 17:52 ` flyxi121
  2021-12-07 18:49 ` flyxi121
                   ` (14 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: flyxi121 @ 2021-12-07 17:52 UTC (permalink / raw)
  To: ml

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

New comment by flyxi121 on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-988145528

Comment:
There are currently two ways that we could bundle the rust toolchain for musl:
1. We can either choose the way alpine does it and link the rust toolchain dynamically against musl. They do it by creating custom rust build targets and some other patches. Without these patches cargo assumes the default musl build target which expects to be statically linked against musl. This leads to cargo not being able to build executables for its own target.
Example: For `cargo install cargo` to work, `RUSTFLAGS="-C target-feature=-crt-static"` has to be set explicitly to build a functioning executable.
I am not 100% sure that it works like that (maybe some of you more experienced rusticeans might be able to lend a hand :D) but I know for a fact, that without patching, a dynamically linked rust toolchain against musl does not work.

2. A probably much easier way of doing things would be just to go with the default, link everything statically against musl but I have not looked into this yet...

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (23 preceding siblings ...)
  2021-12-07 17:52 ` flyxi121
@ 2021-12-07 18:49 ` flyxi121
  2021-12-07 19:03 ` ericonr
                   ` (13 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: flyxi121 @ 2021-12-07 18:49 UTC (permalink / raw)
  To: ml

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

New comment by flyxi121 on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-988145528

Comment:
There are currently two ways that we could bundle the rust toolchain for musl:
1. We can either choose the way alpine does it and link the rust toolchain dynamically against musl. They do it by creating custom rust build targets and some other patches. Without these patches cargo assumes the default musl build target which expects to be statically linked against musl. This leads to cargo not being able to build executables for its own target.
Example: For `cargo install cargo` to work, `RUSTFLAGS="-C target-feature=-crt-static"` has to be set explicitly to build a functioning executable.
I am not 100% sure that it works like that (maybe some of you more experienced rusticeans might be able to lend a hand :D) but I know for a fact, that without patching, a dynamically linked rust toolchain against musl does not work.

2. A probably much easier way of doing things would be just to go with the default, link everything statically against musl but I have not looked into this yet...

Edit: I should mention that with option 2 the rust toolchain would also have to be linked statically against llvm as far as I am aware, which is the reason why alpine choses to go with dynamically linking both (please correct me if I am wrong)

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (24 preceding siblings ...)
  2021-12-07 18:49 ` flyxi121
@ 2021-12-07 19:03 ` ericonr
  2021-12-07 19:03 ` [PR PATCH] [Updated] " ericonr
                   ` (12 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: ericonr @ 2021-12-07 19:03 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-988190970

Comment:
Instead of going with the way Alpine did it, we patch the toolchain to use dynamic linking for the default `musl` targets.

There's unfortunately something wrong with the patches currently being applied in this PR, and it's failing to link libc in, apparently.

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

* Re: [PR PATCH] [Updated] [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (25 preceding siblings ...)
  2021-12-07 19:03 ` ericonr
@ 2021-12-07 19:03 ` ericonr
  2021-12-07 19:12 ` flyxi121
                   ` (11 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: ericonr @ 2021-12-07 19:03 UTC (permalink / raw)
  To: ml

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

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

https://github.com/ericonr/void-packages rust
https://github.com/void-linux/void-packages/pull/32555

[WIP] Rust 1.54.0
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

musl build (at least) is currently broken, accepting help:

```
Rustbook (x86_64-unknown-linux-musl) - unstable-book
Building stage0 std artifacts (x86_64-unknown-linux-musl -> x86_64-unknown-linux-musl)
   Compiling compiler_builtins v0.1.45
   Compiling core v0.0.0 (/builddir/rustc-1.54.0-src/library/core)
   Compiling libc v0.2.93
   Compiling cc v1.0.68
   Compiling std v0.0.0 (/builddir/rustc-1.54.0-src/library/std)
   Compiling unwind v0.0.0 (/builddir/rustc-1.54.0-src/library/unwind)
   Compiling rustc-std-workspace-core v1.99.0 (/builddir/rustc-1.54.0-src/library/rustc-std-workspace-core)
   Compiling alloc v0.0.0 (/builddir/rustc-1.54.0-src/library/alloc)
   Compiling cfg-if v0.1.10
   Compiling adler v0.2.3
   Compiling rustc-demangle v0.1.18
error: could not find native static library `c`, perhaps an -L flag is missing?

error: aborting due to previous error

error: could not compile `libc`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
command did not execute successfully: "/builddir/rustc-1.54.0-src/stage0-bootstrap/bin/cargo" "build" "--target" "x86_64-unknown-linux-musl" "-Zbinary-dep-depinfo" "-j" "8" "--release" "--locked" "--frozen" "--features" "panic-unwind backtrace" "--manifest-path" "/builddir/rustc-1.54.0-src/library/test/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit status: 101
failed to run: /builddir/rustc-1.54.0-src/build/bootstrap/debug/bootstrap dist --jobs 8
Build completed unsuccessfully in 0:02:40
```

[ci skip]

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

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

From a9b0a16332027084e5881f21cdf1523ddb350984 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Tue, 17 Aug 2021 18:02:42 -0300
Subject: [PATCH 1/2] rust: update to 1.54.0.

Co-authored-by: Isaac Freund <ifreund@ifreund.xyz>
---
 ...ative-libraries-when-linking-static-.patch | 42 ++++------
 ...dlib-and-musl_root-from-musl-targets.patch | 32 +++----
 ...fer-libgcc_eh-over-libunwind-on-musl.patch | 83 ++++++++++++-------
 srcpkgs/rust/patches/xxx-ppcle-ccrs.patch     | 29 -------
 srcpkgs/rust/patches/xxx-ppcle-gcc.patch      | 25 ------
 srcpkgs/rust/patches/xxx-ppcle.patch          | 60 +-------------
 srcpkgs/rust/template                         |  7 +-
 7 files changed, 88 insertions(+), 190 deletions(-)
 delete mode 100644 srcpkgs/rust/patches/xxx-ppcle-ccrs.patch
 delete mode 100644 srcpkgs/rust/patches/xxx-ppcle-gcc.patch

diff --git a/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch b/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch
index 0fd1ca7d2dfa..b2e61ddb0bad 100644
--- a/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch
+++ b/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch
@@ -12,29 +12,17 @@ executables.
 
 Fixes #54243
 ---
- src/librustc_codegen_ssa/back/link.rs | 18 ++++++++++++++----
- 1 file changed, 14 insertions(+), 4 deletions(-)
-
 diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
-index 8bc4e6442..52ff7a52e 100644
+index 6c9ec9e7b0d..60f43f70e4e 100644
 --- a/compiler/rustc_codegen_ssa/src/back/link.rs
 +++ b/compiler/rustc_codegen_ssa/src/back/link.rs
-@@ -2081,8 +2081,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(
-     }
- }
+@@ -2396,10 +2396,24 @@ fn add_upstream_native_libraries(
  
--/// Link in all of our upstream crates' native dependencies. Remember that all of these upstream
--/// native dependencies are all non-static dependencies. We've got two cases then:
-+/// Link in all of our upstream crates' native dependencies. We have two cases:
- ///
- /// 1. The upstream crate is an rlib. In this case we *must* link in the native dependency because
- /// the rlib is just an archive.
-@@ -2015,7 +2013,19 @@
-                 continue;
-             }
+             let verbatim = lib.verbatim.unwrap_or(false);
              match lib.kind {
--                NativeLibKind::Dylib | NativeLibKind::Unspecified => cmd.link_dylib(name),
-+                NativeLibKind::Dylib | NativeLibKind::Unspecified => {
+-                NativeLibKind::Dylib { as_needed } => {
+-                    cmd.link_dylib(name, verbatim, as_needed.unwrap_or(true))
++                NativeLibKind::Dylib { .. } | NativeLibKind::Unspecified => {
 +                    // On some targets, like Linux, linking a static executable inhibits using
 +                    // dylibs at all. Force native libraries to be static, even if for example
 +                    // an upstream rlib was originally linked against a native shared library.
@@ -42,11 +30,17 @@ index 8bc4e6442..52ff7a52e 100644
 +                        && sess.crt_static(Some(crate_type))
 +                        && !sess.target.options.crt_static_allows_dylibs
 +                    {
-+                        cmd.link_staticlib(name)
++                        cmd.link_staticlib(name, verbatim)
 +                    } else {
-+                        cmd.link_dylib(name)
++                        cmd.link_dylib(name, verbatim,
++                                       match lib.kind {
++                                           NativeLibKind::Dylib { as_needed } => as_needed.unwrap_or(true),
++                                           NativeLibKind::Unspecified => true,
++                                           _ => unreachable!()
++                                       })
 +                    }
-+                },
-                 NativeLibKind::Framework => cmd.link_framework(name),
-                 NativeLibKind::StaticNoBundle => {
-                     // Link "static-nobundle" native libs only if the crate they originate from
+                 }
+-                NativeLibKind::Unspecified => cmd.link_dylib(name, verbatim, true),
+                 NativeLibKind::Framework { as_needed } => {
+                     cmd.link_framework(name, as_needed.unwrap_or(true))
+                 }
diff --git a/srcpkgs/rust/patches/0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch b/srcpkgs/rust/patches/0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch
index 85a8806e010b..112d012e11e5 100644
--- a/srcpkgs/rust/patches/0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch
+++ b/srcpkgs/rust/patches/0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch
@@ -1,5 +1,5 @@
 diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
-index 2fc9ab29f..276736159 100644
+index 2fc9ab29f92..27673615968 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 {
@@ -32,7 +32,7 @@ index 2fc9ab29f..276736159 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 5038a967d..b3c0e5bc4 100644
+index 5038a967d0a..b3c0e5bc416 100644
 --- a/compiler/rustc_target/src/spec/linux_musl_base.rs
 +++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
 @@ -1,16 +1,9 @@
@@ -53,10 +53,10 @@ index 5038a967d..b3c0e5bc4 100644
      base
  }
 diff --git a/config.toml.example b/config.toml.example
-index 6e5584797..5be9882a8 100644
+index 7fa5353d09b..98afe3743c0 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -638,15 +638,6 @@ changelog-seen = 2
+@@ -644,15 +644,6 @@ changelog-seen = 2
  # only use static libraries. If unset, the target's default linkage is used.
  #crt-static = <platform-specific> (bool)
  
@@ -73,7 +73,7 @@ index 6e5584797..5be9882a8 100644
  # `wasm32-wasi` target. If you are building wasm32-wasi target, make sure to
  # create a `[target.wasm32-wasi]` section and move this field there.
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index e750c2963..f6ba3032b 100644
+index e750c2963dd..f6ba3032b0d 100644
 --- a/src/bootstrap/cc_detect.rs
 +++ b/src/bootstrap/cc_detect.rs
 @@ -98,7 +98,7 @@ pub fn find(build: &mut Build) {
@@ -130,7 +130,7 @@ index e750c2963..f6ba3032b 100644
      }
  }
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index ee3527b6b..0a8b78327 100644
+index 112a6ea9398..4e42bcbbdad 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
 @@ -179,34 +179,7 @@ fn copy_self_contained_objects(
@@ -169,7 +169,7 @@ index ee3527b6b..0a8b78327 100644
          let srcdir = builder
              .wasi_root(target)
              .unwrap_or_else(|| {
-@@ -288,15 +261,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+@@ -290,15 +263,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
              .arg("--manifest-path")
              .arg(builder.src.join("library/test/Cargo.toml"));
  
@@ -186,7 +186,7 @@ index ee3527b6b..0a8b78327 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 483816b98..7517d757c 100644
+index 483816b98d6..7517d757cc0 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
 @@ -165,7 +165,6 @@ pub struct Config {
@@ -223,7 +223,7 @@ index 483816b98..7517d757c 100644
      wasi_root: Option<String>,
      qemu_rootfs: Option<String>,
      no_std: Option<bool>,
-@@ -846,7 +840,6 @@ impl Config {
+@@ -846,7 +840,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;
@@ -231,7 +231,7 @@ index 483816b98..7517d757c 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);
-@@ -892,8 +885,6 @@ impl Config {
+@@ -892,8 +885,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;
@@ -241,7 +241,7 @@ index 483816b98..7517d757c 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 999882a1c..7ccc2b73c 100755
+index 999882a1c04..7ccc2b73c5d 100755
 --- a/src/bootstrap/configure.py
 +++ b/src/bootstrap/configure.py
 @@ -109,34 +109,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
@@ -280,10 +280,10 @@ index 999882a1c..7ccc2b73c 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 24da44b93..c08bc6d94 100644
+index 347236c655a..1285fddb780 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -927,25 +927,6 @@ impl Build {
+@@ -947,25 +947,6 @@ fn crt_static(&self, target: TargetSelection) -> Option<bool> {
          }
      }
  
@@ -310,10 +310,10 @@ index 24da44b93..c08bc6d94 100644
      fn wasi_root(&self, target: TargetSelection) -> Option<&Path> {
          self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p)
 diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
-index ed0cbdf97..44937aed9 100644
+index a28762ac485..bf52ff0ae9a 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
-@@ -182,28 +182,6 @@ pub fn check(build: &mut Build) {
+@@ -183,28 +183,6 @@ pub fn check(build: &mut Build) {
              }
          }
  
@@ -339,6 +339,6 @@ index ed0cbdf97..44937aed9 100644
 -            }
 -        }
 -
-         if target.contains("msvc") {
+         if need_cmake && target.contains("msvc") {
              // There are three builds of cmake on windows: MSVC, MinGW, and
              // Cygwin. The Cygwin build does not have generators for Visual
diff --git a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch b/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
index 58ffd0776912..f5dd8cbd9132 100644
--- a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
+++ b/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
@@ -6,27 +6,12 @@ Date: Sat, 9 Sep 2017 00:14:16 -0500
 Subject: [PATCH 06/16] Prefer libgcc_eh over libunwind for musl
 
 ---
- src/libunwind/lib.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs
-index 9182e349b19..0377fbb58fc 100644
---- a/library/unwind/src/lib.rs
-+++ b/library/unwind/src/lib.rs
-@@ -23,6 +23,6 @@ cfg_if::cfg_if! {
- }
- 
- #[cfg(target_env = "musl")]
--#[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
-+#[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
- #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
- extern {}
-diff --git a/src/libunwind/build.rs b/src/libunwind/build.rs
-index f24d957..28828e5 100644
+diff --git a/library/unwind/build.rs b/library/unwind/build.rs
+index 0529d24a274..5ef3e67d47f 100644
 --- a/library/unwind/build.rs
 +++ b/library/unwind/build.rs
-@@ -5,17 +5,12 @@
-     let target = env::var("TARGET").expect("TARGET was not set");
+@@ -10,31 +10,12 @@ fn main() {
+     }
  
      if cfg!(feature = "llvm-libunwind")
 -        && ((target.contains("linux") && !target.contains("musl")) || target.contains("fuchsia"))
@@ -40,24 +25,58 @@ index f24d957..28828e5 100644
 -        // linking for Linux is handled in lib.rs
 -        if target.contains("musl") {
 -            llvm_libunwind::compile();
+-        } else if target.contains("android") {
+-            let build = cc::Build::new();
+-
+-            // Since ndk r23 beta 3 `libgcc` was replaced with `libunwind` thus
+-            // check if we have `libunwind` available and if so use it. Otherwise
+-            // fall back to `libgcc` to support older ndk versions.
+-            let has_unwind =
+-                build.is_flag_supported("-lunwind").expect("Unable to invoke compiler");
+-
+-            if has_unwind {
+-                println!("cargo:rustc-link-lib=unwind");
+-            } else {
+-                println!("cargo:rustc-link-lib=gcc");
+-            }
 -        }
      } else if target.contains("freebsd") {
          println!("cargo:rustc-link-lib=gcc_s");
-     } else if target.contains("rumprun") {
-@@ -143,15 +138,6 @@
-             cfg.file(root.join("src").join(src));
+     } else if target.contains("netbsd") {
+@@ -71,7 +52,6 @@ mod llvm_libunwind {
+     /// Compile the libunwind C/C++ source code.
+     pub fn compile() {
+         let target = env::var("TARGET").expect("TARGET was not set");
+-        let target_env = env::var("CARGO_CFG_TARGET_ENV").unwrap();
+         let mut cc_cfg = cc::Build::new();
+         let mut cpp_cfg = cc::Build::new();
+         let root = Path::new("../../src/llvm-project/libunwind");
+@@ -92,15 +72,6 @@ pub fn compile() {
+             cc_cfg.flag("-std=c99");
          }
  
--        if target_env == "musl" {
--            // use the same C compiler command to compile C++ code so we do not need to setup the
--            // C++ compiler env variables on the builders
--            cfg.cpp(false);
--            // linking for musl is handled in lib.rs
--            cfg.cargo_metadata(false);
--            println!("cargo:rustc-link-search=native={}", env::var("OUT_DIR").unwrap());
+-        if target.contains("x86_64-fortanix-unknown-sgx") || target_env == "musl" {
+-            // use the same GCC C compiler command to compile C++ code so we do not need to setup the
+-            // C++ compiler env variables on the builders.
+-            // Don't set this for clang++, as clang++ is able to compile this without libc++.
+-            if cpp_cfg.get_compiler().is_like_gnu() {
+-                cpp_cfg.cpp(false);
+-            }
 -        }
 -
-         cfg.compile("unwind");
+         for cfg in [&mut cc_cfg, &mut cpp_cfg].iter_mut() {
+             cfg.warnings(false);
+             cfg.flag("-fstrict-aliasing");
+diff --git a/library/unwind/src/lib.rs b/library/unwind/src/lib.rs
+index eaeec72fbb5..4cc721031a3 100644
+--- a/library/unwind/src/lib.rs
++++ b/library/unwind/src/lib.rs
+@@ -48,7 +48,7 @@
+         #[link(name = "unwind", cfg(not(target_feature = "crt-static")))]
+         extern "C" {}
+     } else {
+-        #[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
++        #[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
+         #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
+         extern "C" {}
      }
- }
-
diff --git a/srcpkgs/rust/patches/xxx-ppcle-ccrs.patch b/srcpkgs/rust/patches/xxx-ppcle-ccrs.patch
deleted file mode 100644
index 06f57aaec5cf..000000000000
--- a/srcpkgs/rust/patches/xxx-ppcle-ccrs.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From dc1de5be2b7908adb493b36f5079064083ed9507 Mon Sep 17 00:00:00 2001
-From: q66 <daniel@octaforge.org>
-Date: Sat, 3 Jul 2021 19:00:46 +0200
-Subject: [PATCH 1/2] cc-1.0.60: fix powerpcle being matched as as msvc
-
----
- vendor/cc-1.0.60/src/lib.rs | 6 +-----
- 1 file changed, 1 insertion(+), 5 deletions(-)
-
-diff --git a/vendor/cc-1.0.60/src/lib.rs b/vendor/cc-1.0.60/src/lib.rs
-index aff6be86..f428ecbb 100644
---- a/vendor/cc-1.0.60/src/lib.rs
-+++ b/vendor/cc-1.0.60/src/lib.rs
-@@ -2556,11 +2556,7 @@ impl Tool {
-         let family = if let Some(fname) = path.file_name().and_then(|p| p.to_str()) {
-             if fname.contains("clang-cl") {
-                 ToolFamily::Msvc { clang_cl: true }
--            } else if fname.contains("cl")
--                && !fname.contains("cloudabi")
--                && !fname.contains("uclibc")
--                && !fname.contains("clang")
--            {
-+            } else if fname.ends_with("cl") || fname == "cl.exe" {
-                 ToolFamily::Msvc { clang_cl: false }
-             } else if fname.contains("clang") {
-                 match clang_driver {
--- 
-2.31.1
-
diff --git a/srcpkgs/rust/patches/xxx-ppcle-gcc.patch b/srcpkgs/rust/patches/xxx-ppcle-gcc.patch
deleted file mode 100644
index b4150fcd8269..000000000000
--- a/srcpkgs/rust/patches/xxx-ppcle-gcc.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From bf983e79364d2d1c4a22857fadae8fcdc6646ef3 Mon Sep 17 00:00:00 2001
-From: q66 <daniel@octaforge.org>
-Date: Sun, 4 Jul 2021 02:17:26 +0200
-Subject: [PATCH] gcc: fix powerpcle being matched as msvc
-
----
- vendor/gcc/src/lib.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/vendor/gcc/src/lib.rs b/vendor/gcc/src/lib.rs
-index 7980281f..05787ceb 100644
---- a/vendor/gcc/src/lib.rs
-+++ b/vendor/gcc/src/lib.rs
-@@ -1549,7 +1549,7 @@ impl Tool {
-         let family = if let Some(fname) = path.file_name().and_then(|p| p.to_str()) {
-             if fname.contains("clang") {
-                 ToolFamily::Clang
--            } else if fname.contains("cl") && !fname.contains("uclibc") {
-+            } else if fname.ends_with("cl") || fname == "cl.exe" {
-                 ToolFamily::Msvc
-             } else {
-                 ToolFamily::Gnu
--- 
-2.31.1
-
diff --git a/srcpkgs/rust/patches/xxx-ppcle.patch b/srcpkgs/rust/patches/xxx-ppcle.patch
index ab5c0c56c925..9473e7ad98f3 100644
--- a/srcpkgs/rust/patches/xxx-ppcle.patch
+++ b/srcpkgs/rust/patches/xxx-ppcle.patch
@@ -30,11 +30,7 @@ Subject: [PATCH] initial ppcle port
  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-1.0.60/src/lib.rs                       |  1 +
  vendor/cc/src/lib.rs                              |  1 +
- vendor/gcc/src/lib.rs                             |  3 ++-
- vendor/jemallocator/benches/roundtrip.rs          |  3 ++-
- vendor/jemallocator/src/lib.rs                    |  3 ++-
  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 +++++++++++++++
@@ -57,9 +53,9 @@ index c2e9dba6..8147a3c3 100644
              target.os == "linux" && target.arch == "powerpc" && target_env_gnu_like;
 +        let linux_powerpcle_gnu_like =
 +            target.os == "linux" && target.arch == "powerpcle" && target_env_gnu_like;
+         use SpecAbi::*;
          let rust_abi = matches!(sig.abi, RustIntrinsic | PlatformIntrinsic | Rust | RustCall);
  
-         // Handle safe Rust thin and fat pointers.
 @@ -2850,7 +2852,8 @@ where
                      || (!win_x64_gnu
                          && !linux_s390x_gnu_like
@@ -394,18 +390,6 @@ index 7dbd7094..08c9de3c 100644
      ("powerpc64", "powerpc64"),
      ("powerpc64le", "powerpc64"),
      ("riscv64gc", "riscv64"),
-diff --git a/vendor/cc-1.0.60/src/lib.rs b/vendor/cc-1.0.60/src/lib.rs
-index f428ecbb..841e459a 100644
---- a/vendor/cc-1.0.60/src/lib.rs
-+++ b/vendor/cc-1.0.60/src/lib.rs
-@@ -2302,6 +2302,7 @@ impl Build {
-             "mipsisa64r6-unknown-linux-gnuabi64" => Some("mipsisa64r6-linux-gnuabi64"),
-             "mipsisa64r6el-unknown-linux-gnuabi64" => Some("mipsisa64r6el-linux-gnuabi64"),
-             "powerpc-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
-+            "powerpcle-unknown-linux-gnu" => Some("powerpcle-linux-gnu"),
-             "powerpc-unknown-linux-gnuspe" => Some("powerpc-linux-gnuspe"),
-             "powerpc-unknown-netbsd" => Some("powerpc--netbsd"),
-             "powerpc64-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
 diff --git a/vendor/cc/src/lib.rs b/vendor/cc/src/lib.rs
 index 5051b296..286c2fb7 100644
 --- a/vendor/cc/src/lib.rs
@@ -418,48 +402,6 @@ 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/gcc/src/lib.rs b/vendor/gcc/src/lib.rs
-index 1fe73012..7980281f 100644
---- a/vendor/gcc/src/lib.rs
-+++ b/vendor/gcc/src/lib.rs
-@@ -1367,7 +1367,8 @@ impl Build {
-                         "mips64el-unknown-linux-gnuabi64" => Some("mips64el-linux-gnuabi64"),
-                         "powerpc-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
-                         "powerpc-unknown-netbsd" => Some("powerpc--netbsd"),
--                        "powerpc64-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
-+                        "powerpcle-unknown-linux-gnu" => Some("powerpcle-linux-gnu"),
-+                        "powerpc64-unknown-linux-gnu" => Some("powerpc64-linux-gnu"),
-                         "powerpc64le-unknown-linux-gnu" => Some("powerpc64le-linux-gnu"),
-                         "s390x-unknown-linux-gnu" => Some("s390x-linux-gnu"),
-                         "sparc64-unknown-netbsd" => Some("sparc64--netbsd"),
-diff --git a/vendor/jemallocator/benches/roundtrip.rs b/vendor/jemallocator/benches/roundtrip.rs
-index eddbb6bb..db81596b 100644
---- a/vendor/jemallocator/benches/roundtrip.rs
-+++ b/vendor/jemallocator/benches/roundtrip.rs
-@@ -26,7 +26,8 @@ static A: Jemalloc = Jemalloc;
-     target_arch = "arm",
-     target_arch = "mips",
-     target_arch = "mipsel",
--    target_arch = "powerpc"
-+    target_arch = "powerpc",
-+    target_arch = "powerpcle"
- )))]
- const MIN_ALIGN: usize = 8;
- #[cfg(all(any(
-diff --git a/vendor/jemallocator/src/lib.rs b/vendor/jemallocator/src/lib.rs
-index f0a3692d..43889c55 100644
---- a/vendor/jemallocator/src/lib.rs
-+++ b/vendor/jemallocator/src/lib.rs
-@@ -37,7 +37,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"
- )))]
- const MIN_ALIGN: usize = 8;
- #[cfg(all(any(
 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
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index f31ea7b87b81..dea0d893f041 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.53.0
+version=1.54.0
 revision=1
 _rust_dist_version=1.53.0
 wrksrc="rustc-${version}-src"
@@ -20,7 +20,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=5cf7ca39a10f6bf4e0b0bd15e3b9a61ce721f301e12d148262e5ba968ab825b9
+checksum=ac8511633e9b5a65ad030a1a2e5bdaa841fdfe3132f2baaa52cc04e71c6c6976
 lib32disabled=yes
 
 build_options="bindist"
@@ -189,10 +189,7 @@ post_patch() {
 	# clear out all the checksum nonsense of patched vendor crates
 	_clear_vendor_checksums libc
 	_clear_vendor_checksums typenum
-	_clear_vendor_checksums cc-1.0.60
-	_clear_vendor_checksums gcc
 	_clear_vendor_checksums cc
-	_clear_vendor_checksums jemallocator
 	_clear_vendor_checksums rustc-ap-rustc_target
 	_clear_vendor_checksums target-lexicon
 	_clear_vendor_checksums tikv-jemallocator

From b1f49aa5383dce77fc877890a826f65a8d5fc9d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Tue, 17 Aug 2021 18:02:46 -0300
Subject: [PATCH 2/2] cargo: update to 0.55.0.

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

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index 075646348d9f..77b804d61249 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo'
 pkgname=cargo
-version=0.54.0
+version=0.55.0
 revision=1
 wrksrc="cargo-${version}"
 build_helper=rust
@@ -13,7 +13,7 @@ license="MIT, Apache-2.0"
 homepage="https://crates.io/"
 distfiles="https://github.com/rust-lang/cargo/archive/${version}.tar.gz
  https://github.com/crossbeam-rs/crossbeam/archive/refs/tags/crossbeam-utils-0.8.5.tar.gz"
-checksum="4627e7eb0be3150d878ed695a1ef874885ff84325019499af61f5e3ade410d4b
+checksum="dd4cf593aee4114b73234d36e9899784c1fa037b266a29ad9de3e9d4a928b577
  57db07eb38b0aaf7951c79b4639819cb84bc4269507091afea7267e10a54e079"
 replaces="cargo-tree>=0"
 

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (26 preceding siblings ...)
  2021-12-07 19:03 ` [PR PATCH] [Updated] " ericonr
@ 2021-12-07 19:12 ` flyxi121
  2021-12-07 19:16 ` flyxi121
                   ` (10 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: flyxi121 @ 2021-12-07 19:12 UTC (permalink / raw)
  To: ml

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

New comment by flyxi121 on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-988197128

Comment:
Yeah that’s why I tried to approach compiling rust from a fresh start without any patches and then start incorporating the patches again. Unfortunately due to the fact that the current packages rust version is 3 versions behind it was quite difficult to get all patches working again and after porting all patches (except one which was not applicable anymore) for the newest rust version (1.57.0), I noticed that it does not build at all.

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (27 preceding siblings ...)
  2021-12-07 19:12 ` flyxi121
@ 2021-12-07 19:16 ` flyxi121
  2021-12-08  1:24 ` flyxi121
                   ` (9 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: flyxi121 @ 2021-12-07 19:16 UTC (permalink / raw)
  To: ml

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

New comment by flyxi121 on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-988197128

Comment:
Yeah that’s why I tried to approach compiling rust from a fresh start without any patches and then start incorporating the patches again. Unfortunately due to the fact that the current packages rust version is 3 versions behind it was quite difficult to get all patches working again and after porting all patches (except one which was not applicable anymore) for the newest rust version (1.57.0), I noticed that it does not build at all.

Also after reading through a lot of the issues on the rust GitHub repository it seems to be that is is not really recommended to change the default targets. Creating a new target looked to me to be the recommended way to approach this problem.

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (28 preceding siblings ...)
  2021-12-07 19:16 ` flyxi121
@ 2021-12-08  1:24 ` flyxi121
  2021-12-13 18:46 ` leahneukirchen
                   ` (8 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: flyxi121 @ 2021-12-08  1:24 UTC (permalink / raw)
  To: ml

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

New comment by flyxi121 on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-988407446

Comment:
So I have managed to build both x86_64 and x86_64-musl (both from musl) by defining custom build targets like alpine does it. I suspect that other architectures will also work doing it this way and I will try to test them all in the coming days.
If it is a problem that we define extra build targets for a dynamically linked rust toolchain I could also fiddle with the old patches for 1.53 and try to get them working but I have no real clue how to fix some of the problems which come with these patches...

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (29 preceding siblings ...)
  2021-12-08  1:24 ` flyxi121
@ 2021-12-13 18:46 ` leahneukirchen
  2021-12-14  3:35 ` ericonr
                   ` (7 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: leahneukirchen @ 2021-12-13 18:46 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-992765407

Comment:
If we can reuse the patches from Alpine that will safe us effort in the future, so my vote is to go for that.

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (30 preceding siblings ...)
  2021-12-13 18:46 ` leahneukirchen
@ 2021-12-14  3:35 ` ericonr
  2021-12-15 15:11 ` flyxi121
                   ` (6 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: ericonr @ 2021-12-14  3:35 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-993125936

Comment:
@leahneukirchen issue with alpine patches is that they will make cross more complicated, because then the target names are all screwed up.

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (31 preceding siblings ...)
  2021-12-14  3:35 ` ericonr
@ 2021-12-15 15:11 ` flyxi121
  2021-12-19  4:17 ` ericonr
                   ` (5 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: flyxi121 @ 2021-12-15 15:11 UTC (permalink / raw)
  To: ml

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

New comment by flyxi121 on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-994886339

Comment:
Sorry that I was not active for the last week, I had a lot to do for university... 

After trying around with the alpine patches, I came to the same conclusion as @ericonr - it messes up all target names. Especially because void linux does not only have musl targets, but also glibc targets. The target names would be inconsistent and confusing for people who are not familiar with alpine linux.

I have also tried building rust without extra build targets (reusing some of void's patches and some of the other alpine patches) and everything seems to work (at least on x86_64-musl), except the fulldep tests. These tests fail, because for some reason rust finds two libc crates.
Considering that neither alpine linux nor arch linux (I chose those 2 linux distributions as they have the newest rust version available and I am familiar with them) even run the tests, I do not even know whether rustc would pass all the tests on these distributions or if they would fail as well.
If anyone has had the same problem and knows how to fix it I would also kindly appreciate it.

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

* Re: [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (32 preceding siblings ...)
  2021-12-15 15:11 ` flyxi121
@ 2021-12-19  4:17 ` ericonr
  2021-12-20  3:54 ` [PR PATCH] [Updated] " ericonr
                   ` (4 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: ericonr @ 2021-12-19  4:17 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-997326943

Comment:
Tests are a mess and I don't particularly care for them myself, though we probably should :P 

I managed to update to 1.57.0 locally and am running test builds for thunderbird and some Rust tools I have installed to see if it's working fine. Could you share your branch so I can compare what we have?

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

* Re: [PR PATCH] [Updated] [WIP] Rust 1.54.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (33 preceding siblings ...)
  2021-12-19  4:17 ` ericonr
@ 2021-12-20  3:54 ` ericonr
  2021-12-20  3:55 ` Rust 1.57.0 ericonr
                   ` (3 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: ericonr @ 2021-12-20  3:54 UTC (permalink / raw)
  To: ml

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

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

https://github.com/ericonr/void-packages rust
https://github.com/void-linux/void-packages/pull/32555

[WIP] Rust 1.54.0
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

musl build (at least) is currently broken, accepting help:

```
Rustbook (x86_64-unknown-linux-musl) - unstable-book
Building stage0 std artifacts (x86_64-unknown-linux-musl -> x86_64-unknown-linux-musl)
   Compiling compiler_builtins v0.1.45
   Compiling core v0.0.0 (/builddir/rustc-1.54.0-src/library/core)
   Compiling libc v0.2.93
   Compiling cc v1.0.68
   Compiling std v0.0.0 (/builddir/rustc-1.54.0-src/library/std)
   Compiling unwind v0.0.0 (/builddir/rustc-1.54.0-src/library/unwind)
   Compiling rustc-std-workspace-core v1.99.0 (/builddir/rustc-1.54.0-src/library/rustc-std-workspace-core)
   Compiling alloc v0.0.0 (/builddir/rustc-1.54.0-src/library/alloc)
   Compiling cfg-if v0.1.10
   Compiling adler v0.2.3
   Compiling rustc-demangle v0.1.18
error: could not find native static library `c`, perhaps an -L flag is missing?

error: aborting due to previous error

error: could not compile `libc`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
command did not execute successfully: "/builddir/rustc-1.54.0-src/stage0-bootstrap/bin/cargo" "build" "--target" "x86_64-unknown-linux-musl" "-Zbinary-dep-depinfo" "-j" "8" "--release" "--locked" "--frozen" "--features" "panic-unwind backtrace" "--manifest-path" "/builddir/rustc-1.54.0-src/library/test/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit status: 101
failed to run: /builddir/rustc-1.54.0-src/build/bootstrap/debug/bootstrap dist --jobs 8
Build completed unsuccessfully in 0:02:40
```

[ci skip]

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

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

From 0448c5df9ac7199b707d137a47ed38d4a269a548 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Tue, 17 Aug 2021 18:02:42 -0300
Subject: [PATCH 1/2] rust: update to 1.57.0.

---
 ...ative-libraries-when-linking-static-.patch | 52 -----------
 ...dlib-and-musl_root-from-musl-targets.patch | 87 ++++++++++++++-----
 ...fer-libgcc_eh-over-libunwind-on-musl.patch | 55 ++----------
 ...nore-broken-and-non-applicable-tests.patch | 77 ----------------
 ...kage-of-musl-libc-for-the-libc-crate.patch | 16 ----
 ...patch => 0016-do-not-copy-libunwind.patch} |  0
 srcpkgs/rust/patches/fix-ppc32.patch          |  6 +-
 .../need-ssp-nonshared-and-execinfo.patch     |  2 +-
 srcpkgs/rust/patches/xxx-ppcle-ccrs.patch     | 29 -------
 srcpkgs/rust/patches/xxx-ppcle-gcc.patch      | 25 ------
 srcpkgs/rust/patches/xxx-ppcle.patch          | 60 +------------
 srcpkgs/rust/template                         | 29 +++----
 12 files changed, 89 insertions(+), 349 deletions(-)
 delete mode 100644 srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch
 delete mode 100644 srcpkgs/rust/patches/0008-Ignore-broken-and-non-applicable-tests.patch
 rename srcpkgs/rust/patches/{00016-do-not-copy-libunwind.patch => 0016-do-not-copy-libunwind.patch} (100%)
 delete mode 100644 srcpkgs/rust/patches/xxx-ppcle-ccrs.patch
 delete mode 100644 srcpkgs/rust/patches/xxx-ppcle-gcc.patch

diff --git a/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch b/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch
deleted file mode 100644
index 0fd1ca7d2dfa..000000000000
--- a/srcpkgs/rust/patches/0003-Require-static-native-libraries-when-linking-static-.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From baa7ce46f19e3584d70e47c8df28c084e76446da Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sun, 3 May 2020 17:48:47 +0200
-Subject: [PATCH 03/15] Require static native libraries when linking static
- executables
-
-On ELF targets like Linux, gcc/ld will create a dynamically-linked
-executable without warning, even when passed `-static`, when asked to
-link to a `.so`. Avoid this confusing and unintended behavior by always
-using the static version of libraries when trying to link static
-executables.
-
-Fixes #54243
----
- src/librustc_codegen_ssa/back/link.rs | 18 ++++++++++++++----
- 1 file changed, 14 insertions(+), 4 deletions(-)
-
-diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
-index 8bc4e6442..52ff7a52e 100644
---- a/compiler/rustc_codegen_ssa/src/back/link.rs
-+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
-@@ -2081,8 +2081,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(
-     }
- }
- 
--/// Link in all of our upstream crates' native dependencies. Remember that all of these upstream
--/// native dependencies are all non-static dependencies. We've got two cases then:
-+/// Link in all of our upstream crates' native dependencies. We have two cases:
- ///
- /// 1. The upstream crate is an rlib. In this case we *must* link in the native dependency because
- /// the rlib is just an archive.
-@@ -2015,7 +2013,19 @@
-                 continue;
-             }
-             match lib.kind {
--                NativeLibKind::Dylib | NativeLibKind::Unspecified => cmd.link_dylib(name),
-+                NativeLibKind::Dylib | NativeLibKind::Unspecified => {
-+                    // On some targets, like Linux, linking a static executable inhibits using
-+                    // dylibs at all. Force native libraries to be static, even if for example
-+                    // an upstream rlib was originally linked against a native shared library.
-+                    if crate_type == config::CrateType::Executable
-+                        && sess.crt_static(Some(crate_type))
-+                        && !sess.target.options.crt_static_allows_dylibs
-+                    {
-+                        cmd.link_staticlib(name)
-+                    } else {
-+                        cmd.link_dylib(name)
-+                    }
-+                },
-                 NativeLibKind::Framework => cmd.link_framework(name),
-                 NativeLibKind::StaticNoBundle => {
-                     // Link "static-nobundle" native libs only if the crate they originate from
diff --git a/srcpkgs/rust/patches/0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch b/srcpkgs/rust/patches/0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch
index 85a8806e010b..427581c48f54 100644
--- a/srcpkgs/rust/patches/0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch
+++ b/srcpkgs/rust/patches/0004-Remove-nostdlib-and-musl_root-from-musl-targets.patch
@@ -1,5 +1,5 @@
 diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs
-index 2fc9ab29f..276736159 100644
+index 2fc9ab29f92..27673615968 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 {
@@ -32,7 +32,7 @@ index 2fc9ab29f..276736159 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 5038a967d..b3c0e5bc4 100644
+index 5038a967d0a..b3c0e5bc416 100644
 --- a/compiler/rustc_target/src/spec/linux_musl_base.rs
 +++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
 @@ -1,16 +1,9 @@
@@ -53,10 +53,10 @@ index 5038a967d..b3c0e5bc4 100644
      base
  }
 diff --git a/config.toml.example b/config.toml.example
-index 6e5584797..5be9882a8 100644
+index 61e57eee782..77943129204 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -638,15 +638,6 @@ changelog-seen = 2
+@@ -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)
  
@@ -73,7 +73,7 @@ index 6e5584797..5be9882a8 100644
  # `wasm32-wasi` target. If you are building wasm32-wasi target, make sure to
  # create a `[target.wasm32-wasi]` section and move this field there.
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
-index e750c2963..f6ba3032b 100644
+index e750c2963dd..f6ba3032b0d 100644
 --- a/src/bootstrap/cc_detect.rs
 +++ b/src/bootstrap/cc_detect.rs
 @@ -98,7 +98,7 @@ pub fn find(build: &mut Build) {
@@ -130,14 +130,13 @@ index e750c2963..f6ba3032b 100644
      }
  }
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index ee3527b6b..0a8b78327 100644
+index e9cc7662e63..4971534ba0e 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -179,34 +179,7 @@ fn copy_self_contained_objects(
-     let mut target_deps = vec![];
+@@ -199,36 +199,7 @@ fn copy_self_contained_objects(
  
      // Copies the 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.
@@ -164,12 +163,15 @@ index ee3527b6b..0a8b78327 100644
 -            builder.copy(&src, &target);
 -            target_deps.push((target, DependencyType::TargetSelfContained));
 -        }
+-
+-        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(|| {
-@@ -288,15 +261,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
+@@ -312,15 +283,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
              .arg("--manifest-path")
              .arg(builder.src.join("library/test/Cargo.toml"));
  
@@ -186,10 +188,10 @@ index ee3527b6b..0a8b78327 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 483816b98..7517d757c 100644
+index e658d958d0a..914b1390b37 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -165,7 +165,6 @@ pub struct Config {
+@@ -172,7 +172,6 @@ pub struct Config {
      pub missing_tools: bool,
  
      // Fallback musl-root for all targets
@@ -197,7 +199,7 @@ index 483816b98..7517d757c 100644
      pub prefix: Option<PathBuf>,
      pub sysconfdir: Option<PathBuf>,
      pub datadir: Option<PathBuf>,
-@@ -291,8 +290,6 @@ pub struct Target {
+@@ -298,8 +297,6 @@ pub struct Target {
      pub sanitizers: Option<bool>,
      pub profiler: Option<bool>,
      pub crt_static: Option<bool>,
@@ -206,7 +208,7 @@ index 483816b98..7517d757c 100644
      pub wasi_root: Option<PathBuf>,
      pub qemu_rootfs: Option<PathBuf>,
      pub no_std: bool,
-@@ -481,7 +478,6 @@ struct Rust {
+@@ -493,7 +490,6 @@ struct Rust {
      default_linker: Option<String>,
      channel: Option<String>,
      description: Option<String>,
@@ -214,7 +216,7 @@ index 483816b98..7517d757c 100644
      rpath: Option<bool>,
      verbose_tests: Option<bool>,
      optimize_tests: Option<bool>,
-@@ -524,8 +520,6 @@ struct TomlTarget {
+@@ -536,8 +532,6 @@ struct TomlTarget {
      sanitizers: Option<bool>,
      profiler: Option<bool>,
      crt_static: Option<bool>,
@@ -223,7 +225,7 @@ index 483816b98..7517d757c 100644
      wasi_root: Option<String>,
      qemu_rootfs: Option<String>,
      no_std: Option<bool>,
-@@ -846,7 +840,6 @@ impl Config {
+@@ -872,7 +866,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;
@@ -231,7 +233,7 @@ index 483816b98..7517d757c 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);
-@@ -892,8 +885,6 @@ impl Config {
+@@ -918,8 +911,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;
@@ -241,10 +243,10 @@ index 483816b98..7517d757c 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 999882a1c..7ccc2b73c 100755
+index 94424cb4548..9ae0cc053e3 100755
 --- a/src/bootstrap/configure.py
 +++ b/src/bootstrap/configure.py
-@@ -109,34 +109,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
+@@ -114,34 +114,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk",
    "aarch64-linux-android NDK standalone path")
  v("x86_64-linux-android-ndk", "target.x86_64-linux-android.android-ndk",
    "x86_64-linux-android NDK standalone path")
@@ -280,10 +282,18 @@ index 999882a1c..7ccc2b73c 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 24da44b93..c08bc6d94 100644
+index 2d4e1527897..3abe9f4a143 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -927,25 +927,6 @@ impl Build {
+@@ -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> {
          }
      }
  
@@ -309,11 +319,40 @@ index 24da44b93..c08bc6d94 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 ed0cbdf97..44937aed9 100644
+index d7db2cef24f..a791177956d 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
-@@ -182,28 +182,6 @@ pub fn check(build: &mut Build) {
+@@ -11,7 +11,6 @@
+ use std::collections::HashMap;
+ use std::env;
+ use std::ffi::{OsStr, OsString};
+-use std::fs;
+ use std::path::PathBuf;
+ use std::process::Command;
+ 
+@@ -178,28 +177,6 @@ pub fn check(build: &mut Build) {
              }
          }
  
@@ -339,6 +378,6 @@ index ed0cbdf97..44937aed9 100644
 -            }
 -        }
 -
-         if target.contains("msvc") {
+         if need_cmake && target.contains("msvc") {
              // There are three builds of cmake on windows: MSVC, MinGW, and
              // Cygwin. The Cygwin build does not have generators for Visual
diff --git a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch b/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
index 58ffd0776912..30cb66fc24b1 100644
--- a/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
+++ b/srcpkgs/rust/patches/0005-Prefer-libgcc_eh-over-libunwind-on-musl.patch
@@ -13,51 +13,12 @@ diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs
 index 9182e349b19..0377fbb58fc 100644
 --- a/library/unwind/src/lib.rs
 +++ b/library/unwind/src/lib.rs
-@@ -23,6 +23,6 @@ cfg_if::cfg_if! {
- }
- 
- #[cfg(target_env = "musl")]
--#[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
-+#[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
- #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
- extern {}
-diff --git a/src/libunwind/build.rs b/src/libunwind/build.rs
-index f24d957..28828e5 100644
---- a/library/unwind/build.rs
-+++ b/library/unwind/build.rs
-@@ -5,17 +5,12 @@
-     let target = env::var("TARGET").expect("TARGET was not set");
- 
-     if cfg!(feature = "llvm-libunwind")
--        && ((target.contains("linux") && !target.contains("musl")) || target.contains("fuchsia"))
-+        && (target.contains("linux") || target.contains("fuchsia"))
-     {
-         // Build the unwinding from libunwind C/C++ source code.
-         llvm_libunwind::compile();
-     } else if target.contains("x86_64-fortanix-unknown-sgx") {
-         llvm_libunwind::compile();
--    } else if target.contains("linux") {
--        // linking for Linux is handled in lib.rs
--        if target.contains("musl") {
--            llvm_libunwind::compile();
--        }
-     } else if target.contains("freebsd") {
-         println!("cargo:rustc-link-lib=gcc_s");
-     } else if target.contains("rumprun") {
-@@ -143,15 +138,6 @@
-             cfg.file(root.join("src").join(src));
-         }
- 
--        if target_env == "musl" {
--            // use the same C compiler command to compile C++ code so we do not need to setup the
--            // C++ compiler env variables on the builders
--            cfg.cpp(false);
--            // linking for musl is handled in lib.rs
--            cfg.cargo_metadata(false);
--            println!("cargo:rustc-link-search=native={}", env::var("OUT_DIR").unwrap());
--        }
--
-         cfg.compile("unwind");
+@@ -51,7 +51,7 @@
+         #[link(name = "unwind", cfg(not(target_feature = "crt-static")))]
+         extern "C" {}
+     } else {
+-        #[link(name = "unwind", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))]
++        #[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
+         #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
+         extern "C" {}
      }
- }
-
diff --git a/srcpkgs/rust/patches/0008-Ignore-broken-and-non-applicable-tests.patch b/srcpkgs/rust/patches/0008-Ignore-broken-and-non-applicable-tests.patch
deleted file mode 100644
index aa6e829074ae..000000000000
--- a/srcpkgs/rust/patches/0008-Ignore-broken-and-non-applicable-tests.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From c63745a2777648d530898bae5af9d25266472b05 Mon Sep 17 00:00:00 2001
-From: Samuel Holland <samuel@sholland.org>
-Date: Sat, 21 Dec 2019 17:00:40 +0100
-Subject: [PATCH 08/15] Ignore broken and non-applicable tests
-
-c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
-env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
-long-linker-command-lines: takes >10 minutes to run (but still passes)
-simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
-simd-intrinsic-generic-select.rs: broken on BE, #59356
-sparc-struct-abi: no sparc target
-sysroot-crates-are-unstable: can't run rustc without RPATH
----
- src/test/codegen/sparc-struct-abi.rs                            | 1 +
- src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile   | 2 ++
- src/test/run-make-fulldeps/long-linker-command-lines/Makefile   | 2 ++
- src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile | 2 ++
- src/test/ui/env-funky-keys.rs                                   | 1 +
- src/test/ui/simd/simd-intrinsic-generic-bitmask.rs              | 2 ++
- 6 files changed, 10 insertions(+)
-
-diff --git a/src/test/codegen/sparc-struct-abi.rs b/src/test/codegen/sparc-struct-abi.rs
-index 78e5b14a..6f93e932 100644
---- a/src/test/codegen/sparc-struct-abi.rs
-+++ b/src/test/codegen/sparc-struct-abi.rs
-@@ -4,6 +4,7 @@
- 
- // only-sparc64
- // compile-flags: -O --target=sparc64-unknown-linux-gnu --crate-type=rlib
-+// ignore-test
- #![feature(no_core, lang_items)]
- #![no_core]
- 
-diff --git a/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile b/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
-index f124ca2a..363b18f0 100644
---- a/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
-+++ b/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
-@@ -1,3 +1,5 @@
-+# ignore-aarch64
-+
- -include ../tools.mk
- 
- all:
-diff --git a/src/test/run-make-fulldeps/long-linker-command-lines/Makefile b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile
-index 5876fbc9..5f167ece 100644
---- a/src/test/run-make-fulldeps/long-linker-command-lines/Makefile
-+++ b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile
-@@ -1,3 +1,5 @@
-+# ignore-test
-+
- -include ../tools.mk
- 
- all:
-diff --git a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
-index 9e770706..6d92ec5c 100644
---- a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
-+++ b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
-@@ -1,3 +1,5 @@
-+# ignore-test
-+
- -include ../tools.mk
- 
- all:
-diff --git a/src/test/ui/env-funky-keys.rs b/src/test/ui/env-funky-keys.rs
-index c5c824ac..f3fe047a 100644
---- a/src/test/ui/env-funky-keys.rs
-+++ b/src/test/ui/env-funky-keys.rs
-@@ -1,6 +1,7 @@
- // run-pass
- // Ignore this test on Android, because it segfaults there.
- 
-+// ignore-test
- // ignore-android
- // ignore-windows
- // ignore-cloudabi no execve
-2.26.2
-
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 3378ee361742..a9ca5f6c7bba 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
@@ -8,22 +8,6 @@ Subject: [PATCH 12/15] Fix dynamic linkage of musl libc for the libc crate
  vendor/libc/src/unix/mod.rs | 6 +++---
  2 files changed, 4 insertions(+), 3 deletions(-)
 
-diff --git a/vendor/libc/src/lib.rs b/vendor/libc/src/lib.rs
-index 6bb71c552..22060a8d7 100644
---- a/vendor/libc/src/lib.rs
-+++ b/vendor/libc/src/lib.rs
-@@ -24,10 +24,7 @@
- #![deny(missing_copy_implementations, safe_packed_borrows)]
- #![cfg_attr(not(feature = "rustc-dep-of-std"), no_std)]
- #![cfg_attr(feature = "rustc-dep-of-std", no_core)]
--#![cfg_attr(
--    any(feature = "rustc-dep-of-std", target_os = "redox"),
--    feature(static_nobundle)
--)]
-+#![cfg_attr(feature = "rustc-dep-of-std", feature(static_nobundle))]
- #![cfg_attr(libc_const_extern_fn, feature(const_extern_fn))]
- 
- #[macro_use]
 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
diff --git a/srcpkgs/rust/patches/00016-do-not-copy-libunwind.patch b/srcpkgs/rust/patches/0016-do-not-copy-libunwind.patch
similarity index 100%
rename from srcpkgs/rust/patches/00016-do-not-copy-libunwind.patch
rename to srcpkgs/rust/patches/0016-do-not-copy-libunwind.patch
diff --git a/srcpkgs/rust/patches/fix-ppc32.patch b/srcpkgs/rust/patches/fix-ppc32.patch
index c5208648a655..739ce4bce7f0 100644
--- a/srcpkgs/rust/patches/fix-ppc32.patch
+++ b/srcpkgs/rust/patches/fix-ppc32.patch
@@ -9,14 +9,14 @@ Fixes #81334.
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index f39e89a9d01f7..061d7ed5ee08b 100644
+index 6750f7a549d..6032a685776 100644
 --- a/src/bootstrap/builder.rs
 +++ b/src/bootstrap/builder.rs
-@@ -1237,7 +1237,7 @@ impl<'a> Builder<'a> {
+@@ -1299,7 +1299,7 @@ pub fn cargo(
          // efficient initial-exec TLS model. This doesn't work with `dlopen`,
          // so we can't use it by default in general, but we can use it for tools
          // and our own internal libraries.
--        if !mode.must_support_dlopen() {
+-        if !mode.must_support_dlopen() && !target.triple.starts_with("powerpc-") {
 +        if !mode.must_support_dlopen() && !target.triple.starts_with("powerpc-") && !target.triple.starts_with("powerpcle-") {
              rustflags.arg("-Ztls-model=initial-exec");
          }
diff --git a/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch b/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch
index 8c24f04b20cc..fe0377dbc381 100644
--- a/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch
+++ b/srcpkgs/rust/patches/need-ssp-nonshared-and-execinfo.patch
@@ -6,7 +6,7 @@
          extern "C" {}
 +    } else if #[cfg(all(target_os = "linux", target_env = "musl"))] {
 +	#[link(name = "ssp_nonshared")]
-+        #[link(name = "execinfo")]
++  #[link(name = "execinfo")]
 +	extern "C" {}
      } else if #[cfg(target_os = "freebsd")] {
          #[link(name = "execinfo")]
diff --git a/srcpkgs/rust/patches/xxx-ppcle-ccrs.patch b/srcpkgs/rust/patches/xxx-ppcle-ccrs.patch
deleted file mode 100644
index 06f57aaec5cf..000000000000
--- a/srcpkgs/rust/patches/xxx-ppcle-ccrs.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From dc1de5be2b7908adb493b36f5079064083ed9507 Mon Sep 17 00:00:00 2001
-From: q66 <daniel@octaforge.org>
-Date: Sat, 3 Jul 2021 19:00:46 +0200
-Subject: [PATCH 1/2] cc-1.0.60: fix powerpcle being matched as as msvc
-
----
- vendor/cc-1.0.60/src/lib.rs | 6 +-----
- 1 file changed, 1 insertion(+), 5 deletions(-)
-
-diff --git a/vendor/cc-1.0.60/src/lib.rs b/vendor/cc-1.0.60/src/lib.rs
-index aff6be86..f428ecbb 100644
---- a/vendor/cc-1.0.60/src/lib.rs
-+++ b/vendor/cc-1.0.60/src/lib.rs
-@@ -2556,11 +2556,7 @@ impl Tool {
-         let family = if let Some(fname) = path.file_name().and_then(|p| p.to_str()) {
-             if fname.contains("clang-cl") {
-                 ToolFamily::Msvc { clang_cl: true }
--            } else if fname.contains("cl")
--                && !fname.contains("cloudabi")
--                && !fname.contains("uclibc")
--                && !fname.contains("clang")
--            {
-+            } else if fname.ends_with("cl") || fname == "cl.exe" {
-                 ToolFamily::Msvc { clang_cl: false }
-             } else if fname.contains("clang") {
-                 match clang_driver {
--- 
-2.31.1
-
diff --git a/srcpkgs/rust/patches/xxx-ppcle-gcc.patch b/srcpkgs/rust/patches/xxx-ppcle-gcc.patch
deleted file mode 100644
index b4150fcd8269..000000000000
--- a/srcpkgs/rust/patches/xxx-ppcle-gcc.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From bf983e79364d2d1c4a22857fadae8fcdc6646ef3 Mon Sep 17 00:00:00 2001
-From: q66 <daniel@octaforge.org>
-Date: Sun, 4 Jul 2021 02:17:26 +0200
-Subject: [PATCH] gcc: fix powerpcle being matched as msvc
-
----
- vendor/gcc/src/lib.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/vendor/gcc/src/lib.rs b/vendor/gcc/src/lib.rs
-index 7980281f..05787ceb 100644
---- a/vendor/gcc/src/lib.rs
-+++ b/vendor/gcc/src/lib.rs
-@@ -1549,7 +1549,7 @@ impl Tool {
-         let family = if let Some(fname) = path.file_name().and_then(|p| p.to_str()) {
-             if fname.contains("clang") {
-                 ToolFamily::Clang
--            } else if fname.contains("cl") && !fname.contains("uclibc") {
-+            } else if fname.ends_with("cl") || fname == "cl.exe" {
-                 ToolFamily::Msvc
-             } else {
-                 ToolFamily::Gnu
--- 
-2.31.1
-
diff --git a/srcpkgs/rust/patches/xxx-ppcle.patch b/srcpkgs/rust/patches/xxx-ppcle.patch
index ab5c0c56c925..9473e7ad98f3 100644
--- a/srcpkgs/rust/patches/xxx-ppcle.patch
+++ b/srcpkgs/rust/patches/xxx-ppcle.patch
@@ -30,11 +30,7 @@ Subject: [PATCH] initial ppcle port
  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-1.0.60/src/lib.rs                       |  1 +
  vendor/cc/src/lib.rs                              |  1 +
- vendor/gcc/src/lib.rs                             |  3 ++-
- vendor/jemallocator/benches/roundtrip.rs          |  3 ++-
- vendor/jemallocator/src/lib.rs                    |  3 ++-
  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 +++++++++++++++
@@ -57,9 +53,9 @@ index c2e9dba6..8147a3c3 100644
              target.os == "linux" && target.arch == "powerpc" && target_env_gnu_like;
 +        let linux_powerpcle_gnu_like =
 +            target.os == "linux" && target.arch == "powerpcle" && target_env_gnu_like;
+         use SpecAbi::*;
          let rust_abi = matches!(sig.abi, RustIntrinsic | PlatformIntrinsic | Rust | RustCall);
  
-         // Handle safe Rust thin and fat pointers.
 @@ -2850,7 +2852,8 @@ where
                      || (!win_x64_gnu
                          && !linux_s390x_gnu_like
@@ -394,18 +390,6 @@ index 7dbd7094..08c9de3c 100644
      ("powerpc64", "powerpc64"),
      ("powerpc64le", "powerpc64"),
      ("riscv64gc", "riscv64"),
-diff --git a/vendor/cc-1.0.60/src/lib.rs b/vendor/cc-1.0.60/src/lib.rs
-index f428ecbb..841e459a 100644
---- a/vendor/cc-1.0.60/src/lib.rs
-+++ b/vendor/cc-1.0.60/src/lib.rs
-@@ -2302,6 +2302,7 @@ impl Build {
-             "mipsisa64r6-unknown-linux-gnuabi64" => Some("mipsisa64r6-linux-gnuabi64"),
-             "mipsisa64r6el-unknown-linux-gnuabi64" => Some("mipsisa64r6el-linux-gnuabi64"),
-             "powerpc-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
-+            "powerpcle-unknown-linux-gnu" => Some("powerpcle-linux-gnu"),
-             "powerpc-unknown-linux-gnuspe" => Some("powerpc-linux-gnuspe"),
-             "powerpc-unknown-netbsd" => Some("powerpc--netbsd"),
-             "powerpc64-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
 diff --git a/vendor/cc/src/lib.rs b/vendor/cc/src/lib.rs
 index 5051b296..286c2fb7 100644
 --- a/vendor/cc/src/lib.rs
@@ -418,48 +402,6 @@ 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/gcc/src/lib.rs b/vendor/gcc/src/lib.rs
-index 1fe73012..7980281f 100644
---- a/vendor/gcc/src/lib.rs
-+++ b/vendor/gcc/src/lib.rs
-@@ -1367,7 +1367,8 @@ impl Build {
-                         "mips64el-unknown-linux-gnuabi64" => Some("mips64el-linux-gnuabi64"),
-                         "powerpc-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
-                         "powerpc-unknown-netbsd" => Some("powerpc--netbsd"),
--                        "powerpc64-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
-+                        "powerpcle-unknown-linux-gnu" => Some("powerpcle-linux-gnu"),
-+                        "powerpc64-unknown-linux-gnu" => Some("powerpc64-linux-gnu"),
-                         "powerpc64le-unknown-linux-gnu" => Some("powerpc64le-linux-gnu"),
-                         "s390x-unknown-linux-gnu" => Some("s390x-linux-gnu"),
-                         "sparc64-unknown-netbsd" => Some("sparc64--netbsd"),
-diff --git a/vendor/jemallocator/benches/roundtrip.rs b/vendor/jemallocator/benches/roundtrip.rs
-index eddbb6bb..db81596b 100644
---- a/vendor/jemallocator/benches/roundtrip.rs
-+++ b/vendor/jemallocator/benches/roundtrip.rs
-@@ -26,7 +26,8 @@ static A: Jemalloc = Jemalloc;
-     target_arch = "arm",
-     target_arch = "mips",
-     target_arch = "mipsel",
--    target_arch = "powerpc"
-+    target_arch = "powerpc",
-+    target_arch = "powerpcle"
- )))]
- const MIN_ALIGN: usize = 8;
- #[cfg(all(any(
-diff --git a/vendor/jemallocator/src/lib.rs b/vendor/jemallocator/src/lib.rs
-index f0a3692d..43889c55 100644
---- a/vendor/jemallocator/src/lib.rs
-+++ b/vendor/jemallocator/src/lib.rs
-@@ -37,7 +37,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"
- )))]
- const MIN_ALIGN: usize = 8;
- #[cfg(all(any(
 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
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index f31ea7b87b81..0f7ba7b33273 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -8,9 +8,9 @@
 # uploaded to https://alpha.de.repo.voidlinux.org/distfiles/
 #
 pkgname=rust
-version=1.53.0
+version=1.57.0
 revision=1
-_rust_dist_version=1.53.0
+_rust_dist_version=1.57.0
 wrksrc="rustc-${version}-src"
 hostmakedepends="cmake curl pkg-config python3 tar"
 makedepends="libffi-devel ncurses-devel libxml2-devel zlib-devel llvm12"
@@ -20,7 +20,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=5cf7ca39a10f6bf4e0b0bd15e3b9a61ce721f301e12d148262e5ba968ab825b9
+checksum=3546f9c3b91b1f8b8efd26c94d6b50312c08210397b4072ed2748e2bd4445c1a
 lib32disabled=yes
 
 build_options="bindist"
@@ -44,7 +44,7 @@ case "$XBPS_MACHINE" in
 	ppc*)
 		# custom bootstrap tarballs still use cargo versioning, so override
 		_bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles"
-		_cargo_dist_version="0.54.0"
+		_cargo_dist_version="0.58.0"
 		;;
 esac
 
@@ -55,15 +55,15 @@ distfiles+=" ${_bootstrap_url}/cargo-${_cargo_dist_version}-${RUST_BUILD}.tar.xz
 case "$XBPS_MACHINE" in
 	i686)
 		checksum+="
-		 deebb4a4de22a60f0dec5d5b84e8dfe6ce039835935dae96477a79468aefd927"
+		 9898a1fae2647f930fa14b9c160a1d22e67ccc70ac0d2d8f79ef1ffcf8d89af7"
 		;;
 	x86_64)
 		checksum+="
-		 e4437f6c83574fc60e183f4df439190f7610e4a669476802795645da66fbb83b"
+		 ed2013713ae742895af5df8d91c5430ba9ba3c781e3bc7f3471b220cc06d565d"
 		;;
 	x86_64-musl)
 		checksum+="
-		 ca236408cb2c35b8c3f7c2b4e9f1e69422ed24153f445192eafb6462351e5c2b"
+		 0d8564d0348843d6c08d98990d9eac50b7b7ab790f89d514b4f45079e786d932"
 		;;
 	ppc64le)
 		checksum+="
@@ -110,18 +110,18 @@ else
 	case "$XBPS_MACHINE" in
 		i686)
 			checksum+="
-			 93b05456ea8500864e020cfbb1dfbe0a93651406432b6950013f87b91ea6ff47
-			 d63690da8adb531bb92e76e211b37d3cf941fa841eaaaa210cce4cd6301ca64a"
+			 9bade3fcd246b0ad6859fcf5d0a80d3eb833e5410efa3a5552c241865562461e
+			 586e7fd521a058cbf4778abb67d7d078dd4820d356351d0b6a719e21d00966db"
 			;;
 		x86_64)
 			checksum+="
-			 9c2f0443a546dd18f1f020c7711a7b9864432545ceb812e79315c1e76508b193
-			 66d5257bbd194db08e67ca63a74cc80cdc4a36eaa30bf7dfe65861d9deaff7f7"
+			 c42f40c5279a3a9d539cae93dbcab9d333777ad9a60a5b9f1086b874ef63db86
+			 ccdc72d06c90841b7227ec3630337881eeda3da5fbe87328d2e9d705f6f8016c"
 			;;
 		x86_64-musl)
 			checksum+="
-			 50de8b4bcb0819ec0ca363e0aa53fc1c55bc85f53bc82da8dce20a132da7e7d9
-			 413449866616b1cd048da1356a41d977bf4e037cce114f07c3afbb0497b3e4c6"
+			 5b04e0e0bbf140f7c49baa6280114c28f59f6de50481bdd45074eebf629c174c
+			 818213a6444503ed6adf0231d3c71de990d4c26926c62e8c602bb7e2d636fb94"
 			;;
 		ppc64le)
 			checksum+="
@@ -189,10 +189,7 @@ post_patch() {
 	# clear out all the checksum nonsense of patched vendor crates
 	_clear_vendor_checksums libc
 	_clear_vendor_checksums typenum
-	_clear_vendor_checksums cc-1.0.60
-	_clear_vendor_checksums gcc
 	_clear_vendor_checksums cc
-	_clear_vendor_checksums jemallocator
 	_clear_vendor_checksums rustc-ap-rustc_target
 	_clear_vendor_checksums target-lexicon
 	_clear_vendor_checksums tikv-jemallocator

From 143304983ab0870b9a5639c3dcb8ac8ba175c163 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
Date: Tue, 17 Aug 2021 18:02:46 -0300
Subject: [PATCH 2/2] cargo: update to 0.58.0.

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

diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template
index 075646348d9f..bf5b4a8ad230 100644
--- a/srcpkgs/cargo/template
+++ b/srcpkgs/cargo/template
@@ -1,6 +1,6 @@
 # Template file for 'cargo'
 pkgname=cargo
-version=0.54.0
+version=0.58.0
 revision=1
 wrksrc="cargo-${version}"
 build_helper=rust
@@ -13,7 +13,7 @@ license="MIT, Apache-2.0"
 homepage="https://crates.io/"
 distfiles="https://github.com/rust-lang/cargo/archive/${version}.tar.gz
  https://github.com/crossbeam-rs/crossbeam/archive/refs/tags/crossbeam-utils-0.8.5.tar.gz"
-checksum="4627e7eb0be3150d878ed695a1ef874885ff84325019499af61f5e3ade410d4b
+checksum="e1d6f55414a29906d24b13c687996b5220e08ccce9c682e4c02851138fc7093f
  57db07eb38b0aaf7951c79b4639819cb84bc4269507091afea7267e10a54e079"
 replaces="cargo-tree>=0"
 
@@ -23,14 +23,14 @@ desc_option_bindist="Generate a tarball for bootstrap"
 # rust upstream no longer ships cargo-versioned tarballs
 # need to use the corresponding rust version instead
 _bootstrap_url="https://static.rust-lang.org/dist"
-_cargo_dist_version="1.53.0"
+_cargo_dist_version="1.57.0"
 
 case "$XBPS_MACHINE" in
 	x86_64*|i686|ppc64le) ;;
 	ppc*)
 		# custom bootstrap tarballs still use cargo versioning, so override
 		_bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles"
-		_cargo_dist_version="0.54.0"
+		_cargo_dist_version="0.58.0"
 		;;
 esac
 
@@ -55,7 +55,7 @@ case "$XBPS_MACHINE" in
 		;;
 	x86_64-musl)
 		checksum+="
-		 ca236408cb2c35b8c3f7c2b4e9f1e69422ed24153f445192eafb6462351e5c2b"
+		 0d8564d0348843d6c08d98990d9eac50b7b7ab790f89d514b4f45079e786d932"
 		;;
 	ppc64le)
 		checksum+="

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

* Re: Rust 1.57.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (34 preceding siblings ...)
  2021-12-20  3:54 ` [PR PATCH] [Updated] " ericonr
@ 2021-12-20  3:55 ` ericonr
  2021-12-22 19:51 ` cinerea0
                   ` (2 subsequent siblings)
  38 siblings, 0 replies; 40+ messages in thread
From: ericonr @ 2021-12-20  3:55 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-997571190

Comment:
Updated to 1.57.0, builds, and I get working thunderbird and fd.

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

* Re: Rust 1.57.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (35 preceding siblings ...)
  2021-12-20  3:55 ` Rust 1.57.0 ericonr
@ 2021-12-22 19:51 ` cinerea0
  2022-01-02 19:11 ` cinerea0
  2022-01-04 15:52 ` [PR PATCH] [Closed]: " q66
  38 siblings, 0 replies; 40+ messages in thread
From: cinerea0 @ 2021-12-22 19:51 UTC (permalink / raw)
  To: ml

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

New comment by cinerea0 on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-943585097

Comment:
Other packages I've found that require a newer rust:
* broot
* delta
* dua-cli
* fselect
* nushell
* pueue
* rdedup
* starship
* zoxide

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

* Re: Rust 1.57.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (36 preceding siblings ...)
  2021-12-22 19:51 ` cinerea0
@ 2022-01-02 19:11 ` cinerea0
  2022-01-04 15:52 ` [PR PATCH] [Closed]: " q66
  38 siblings, 0 replies; 40+ messages in thread
From: cinerea0 @ 2022-01-02 19:11 UTC (permalink / raw)
  To: ml

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

New comment by cinerea0 on void-packages repository

https://github.com/void-linux/void-packages/pull/32555#issuecomment-943585097

Comment:
Other packages I've found that require a newer rust:
* broot
* delta
* dua-cli
* fselect
* nushell
* pueue
* rdedup
* starship
* tealdeer
* zoxide

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

* Re: [PR PATCH] [Closed]: Rust 1.57.0
  2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
                   ` (37 preceding siblings ...)
  2022-01-02 19:11 ` cinerea0
@ 2022-01-04 15:52 ` q66
  38 siblings, 0 replies; 40+ messages in thread
From: q66 @ 2022-01-04 15:52 UTC (permalink / raw)
  To: ml

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

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

Rust 1.57.0
https://github.com/void-linux/void-packages/pull/32555

Description:
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

musl build (at least) is currently broken, accepting help:

```
Rustbook (x86_64-unknown-linux-musl) - unstable-book
Building stage0 std artifacts (x86_64-unknown-linux-musl -> x86_64-unknown-linux-musl)
   Compiling compiler_builtins v0.1.45
   Compiling core v0.0.0 (/builddir/rustc-1.54.0-src/library/core)
   Compiling libc v0.2.93
   Compiling cc v1.0.68
   Compiling std v0.0.0 (/builddir/rustc-1.54.0-src/library/std)
   Compiling unwind v0.0.0 (/builddir/rustc-1.54.0-src/library/unwind)
   Compiling rustc-std-workspace-core v1.99.0 (/builddir/rustc-1.54.0-src/library/rustc-std-workspace-core)
   Compiling alloc v0.0.0 (/builddir/rustc-1.54.0-src/library/alloc)
   Compiling cfg-if v0.1.10
   Compiling adler v0.2.3
   Compiling rustc-demangle v0.1.18
error: could not find native static library `c`, perhaps an -L flag is missing?

error: aborting due to previous error

error: could not compile `libc`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
command did not execute successfully: "/builddir/rustc-1.54.0-src/stage0-bootstrap/bin/cargo" "build" "--target" "x86_64-unknown-linux-musl" "-Zbinary-dep-depinfo" "-j" "8" "--release" "--locked" "--frozen" "--features" "panic-unwind backtrace" "--manifest-path" "/builddir/rustc-1.54.0-src/library/test/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit status: 101
failed to run: /builddir/rustc-1.54.0-src/build/bootstrap/debug/bootstrap dist --jobs 8
Build completed unsuccessfully in 0:02:40
```

[ci skip]

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

end of thread, other threads:[~2022-01-04 15:52 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-17 21:13 [PR PATCH] [WIP] Rust 1.54.0 ericonr
2021-08-18  1:18 ` ericonr
2021-08-18 21:54 ` ifreund
2021-08-18 21:54 ` ifreund
2021-08-19  2:47 ` [PR PATCH] [Updated] " ericonr
2021-08-19  5:31 ` ericonr
2021-09-17 14:18 ` ram02z
2021-09-17 23:01 ` cinerea0
2021-10-04  1:53 ` uninhm
2021-10-14 17:51 ` cinerea0
2021-10-21 17:49 ` cinerea0
2021-10-21 17:57 ` cinerea0
2021-10-22  1:38 ` cinerea0
2021-10-30  5:14 ` cinerea0
2021-11-01  5:39 ` cinerea0
2021-11-02  5:27 ` ericonr
2021-11-04  3:59 ` cinerea0
2021-11-11  2:26 ` cinerea0
2021-11-14  8:04 ` kartikynwa
2021-11-23 23:29 ` cinerea0
2021-12-03  3:33 ` cinerea0
2021-12-06  1:11 ` flyxi121
2021-12-06  1:55 ` ericonr
2021-12-06 23:06 ` flyxi121
2021-12-07 17:52 ` flyxi121
2021-12-07 18:49 ` flyxi121
2021-12-07 19:03 ` ericonr
2021-12-07 19:03 ` [PR PATCH] [Updated] " ericonr
2021-12-07 19:12 ` flyxi121
2021-12-07 19:16 ` flyxi121
2021-12-08  1:24 ` flyxi121
2021-12-13 18:46 ` leahneukirchen
2021-12-14  3:35 ` ericonr
2021-12-15 15:11 ` flyxi121
2021-12-19  4:17 ` ericonr
2021-12-20  3:54 ` [PR PATCH] [Updated] " ericonr
2021-12-20  3:55 ` Rust 1.57.0 ericonr
2021-12-22 19:51 ` cinerea0
2022-01-02 19:11 ` cinerea0
2022-01-04 15:52 ` [PR PATCH] [Closed]: " q66

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