Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [WIP] rust: update to 1.45.2
@ 2020-08-07 19:16 jnbr
  2020-08-09  8:31 ` [PR PATCH] [Updated] " jnbr
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: jnbr @ 2020-08-07 19:16 UTC (permalink / raw)
  To: ml

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

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

https://github.com/jnbr/void-packages rust-145
https://github.com/void-linux/void-packages/pull/24129

[WIP] rust: update to 1.45.2
needs some testing
@q66 can you build 1.44 bootstrap binaries for ppc* ?

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

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

From 78571ec254b237abad0d544a675b1239ccc48ff5 Mon Sep 17 00:00:00 2001
From: Johannes <johannes.brechtmann@gmail.com>
Date: Fri, 7 Aug 2020 20:56:38 +0200
Subject: [PATCH] rust: update to 1.45.2

---
 ...ative-libraries-when-linking-static-.patch | 15 ++--
 ...dlib-and-musl_root-from-musl-targets.patch | 68 ++++++++++---------
 ...mically-link-libc-on-musl-by-default.patch |  8 ++-
 ...nd-result-of-highest-as-f64-.log-2.0.patch | 29 --------
 srcpkgs/rust/template                         | 14 ++--
 5 files changed, 55 insertions(+), 79 deletions(-)
 delete mode 100644 srcpkgs/rust/patches/0013-round-result-of-highest-as-f64-.log-2.0.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 54cc27cded5..77e5551e73e 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
@@ -19,7 +19,7 @@ diff --git a/src/librustc_codegen_ssa/back/link.rs b/src/librustc_codegen_ssa/ba
 index 0dd2f029..f22b4277 100644
 --- a/src/librustc_codegen_ssa/back/link.rs
 +++ b/src/librustc_codegen_ssa/back/link.rs
-@@ -1741,9 +1741,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(
+@@ -1964,9 +1964,7 @@
      }
  }
  
@@ -30,12 +30,12 @@ index 0dd2f029..f22b4277 100644
  //
  // 1. The upstream crate is an rlib. In this case we *must* link in the
  // native dependency because the rlib is just an archive.
-@@ -1792,7 +1790,19 @@ pub fn add_upstream_native_libraries(
+@@ -2015,7 +2013,19 @@
                  continue;
              }
              match lib.kind {
--                NativeLibraryKind::NativeUnknown => cmd.link_dylib(name),
-+                NativeLibraryKind::NativeUnknown => {
+-                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.
@@ -48,9 +48,6 @@ index 0dd2f029..f22b4277 100644
 +                        cmd.link_dylib(name)
 +                    }
 +                },
-                 NativeLibraryKind::NativeFramework => cmd.link_framework(name),
-                 NativeLibraryKind::NativeStaticNobundle => {
+                 NativeLibKind::Framework => cmd.link_framework(name),
+                 NativeLibKind::StaticNoBundle => {
                      // Link "static-nobundle" native libs only if the crate they originate from
--- 
-2.26.2
-
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 06e42fdf1e3..e6e88d24a4a 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
@@ -89,19 +89,20 @@ diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
 index 65a00db3..01fd2cf3 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -125,18 +125,7 @@ fn copy_third_party_objects(
+@@ -125,19 +125,7 @@
          target_deps.push(target);
      };
  
--    // Copies the crt(1,i,n).o startup objects
+-    // Copies the CRT objects.
 -    //
--    // Since musl supports fully static linking, we can cross link for it even
--    // with a glibc-targeting toolchain, given we have the appropriate startup
--    // files. As those shipped with glibc won't work, copy the ones provided by
--    // musl so we have them on linux-gnu hosts.
+-    // rustc historically provides a more self-contained installation for musl targets
+-    // not requiring the presence of a native musl toolchain. For example, it can fall back
+-    // to using gcc from a glibc-targeting toolchain for linking.
+-    // To do that we have to distribute musl startup objects as a part of Rust toolchain
+-    // and link with them manually in the self-contained mode.
 -    if target.contains("musl") {
 -        let srcdir = builder.musl_root(target).unwrap().join("lib");
--        for &obj in &["crt1.o", "crti.o", "crtn.o"] {
+-        for &obj in &["crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
 -            copy_and_stamp(&srcdir, obj);
 -        }
 -    } else if target.ends_with("-wasi") {
@@ -109,7 +110,7 @@ index 65a00db3..01fd2cf3 100644
          let srcdir = builder.wasi_root(target).unwrap().join("lib/wasm32-wasi");
          copy_and_stamp(&srcdir, "crt1.o");
      }
-@@ -213,15 +202,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: Interned<String>, cargo: &mut Ca
+@@ -216,15 +204,6 @@
              .arg("--manifest-path")
              .arg(builder.src.join("src/libtest/Cargo.toml"));
  
@@ -275,35 +276,40 @@ diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/s
 index e294e639..58ae91a9 100644
 --- a/src/librustc_target/spec/linux_musl_base.rs
 +++ b/src/librustc_target/spec/linux_musl_base.rs
-@@ -3,28 +3,12 @@ use crate::spec::{LinkerFlavor, TargetOptions};
- pub fn opts() -> TargetOptions {
-     let mut base = super::linux_base::opts();
- 
--    // Make sure that the linker/gcc really don't pull in anything, including
--    // default objects, libs, etc.
--    base.pre_link_args_crt.insert(LinkerFlavor::Gcc, Vec::new());
--    base.pre_link_args_crt.get_mut(&LinkerFlavor::Gcc).unwrap().push("-nostdlib".to_string());
--
-     // At least when this was tested, the linker would not add the
-     // `GNU_EH_FRAME` program header to executables generated, which is required
-     // when unwinding to locate the unwinding information. I'm not sure why this
+@@ -10,10 +10,6 @@
      // argument is *not* necessary for normal builds, but it can't hurt!
      base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,--eh-frame-hdr".to_string());
  
--    // When generating a statically linked executable there's generally some
--    // small setup needed which is listed in these files. These are provided by
--    // a musl toolchain and are linked by default by the `musl-gcc` script. Note
--    // that `gcc` also does this by default, it just uses some different files.
--    //
--    // Each target directory for musl has these object files included in it so
--    // they'll be included from there.
--    base.pre_link_objects_exe_crt.push("crt1.o".to_string());
--    base.pre_link_objects_exe_crt.push("crti.o".to_string());
--    base.post_link_objects_crt.push("crtn.o".to_string());
+-    base.pre_link_objects_fallback = crt_objects::pre_musl_fallback();
+-    base.post_link_objects_fallback = crt_objects::post_musl_fallback();
+-    base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
 -
      // These targets statically link libc by default
      base.crt_static_default = true;
      // These targets allow the user to choose between static and dynamic linking.
+--- a/src/librustc_target/spec/crt_objects.rs.orig	2020-08-07 01:01:58.142394507 +0200
++++ b/src/librustc_target/spec/crt_objects.rs	2020-08-07 01:02:25.030392771 +0200
+@@ -61,21 +61,6 @@
+     ])
+ }
+ 
+-pub(super) fn pre_musl_fallback() -> CrtObjects {
+-    new(&[
+-        (LinkOutputKind::DynamicNoPicExe, &["crt1.o", "crti.o"]),
+-        (LinkOutputKind::DynamicPicExe, &["Scrt1.o", "crti.o"]),
+-        (LinkOutputKind::StaticNoPicExe, &["crt1.o", "crti.o"]),
+-        (LinkOutputKind::StaticPicExe, &["rcrt1.o", "crti.o"]),
+-        (LinkOutputKind::DynamicDylib, &["crti.o"]),
+-        (LinkOutputKind::StaticDylib, &["crti.o"]),
+-    ])
+-}
+-
+-pub(super) fn post_musl_fallback() -> CrtObjects {
+-    all("crtn.o")
+-}
+-
+ pub(super) fn pre_mingw_fallback() -> CrtObjects {
+     new(&[
+         (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
 -- 
 2.26.2
-
diff --git a/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch b/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch
index 0492242be10..99bd516027b 100644
--- a/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch
+++ b/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch
@@ -11,6 +11,11 @@ diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/s
 index 58ae91a9..1fae72d6 100644
 --- a/src/librustc_target/spec/linux_musl_base.rs
 +++ b/src/librustc_target/spec/linux_musl_base.rs
+@@ -1,4 +1,3 @@
+-use crate::spec::crt_objects::{self, CrtObjectsFallback};
+ use crate::spec::{LinkerFlavor, TargetOptions};
+ 
+ pub fn opts() -> TargetOptions {
 @@ -9,8 +9,7 @@ pub fn opts() -> TargetOptions {
      // argument is *not* necessary for normal builds, but it can't hurt!
      base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,--eh-frame-hdr".to_string());
@@ -21,6 +26,3 @@ index 58ae91a9..1fae72d6 100644
      // These targets allow the user to choose between static and dynamic linking.
      base.crt_static_respected = true;
  
--- 
-2.26.2
-
diff --git a/srcpkgs/rust/patches/0013-round-result-of-highest-as-f64-.log-2.0.patch b/srcpkgs/rust/patches/0013-round-result-of-highest-as-f64-.log-2.0.patch
deleted file mode 100644
index 46fac863858..00000000000
--- a/srcpkgs/rust/patches/0013-round-result-of-highest-as-f64-.log-2.0.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From d74af8923022dd369315ada0a06e467dffd127cf Mon Sep 17 00:00:00 2001
-From: Michael Hudson-Doyle <michael.hudson@canonical.com>
-Date: Wed, 13 Mar 2019 15:55:30 +1300
-Subject: [PATCH 13/15] round result of (highest as f64).log(2.0)
-
-Even though (1024f64).log(2.0) has an exact, representable, value, with
-rustc 1.32 on i386 it comes out as +9.999999999999999985 with
-optimization enabled. And the rustc doesn't like having two defintions
-for U1024 etc.
----
- vendor/typenum/build/main.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/vendor/typenum/build/main.rs b/vendor/typenum/build/main.rs
-index 9c9f237c..153031a2 100644
---- a/vendor/typenum/build/main.rs
-+++ b/vendor/typenum/build/main.rs
-@@ -77,7 +77,7 @@ pub fn no_std() {}
- fn main() {
-     let highest: u64 = 1024;
- 
--    let first2: u32 = (highest as f64).log(2.0) as u32 + 1;
-+    let first2: u32 = (highest as f64).log(2.0).round() as u32 + 1;
-     let first10: u32 = (highest as f64).log(10.0) as u32 + 1;
-     let uints = (0..(highest + 1))
-         .chain((first2..64).map(|i| 2u64.pow(i)))
--- 
-2.26.2
-
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index cba2feba4d2..fc0fd28d538 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -4,9 +4,9 @@
 # Permission to use rust and cargo trademark is granted.
 # See: https://github.com/rust-lang/core-team/issues/4
 pkgname=rust
-version=1.44.1
+version=1.45.2
 revision=1
-_rust_dist_version=1.43.1
+_rust_dist_version=1.44.1
 _cargo_dist_version=0.44.0
 # Always make sure custom distfiles used for bootstrap are
 # uploaded to https://alpha.de.repo.voidlinux.org/distfiles/
@@ -19,7 +19,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://www.rust-lang.org/"
 distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
-checksum="7e2e64cb298dd5d5aea52eafe943ba0458fa82f2987fdcda1ff6f537b6f88473"
+checksum="b7a3fc1e3ee367260ef945da867da0957f8983705f011ba2a73715375e50e308"
 lib32disabled=yes
 patch_args="-Np1"
 
@@ -57,14 +57,14 @@ else
 			;;
 		x86_64)
 			checksum+="
-			 a18b89572ff2e55eb9e0428efcdb60eacd82fe28c4d825d169b0ffc9e3c55ceb
-			 dabc62db53c2e7ffeba2824d4c52a938486b04c01a93ecba00c5d529868f6cfc
+			 958f84334c59f43b321b34fbf437f683b3b1fc51fde89a5572b41415b52372fe
+			 36059ac75bb226e72e882f5830379b7d31d4ecc0da0cf69df2ddc3441c26eb58
 			 84ba23058542691dae8157beec6a7679a420643eb6a708134bb1dfb01cbdebea"
 			;;
 		x86_64-musl)
 			checksum+="
-			 be982dc01b5c86a3f2b0b99a2ca0e13b3cea698ee6f1db9fa024de5c8b35a75d
-			 f3b55147ff6e01448699eaf0875d7956ea38eeef42a19cda9d555e814470e823
+			 dc3405eaf9dacc1288fb26aa75e50d4ee9b18ed2d558c4b28bdbc6feca3cfc4b
+			 ad6c595d85acd999cadf16d62d889f9f61647ceb666866083336e355dd9c5fdc
 			 653cb60214d6f1000c9a7775111dccd093c0118e7f7bf5f2f1f53a7e5e2420b3"
 			;;
 		ppc64le)

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

* Re: [PR PATCH] [Updated] [WIP] rust: update to 1.45.2
  2020-08-07 19:16 [PR PATCH] [WIP] rust: update to 1.45.2 jnbr
@ 2020-08-09  8:31 ` jnbr
  2020-08-09  8:36 ` jnbr
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jnbr @ 2020-08-09  8:31 UTC (permalink / raw)
  To: ml

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

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

https://github.com/jnbr/void-packages rust-145
https://github.com/void-linux/void-packages/pull/24129

[WIP] rust: update to 1.45.2
needs some testing
@q66 can you build 1.44 bootstrap binaries for ppc* ?

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

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

From 5bc255c7c04c7594764b1cd2a9c3282177e9179f Mon Sep 17 00:00:00 2001
From: Johannes <johannes.brechtmann@gmail.com>
Date: Fri, 7 Aug 2020 20:56:38 +0200
Subject: [PATCH] rust: update to 1.45.2

[ci skip]
---
 ...ative-libraries-when-linking-static-.patch | 15 ++--
 ...dlib-and-musl_root-from-musl-targets.patch | 68 ++++++++++---------
 ...mically-link-libc-on-musl-by-default.patch |  8 ++-
 ...nd-result-of-highest-as-f64-.log-2.0.patch | 29 --------
 srcpkgs/rust/template                         | 18 ++---
 5 files changed, 57 insertions(+), 81 deletions(-)
 delete mode 100644 srcpkgs/rust/patches/0013-round-result-of-highest-as-f64-.log-2.0.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 54cc27cded5..77e5551e73e 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
@@ -19,7 +19,7 @@ diff --git a/src/librustc_codegen_ssa/back/link.rs b/src/librustc_codegen_ssa/ba
 index 0dd2f029..f22b4277 100644
 --- a/src/librustc_codegen_ssa/back/link.rs
 +++ b/src/librustc_codegen_ssa/back/link.rs
-@@ -1741,9 +1741,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(
+@@ -1964,9 +1964,7 @@
      }
  }
  
@@ -30,12 +30,12 @@ index 0dd2f029..f22b4277 100644
  //
  // 1. The upstream crate is an rlib. In this case we *must* link in the
  // native dependency because the rlib is just an archive.
-@@ -1792,7 +1790,19 @@ pub fn add_upstream_native_libraries(
+@@ -2015,7 +2013,19 @@
                  continue;
              }
              match lib.kind {
--                NativeLibraryKind::NativeUnknown => cmd.link_dylib(name),
-+                NativeLibraryKind::NativeUnknown => {
+-                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.
@@ -48,9 +48,6 @@ index 0dd2f029..f22b4277 100644
 +                        cmd.link_dylib(name)
 +                    }
 +                },
-                 NativeLibraryKind::NativeFramework => cmd.link_framework(name),
-                 NativeLibraryKind::NativeStaticNobundle => {
+                 NativeLibKind::Framework => cmd.link_framework(name),
+                 NativeLibKind::StaticNoBundle => {
                      // Link "static-nobundle" native libs only if the crate they originate from
--- 
-2.26.2
-
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 06e42fdf1e3..e6e88d24a4a 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
@@ -89,19 +89,20 @@ diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
 index 65a00db3..01fd2cf3 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -125,18 +125,7 @@ fn copy_third_party_objects(
+@@ -125,19 +125,7 @@
          target_deps.push(target);
      };
  
--    // Copies the crt(1,i,n).o startup objects
+-    // Copies the CRT objects.
 -    //
--    // Since musl supports fully static linking, we can cross link for it even
--    // with a glibc-targeting toolchain, given we have the appropriate startup
--    // files. As those shipped with glibc won't work, copy the ones provided by
--    // musl so we have them on linux-gnu hosts.
+-    // rustc historically provides a more self-contained installation for musl targets
+-    // not requiring the presence of a native musl toolchain. For example, it can fall back
+-    // to using gcc from a glibc-targeting toolchain for linking.
+-    // To do that we have to distribute musl startup objects as a part of Rust toolchain
+-    // and link with them manually in the self-contained mode.
 -    if target.contains("musl") {
 -        let srcdir = builder.musl_root(target).unwrap().join("lib");
--        for &obj in &["crt1.o", "crti.o", "crtn.o"] {
+-        for &obj in &["crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
 -            copy_and_stamp(&srcdir, obj);
 -        }
 -    } else if target.ends_with("-wasi") {
@@ -109,7 +110,7 @@ index 65a00db3..01fd2cf3 100644
          let srcdir = builder.wasi_root(target).unwrap().join("lib/wasm32-wasi");
          copy_and_stamp(&srcdir, "crt1.o");
      }
-@@ -213,15 +202,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: Interned<String>, cargo: &mut Ca
+@@ -216,15 +204,6 @@
              .arg("--manifest-path")
              .arg(builder.src.join("src/libtest/Cargo.toml"));
  
@@ -275,35 +276,40 @@ diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/s
 index e294e639..58ae91a9 100644
 --- a/src/librustc_target/spec/linux_musl_base.rs
 +++ b/src/librustc_target/spec/linux_musl_base.rs
-@@ -3,28 +3,12 @@ use crate::spec::{LinkerFlavor, TargetOptions};
- pub fn opts() -> TargetOptions {
-     let mut base = super::linux_base::opts();
- 
--    // Make sure that the linker/gcc really don't pull in anything, including
--    // default objects, libs, etc.
--    base.pre_link_args_crt.insert(LinkerFlavor::Gcc, Vec::new());
--    base.pre_link_args_crt.get_mut(&LinkerFlavor::Gcc).unwrap().push("-nostdlib".to_string());
--
-     // At least when this was tested, the linker would not add the
-     // `GNU_EH_FRAME` program header to executables generated, which is required
-     // when unwinding to locate the unwinding information. I'm not sure why this
+@@ -10,10 +10,6 @@
      // argument is *not* necessary for normal builds, but it can't hurt!
      base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,--eh-frame-hdr".to_string());
  
--    // When generating a statically linked executable there's generally some
--    // small setup needed which is listed in these files. These are provided by
--    // a musl toolchain and are linked by default by the `musl-gcc` script. Note
--    // that `gcc` also does this by default, it just uses some different files.
--    //
--    // Each target directory for musl has these object files included in it so
--    // they'll be included from there.
--    base.pre_link_objects_exe_crt.push("crt1.o".to_string());
--    base.pre_link_objects_exe_crt.push("crti.o".to_string());
--    base.post_link_objects_crt.push("crtn.o".to_string());
+-    base.pre_link_objects_fallback = crt_objects::pre_musl_fallback();
+-    base.post_link_objects_fallback = crt_objects::post_musl_fallback();
+-    base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
 -
      // These targets statically link libc by default
      base.crt_static_default = true;
      // These targets allow the user to choose between static and dynamic linking.
+--- a/src/librustc_target/spec/crt_objects.rs.orig	2020-08-07 01:01:58.142394507 +0200
++++ b/src/librustc_target/spec/crt_objects.rs	2020-08-07 01:02:25.030392771 +0200
+@@ -61,21 +61,6 @@
+     ])
+ }
+ 
+-pub(super) fn pre_musl_fallback() -> CrtObjects {
+-    new(&[
+-        (LinkOutputKind::DynamicNoPicExe, &["crt1.o", "crti.o"]),
+-        (LinkOutputKind::DynamicPicExe, &["Scrt1.o", "crti.o"]),
+-        (LinkOutputKind::StaticNoPicExe, &["crt1.o", "crti.o"]),
+-        (LinkOutputKind::StaticPicExe, &["rcrt1.o", "crti.o"]),
+-        (LinkOutputKind::DynamicDylib, &["crti.o"]),
+-        (LinkOutputKind::StaticDylib, &["crti.o"]),
+-    ])
+-}
+-
+-pub(super) fn post_musl_fallback() -> CrtObjects {
+-    all("crtn.o")
+-}
+-
+ pub(super) fn pre_mingw_fallback() -> CrtObjects {
+     new(&[
+         (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
 -- 
 2.26.2
-
diff --git a/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch b/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch
index 0492242be10..99bd516027b 100644
--- a/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch
+++ b/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch
@@ -11,6 +11,11 @@ diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/s
 index 58ae91a9..1fae72d6 100644
 --- a/src/librustc_target/spec/linux_musl_base.rs
 +++ b/src/librustc_target/spec/linux_musl_base.rs
+@@ -1,4 +1,3 @@
+-use crate::spec::crt_objects::{self, CrtObjectsFallback};
+ use crate::spec::{LinkerFlavor, TargetOptions};
+ 
+ pub fn opts() -> TargetOptions {
 @@ -9,8 +9,7 @@ pub fn opts() -> TargetOptions {
      // argument is *not* necessary for normal builds, but it can't hurt!
      base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,--eh-frame-hdr".to_string());
@@ -21,6 +26,3 @@ index 58ae91a9..1fae72d6 100644
      // These targets allow the user to choose between static and dynamic linking.
      base.crt_static_respected = true;
  
--- 
-2.26.2
-
diff --git a/srcpkgs/rust/patches/0013-round-result-of-highest-as-f64-.log-2.0.patch b/srcpkgs/rust/patches/0013-round-result-of-highest-as-f64-.log-2.0.patch
deleted file mode 100644
index 46fac863858..00000000000
--- a/srcpkgs/rust/patches/0013-round-result-of-highest-as-f64-.log-2.0.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From d74af8923022dd369315ada0a06e467dffd127cf Mon Sep 17 00:00:00 2001
-From: Michael Hudson-Doyle <michael.hudson@canonical.com>
-Date: Wed, 13 Mar 2019 15:55:30 +1300
-Subject: [PATCH 13/15] round result of (highest as f64).log(2.0)
-
-Even though (1024f64).log(2.0) has an exact, representable, value, with
-rustc 1.32 on i386 it comes out as +9.999999999999999985 with
-optimization enabled. And the rustc doesn't like having two defintions
-for U1024 etc.
----
- vendor/typenum/build/main.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/vendor/typenum/build/main.rs b/vendor/typenum/build/main.rs
-index 9c9f237c..153031a2 100644
---- a/vendor/typenum/build/main.rs
-+++ b/vendor/typenum/build/main.rs
-@@ -77,7 +77,7 @@ pub fn no_std() {}
- fn main() {
-     let highest: u64 = 1024;
- 
--    let first2: u32 = (highest as f64).log(2.0) as u32 + 1;
-+    let first2: u32 = (highest as f64).log(2.0).round() as u32 + 1;
-     let first10: u32 = (highest as f64).log(10.0) as u32 + 1;
-     let uints = (0..(highest + 1))
-         .chain((first2..64).map(|i| 2u64.pow(i)))
--- 
-2.26.2
-
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index cba2feba4d2..27d213a1f4d 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -4,9 +4,9 @@
 # Permission to use rust and cargo trademark is granted.
 # See: https://github.com/rust-lang/core-team/issues/4
 pkgname=rust
-version=1.44.1
+version=1.45.2
 revision=1
-_rust_dist_version=1.43.1
+_rust_dist_version=1.44.1
 _cargo_dist_version=0.44.0
 # Always make sure custom distfiles used for bootstrap are
 # uploaded to https://alpha.de.repo.voidlinux.org/distfiles/
@@ -19,7 +19,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://www.rust-lang.org/"
 distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
-checksum="7e2e64cb298dd5d5aea52eafe943ba0458fa82f2987fdcda1ff6f537b6f88473"
+checksum="b7a3fc1e3ee367260ef945da867da0957f8983705f011ba2a73715375e50e308"
 lib32disabled=yes
 patch_args="-Np1"
 
@@ -51,20 +51,20 @@ else
 	case "$XBPS_MACHINE" in
 		i686)
 			checksum+="
-			 b415a406443cafa85e426d56d02fb52231b8d78ad1fec33b79b757d8ef4ed64c
-			 9913d3e21efc13445e3b71f6e1103c63b130544e1f28a99a0bb642276ebca985
+			 4ecc4c405fda8961330c317c1367971ab572c3de66643cfee1cebaf1bf1df958
+			 c949ecf87db65cdfdfc61f9b6c4fc48982b9a9727b4551a34c79212bd9e6eb23
 			 c7b4045b2001be2e97b0b08dfaee02097aea0e8a9983b42585d733cfa1e69683"
 			;;
 		x86_64)
 			checksum+="
-			 a18b89572ff2e55eb9e0428efcdb60eacd82fe28c4d825d169b0ffc9e3c55ceb
-			 dabc62db53c2e7ffeba2824d4c52a938486b04c01a93ecba00c5d529868f6cfc
+			 958f84334c59f43b321b34fbf437f683b3b1fc51fde89a5572b41415b52372fe
+			 36059ac75bb226e72e882f5830379b7d31d4ecc0da0cf69df2ddc3441c26eb58
 			 84ba23058542691dae8157beec6a7679a420643eb6a708134bb1dfb01cbdebea"
 			;;
 		x86_64-musl)
 			checksum+="
-			 be982dc01b5c86a3f2b0b99a2ca0e13b3cea698ee6f1db9fa024de5c8b35a75d
-			 f3b55147ff6e01448699eaf0875d7956ea38eeef42a19cda9d555e814470e823
+			 dc3405eaf9dacc1288fb26aa75e50d4ee9b18ed2d558c4b28bdbc6feca3cfc4b
+			 ad6c595d85acd999cadf16d62d889f9f61647ceb666866083336e355dd9c5fdc
 			 653cb60214d6f1000c9a7775111dccd093c0118e7f7bf5f2f1f53a7e5e2420b3"
 			;;
 		ppc64le)

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

* Re: [WIP] rust: update to 1.45.2
  2020-08-07 19:16 [PR PATCH] [WIP] rust: update to 1.45.2 jnbr
  2020-08-09  8:31 ` [PR PATCH] [Updated] " jnbr
@ 2020-08-09  8:36 ` jnbr
  2020-08-25 23:26 ` q66
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jnbr @ 2020-08-09  8:36 UTC (permalink / raw)
  To: ml

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

New comment by jnbr on void-packages repository

https://github.com/void-linux/void-packages/pull/24129#issuecomment-671024523

Comment:
Builds are passing for all our official supported architectures.
No issues with building firefox with the updated rust.
Still blocked by powerpc (https://bugzilla.redhat.com/show_bug.cgi?id=1862012).

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

* Re: [WIP] rust: update to 1.45.2
  2020-08-07 19:16 [PR PATCH] [WIP] rust: update to 1.45.2 jnbr
  2020-08-09  8:31 ` [PR PATCH] [Updated] " jnbr
  2020-08-09  8:36 ` jnbr
@ 2020-08-25 23:26 ` q66
  2020-08-28 18:50 ` [PR PATCH] [Updated] " jnbr
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: q66 @ 2020-08-25 23:26 UTC (permalink / raw)
  To: ml

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

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/24129#issuecomment-680317906

Comment:
1.46 is out tomorrow, we should just update to that; the 1.45.2 bootstrap tarballs are currently being built so we should have them in time

the llvm issue is now solved (patch already included in `void-packages`) so that's not blocking anything anymore

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

* Re: [PR PATCH] [Updated] [WIP] rust: update to 1.45.2
  2020-08-07 19:16 [PR PATCH] [WIP] rust: update to 1.45.2 jnbr
                   ` (2 preceding siblings ...)
  2020-08-25 23:26 ` q66
@ 2020-08-28 18:50 ` jnbr
  2020-08-28 18:51 ` jnbr
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jnbr @ 2020-08-28 18:50 UTC (permalink / raw)
  To: ml

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

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

https://github.com/jnbr/void-packages rust-145
https://github.com/void-linux/void-packages/pull/24129

[WIP] rust: update to 1.45.2
needs some testing
@q66 can you build 1.44 bootstrap binaries for ppc* ?

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

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

From c25893d5f9284b65ddb8c683e440661e96a3f339 Mon Sep 17 00:00:00 2001
From: Johannes <johannes.brechtmann@gmail.com>
Date: Fri, 7 Aug 2020 20:56:38 +0200
Subject: [PATCH 1/2] rust: update to 1.45.2

---
 ...ative-libraries-when-linking-static-.patch | 15 ++--
 ...dlib-and-musl_root-from-musl-targets.patch | 68 ++++++++++---------
 ...mically-link-libc-on-musl-by-default.patch |  8 ++-
 ...nd-result-of-highest-as-f64-.log-2.0.patch | 29 --------
 srcpkgs/rust/template                         | 14 ++--
 5 files changed, 55 insertions(+), 79 deletions(-)
 delete mode 100644 srcpkgs/rust/patches/0013-round-result-of-highest-as-f64-.log-2.0.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 54cc27cded5..77e5551e73e 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
@@ -19,7 +19,7 @@ diff --git a/src/librustc_codegen_ssa/back/link.rs b/src/librustc_codegen_ssa/ba
 index 0dd2f029..f22b4277 100644
 --- a/src/librustc_codegen_ssa/back/link.rs
 +++ b/src/librustc_codegen_ssa/back/link.rs
-@@ -1741,9 +1741,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(
+@@ -1964,9 +1964,7 @@
      }
  }
  
@@ -30,12 +30,12 @@ index 0dd2f029..f22b4277 100644
  //
  // 1. The upstream crate is an rlib. In this case we *must* link in the
  // native dependency because the rlib is just an archive.
-@@ -1792,7 +1790,19 @@ pub fn add_upstream_native_libraries(
+@@ -2015,7 +2013,19 @@
                  continue;
              }
              match lib.kind {
--                NativeLibraryKind::NativeUnknown => cmd.link_dylib(name),
-+                NativeLibraryKind::NativeUnknown => {
+-                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.
@@ -48,9 +48,6 @@ index 0dd2f029..f22b4277 100644
 +                        cmd.link_dylib(name)
 +                    }
 +                },
-                 NativeLibraryKind::NativeFramework => cmd.link_framework(name),
-                 NativeLibraryKind::NativeStaticNobundle => {
+                 NativeLibKind::Framework => cmd.link_framework(name),
+                 NativeLibKind::StaticNoBundle => {
                      // Link "static-nobundle" native libs only if the crate they originate from
--- 
-2.26.2
-
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 06e42fdf1e3..e6e88d24a4a 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
@@ -89,19 +89,20 @@ diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
 index 65a00db3..01fd2cf3 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -125,18 +125,7 @@ fn copy_third_party_objects(
+@@ -125,19 +125,7 @@
          target_deps.push(target);
      };
  
--    // Copies the crt(1,i,n).o startup objects
+-    // Copies the CRT objects.
 -    //
--    // Since musl supports fully static linking, we can cross link for it even
--    // with a glibc-targeting toolchain, given we have the appropriate startup
--    // files. As those shipped with glibc won't work, copy the ones provided by
--    // musl so we have them on linux-gnu hosts.
+-    // rustc historically provides a more self-contained installation for musl targets
+-    // not requiring the presence of a native musl toolchain. For example, it can fall back
+-    // to using gcc from a glibc-targeting toolchain for linking.
+-    // To do that we have to distribute musl startup objects as a part of Rust toolchain
+-    // and link with them manually in the self-contained mode.
 -    if target.contains("musl") {
 -        let srcdir = builder.musl_root(target).unwrap().join("lib");
--        for &obj in &["crt1.o", "crti.o", "crtn.o"] {
+-        for &obj in &["crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
 -            copy_and_stamp(&srcdir, obj);
 -        }
 -    } else if target.ends_with("-wasi") {
@@ -109,7 +110,7 @@ index 65a00db3..01fd2cf3 100644
          let srcdir = builder.wasi_root(target).unwrap().join("lib/wasm32-wasi");
          copy_and_stamp(&srcdir, "crt1.o");
      }
-@@ -213,15 +202,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: Interned<String>, cargo: &mut Ca
+@@ -216,15 +204,6 @@
              .arg("--manifest-path")
              .arg(builder.src.join("src/libtest/Cargo.toml"));
  
@@ -275,35 +276,40 @@ diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/s
 index e294e639..58ae91a9 100644
 --- a/src/librustc_target/spec/linux_musl_base.rs
 +++ b/src/librustc_target/spec/linux_musl_base.rs
-@@ -3,28 +3,12 @@ use crate::spec::{LinkerFlavor, TargetOptions};
- pub fn opts() -> TargetOptions {
-     let mut base = super::linux_base::opts();
- 
--    // Make sure that the linker/gcc really don't pull in anything, including
--    // default objects, libs, etc.
--    base.pre_link_args_crt.insert(LinkerFlavor::Gcc, Vec::new());
--    base.pre_link_args_crt.get_mut(&LinkerFlavor::Gcc).unwrap().push("-nostdlib".to_string());
--
-     // At least when this was tested, the linker would not add the
-     // `GNU_EH_FRAME` program header to executables generated, which is required
-     // when unwinding to locate the unwinding information. I'm not sure why this
+@@ -10,10 +10,6 @@
      // argument is *not* necessary for normal builds, but it can't hurt!
      base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,--eh-frame-hdr".to_string());
  
--    // When generating a statically linked executable there's generally some
--    // small setup needed which is listed in these files. These are provided by
--    // a musl toolchain and are linked by default by the `musl-gcc` script. Note
--    // that `gcc` also does this by default, it just uses some different files.
--    //
--    // Each target directory for musl has these object files included in it so
--    // they'll be included from there.
--    base.pre_link_objects_exe_crt.push("crt1.o".to_string());
--    base.pre_link_objects_exe_crt.push("crti.o".to_string());
--    base.post_link_objects_crt.push("crtn.o".to_string());
+-    base.pre_link_objects_fallback = crt_objects::pre_musl_fallback();
+-    base.post_link_objects_fallback = crt_objects::post_musl_fallback();
+-    base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
 -
      // These targets statically link libc by default
      base.crt_static_default = true;
      // These targets allow the user to choose between static and dynamic linking.
+--- a/src/librustc_target/spec/crt_objects.rs.orig	2020-08-07 01:01:58.142394507 +0200
++++ b/src/librustc_target/spec/crt_objects.rs	2020-08-07 01:02:25.030392771 +0200
+@@ -61,21 +61,6 @@
+     ])
+ }
+ 
+-pub(super) fn pre_musl_fallback() -> CrtObjects {
+-    new(&[
+-        (LinkOutputKind::DynamicNoPicExe, &["crt1.o", "crti.o"]),
+-        (LinkOutputKind::DynamicPicExe, &["Scrt1.o", "crti.o"]),
+-        (LinkOutputKind::StaticNoPicExe, &["crt1.o", "crti.o"]),
+-        (LinkOutputKind::StaticPicExe, &["rcrt1.o", "crti.o"]),
+-        (LinkOutputKind::DynamicDylib, &["crti.o"]),
+-        (LinkOutputKind::StaticDylib, &["crti.o"]),
+-    ])
+-}
+-
+-pub(super) fn post_musl_fallback() -> CrtObjects {
+-    all("crtn.o")
+-}
+-
+ pub(super) fn pre_mingw_fallback() -> CrtObjects {
+     new(&[
+         (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
 -- 
 2.26.2
-
diff --git a/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch b/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch
index 0492242be10..99bd516027b 100644
--- a/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch
+++ b/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch
@@ -11,6 +11,11 @@ diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/s
 index 58ae91a9..1fae72d6 100644
 --- a/src/librustc_target/spec/linux_musl_base.rs
 +++ b/src/librustc_target/spec/linux_musl_base.rs
+@@ -1,4 +1,3 @@
+-use crate::spec::crt_objects::{self, CrtObjectsFallback};
+ use crate::spec::{LinkerFlavor, TargetOptions};
+ 
+ pub fn opts() -> TargetOptions {
 @@ -9,8 +9,7 @@ pub fn opts() -> TargetOptions {
      // argument is *not* necessary for normal builds, but it can't hurt!
      base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,--eh-frame-hdr".to_string());
@@ -21,6 +26,3 @@ index 58ae91a9..1fae72d6 100644
      // These targets allow the user to choose between static and dynamic linking.
      base.crt_static_respected = true;
  
--- 
-2.26.2
-
diff --git a/srcpkgs/rust/patches/0013-round-result-of-highest-as-f64-.log-2.0.patch b/srcpkgs/rust/patches/0013-round-result-of-highest-as-f64-.log-2.0.patch
deleted file mode 100644
index 46fac863858..00000000000
--- a/srcpkgs/rust/patches/0013-round-result-of-highest-as-f64-.log-2.0.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From d74af8923022dd369315ada0a06e467dffd127cf Mon Sep 17 00:00:00 2001
-From: Michael Hudson-Doyle <michael.hudson@canonical.com>
-Date: Wed, 13 Mar 2019 15:55:30 +1300
-Subject: [PATCH 13/15] round result of (highest as f64).log(2.0)
-
-Even though (1024f64).log(2.0) has an exact, representable, value, with
-rustc 1.32 on i386 it comes out as +9.999999999999999985 with
-optimization enabled. And the rustc doesn't like having two defintions
-for U1024 etc.
----
- vendor/typenum/build/main.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/vendor/typenum/build/main.rs b/vendor/typenum/build/main.rs
-index 9c9f237c..153031a2 100644
---- a/vendor/typenum/build/main.rs
-+++ b/vendor/typenum/build/main.rs
-@@ -77,7 +77,7 @@ pub fn no_std() {}
- fn main() {
-     let highest: u64 = 1024;
- 
--    let first2: u32 = (highest as f64).log(2.0) as u32 + 1;
-+    let first2: u32 = (highest as f64).log(2.0).round() as u32 + 1;
-     let first10: u32 = (highest as f64).log(10.0) as u32 + 1;
-     let uints = (0..(highest + 1))
-         .chain((first2..64).map(|i| 2u64.pow(i)))
--- 
-2.26.2
-
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index cba2feba4d2..fc0fd28d538 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -4,9 +4,9 @@
 # Permission to use rust and cargo trademark is granted.
 # See: https://github.com/rust-lang/core-team/issues/4
 pkgname=rust
-version=1.44.1
+version=1.45.2
 revision=1
-_rust_dist_version=1.43.1
+_rust_dist_version=1.44.1
 _cargo_dist_version=0.44.0
 # Always make sure custom distfiles used for bootstrap are
 # uploaded to https://alpha.de.repo.voidlinux.org/distfiles/
@@ -19,7 +19,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://www.rust-lang.org/"
 distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
-checksum="7e2e64cb298dd5d5aea52eafe943ba0458fa82f2987fdcda1ff6f537b6f88473"
+checksum="b7a3fc1e3ee367260ef945da867da0957f8983705f011ba2a73715375e50e308"
 lib32disabled=yes
 patch_args="-Np1"
 
@@ -57,14 +57,14 @@ else
 			;;
 		x86_64)
 			checksum+="
-			 a18b89572ff2e55eb9e0428efcdb60eacd82fe28c4d825d169b0ffc9e3c55ceb
-			 dabc62db53c2e7ffeba2824d4c52a938486b04c01a93ecba00c5d529868f6cfc
+			 958f84334c59f43b321b34fbf437f683b3b1fc51fde89a5572b41415b52372fe
+			 36059ac75bb226e72e882f5830379b7d31d4ecc0da0cf69df2ddc3441c26eb58
 			 84ba23058542691dae8157beec6a7679a420643eb6a708134bb1dfb01cbdebea"
 			;;
 		x86_64-musl)
 			checksum+="
-			 be982dc01b5c86a3f2b0b99a2ca0e13b3cea698ee6f1db9fa024de5c8b35a75d
-			 f3b55147ff6e01448699eaf0875d7956ea38eeef42a19cda9d555e814470e823
+			 dc3405eaf9dacc1288fb26aa75e50d4ee9b18ed2d558c4b28bdbc6feca3cfc4b
+			 ad6c595d85acd999cadf16d62d889f9f61647ceb666866083336e355dd9c5fdc
 			 653cb60214d6f1000c9a7775111dccd093c0118e7f7bf5f2f1f53a7e5e2420b3"
 			;;
 		ppc64le)

From fbba991ea97a72d5ce3f47b4c0e9c379a05629e0 Mon Sep 17 00:00:00 2001
From: Johannes <johannes.brechtmann@gmail.com>
Date: Fri, 28 Aug 2020 20:49:36 +0200
Subject: [PATCH 2/2] rust: update to 1.46.0

---
 ...dlib-and-musl_root-from-musl-targets.patch | 85 ++++++++++++-------
 ...fer-libgcc_eh-over-libunwind-on-musl.patch |  6 +-
 ...e-debugger-scripts-to-usr-share-rust.patch | 24 ++----
 ...mically-link-libc-on-musl-by-default.patch |  8 +-
 srcpkgs/rust/template                         | 18 ++--
 5 files changed, 79 insertions(+), 62 deletions(-)

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 e6e88d24a4a..f4218818445 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
@@ -14,20 +14,24 @@ Subject: [PATCH 04/15] Remove -nostdlib and musl_root from musl targets
  src/librustc_target/spec/linux_musl_base.rs | 16 ------------
  8 files changed, 3 insertions(+), 130 deletions(-)
 
-diff --git a/config.toml.example b/config.toml.example
-index ce21b634..f14a5660 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -352,9 +352,6 @@
- # nightly features
- #channel = "dev"
+@@ -525,15 +525,6 @@
+ # only use static libraries. If unset, the target's default linkage is used.
+ #crt-static = false
  
--# The root location of the MUSL installation directory.
+-# The root location of the musl installation directory. The library directory
+-# will also need to contain libunwind.a for an unwinding implementation. Note
+-# that this option only makes sense for musl targets that produce statically
+-# linked binaries
 -#musl-root = "..."
 -
- # By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
- # platforms to ensure that the compiler is usable by default from the build
- # directory (as it links to a number of dynamic libraries). This may not be
+-# The full path to the musl libdir.
+-#musl-libdir = musl-root/lib
+-
+ # The root location of the `wasm32-wasi` sysroot.
+ #wasi-root = "..."
+ 
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
 index a236edf9..54c3cc64 100644
 --- a/src/bootstrap/cc_detect.rs
@@ -89,9 +93,9 @@ diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
 index 65a00db3..01fd2cf3 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -125,19 +125,7 @@
-         target_deps.push(target);
-     };
+@@ -169,26 +169,7 @@
+     t!(fs::create_dir_all(&libdir_self_contained));
+     let mut target_deps = vec![];
  
 -    // Copies the CRT objects.
 -    //
@@ -101,24 +105,31 @@ index 65a00db3..01fd2cf3 100644
 -    // To do that we have to distribute musl startup objects as a part of Rust toolchain
 -    // and link with them manually in the self-contained mode.
 -    if target.contains("musl") {
--        let srcdir = builder.musl_root(target).unwrap().join("lib");
+-        let srcdir = builder.musl_libdir(target).unwrap();
 -        for &obj in &["crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
--            copy_and_stamp(&srcdir, obj);
+-            copy_and_stamp(
+-                builder,
+-                &libdir_self_contained,
+-                &srcdir,
+-                obj,
+-                &mut target_deps,
+-                DependencyType::TargetSelfContained,
+-            );
 -        }
 -    } else if target.ends_with("-wasi") {
 +    if target.ends_with("-wasi") {
          let srcdir = builder.wasi_root(target).unwrap().join("lib/wasm32-wasi");
-         copy_and_stamp(&srcdir, "crt1.o");
-     }
-@@ -216,15 +204,6 @@
+         copy_and_stamp(
+             builder,
+@@ -263,15 +244,6 @@
              .arg("--manifest-path")
              .arg(builder.src.join("src/libtest/Cargo.toml"));
  
 -        // Help the libc crate compile by assisting it in finding various
 -        // sysroot native libraries.
 -        if target.contains("musl") {
--            if let Some(p) = builder.musl_root(target) {
--                let root = format!("native={}/lib", p.to_str().unwrap());
+-            if let Some(p) = builder.musl_libdir(target) {
+-                let root = format!("native={}", p.to_str().unwrap());
 -                cargo.rustflag("-L").rustflag(&root);
 -            }
 -        }
@@ -130,7 +141,7 @@ diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
 index 56164b74..8c46334a 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -134,8 +134,6 @@ pub struct Config {
+@@ -135,8 +135,6 @@
      pub print_step_timings: bool,
      pub missing_tools: bool,
  
@@ -139,15 +150,16 @@ index 56164b74..8c46334a 100644
      pub prefix: Option<PathBuf>,
      pub sysconfdir: Option<PathBuf>,
      pub datadir: Option<PathBuf>,
-@@ -171,7 +169,6 @@ pub struct Target {
+@@ -172,8 +170,6 @@
      pub linker: Option<PathBuf>,
      pub ndk: Option<PathBuf>,
      pub crt_static: Option<bool>,
 -    pub musl_root: Option<PathBuf>,
+-    pub musl_libdir: Option<PathBuf>,
      pub wasi_root: Option<PathBuf>,
      pub qemu_rootfs: Option<PathBuf>,
      pub no_std: bool,
-@@ -322,7 +319,6 @@ struct Rust {
+@@ -327,7 +323,6 @@
      parallel_compiler: Option<bool>,
      default_linker: Option<String>,
      channel: Option<String>,
@@ -155,15 +167,16 @@ index 56164b74..8c46334a 100644
      rpath: Option<bool>,
      verbose_tests: Option<bool>,
      optimize_tests: Option<bool>,
-@@ -359,7 +355,6 @@ struct TomlTarget {
+@@ -363,8 +358,6 @@
      llvm_filecheck: Option<String>,
      android_ndk: Option<String>,
      crt_static: Option<bool>,
 -    musl_root: Option<String>,
+-    musl_libdir: Option<String>,
      wasi_root: Option<String>,
      qemu_rootfs: Option<String>,
      no_std: Option<bool>,
-@@ -585,7 +580,6 @@ impl Config {
+@@ -592,7 +585,6 @@
              set(&mut config.llvm_tools_enabled, rust.llvm_tools);
              config.rustc_parallel = rust.parallel_compiler.unwrap_or(false);
              config.rustc_default_linker = rust.default_linker.clone();
@@ -171,11 +184,12 @@ index 56164b74..8c46334a 100644
              config.save_toolstates = rust.save_toolstates.clone().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);
-@@ -625,7 +619,6 @@ impl Config {
+@@ -632,8 +624,6 @@
                  target.ranlib = cfg.ranlib.clone().map(PathBuf::from);
                  target.linker = cfg.linker.clone().map(PathBuf::from);
                  target.crt_static = cfg.crt_static;
 -                target.musl_root = cfg.musl_root.clone().map(PathBuf::from);
+-                target.musl_libdir = cfg.musl_libdir.clone().map(PathBuf::from);
                  target.wasi_root = cfg.wasi_root.clone().map(PathBuf::from);
                  target.qemu_rootfs = cfg.qemu_rootfs.clone().map(PathBuf::from);
  
@@ -222,7 +236,7 @@ diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
 index c7e63990..77bbb2cd 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -845,16 +845,6 @@ impl Build {
+@@ -881,25 +882,6 @@
          }
      }
  
@@ -235,6 +249,15 @@ index c7e63990..77bbb2cd 100644
 -            .or_else(|| self.config.musl_root.as_ref())
 -            .map(|p| &**p)
 -    }
+-
+-    /// Returns the "musl libdir" for this `target`.
+-    fn musl_libdir(&self, target: Interned<String>) -> Option<PathBuf> {
+-        let t = self.config.target_config.get(&target)?;
+-        if let libdir @ Some(_) = &t.musl_libdir {
+-            return libdir.clone();
+-        }
+-        self.musl_root(target).map(|root| root.join("lib"))
+-    }
 -
      /// Returns the sysroot for the wasi target, if defined
      fn wasi_root(&self, target: Interned<String>) -> Option<&Path> {
@@ -243,7 +266,7 @@ diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
 index 530e74da..8ec9f046 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
-@@ -201,28 +201,6 @@ pub fn check(build: &mut Build) {
+@@ -191,28 +191,6 @@
              }
          }
  
@@ -255,10 +278,10 @@ index 530e74da..8ec9f046 100644
 -                let target = build.config.target_config.entry(target.clone()).or_default();
 -                target.musl_root = Some("/usr".into());
 -            }
--            match build.musl_root(*target) {
--                Some(root) => {
--                    if fs::metadata(root.join("lib/libc.a")).is_err() {
--                        panic!("couldn't find libc.a in musl dir: {}", root.join("lib").display());
+-            match build.musl_libdir(*target) {
+-                Some(libdir) => {
+-                    if fs::metadata(libdir.join("libc.a")).is_err() {
+-                        panic!("couldn't find libc.a in musl libdir: {}", libdir.display());
 -                    }
 -                }
 -                None => panic!(
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 0f65179eb40..3b8df62d67c 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
@@ -12,7 +12,7 @@ diff --git a/src/libunwind/build.rs b/src/libunwind/build.rs
 index a24808b3..a1250889 100644
 --- a/src/libunwind/build.rs
 +++ b/src/libunwind/build.rs
-@@ -5,15 +5,12 @@ fn main() {
+@@ -5,17 +5,14 @@
      let target = env::var("TARGET").expect("TARGET was not set");
  
      if cfg!(feature = "llvm-libunwind")
@@ -21,6 +21,8 @@ index a24808b3..a1250889 100644
      {
          // 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") {
 -        if target.contains("musl") {
 -            // linking for musl is handled in lib.rs
@@ -30,7 +32,7 @@ index a24808b3..a1250889 100644
              println!("cargo:rustc-link-lib=gcc_s");
          }
      } else if target.contains("freebsd") {
-@@ -105,15 +102,6 @@ mod llvm_libunwind {
+@@ -145,15 +142,6 @@
              cfg.file(root.join("src").join(src));
          }
  
diff --git a/srcpkgs/rust/patches/0010-Move-debugger-scripts-to-usr-share-rust.patch b/srcpkgs/rust/patches/0010-Move-debugger-scripts-to-usr-share-rust.patch
index 92705d977ca..7f913c8e631 100644
--- a/srcpkgs/rust/patches/0010-Move-debugger-scripts-to-usr-share-rust.patch
+++ b/srcpkgs/rust/patches/0010-Move-debugger-scripts-to-usr-share-rust.patch
@@ -35,18 +35,12 @@ index 23ba93da..dc51b16c 100755
  
  # Run GDB with the additional arguments that load the pretty printers
  # Set the environment variable `RUST_GDB` to overwrite the call to a
-diff --git a/src/etc/rust-lldb b/src/etc/rust-lldb
-index 7b9b40e6..e471db36 100755
---- a/src/etc/rust-lldb
-+++ b/src/etc/rust-lldb
-@@ -31,7 +31,7 @@ EOF
- fi
- 
- # Prepare commands that will be loaded before any file on the command line has been loaded
--script_import="command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_rust_formatters.py\""
-+script_import="command script import \"$RUSTC_SYSROOT/share/rust/lldb_rust_formatters.py\""
- category_definition="type summary add --no-value --python-function lldb_rust_formatters.print_val -x \".*\" --category Rust"
- category_enable="type category enable Rust"
- 
--- 
-2.26.2
+
+--- a/src/etc/lldb_commands
++++ b/src/etc/lldb_commands
+@@ -1,4 +1,4 @@
+-command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_lookup.py\"
++command script import \"$RUSTC_SYSROOT/share/rust/etc/lldb_lookup.py\"
+ type synthetic add -l lldb_lookup.synthetic_lookup -x \".*\" --category Rust
+ type summary add -F lldb_lookup.summary_lookup  -e -x -h \"^(alloc::([a-z_]+::)+)String$\" --category Rust
+ type summary add -F lldb_lookup.summary_lookup  -e -x -h \"^&str$\" --category Rust
diff --git a/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch b/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch
index 99bd516027b..482bfb81776 100644
--- a/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch
+++ b/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch
@@ -11,14 +11,12 @@ diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/s
 index 58ae91a9..1fae72d6 100644
 --- a/src/librustc_target/spec/linux_musl_base.rs
 +++ b/src/librustc_target/spec/linux_musl_base.rs
-@@ -1,4 +1,3 @@
+@@ -1,11 +1,9 @@
 -use crate::spec::crt_objects::{self, CrtObjectsFallback};
- use crate::spec::{LinkerFlavor, TargetOptions};
+ use crate::spec::TargetOptions;
  
  pub fn opts() -> TargetOptions {
-@@ -9,8 +9,7 @@ pub fn opts() -> TargetOptions {
-     // argument is *not* necessary for normal builds, but it can't hurt!
-     base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,--eh-frame-hdr".to_string());
+     let mut base = super::linux_base::opts();
  
 -    // These targets statically link libc by default
 -    base.crt_static_default = true;
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index fc0fd28d538..e6185cdba22 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -4,9 +4,9 @@
 # Permission to use rust and cargo trademark is granted.
 # See: https://github.com/rust-lang/core-team/issues/4
 pkgname=rust
-version=1.45.2
+version=1.46.0
 revision=1
-_rust_dist_version=1.44.1
+_rust_dist_version=1.45.2
 _cargo_dist_version=0.44.0
 # Always make sure custom distfiles used for bootstrap are
 # uploaded to https://alpha.de.repo.voidlinux.org/distfiles/
@@ -19,7 +19,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://www.rust-lang.org/"
 distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
-checksum="b7a3fc1e3ee367260ef945da867da0957f8983705f011ba2a73715375e50e308"
+checksum="2d6a3b7196db474ba3f37b8f5d50a1ecedff00738d7846840605b42bfc922728"
 lib32disabled=yes
 patch_args="-Np1"
 
@@ -51,20 +51,20 @@ else
 	case "$XBPS_MACHINE" in
 		i686)
 			checksum+="
-			 b415a406443cafa85e426d56d02fb52231b8d78ad1fec33b79b757d8ef4ed64c
-			 9913d3e21efc13445e3b71f6e1103c63b130544e1f28a99a0bb642276ebca985
+			 72676b7bb6a6ad056af2ad5459b1ac3992b7a65b823ed7f00d4af72266e0f1ad
+			 05474dbec0385c8dcfd940e6f8954d4f8284745a4fbcf57932022b1593829463
 			 c7b4045b2001be2e97b0b08dfaee02097aea0e8a9983b42585d733cfa1e69683"
 			;;
 		x86_64)
 			checksum+="
-			 958f84334c59f43b321b34fbf437f683b3b1fc51fde89a5572b41415b52372fe
-			 36059ac75bb226e72e882f5830379b7d31d4ecc0da0cf69df2ddc3441c26eb58
+			 0be5c8506fd9317c7d0dc8044b5fef8501caa74f88a9a22be795d68362dc57f6
+			 02309322467af8e37256ccf1f064f5233c7fca4423dffde0bd5eb32cde46942a
 			 84ba23058542691dae8157beec6a7679a420643eb6a708134bb1dfb01cbdebea"
 			;;
 		x86_64-musl)
 			checksum+="
-			 dc3405eaf9dacc1288fb26aa75e50d4ee9b18ed2d558c4b28bdbc6feca3cfc4b
-			 ad6c595d85acd999cadf16d62d889f9f61647ceb666866083336e355dd9c5fdc
+			 9a971ff29e01243b08f6f3c220ab5d608489637a6b5d81ba2e8a78007901ced0
+			 e8081032d53baa129c41c4c2bfb025648ac321c9c809f377110f8a26f7ce1cdb
 			 653cb60214d6f1000c9a7775111dccd093c0118e7f7bf5f2f1f53a7e5e2420b3"
 			;;
 		ppc64le)

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

* Re: [PR PATCH] [Updated] [WIP] rust: update to 1.45.2
  2020-08-07 19:16 [PR PATCH] [WIP] rust: update to 1.45.2 jnbr
                   ` (3 preceding siblings ...)
  2020-08-28 18:50 ` [PR PATCH] [Updated] " jnbr
@ 2020-08-28 18:51 ` jnbr
  2020-08-28 18:52 ` [WIP] rust: update to 1.46.0 jnbr
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jnbr @ 2020-08-28 18:51 UTC (permalink / raw)
  To: ml

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

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

https://github.com/jnbr/void-packages rust-145
https://github.com/void-linux/void-packages/pull/24129

[WIP] rust: update to 1.45.2
needs some testing
@q66 can you build 1.44 bootstrap binaries for ppc* ?

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

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

From c25893d5f9284b65ddb8c683e440661e96a3f339 Mon Sep 17 00:00:00 2001
From: Johannes <johannes.brechtmann@gmail.com>
Date: Fri, 7 Aug 2020 20:56:38 +0200
Subject: [PATCH 1/2] rust: update to 1.45.2

---
 ...ative-libraries-when-linking-static-.patch | 15 ++--
 ...dlib-and-musl_root-from-musl-targets.patch | 68 ++++++++++---------
 ...mically-link-libc-on-musl-by-default.patch |  8 ++-
 ...nd-result-of-highest-as-f64-.log-2.0.patch | 29 --------
 srcpkgs/rust/template                         | 14 ++--
 5 files changed, 55 insertions(+), 79 deletions(-)
 delete mode 100644 srcpkgs/rust/patches/0013-round-result-of-highest-as-f64-.log-2.0.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 54cc27cded5..77e5551e73e 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
@@ -19,7 +19,7 @@ diff --git a/src/librustc_codegen_ssa/back/link.rs b/src/librustc_codegen_ssa/ba
 index 0dd2f029..f22b4277 100644
 --- a/src/librustc_codegen_ssa/back/link.rs
 +++ b/src/librustc_codegen_ssa/back/link.rs
-@@ -1741,9 +1741,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(
+@@ -1964,9 +1964,7 @@
      }
  }
  
@@ -30,12 +30,12 @@ index 0dd2f029..f22b4277 100644
  //
  // 1. The upstream crate is an rlib. In this case we *must* link in the
  // native dependency because the rlib is just an archive.
-@@ -1792,7 +1790,19 @@ pub fn add_upstream_native_libraries(
+@@ -2015,7 +2013,19 @@
                  continue;
              }
              match lib.kind {
--                NativeLibraryKind::NativeUnknown => cmd.link_dylib(name),
-+                NativeLibraryKind::NativeUnknown => {
+-                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.
@@ -48,9 +48,6 @@ index 0dd2f029..f22b4277 100644
 +                        cmd.link_dylib(name)
 +                    }
 +                },
-                 NativeLibraryKind::NativeFramework => cmd.link_framework(name),
-                 NativeLibraryKind::NativeStaticNobundle => {
+                 NativeLibKind::Framework => cmd.link_framework(name),
+                 NativeLibKind::StaticNoBundle => {
                      // Link "static-nobundle" native libs only if the crate they originate from
--- 
-2.26.2
-
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 06e42fdf1e3..e6e88d24a4a 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
@@ -89,19 +89,20 @@ diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
 index 65a00db3..01fd2cf3 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -125,18 +125,7 @@ fn copy_third_party_objects(
+@@ -125,19 +125,7 @@
          target_deps.push(target);
      };
  
--    // Copies the crt(1,i,n).o startup objects
+-    // Copies the CRT objects.
 -    //
--    // Since musl supports fully static linking, we can cross link for it even
--    // with a glibc-targeting toolchain, given we have the appropriate startup
--    // files. As those shipped with glibc won't work, copy the ones provided by
--    // musl so we have them on linux-gnu hosts.
+-    // rustc historically provides a more self-contained installation for musl targets
+-    // not requiring the presence of a native musl toolchain. For example, it can fall back
+-    // to using gcc from a glibc-targeting toolchain for linking.
+-    // To do that we have to distribute musl startup objects as a part of Rust toolchain
+-    // and link with them manually in the self-contained mode.
 -    if target.contains("musl") {
 -        let srcdir = builder.musl_root(target).unwrap().join("lib");
--        for &obj in &["crt1.o", "crti.o", "crtn.o"] {
+-        for &obj in &["crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
 -            copy_and_stamp(&srcdir, obj);
 -        }
 -    } else if target.ends_with("-wasi") {
@@ -109,7 +110,7 @@ index 65a00db3..01fd2cf3 100644
          let srcdir = builder.wasi_root(target).unwrap().join("lib/wasm32-wasi");
          copy_and_stamp(&srcdir, "crt1.o");
      }
-@@ -213,15 +202,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: Interned<String>, cargo: &mut Ca
+@@ -216,15 +204,6 @@
              .arg("--manifest-path")
              .arg(builder.src.join("src/libtest/Cargo.toml"));
  
@@ -275,35 +276,40 @@ diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/s
 index e294e639..58ae91a9 100644
 --- a/src/librustc_target/spec/linux_musl_base.rs
 +++ b/src/librustc_target/spec/linux_musl_base.rs
-@@ -3,28 +3,12 @@ use crate::spec::{LinkerFlavor, TargetOptions};
- pub fn opts() -> TargetOptions {
-     let mut base = super::linux_base::opts();
- 
--    // Make sure that the linker/gcc really don't pull in anything, including
--    // default objects, libs, etc.
--    base.pre_link_args_crt.insert(LinkerFlavor::Gcc, Vec::new());
--    base.pre_link_args_crt.get_mut(&LinkerFlavor::Gcc).unwrap().push("-nostdlib".to_string());
--
-     // At least when this was tested, the linker would not add the
-     // `GNU_EH_FRAME` program header to executables generated, which is required
-     // when unwinding to locate the unwinding information. I'm not sure why this
+@@ -10,10 +10,6 @@
      // argument is *not* necessary for normal builds, but it can't hurt!
      base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,--eh-frame-hdr".to_string());
  
--    // When generating a statically linked executable there's generally some
--    // small setup needed which is listed in these files. These are provided by
--    // a musl toolchain and are linked by default by the `musl-gcc` script. Note
--    // that `gcc` also does this by default, it just uses some different files.
--    //
--    // Each target directory for musl has these object files included in it so
--    // they'll be included from there.
--    base.pre_link_objects_exe_crt.push("crt1.o".to_string());
--    base.pre_link_objects_exe_crt.push("crti.o".to_string());
--    base.post_link_objects_crt.push("crtn.o".to_string());
+-    base.pre_link_objects_fallback = crt_objects::pre_musl_fallback();
+-    base.post_link_objects_fallback = crt_objects::post_musl_fallback();
+-    base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
 -
      // These targets statically link libc by default
      base.crt_static_default = true;
      // These targets allow the user to choose between static and dynamic linking.
+--- a/src/librustc_target/spec/crt_objects.rs.orig	2020-08-07 01:01:58.142394507 +0200
++++ b/src/librustc_target/spec/crt_objects.rs	2020-08-07 01:02:25.030392771 +0200
+@@ -61,21 +61,6 @@
+     ])
+ }
+ 
+-pub(super) fn pre_musl_fallback() -> CrtObjects {
+-    new(&[
+-        (LinkOutputKind::DynamicNoPicExe, &["crt1.o", "crti.o"]),
+-        (LinkOutputKind::DynamicPicExe, &["Scrt1.o", "crti.o"]),
+-        (LinkOutputKind::StaticNoPicExe, &["crt1.o", "crti.o"]),
+-        (LinkOutputKind::StaticPicExe, &["rcrt1.o", "crti.o"]),
+-        (LinkOutputKind::DynamicDylib, &["crti.o"]),
+-        (LinkOutputKind::StaticDylib, &["crti.o"]),
+-    ])
+-}
+-
+-pub(super) fn post_musl_fallback() -> CrtObjects {
+-    all("crtn.o")
+-}
+-
+ pub(super) fn pre_mingw_fallback() -> CrtObjects {
+     new(&[
+         (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
 -- 
 2.26.2
-
diff --git a/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch b/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch
index 0492242be10..99bd516027b 100644
--- a/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch
+++ b/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch
@@ -11,6 +11,11 @@ diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/s
 index 58ae91a9..1fae72d6 100644
 --- a/src/librustc_target/spec/linux_musl_base.rs
 +++ b/src/librustc_target/spec/linux_musl_base.rs
+@@ -1,4 +1,3 @@
+-use crate::spec::crt_objects::{self, CrtObjectsFallback};
+ use crate::spec::{LinkerFlavor, TargetOptions};
+ 
+ pub fn opts() -> TargetOptions {
 @@ -9,8 +9,7 @@ pub fn opts() -> TargetOptions {
      // argument is *not* necessary for normal builds, but it can't hurt!
      base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,--eh-frame-hdr".to_string());
@@ -21,6 +26,3 @@ index 58ae91a9..1fae72d6 100644
      // These targets allow the user to choose between static and dynamic linking.
      base.crt_static_respected = true;
  
--- 
-2.26.2
-
diff --git a/srcpkgs/rust/patches/0013-round-result-of-highest-as-f64-.log-2.0.patch b/srcpkgs/rust/patches/0013-round-result-of-highest-as-f64-.log-2.0.patch
deleted file mode 100644
index 46fac863858..00000000000
--- a/srcpkgs/rust/patches/0013-round-result-of-highest-as-f64-.log-2.0.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From d74af8923022dd369315ada0a06e467dffd127cf Mon Sep 17 00:00:00 2001
-From: Michael Hudson-Doyle <michael.hudson@canonical.com>
-Date: Wed, 13 Mar 2019 15:55:30 +1300
-Subject: [PATCH 13/15] round result of (highest as f64).log(2.0)
-
-Even though (1024f64).log(2.0) has an exact, representable, value, with
-rustc 1.32 on i386 it comes out as +9.999999999999999985 with
-optimization enabled. And the rustc doesn't like having two defintions
-for U1024 etc.
----
- vendor/typenum/build/main.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/vendor/typenum/build/main.rs b/vendor/typenum/build/main.rs
-index 9c9f237c..153031a2 100644
---- a/vendor/typenum/build/main.rs
-+++ b/vendor/typenum/build/main.rs
-@@ -77,7 +77,7 @@ pub fn no_std() {}
- fn main() {
-     let highest: u64 = 1024;
- 
--    let first2: u32 = (highest as f64).log(2.0) as u32 + 1;
-+    let first2: u32 = (highest as f64).log(2.0).round() as u32 + 1;
-     let first10: u32 = (highest as f64).log(10.0) as u32 + 1;
-     let uints = (0..(highest + 1))
-         .chain((first2..64).map(|i| 2u64.pow(i)))
--- 
-2.26.2
-
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index cba2feba4d2..fc0fd28d538 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -4,9 +4,9 @@
 # Permission to use rust and cargo trademark is granted.
 # See: https://github.com/rust-lang/core-team/issues/4
 pkgname=rust
-version=1.44.1
+version=1.45.2
 revision=1
-_rust_dist_version=1.43.1
+_rust_dist_version=1.44.1
 _cargo_dist_version=0.44.0
 # Always make sure custom distfiles used for bootstrap are
 # uploaded to https://alpha.de.repo.voidlinux.org/distfiles/
@@ -19,7 +19,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://www.rust-lang.org/"
 distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
-checksum="7e2e64cb298dd5d5aea52eafe943ba0458fa82f2987fdcda1ff6f537b6f88473"
+checksum="b7a3fc1e3ee367260ef945da867da0957f8983705f011ba2a73715375e50e308"
 lib32disabled=yes
 patch_args="-Np1"
 
@@ -57,14 +57,14 @@ else
 			;;
 		x86_64)
 			checksum+="
-			 a18b89572ff2e55eb9e0428efcdb60eacd82fe28c4d825d169b0ffc9e3c55ceb
-			 dabc62db53c2e7ffeba2824d4c52a938486b04c01a93ecba00c5d529868f6cfc
+			 958f84334c59f43b321b34fbf437f683b3b1fc51fde89a5572b41415b52372fe
+			 36059ac75bb226e72e882f5830379b7d31d4ecc0da0cf69df2ddc3441c26eb58
 			 84ba23058542691dae8157beec6a7679a420643eb6a708134bb1dfb01cbdebea"
 			;;
 		x86_64-musl)
 			checksum+="
-			 be982dc01b5c86a3f2b0b99a2ca0e13b3cea698ee6f1db9fa024de5c8b35a75d
-			 f3b55147ff6e01448699eaf0875d7956ea38eeef42a19cda9d555e814470e823
+			 dc3405eaf9dacc1288fb26aa75e50d4ee9b18ed2d558c4b28bdbc6feca3cfc4b
+			 ad6c595d85acd999cadf16d62d889f9f61647ceb666866083336e355dd9c5fdc
 			 653cb60214d6f1000c9a7775111dccd093c0118e7f7bf5f2f1f53a7e5e2420b3"
 			;;
 		ppc64le)

From ce1d8eeb67fcf46b729704541d367802520e8011 Mon Sep 17 00:00:00 2001
From: Johannes <johannes.brechtmann@gmail.com>
Date: Fri, 28 Aug 2020 20:49:36 +0200
Subject: [PATCH 2/2] rust: update to 1.46.0

[ci skip]
---
 ...dlib-and-musl_root-from-musl-targets.patch | 85 ++++++++++++-------
 ...fer-libgcc_eh-over-libunwind-on-musl.patch |  6 +-
 ...e-debugger-scripts-to-usr-share-rust.patch | 24 ++----
 ...mically-link-libc-on-musl-by-default.patch |  8 +-
 srcpkgs/rust/template                         | 18 ++--
 5 files changed, 79 insertions(+), 62 deletions(-)

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 e6e88d24a4a..f4218818445 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
@@ -14,20 +14,24 @@ Subject: [PATCH 04/15] Remove -nostdlib and musl_root from musl targets
  src/librustc_target/spec/linux_musl_base.rs | 16 ------------
  8 files changed, 3 insertions(+), 130 deletions(-)
 
-diff --git a/config.toml.example b/config.toml.example
-index ce21b634..f14a5660 100644
 --- a/config.toml.example
 +++ b/config.toml.example
-@@ -352,9 +352,6 @@
- # nightly features
- #channel = "dev"
+@@ -525,15 +525,6 @@
+ # only use static libraries. If unset, the target's default linkage is used.
+ #crt-static = false
  
--# The root location of the MUSL installation directory.
+-# The root location of the musl installation directory. The library directory
+-# will also need to contain libunwind.a for an unwinding implementation. Note
+-# that this option only makes sense for musl targets that produce statically
+-# linked binaries
 -#musl-root = "..."
 -
- # By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
- # platforms to ensure that the compiler is usable by default from the build
- # directory (as it links to a number of dynamic libraries). This may not be
+-# The full path to the musl libdir.
+-#musl-libdir = musl-root/lib
+-
+ # The root location of the `wasm32-wasi` sysroot.
+ #wasi-root = "..."
+ 
 diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs
 index a236edf9..54c3cc64 100644
 --- a/src/bootstrap/cc_detect.rs
@@ -89,9 +93,9 @@ diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
 index 65a00db3..01fd2cf3 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -125,19 +125,7 @@
-         target_deps.push(target);
-     };
+@@ -169,26 +169,7 @@
+     t!(fs::create_dir_all(&libdir_self_contained));
+     let mut target_deps = vec![];
  
 -    // Copies the CRT objects.
 -    //
@@ -101,24 +105,31 @@ index 65a00db3..01fd2cf3 100644
 -    // To do that we have to distribute musl startup objects as a part of Rust toolchain
 -    // and link with them manually in the self-contained mode.
 -    if target.contains("musl") {
--        let srcdir = builder.musl_root(target).unwrap().join("lib");
+-        let srcdir = builder.musl_libdir(target).unwrap();
 -        for &obj in &["crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
--            copy_and_stamp(&srcdir, obj);
+-            copy_and_stamp(
+-                builder,
+-                &libdir_self_contained,
+-                &srcdir,
+-                obj,
+-                &mut target_deps,
+-                DependencyType::TargetSelfContained,
+-            );
 -        }
 -    } else if target.ends_with("-wasi") {
 +    if target.ends_with("-wasi") {
          let srcdir = builder.wasi_root(target).unwrap().join("lib/wasm32-wasi");
-         copy_and_stamp(&srcdir, "crt1.o");
-     }
-@@ -216,15 +204,6 @@
+         copy_and_stamp(
+             builder,
+@@ -263,15 +244,6 @@
              .arg("--manifest-path")
              .arg(builder.src.join("src/libtest/Cargo.toml"));
  
 -        // Help the libc crate compile by assisting it in finding various
 -        // sysroot native libraries.
 -        if target.contains("musl") {
--            if let Some(p) = builder.musl_root(target) {
--                let root = format!("native={}/lib", p.to_str().unwrap());
+-            if let Some(p) = builder.musl_libdir(target) {
+-                let root = format!("native={}", p.to_str().unwrap());
 -                cargo.rustflag("-L").rustflag(&root);
 -            }
 -        }
@@ -130,7 +141,7 @@ diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
 index 56164b74..8c46334a 100644
 --- a/src/bootstrap/config.rs
 +++ b/src/bootstrap/config.rs
-@@ -134,8 +134,6 @@ pub struct Config {
+@@ -135,8 +135,6 @@
      pub print_step_timings: bool,
      pub missing_tools: bool,
  
@@ -139,15 +150,16 @@ index 56164b74..8c46334a 100644
      pub prefix: Option<PathBuf>,
      pub sysconfdir: Option<PathBuf>,
      pub datadir: Option<PathBuf>,
-@@ -171,7 +169,6 @@ pub struct Target {
+@@ -172,8 +170,6 @@
      pub linker: Option<PathBuf>,
      pub ndk: Option<PathBuf>,
      pub crt_static: Option<bool>,
 -    pub musl_root: Option<PathBuf>,
+-    pub musl_libdir: Option<PathBuf>,
      pub wasi_root: Option<PathBuf>,
      pub qemu_rootfs: Option<PathBuf>,
      pub no_std: bool,
-@@ -322,7 +319,6 @@ struct Rust {
+@@ -327,7 +323,6 @@
      parallel_compiler: Option<bool>,
      default_linker: Option<String>,
      channel: Option<String>,
@@ -155,15 +167,16 @@ index 56164b74..8c46334a 100644
      rpath: Option<bool>,
      verbose_tests: Option<bool>,
      optimize_tests: Option<bool>,
-@@ -359,7 +355,6 @@ struct TomlTarget {
+@@ -363,8 +358,6 @@
      llvm_filecheck: Option<String>,
      android_ndk: Option<String>,
      crt_static: Option<bool>,
 -    musl_root: Option<String>,
+-    musl_libdir: Option<String>,
      wasi_root: Option<String>,
      qemu_rootfs: Option<String>,
      no_std: Option<bool>,
-@@ -585,7 +580,6 @@ impl Config {
+@@ -592,7 +585,6 @@
              set(&mut config.llvm_tools_enabled, rust.llvm_tools);
              config.rustc_parallel = rust.parallel_compiler.unwrap_or(false);
              config.rustc_default_linker = rust.default_linker.clone();
@@ -171,11 +184,12 @@ index 56164b74..8c46334a 100644
              config.save_toolstates = rust.save_toolstates.clone().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);
-@@ -625,7 +619,6 @@ impl Config {
+@@ -632,8 +624,6 @@
                  target.ranlib = cfg.ranlib.clone().map(PathBuf::from);
                  target.linker = cfg.linker.clone().map(PathBuf::from);
                  target.crt_static = cfg.crt_static;
 -                target.musl_root = cfg.musl_root.clone().map(PathBuf::from);
+-                target.musl_libdir = cfg.musl_libdir.clone().map(PathBuf::from);
                  target.wasi_root = cfg.wasi_root.clone().map(PathBuf::from);
                  target.qemu_rootfs = cfg.qemu_rootfs.clone().map(PathBuf::from);
  
@@ -222,7 +236,7 @@ diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
 index c7e63990..77bbb2cd 100644
 --- a/src/bootstrap/lib.rs
 +++ b/src/bootstrap/lib.rs
-@@ -845,16 +845,6 @@ impl Build {
+@@ -881,25 +882,6 @@
          }
      }
  
@@ -235,6 +249,15 @@ index c7e63990..77bbb2cd 100644
 -            .or_else(|| self.config.musl_root.as_ref())
 -            .map(|p| &**p)
 -    }
+-
+-    /// Returns the "musl libdir" for this `target`.
+-    fn musl_libdir(&self, target: Interned<String>) -> Option<PathBuf> {
+-        let t = self.config.target_config.get(&target)?;
+-        if let libdir @ Some(_) = &t.musl_libdir {
+-            return libdir.clone();
+-        }
+-        self.musl_root(target).map(|root| root.join("lib"))
+-    }
 -
      /// Returns the sysroot for the wasi target, if defined
      fn wasi_root(&self, target: Interned<String>) -> Option<&Path> {
@@ -243,7 +266,7 @@ diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
 index 530e74da..8ec9f046 100644
 --- a/src/bootstrap/sanity.rs
 +++ b/src/bootstrap/sanity.rs
-@@ -201,28 +201,6 @@ pub fn check(build: &mut Build) {
+@@ -191,28 +191,6 @@
              }
          }
  
@@ -255,10 +278,10 @@ index 530e74da..8ec9f046 100644
 -                let target = build.config.target_config.entry(target.clone()).or_default();
 -                target.musl_root = Some("/usr".into());
 -            }
--            match build.musl_root(*target) {
--                Some(root) => {
--                    if fs::metadata(root.join("lib/libc.a")).is_err() {
--                        panic!("couldn't find libc.a in musl dir: {}", root.join("lib").display());
+-            match build.musl_libdir(*target) {
+-                Some(libdir) => {
+-                    if fs::metadata(libdir.join("libc.a")).is_err() {
+-                        panic!("couldn't find libc.a in musl libdir: {}", libdir.display());
 -                    }
 -                }
 -                None => panic!(
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 0f65179eb40..3b8df62d67c 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
@@ -12,7 +12,7 @@ diff --git a/src/libunwind/build.rs b/src/libunwind/build.rs
 index a24808b3..a1250889 100644
 --- a/src/libunwind/build.rs
 +++ b/src/libunwind/build.rs
-@@ -5,15 +5,12 @@ fn main() {
+@@ -5,17 +5,14 @@
      let target = env::var("TARGET").expect("TARGET was not set");
  
      if cfg!(feature = "llvm-libunwind")
@@ -21,6 +21,8 @@ index a24808b3..a1250889 100644
      {
          // 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") {
 -        if target.contains("musl") {
 -            // linking for musl is handled in lib.rs
@@ -30,7 +32,7 @@ index a24808b3..a1250889 100644
              println!("cargo:rustc-link-lib=gcc_s");
          }
      } else if target.contains("freebsd") {
-@@ -105,15 +102,6 @@ mod llvm_libunwind {
+@@ -145,15 +142,6 @@
              cfg.file(root.join("src").join(src));
          }
  
diff --git a/srcpkgs/rust/patches/0010-Move-debugger-scripts-to-usr-share-rust.patch b/srcpkgs/rust/patches/0010-Move-debugger-scripts-to-usr-share-rust.patch
index 92705d977ca..7f913c8e631 100644
--- a/srcpkgs/rust/patches/0010-Move-debugger-scripts-to-usr-share-rust.patch
+++ b/srcpkgs/rust/patches/0010-Move-debugger-scripts-to-usr-share-rust.patch
@@ -35,18 +35,12 @@ index 23ba93da..dc51b16c 100755
  
  # Run GDB with the additional arguments that load the pretty printers
  # Set the environment variable `RUST_GDB` to overwrite the call to a
-diff --git a/src/etc/rust-lldb b/src/etc/rust-lldb
-index 7b9b40e6..e471db36 100755
---- a/src/etc/rust-lldb
-+++ b/src/etc/rust-lldb
-@@ -31,7 +31,7 @@ EOF
- fi
- 
- # Prepare commands that will be loaded before any file on the command line has been loaded
--script_import="command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_rust_formatters.py\""
-+script_import="command script import \"$RUSTC_SYSROOT/share/rust/lldb_rust_formatters.py\""
- category_definition="type summary add --no-value --python-function lldb_rust_formatters.print_val -x \".*\" --category Rust"
- category_enable="type category enable Rust"
- 
--- 
-2.26.2
+
+--- a/src/etc/lldb_commands
++++ b/src/etc/lldb_commands
+@@ -1,4 +1,4 @@
+-command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_lookup.py\"
++command script import \"$RUSTC_SYSROOT/share/rust/etc/lldb_lookup.py\"
+ type synthetic add -l lldb_lookup.synthetic_lookup -x \".*\" --category Rust
+ type summary add -F lldb_lookup.summary_lookup  -e -x -h \"^(alloc::([a-z_]+::)+)String$\" --category Rust
+ type summary add -F lldb_lookup.summary_lookup  -e -x -h \"^&str$\" --category Rust
diff --git a/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch b/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch
index 99bd516027b..482bfb81776 100644
--- a/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch
+++ b/srcpkgs/rust/patches/0011-Dynamically-link-libc-on-musl-by-default.patch
@@ -11,14 +11,12 @@ diff --git a/src/librustc_target/spec/linux_musl_base.rs b/src/librustc_target/s
 index 58ae91a9..1fae72d6 100644
 --- a/src/librustc_target/spec/linux_musl_base.rs
 +++ b/src/librustc_target/spec/linux_musl_base.rs
-@@ -1,4 +1,3 @@
+@@ -1,11 +1,9 @@
 -use crate::spec::crt_objects::{self, CrtObjectsFallback};
- use crate::spec::{LinkerFlavor, TargetOptions};
+ use crate::spec::TargetOptions;
  
  pub fn opts() -> TargetOptions {
-@@ -9,8 +9,7 @@ pub fn opts() -> TargetOptions {
-     // argument is *not* necessary for normal builds, but it can't hurt!
-     base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-Wl,--eh-frame-hdr".to_string());
+     let mut base = super::linux_base::opts();
  
 -    // These targets statically link libc by default
 -    base.crt_static_default = true;
diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template
index fc0fd28d538..e6185cdba22 100644
--- a/srcpkgs/rust/template
+++ b/srcpkgs/rust/template
@@ -4,9 +4,9 @@
 # Permission to use rust and cargo trademark is granted.
 # See: https://github.com/rust-lang/core-team/issues/4
 pkgname=rust
-version=1.45.2
+version=1.46.0
 revision=1
-_rust_dist_version=1.44.1
+_rust_dist_version=1.45.2
 _cargo_dist_version=0.44.0
 # Always make sure custom distfiles used for bootstrap are
 # uploaded to https://alpha.de.repo.voidlinux.org/distfiles/
@@ -19,7 +19,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="MIT, Apache-2.0"
 homepage="https://www.rust-lang.org/"
 distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
-checksum="b7a3fc1e3ee367260ef945da867da0957f8983705f011ba2a73715375e50e308"
+checksum="2d6a3b7196db474ba3f37b8f5d50a1ecedff00738d7846840605b42bfc922728"
 lib32disabled=yes
 patch_args="-Np1"
 
@@ -51,20 +51,20 @@ else
 	case "$XBPS_MACHINE" in
 		i686)
 			checksum+="
-			 b415a406443cafa85e426d56d02fb52231b8d78ad1fec33b79b757d8ef4ed64c
-			 9913d3e21efc13445e3b71f6e1103c63b130544e1f28a99a0bb642276ebca985
+			 72676b7bb6a6ad056af2ad5459b1ac3992b7a65b823ed7f00d4af72266e0f1ad
+			 05474dbec0385c8dcfd940e6f8954d4f8284745a4fbcf57932022b1593829463
 			 c7b4045b2001be2e97b0b08dfaee02097aea0e8a9983b42585d733cfa1e69683"
 			;;
 		x86_64)
 			checksum+="
-			 958f84334c59f43b321b34fbf437f683b3b1fc51fde89a5572b41415b52372fe
-			 36059ac75bb226e72e882f5830379b7d31d4ecc0da0cf69df2ddc3441c26eb58
+			 0be5c8506fd9317c7d0dc8044b5fef8501caa74f88a9a22be795d68362dc57f6
+			 02309322467af8e37256ccf1f064f5233c7fca4423dffde0bd5eb32cde46942a
 			 84ba23058542691dae8157beec6a7679a420643eb6a708134bb1dfb01cbdebea"
 			;;
 		x86_64-musl)
 			checksum+="
-			 dc3405eaf9dacc1288fb26aa75e50d4ee9b18ed2d558c4b28bdbc6feca3cfc4b
-			 ad6c595d85acd999cadf16d62d889f9f61647ceb666866083336e355dd9c5fdc
+			 9a971ff29e01243b08f6f3c220ab5d608489637a6b5d81ba2e8a78007901ced0
+			 e8081032d53baa129c41c4c2bfb025648ac321c9c809f377110f8a26f7ce1cdb
 			 653cb60214d6f1000c9a7775111dccd093c0118e7f7bf5f2f1f53a7e5e2420b3"
 			;;
 		ppc64le)

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

* Re: [WIP] rust: update to 1.46.0
  2020-08-07 19:16 [PR PATCH] [WIP] rust: update to 1.45.2 jnbr
                   ` (4 preceding siblings ...)
  2020-08-28 18:51 ` jnbr
@ 2020-08-28 18:52 ` jnbr
  2020-08-29 13:27 ` ericonr
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jnbr @ 2020-08-28 18:52 UTC (permalink / raw)
  To: ml

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

New comment by jnbr on void-packages repository

https://github.com/void-linux/void-packages/pull/24129#issuecomment-683075578

Comment:
updated to 1.46.0

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

* Re: [WIP] rust: update to 1.46.0
  2020-08-07 19:16 [PR PATCH] [WIP] rust: update to 1.45.2 jnbr
                   ` (5 preceding siblings ...)
  2020-08-28 18:52 ` [WIP] rust: update to 1.46.0 jnbr
@ 2020-08-29 13:27 ` ericonr
  2020-09-22 18:29 ` Chocimier
  2020-09-22 18:29 ` [PR PATCH] [Closed]: " Chocimier
  8 siblings, 0 replies; 10+ messages in thread
From: ericonr @ 2020-08-29 13:27 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/24129#issuecomment-683290103

Comment:
Regression, but I don't know if it affects projects we use: https://www.reddit.com/r/rust/comments/iingya/compiler_regression_on_1460/

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

* Re: [WIP] rust: update to 1.46.0
  2020-08-07 19:16 [PR PATCH] [WIP] rust: update to 1.45.2 jnbr
                   ` (6 preceding siblings ...)
  2020-08-29 13:27 ` ericonr
@ 2020-09-22 18:29 ` Chocimier
  2020-09-22 18:29 ` [PR PATCH] [Closed]: " Chocimier
  8 siblings, 0 replies; 10+ messages in thread
From: Chocimier @ 2020-09-22 18:29 UTC (permalink / raw)
  To: ml

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

New comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/24129#issuecomment-696901061

Comment:
closed by 6d6416793c0fd6be56ea5f05a94b813c6af39218

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

* Re: [PR PATCH] [Closed]: [WIP] rust: update to 1.46.0
  2020-08-07 19:16 [PR PATCH] [WIP] rust: update to 1.45.2 jnbr
                   ` (7 preceding siblings ...)
  2020-09-22 18:29 ` Chocimier
@ 2020-09-22 18:29 ` Chocimier
  8 siblings, 0 replies; 10+ messages in thread
From: Chocimier @ 2020-09-22 18:29 UTC (permalink / raw)
  To: ml

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

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

[WIP] rust: update to 1.46.0
https://github.com/void-linux/void-packages/pull/24129

Description:
needs some testing
@q66 can you build 1.44 bootstrap binaries for ppc* ?

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

end of thread, other threads:[~2020-09-22 18:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-07 19:16 [PR PATCH] [WIP] rust: update to 1.45.2 jnbr
2020-08-09  8:31 ` [PR PATCH] [Updated] " jnbr
2020-08-09  8:36 ` jnbr
2020-08-25 23:26 ` q66
2020-08-28 18:50 ` [PR PATCH] [Updated] " jnbr
2020-08-28 18:51 ` jnbr
2020-08-28 18:52 ` [WIP] rust: update to 1.46.0 jnbr
2020-08-29 13:27 ` ericonr
2020-09-22 18:29 ` Chocimier
2020-09-22 18:29 ` [PR PATCH] [Closed]: " Chocimier

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