From b463147c79e93e2bedca0db0e443d507b7eebef6 Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Fri, 3 May 2024 10:38:58 +0200 Subject: [PATCH 1/4] rust-bootstrap: update to 1.78.0 --- srcpkgs/rust-bootstrap/template | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/srcpkgs/rust-bootstrap/template b/srcpkgs/rust-bootstrap/template index afc36b5253251e..6e0658375be43c 100644 --- a/srcpkgs/rust-bootstrap/template +++ b/srcpkgs/rust-bootstrap/template @@ -1,6 +1,6 @@ # Template file for 'rust-bootstrap' pkgname=rust-bootstrap -version=1.77.1 +version=1.78.0 revision=1 short_desc="Rust programming language bootstrap toolchain" maintainer="Orphaned " @@ -31,24 +31,24 @@ case "$XBPS_TARGET_MACHINE" in ${_bootstrap_url}/rustc-${version}-i686-unknown-linux-gnu.tar.xz ${_bootstrap_url}/rust-std-${version}-i686-unknown-linux-gnu.tar.xz" checksum=" - 204a79ddc33e74a23b817724a57fdaad5e2552d034653915a7508c7d0063045a - 7bf24ca93bde8cd761128e68cbcabc9d304c5cf19fcdd020bca2d56e43014381" + 8ba9c213e5daaf08a13c5787a4ea0d7ae8d1e7004126de2b8dc6a6dcd798becd + 9e5e02311853354c1540e1b4da6c1686616cea9d3a233c033023f36d950977c0" ;; x86_64) distfiles=" ${_bootstrap_url}/rustc-${version}-x86_64-unknown-linux-gnu.tar.xz ${_bootstrap_url}/rust-std-${version}-x86_64-unknown-linux-gnu.tar.xz" checksum=" - c9caaf8c214f6683281fa55e76a4d345004aa2933daca469952b3bead8cc5ca9 - 317e604909360d1bb92f7558aaa5ce449312630d8226767ae9df99bf5bef4fd1" + 3994971e5923716d54e4b574ce238f04c4e20cda03990670f7cc3f87d36e5499 + 95aece42a336f237c5bac5c5d9aca051b7f0bd3e6a64fb3c5828e6d0d3af2e8c" ;; x86_64-musl) distfiles=" ${_bootstrap_url}/rustc-${version}-x86_64-unknown-linux-musl.tar.xz ${_bootstrap_url}/rust-std-${version}-x86_64-unknown-linux-musl.tar.xz" checksum=" - d00be127d978177c0b2f439a1e63e4c25a3ca5f035a7282187555ab540cc18a3 - 899c2668e65ad3557033169e67a6fa3d9c816c62d39ee11d5ebef4eded226d0b" + 82bbe731cde3d323147b34aaf5ed2251b70ade44b96a69b5d93b8968d7af96ea + f2c30e43184b050f56cc2ac98af0752a881f104c08456731a9cd9e21d9f7dfb5" ;; # placeholders for user-supplied distfiles ppc64le) From 89f1e38a8808c6006e57fe09d85810c7f6b904a8 Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Fri, 3 May 2024 10:40:02 +0200 Subject: [PATCH 2/4] cargo-bootstrap: update to 1.78.0 --- srcpkgs/cargo-bootstrap/template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/cargo-bootstrap/template b/srcpkgs/cargo-bootstrap/template index 8a97b963bd76c2..ceadf8be595647 100644 --- a/srcpkgs/cargo-bootstrap/template +++ b/srcpkgs/cargo-bootstrap/template @@ -1,6 +1,6 @@ # Template file for 'cargo-bootstrap' pkgname=cargo-bootstrap -version=1.77.1 +version=1.78.0 revision=1 short_desc="Bootstrap binaries of Rust package manager" maintainer="Orphaned " @@ -24,15 +24,15 @@ esac case "$XBPS_TARGET_MACHINE" in i686) distfiles="${_bootstrap_url}/cargo-${version}-i686-unknown-linux-gnu.tar.xz" - checksum="3fe49c81296a64c51b69ddbeecbdf12e12e41eb9ca636e75b4bc372ae09858ee" + checksum="472230d0a04c6a2db80671549cb970176299817883dafbffb15c993f5aeaa909" ;; x86_64) distfiles="${_bootstrap_url}/cargo-${version}-x86_64-unknown-linux-gnu.tar.xz" - checksum="87713287303cbb44d89d839ade3de7fe679fcadfe4688a9c6829c276a7946e79" + checksum="f8aacf7a101eb10dc000b8bf26de90a9d0ce678d02ccf70430ed20dd31ecec6b" ;; x86_64-musl) distfiles="${_bootstrap_url}/cargo-${version}-x86_64-unknown-linux-musl.tar.xz" - checksum="d5ff9700b75c908ba0a1048386d0151414ad161da01d640c850b1955695b175f" + checksum="681721c1b07014c346f1114ed800e5f5c5eb64a7a22d808f8c0bbc5616374fa6" ;; # placeholders for user-supplied distfiles ppc64le) From 9992aa1fdd02d31ebeae867114ce44af157a64ac Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Fri, 3 May 2024 10:40:58 +0200 Subject: [PATCH 3/4] rust: update to 1.78.0 --- ...dlib-and-musl_root-from-musl-targets.patch | 52 +++++++++---------- ...ng-native-sysroot-to-use-for-linkage.patch | 30 +++++------ srcpkgs/rust/template | 4 +- 3 files changed, 43 insertions(+), 43 deletions(-) diff --git a/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch index fd039c031bf3f2..5e66e84d56ddb5 100644 --- a/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch +++ b/srcpkgs/rust/patches/0002-Remove-nostdlib-and-musl_root-from-musl-targets.patch @@ -61,10 +61,10 @@ index 53f710b8f..2a4eec15f 100644 new(&[ (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]), diff --git a/config.example.toml b/config.example.toml -index a7d4df545..feaa0f861 100644 +index f94553dd6..65139e167 100644 --- a/config.example.toml +++ b/config.example.toml -@@ -586,14 +586,6 @@ +@@ -591,14 +591,6 @@ # behavior -- this may lead to miscompilations or other bugs. #description = "" @@ -80,7 +80,7 @@ index a7d4df545..feaa0f861 100644 # platforms to ensure that the compiler is usable by default from the build # directory (as it links to a number of dynamic libraries). This may not be diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py -index 544a42d9a..8bd3fc755 100755 +index 818a7daad..5edc363f6 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py @@ -99,34 +99,6 @@ v("llvm-config", None, "set path to llvm-config") @@ -119,10 +119,10 @@ index 544a42d9a..8bd3fc755 100755 "riscv32gc-unknown-linux-musl install directory") v("musl-root-riscv64gc", "target.riscv64gc-unknown-linux-musl.musl-root", diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs -index df4d1a43d..b34309a27 100644 +index e927b491c..00475eb66 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs -@@ -307,39 +307,7 @@ fn copy_self_contained_objects( +@@ -361,39 +361,7 @@ fn copy_self_contained_objects( let mut target_deps = vec![]; // Copies the libc and CRT objects. @@ -150,7 +150,7 @@ index df4d1a43d..b34309a27 100644 - for &obj in &["crtbegin.o", "crtbeginS.o", "crtend.o", "crtendS.o"] { - let src = crt_path.join(obj); - let target = libdir_self_contained.join(obj); -- builder.copy(&src, &target); +- builder.copy_link(&src, &target); - target_deps.push((target, DependencyType::TargetSelfContained)); - } - @@ -163,7 +163,7 @@ index df4d1a43d..b34309a27 100644 let srcdir = builder .wasi_root(target) .unwrap_or_else(|| { -@@ -436,15 +404,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car +@@ -504,15 +472,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car .arg("--manifest-path") .arg(builder.src.join("library/sysroot/Cargo.toml")); @@ -180,18 +180,18 @@ index df4d1a43d..b34309a27 100644 if let Some(p) = builder.wasi_root(target) { let root = format!( diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs -index f1e1b89d9..e706b9d65 100644 +index 3e1bc9a9a..3eef99651 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs -@@ -308,7 +308,6 @@ pub struct Config { - pub missing_tools: bool, +@@ -310,7 +310,6 @@ pub struct Config { + pub missing_tools: bool, // FIXME: Deprecated field. Remove it at 2024. // Fallback musl-root for all targets - pub musl_root: Option, pub prefix: Option, pub sysconfdir: Option, pub datadir: Option, -@@ -574,8 +573,6 @@ pub struct Target { +@@ -579,8 +578,6 @@ pub struct Target { pub profiler: Option, pub rpath: Option, pub crt_static: Option, @@ -199,16 +199,16 @@ index f1e1b89d9..e706b9d65 100644 - pub musl_libdir: Option, pub wasi_root: Option, pub qemu_rootfs: Option, - pub no_std: bool, -@@ -1080,7 +1077,6 @@ define_config! { + pub runner: Option, +@@ -1089,7 +1086,6 @@ define_config! { default_linker: Option = "default-linker", channel: Option = "channel", description: Option = "description", - musl_root: Option = "musl-root", rpath: Option = "rpath", strip: Option = "strip", - stack_protector: Option = "stack-protector", -@@ -1131,8 +1127,6 @@ define_config! { + frame_pointers: Option = "frame-pointers", +@@ -1143,8 +1139,6 @@ define_config! { profiler: Option = "profiler", rpath: Option = "rpath", crt_static: Option = "crt-static", @@ -217,7 +217,7 @@ index f1e1b89d9..e706b9d65 100644 wasi_root: Option = "wasi-root", qemu_rootfs: Option = "qemu-rootfs", no_std: Option = "no-std", -@@ -1532,7 +1526,6 @@ impl Config { +@@ -1564,7 +1558,6 @@ impl Config { default_linker, channel, description, @@ -225,7 +225,7 @@ index f1e1b89d9..e706b9d65 100644 rpath, verbose_tests, optimize_tests, -@@ -1634,7 +1627,6 @@ impl Config { +@@ -1677,7 +1670,6 @@ impl Config { config.rustc_parallel = parallel_compiler.unwrap_or(config.channel == "dev" || config.channel == "nightly"); config.rustc_default_linker = default_linker; @@ -233,7 +233,7 @@ index f1e1b89d9..e706b9d65 100644 config.save_toolstates = save_toolstates.map(PathBuf::from); set( &mut config.deny_warnings, -@@ -1827,8 +1819,6 @@ impl Config { +@@ -1876,8 +1868,6 @@ impl Config { target.ranlib = cfg.ranlib.map(PathBuf::from); target.linker = cfg.linker.map(PathBuf::from); target.crt_static = cfg.crt_static; @@ -241,9 +241,9 @@ index f1e1b89d9..e706b9d65 100644 - target.musl_libdir = cfg.musl_libdir.map(PathBuf::from); target.wasi_root = cfg.wasi_root.map(PathBuf::from); target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from); - target.sanitizers = cfg.sanitizers; + target.runner = cfg.runner; diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs -index 9101d94ea..df72d6f9a 100644 +index e03b1e179..e61335d9b 100644 --- a/src/bootstrap/src/core/sanity.rs +++ b/src/bootstrap/src/core/sanity.rs @@ -11,7 +11,6 @@ @@ -254,7 +254,7 @@ index 9101d94ea..df72d6f9a 100644 use std::path::PathBuf; use std::process::Command; -@@ -215,28 +214,6 @@ than building it. +@@ -220,28 +219,6 @@ than building it. continue; } @@ -284,10 +284,10 @@ index 9101d94ea..df72d6f9a 100644 // There are three builds of cmake on windows: MSVC, MinGW, and // Cygwin. The Cygwin build does not have generators for Visual diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs -index 871318de5..b3f1eff91 100644 +index 5ed6b357e..9667bb0e0 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs -@@ -1290,25 +1290,6 @@ impl Build { +@@ -1319,25 +1319,6 @@ impl Build { } } @@ -297,7 +297,7 @@ index 871318de5..b3f1eff91 100644 - .target_config - .get(&target) - .and_then(|t| t.musl_root.as_ref()) -- .or_else(|| self.config.musl_root.as_ref()) +- .or(self.config.musl_root.as_ref()) - .map(|p| &**p) - } - @@ -314,10 +314,10 @@ index 871318de5..b3f1eff91 100644 fn wasi_root(&self, target: TargetSelection) -> Option<&Path> { self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p) diff --git a/src/bootstrap/src/utils/cc_detect.rs b/src/bootstrap/src/utils/cc_detect.rs -index fb5b9d8c8..c6c9368a0 100644 +index 3ba4e0cb6..31ffacb25 100644 --- a/src/bootstrap/src/utils/cc_detect.rs +++ b/src/bootstrap/src/utils/cc_detect.rs -@@ -201,30 +201,6 @@ fn default_compiler( +@@ -199,30 +199,6 @@ fn default_compiler( } } diff --git a/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch b/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch index 37ca0845b697d6..9ce295415b5f1c 100644 --- a/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch +++ b/srcpkgs/rust/patches/0013-allow-specifying-native-sysroot-to-use-for-linkage.patch @@ -7,41 +7,41 @@ This allows us to get around the linker attempting to use incompatible libs. diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs -index e18096443..b48742ae4 100644 +index 7f93fdc72..f52644b57 100644 --- a/src/bootstrap/src/core/builder.rs +++ b/src/bootstrap/src/core/builder.rs -@@ -1706,6 +1706,10 @@ impl<'a> Builder<'a> { - hostflags.arg(&arg); +@@ -2429,6 +2429,10 @@ impl Cargo { + self.hostflags.arg(&arg); } -+ if let Some(sysroot) = self.native_sysroot(target) { -+ rustflags.arg(&format!("-Clink-args=--sysroot={}", sysroot.display())); ++ if let Some(sysroot) = builder.native_sysroot(target) { ++ self.rustflags.arg(&format!("-Clink-args=--sysroot={}", sysroot.display())); + } + - if let Some(target_linker) = self.linker(target) { + if let Some(target_linker) = builder.linker(target) { let target = crate::envify(&target.triple); - cargo.env(&format!("CARGO_TARGET_{target}_LINKER"), target_linker); + self.command.env(&format!("CARGO_TARGET_{target}_LINKER"), target_linker); diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs -index f1e1b89d9..30e61161d 100644 +index 3e1bc9a9a..e0038b9ac 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs -@@ -570,6 +570,7 @@ pub struct Target { - pub ranlib: Option, +@@ -575,6 +575,7 @@ pub struct Target { pub default_linker: Option, pub linker: Option, + pub split_debuginfo: Option, + pub sysroot: Option, pub sanitizers: Option, pub profiler: Option, pub rpath: Option, -@@ -1123,6 +1124,7 @@ define_config! { - ranlib: Option = "ranlib", +@@ -1135,6 +1136,7 @@ define_config! { default_linker: Option = "default-linker", linker: Option = "linker", + split_debuginfo: Option = "split-debuginfo", + sysroot: Option = "sysroot", llvm_config: Option = "llvm-config", llvm_has_rust_patches: Option = "llvm-has-rust-patches", llvm_filecheck: Option = "llvm-filecheck", -@@ -1826,6 +1828,7 @@ impl Config { +@@ -1875,6 +1877,7 @@ impl Config { target.ar = cfg.ar.map(PathBuf::from); target.ranlib = cfg.ranlib.map(PathBuf::from); target.linker = cfg.linker.map(PathBuf::from); @@ -50,10 +50,10 @@ index f1e1b89d9..30e61161d 100644 target.musl_root = cfg.musl_root.map(PathBuf::from); target.musl_libdir = cfg.musl_libdir.map(PathBuf::from); diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs -index 871318de5..96abbe721 100644 +index 5ed6b357e..0d4392dd8 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs -@@ -1289,6 +1289,10 @@ impl Build { +@@ -1318,6 +1318,10 @@ impl Build { self.config.target_config.get(&target).and_then(|t| t.crt_static) } } diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template index 21e11623638676..4c1c4b0170861b 100644 --- a/srcpkgs/rust/template +++ b/srcpkgs/rust/template @@ -8,7 +8,7 @@ # uploaded to https://repo-default.voidlinux.org/distfiles/ # pkgname=rust -version=1.77.1 +version=1.78.0 revision=1 hostmakedepends="curl pkg-config python3 tar cargo-bootstrap" makedepends="libffi-devel ncurses-devel libxml2-devel zlib-devel llvm17-devel" @@ -18,7 +18,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=ee106e4c569f52dba3b5b282b105820f86bd8f6b3d09c06b8dce82fb1bb3a4a1 +checksum=ff544823a5cb27f2738128577f1e7e00ee8f4c83f2a348781ae4fc355e91d5a9 lib32disabled=yes make_check=no # CBA for now python_version=3 # needed for python files in rust-src From afc28a93e417287c3db183d2ccfb433e0b3aa001 Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Fri, 3 May 2024 10:41:12 +0200 Subject: [PATCH 4/4] cargo: update to 1.78.0 --- srcpkgs/cargo/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template index 4d75e4a7306e12..30caa26d74b257 100644 --- a/srcpkgs/cargo/template +++ b/srcpkgs/cargo/template @@ -1,8 +1,8 @@ # Template file for 'cargo' pkgname=cargo -version=1.77.1 +version=1.78.0 revision=1 -_cargo_revision=0.78.1 +_cargo_revision=0.79.0 build_helper=rust hostmakedepends="cargo-bootstrap rust python3 curl pkg-config zlib-devel" makedepends="rust libcurl-devel openssl-devel" @@ -12,7 +12,7 @@ maintainer="Enno Boland " license="MIT, Apache-2.0" homepage="https://crates.io/" distfiles="https://github.com/rust-lang/cargo/archive/refs/tags/${_cargo_revision}.tar.gz" -checksum=0283fecebb6d3cbd111688eb0359edaf6676f4b2829201a8afe5a0e3afdb4b48 +checksum=b9de52bc7452fd74ab344b636f054de3e9a67cf167567cc4ce948e9219e81d98 replaces="cargo-tree>=0" build_options="static bindist"