From 9bbb2ab4e161fd33299c2b3a20fd4f4b3b4a381b Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Fri, 6 Oct 2023 00:38:43 +0200 Subject: [PATCH] rust: update to 1.73.0 --- ...dlib-and-musl_root-from-musl-targets.patch | 50 +++++++++---------- ...4-fix-shebang-on-install-template.sh.patch | 4 +- srcpkgs/rust/template | 4 +- 3 files changed, 29 insertions(+), 29 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 06620bb8a43..093afb15cba 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 @@ -60,10 +60,10 @@ index 61553e71b..88f807a58 100644 base } diff --git a/config.example.toml b/config.example.toml -index 0c65b25fe..3030f1a92 100644 +index 5c4bee875..bccf81b0a 100644 --- a/config.example.toml +++ b/config.example.toml -@@ -563,14 +563,6 @@ changelog-seen = 2 +@@ -573,14 +573,6 @@ changelog-seen = 2 # behavior -- this may lead to miscompilations or other bugs. #description = "" @@ -79,7 +79,7 @@ index 0c65b25fe..3030f1a92 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/cc_detect.rs b/src/bootstrap/cc_detect.rs -index ade3bfed1..66d2f549a 100644 +index 2496c2a9d..9aff56181 100644 --- a/src/bootstrap/cc_detect.rs +++ b/src/bootstrap/cc_detect.rs @@ -110,7 +110,7 @@ pub fn find_target(build: &Build, target: TargetSelection) { @@ -136,10 +136,10 @@ index ade3bfed1..66d2f549a 100644 } } diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs -index 14c3ef79a..c525031d1 100644 +index 9c68e5a78..09fb6a721 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs -@@ -268,39 +268,7 @@ fn copy_self_contained_objects( +@@ -256,39 +256,7 @@ fn copy_self_contained_objects( let mut target_deps = vec![]; // Copies the libc and CRT objects. @@ -149,7 +149,7 @@ index 14c3ef79a..c525031d1 100644 - // 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") { +- if target.contains("musl") && !target.contains("unikraft") { - let srcdir = builder.musl_libdir(target).unwrap_or_else(|| { - panic!("Target {:?} does not have a \"musl-libdir\" key", target.triple) - }); @@ -175,12 +175,12 @@ index 14c3ef79a..c525031d1 100644 - let libunwind_path = copy_llvm_libunwind(builder, target, &libdir_self_contained); - target_deps.push((libunwind_path, DependencyType::TargetSelfContained)); - } -- } else if target.ends_with("-wasi") { -+ if target.ends_with("-wasi") { +- } else if target.contains("-wasi") { ++ if target.contains("-wasi") { let srcdir = builder .wasi_root(target) .unwrap_or_else(|| { -@@ -397,15 +365,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car +@@ -390,15 +358,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car .arg("--manifest-path") .arg(builder.src.join("library/sysroot/Cargo.toml")); @@ -193,14 +193,14 @@ index 14c3ef79a..c525031d1 100644 - } - } - - if target.ends_with("-wasi") { + if target.contains("-wasi") { if let Some(p) = builder.wasi_root(target) { - let root = format!("native={}/lib/wasm32-wasi", p.to_str().unwrap()); + let root = format!( diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs -index fe932fd6b..937801cea 100644 +index 4821d20a8..b9743ce8b 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs -@@ -263,7 +263,6 @@ pub struct Config { +@@ -264,7 +264,6 @@ pub struct Config { pub missing_tools: bool, // Fallback musl-root for all targets @@ -208,8 +208,8 @@ index fe932fd6b..937801cea 100644 pub prefix: Option, pub sysconfdir: Option, pub datadir: Option, -@@ -536,8 +535,6 @@ pub struct Target { - pub profiler: Option, +@@ -537,8 +536,6 @@ pub struct Target { + pub profiler: Option, pub rpath: Option, pub crt_static: Option, - pub musl_root: Option, @@ -217,7 +217,7 @@ index fe932fd6b..937801cea 100644 pub wasi_root: Option, pub qemu_rootfs: Option, pub no_std: bool, -@@ -945,7 +942,6 @@ define_config! { +@@ -998,7 +995,6 @@ define_config! { default_linker: Option = "default-linker", channel: Option = "channel", description: Option = "description", @@ -225,8 +225,8 @@ index fe932fd6b..937801cea 100644 rpath: Option = "rpath", verbose_tests: Option = "verbose-tests", optimize_tests: Option = "optimize-tests", -@@ -994,8 +990,6 @@ define_config! { - profiler: Option = "profiler", +@@ -1047,8 +1043,6 @@ define_config! { + profiler: Option = "profiler", rpath: Option = "rpath", crt_static: Option = "crt-static", - musl_root: Option = "musl-root", @@ -234,7 +234,7 @@ index fe932fd6b..937801cea 100644 wasi_root: Option = "wasi-root", qemu_rootfs: Option = "qemu-rootfs", no_std: Option = "no-std", -@@ -1367,7 +1361,6 @@ impl Config { +@@ -1430,7 +1424,6 @@ impl Config { set(&mut config.llvm_tools_enabled, rust.llvm_tools); config.rustc_parallel = rust.parallel_compiler.unwrap_or(false); config.rustc_default_linker = rust.default_linker; @@ -242,7 +242,7 @@ index fe932fd6b..937801cea 100644 config.save_toolstates = rust.save_toolstates.map(PathBuf::from); set( &mut config.deny_warnings, -@@ -1534,8 +1527,6 @@ impl Config { +@@ -1615,8 +1608,6 @@ impl Config { target.ranlib = cfg.ranlib.map(PathBuf::from); target.linker = cfg.linker.map(PathBuf::from); target.crt_static = cfg.crt_static; @@ -252,7 +252,7 @@ index fe932fd6b..937801cea 100644 target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from); target.sanitizers = cfg.sanitizers; diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py -index e8eebdfb5..8e1b4ec98 100755 +index 15e8c1eb9..7749fc54d 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py @@ -110,34 +110,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk", @@ -291,10 +291,10 @@ index e8eebdfb5..8e1b4ec98 100755 "riscv32gc-unknown-linux-musl install directory") v("musl-root-riscv64gc", "target.riscv64gc-unknown-linux-musl.musl-root", diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs -index 0a7aff622..8f06a1b51 100644 +index 4396bbc51..683ba5480 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs -@@ -1256,25 +1256,6 @@ impl Build { +@@ -1289,25 +1289,6 @@ impl Build { } } @@ -321,7 +321,7 @@ index 0a7aff622..8f06a1b51 100644 fn wasi_root(&self, target: TargetSelection) -> Option<&Path> { self.config.target_config.get(&target).and_then(|t| t.wasi_root.as_ref()).map(|p| &**p) diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs -index 8f5ba4273..73192fef2 100644 +index 7e83b508e..761e83ddc 100644 --- a/src/bootstrap/sanity.rs +++ b/src/bootstrap/sanity.rs @@ -11,7 +11,6 @@ @@ -337,7 +337,7 @@ index 8f5ba4273..73192fef2 100644 } - // Make sure musl-root is valid -- if target.contains("musl") { +- if target.contains("musl") && !target.contains("unikraft") { - // If this is a native target (host is also musl) and no musl-root is given, - // fall back to the system toolchain in /usr before giving up - if build.musl_root(*target).is_none() && build.config.build == *target { diff --git a/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch b/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch index 2326d3cc423..dcf4ed953a8 100644 --- a/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch +++ b/srcpkgs/rust/patches/0004-fix-shebang-on-install-template.sh.patch @@ -4,11 +4,11 @@ Date: Mon, 20 Dec 2021 00:55:18 +0100 Subject: [PATCH 04/15] fix shebang on install-template.sh diff --git a/src/tools/rust-installer/install-template.sh b/src/tools/rust-installer/install-template.sh -index 92a3f1f2c..fca281191 100644 +index b477c3eac..7bf7ed7fb 100644 --- a/src/tools/rust-installer/install-template.sh +++ b/src/tools/rust-installer/install-template.sh @@ -1,4 +1,4 @@ --#!/bin/bash +-#!/usr/bin/env bash +#!/bin/sh # No undefined variables diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template index 708e04edbc7..7f560e029a2 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.72.1 +version=1.73.0 revision=1 hostmakedepends="curl pkg-config python3 tar cargo-bootstrap" makedepends="libffi-devel ncurses-devel libxml2-devel zlib-devel llvm15" @@ -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=7f48845f6a52cdbb5d63fb0528fd5f520eb443275b55f98e328159f86568f895 +checksum=96d62e6d1f2d21df7ac8acb3b9882411f9e7c7036173f7f2ede9e1f1f6b1bb3a lib32disabled=yes make_check=no # CBA for now python_version=3 # needed for python files in rust-src