From 0bb77ce489ddcf8ce346291907595215a53fde58 Mon Sep 17 00:00:00 2001 From: Subhaditya Nath Date: Mon, 21 Mar 2022 19:41:03 +0530 Subject: [PATCH] rust: update to 1.58.0 --- .../rust/patches/0001-musl-void-setup.patch | 35 ++----------------- ...kage-of-musl-libc-for-the-libc-crate.patch | 8 ++--- srcpkgs/rust/template | 4 +-- 3 files changed, 9 insertions(+), 38 deletions(-) diff --git a/srcpkgs/rust/patches/0001-musl-void-setup.patch b/srcpkgs/rust/patches/0001-musl-void-setup.patch index 427581c48f54..d42d9ac2ae5d 100644 --- a/srcpkgs/rust/patches/0001-musl-void-setup.patch +++ b/srcpkgs/rust/patches/0001-musl-void-setup.patch @@ -135,7 +135,7 @@ index e9cc7662e63..4971534ba0e 100644 +++ b/src/bootstrap/compile.rs @@ -199,36 +199,7 @@ fn copy_self_contained_objects( - // Copies the CRT objects. + // Copies the libc and CRT objects. // - // rustc historically provides a more self-contained installation for musl targets - // not requiring the presence of a native musl toolchain. For example, it can fall back @@ -146,7 +146,7 @@ index e9cc7662e63..4971534ba0e 100644 - let srcdir = builder.musl_libdir(target).unwrap_or_else(|| { - panic!("Target {:?} does not have a \"musl-libdir\" key", target.triple) - }); -- for &obj in &["crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] { +- for &obj in &["libc.a", "crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] { - copy_and_stamp( - builder, - &libdir_self_contained, @@ -285,15 +285,7 @@ diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 2d4e1527897..3abe9f4a143 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs -@@ -277,7 +277,6 @@ pub struct Build { - struct Crate { - name: Interned, - deps: HashSet>, -- id: String, - path: PathBuf, - } - -@@ -1056,25 +1055,6 @@ fn crt_static(&self, target: TargetSelection) -> Option { +@@ -1055,25 +1056,6 @@ impl Build { } } @@ -319,27 +311,6 @@ index 2d4e1527897..3abe9f4a143 100644 /// Returns the sysroot for the wasi target, if defined fn wasi_root(&self, target: TargetSelection) -> Option<&Path> { self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p) -diff --git a/src/bootstrap/metadata.rs b/src/bootstrap/metadata.rs -index a38391c7b88..65e229697dc 100644 ---- a/src/bootstrap/metadata.rs -+++ b/src/bootstrap/metadata.rs -@@ -14,7 +14,6 @@ struct Output { - - #[derive(Deserialize)] - struct Package { -- id: String, - name: String, - source: Option, - manifest_path: String, -@@ -50,7 +49,7 @@ pub fn build(build: &mut Build) { - .filter(|dep| dep.source.is_none()) - .map(|dep| INTERNER.intern_string(dep.name)) - .collect(); -- build.crates.insert(name, Crate { name, id: package.id, deps, path }); -+ build.crates.insert(name, Crate { name, deps, path }); - } - } - } diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs index d7db2cef24f..a791177956d 100644 --- a/src/bootstrap/sanity.rs diff --git a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch b/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch index a9ca5f6c7bba..8a18e414e209 100644 --- a/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch +++ b/srcpkgs/rust/patches/0012-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch @@ -12,14 +12,14 @@ diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs index 238da24b..ffb05ee7 100644 --- a/vendor/libc/src/unix/mod.rs +++ b/vendor/libc/src/unix/mod.rs -@@ -299,11 +299,11 @@ cfg_if! { - // cargo build, don't pull in anything extra as the libstd dep - // already pulls in all libs. +@@ -329,11 +329,11 @@ cfg_if! { + #[link(name = "c", cfg(not(target_feature = "crt-static")))] + extern {} } else if #[cfg(target_env = "musl")] { + #[link(name = "c")] + extern {} #[cfg_attr(feature = "rustc-dep-of-std", -- link(name = "c", kind = "static", +- link(name = "c", kind = "static", modifiers = "-bundle", + link(name = "gcc", kind = "static-nobundle", cfg(target_feature = "crt-static")))] - #[cfg_attr(feature = "rustc-dep-of-std", diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template index 560a629f3da2..d051ca54fea1 100644 --- a/srcpkgs/rust/template +++ b/srcpkgs/rust/template @@ -8,7 +8,7 @@ # uploaded to https://alpha.de.repo.voidlinux.org/distfiles/ # pkgname=rust -version=1.57.0 +version=1.58.0 revision=1 wrksrc="rustc-${version}-src" hostmakedepends="cmake curl pkg-config python3 tar cargo-bootstrap" @@ -19,7 +19,7 @@ maintainer="Enno Boland " license="MIT, Apache-2.0" homepage="https://www.rust-lang.org/" distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz" -checksum=3546f9c3b91b1f8b8efd26c94d6b50312c08210397b4072ed2748e2bd4445c1a +checksum=0ad531a32f3c2e996b9322c6b7262a9cfe557e49ff3363adea07b575106cd770 lib32disabled=yes make_check=no # CBA for now