From 2936b3fb9a993af94905111ddca1e44972f1927a Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Tue, 22 Aug 2023 18:05:45 +0200 Subject: [PATCH] rust: update to 1.72.0 --- ...dlib-and-musl_root-from-musl-targets.patch | 74 +++++++++---------- srcpkgs/rust/template | 11 ++- 2 files changed, 45 insertions(+), 40 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 ef3154a84cd..06620bb8a43 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 d0eaa9fd7..b92f9488e 100644 +index 0c65b25fe..3030f1a92 100644 --- a/config.example.toml +++ b/config.example.toml -@@ -556,14 +556,6 @@ changelog-seen = 2 +@@ -563,14 +563,6 @@ changelog-seen = 2 # behavior -- this may lead to miscompilations or other bugs. #description = "" @@ -79,28 +79,28 @@ index d0eaa9fd7..b92f9488e 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 65c882fb8..f35a92821 100644 +index ade3bfed1..66d2f549a 100644 --- a/src/bootstrap/cc_detect.rs +++ b/src/bootstrap/cc_detect.rs -@@ -103,7 +103,7 @@ pub fn find(build: &mut Build) { - if let Some(cc) = config.and_then(|c| c.cc.as_ref()) { - cfg.compiler(cc); - } else { -- set_compiler(&mut cfg, Language::C, target, config, build); -+ set_compiler(&mut cfg, Language::C, target, config); - } +@@ -110,7 +110,7 @@ pub fn find_target(build: &Build, target: TargetSelection) { + if let Some(cc) = config.and_then(|c| c.cc.as_ref()) { + cfg.compiler(cc); + } else { +- set_compiler(&mut cfg, Language::C, target, config, build); ++ set_compiler(&mut cfg, Language::C, target, config); + } - let compiler = cfg.get_compiler(); -@@ -124,7 +124,7 @@ pub fn find(build: &mut Build) { - cfg.compiler(cxx); - true - } else if build.hosts.contains(&target) || build.build == target { -- set_compiler(&mut cfg, Language::CPlusPlus, target, config, build); -+ set_compiler(&mut cfg, Language::CPlusPlus, target, config); - true - } else { - // Use an auto-detected compiler (or one configured via `CXX_target_triple` env vars). -@@ -160,7 +160,6 @@ fn set_compiler( + let compiler = cfg.get_compiler(); +@@ -131,7 +131,7 @@ pub fn find_target(build: &Build, target: TargetSelection) { + cfg.compiler(cxx); + true + } else if build.hosts.contains(&target) || build.build == target { +- set_compiler(&mut cfg, Language::CPlusPlus, target, config, build); ++ set_compiler(&mut cfg, Language::CPlusPlus, target, config); + true + } else { + // Use an auto-detected compiler (or one configured via `CXX_target_triple` env vars). +@@ -166,7 +166,6 @@ fn set_compiler( compiler: Language, target: TargetSelection, config: Option<&Target>, @@ -108,7 +108,7 @@ index 65c882fb8..f35a92821 100644 ) { match &*target.triple { // When compiling for android we may have the NDK configured in the -@@ -196,26 +195,6 @@ fn set_compiler( +@@ -202,26 +201,6 @@ fn set_compiler( } } @@ -136,10 +136,10 @@ index 65c882fb8..f35a92821 100644 } } diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs -index 33addb90d..fb6c97d82 100644 +index 14c3ef79a..c525031d1 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs -@@ -237,39 +237,7 @@ fn copy_self_contained_objects( +@@ -268,39 +268,7 @@ fn copy_self_contained_objects( let mut target_deps = vec![]; // Copies the libc and CRT objects. @@ -180,7 +180,7 @@ index 33addb90d..fb6c97d82 100644 let srcdir = builder .wasi_root(target) .unwrap_or_else(|| { -@@ -366,15 +334,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car +@@ -397,15 +365,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car .arg("--manifest-path") .arg(builder.src.join("library/sysroot/Cargo.toml")); @@ -197,10 +197,10 @@ index 33addb90d..fb6c97d82 100644 if let Some(p) = builder.wasi_root(target) { let root = format!("native={}/lib/wasm32-wasi", p.to_str().unwrap()); diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs -index e192cda9a..a7c39c40e 100644 +index fe932fd6b..937801cea 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs -@@ -211,7 +211,6 @@ pub struct Config { +@@ -263,7 +263,6 @@ pub struct Config { pub missing_tools: bool, // Fallback musl-root for all targets @@ -208,7 +208,7 @@ index e192cda9a..a7c39c40e 100644 pub prefix: Option, pub sysconfdir: Option, pub datadir: Option, -@@ -470,8 +469,6 @@ pub struct Target { +@@ -536,8 +535,6 @@ pub struct Target { pub profiler: Option, pub rpath: Option, pub crt_static: Option, @@ -217,7 +217,7 @@ index e192cda9a..a7c39c40e 100644 pub wasi_root: Option, pub qemu_rootfs: Option, pub no_std: bool, -@@ -834,7 +831,6 @@ define_config! { +@@ -945,7 +942,6 @@ define_config! { default_linker: Option = "default-linker", channel: Option = "channel", description: Option = "description", @@ -225,7 +225,7 @@ index e192cda9a..a7c39c40e 100644 rpath: Option = "rpath", verbose_tests: Option = "verbose-tests", optimize_tests: Option = "optimize-tests", -@@ -883,8 +879,6 @@ define_config! { +@@ -994,8 +990,6 @@ define_config! { profiler: Option = "profiler", rpath: Option = "rpath", crt_static: Option = "crt-static", @@ -234,7 +234,7 @@ index e192cda9a..a7c39c40e 100644 wasi_root: Option = "wasi-root", qemu_rootfs: Option = "qemu-rootfs", no_std: Option = "no-std", -@@ -1247,7 +1241,6 @@ impl Config { +@@ -1367,7 +1361,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 e192cda9a..a7c39c40e 100644 config.save_toolstates = rust.save_toolstates.map(PathBuf::from); set( &mut config.deny_warnings, -@@ -1414,8 +1407,6 @@ impl Config { +@@ -1534,8 +1527,6 @@ impl Config { target.ranlib = cfg.ranlib.map(PathBuf::from); target.linker = cfg.linker.map(PathBuf::from); target.crt_static = cfg.crt_static; @@ -252,10 +252,10 @@ index e192cda9a..a7c39c40e 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 571062a3a..a6fe35975 100755 +index e8eebdfb5..8e1b4ec98 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py -@@ -111,34 +111,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk", +@@ -110,34 +110,6 @@ v("aarch64-linux-android-ndk", "target.aarch64-linux-android.android-ndk", "aarch64-linux-android NDK standalone path") v("x86_64-linux-android-ndk", "target.x86_64-linux-android.android-ndk", "x86_64-linux-android NDK standalone path") @@ -291,10 +291,10 @@ index 571062a3a..a6fe35975 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 943f51341..688e64296 100644 +index 0a7aff622..8f06a1b51 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs -@@ -1219,25 +1219,6 @@ impl Build { +@@ -1256,25 +1256,6 @@ impl Build { } } @@ -321,7 +321,7 @@ index 943f51341..688e64296 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 140259b02..24bfb6019 100644 +index 8f5ba4273..73192fef2 100644 --- a/src/bootstrap/sanity.rs +++ b/src/bootstrap/sanity.rs @@ -11,7 +11,6 @@ diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template index 01c14dce774..a2dc1450570 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.71.1 +version=1.72.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=6fa90d50d1d529a75f6cc349784de57d7ec0ba2419b09bde7d335c25bd4e472e +checksum=ea9d61bbb51d76b6ea681156f69f0e0596b59722f04414b01c6e100b4b5be3a1 lib32disabled=yes make_check=no # CBA for now python_version=3 # needed for python files in rust-src @@ -114,7 +114,7 @@ do_configure() { --enable-locked-deps \ --enable-verbose-tests \ --disable-full-bootstrap \ - --disable-extended \ + --enable-extended \ --disable-codegen-tests \ --disable-dist-src \ --${_llvm_shared}-llvm-link-shared \ @@ -128,6 +128,7 @@ do_configure() { --release-description="Void Linux" \ --llvm-libunwind=no \ --llvm-config=/usr/bin/llvm-config \ + --tools=clippy,rustdoc,rustfmt \ --set="rust.optimize=true" \ --set="rust.debug=false" \ --set="rust.codegen-units=1" \ @@ -199,6 +200,10 @@ do_install() { -C "$DESTDIR/usr" --strip-components=2 --exclude=manifest.in tar xf build/dist/rust-src-${version}.tar.gz \ -C "$DESTDIR/usr" --strip-components=2 --exclude=manifest.in + tar xf build/dist/rustfmt-${version}-${RUST_TARGET}.tar.gz \ + -C "$DESTDIR/usr" --strip-components=2 --exclude=manifest.in + tar xf build/dist/clippy-${version}-${RUST_TARGET}.tar.gz \ + -C "$DESTDIR/usr" --strip-components=2 --exclude=manifest.in vlicense COPYRIGHT vlicense LICENSE-APACHE