From 87b7abc3ee3209aa687fc6acaf74e87ea3c26124 Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Fri, 29 Dec 2023 00:50:13 +0100 Subject: [PATCH 1/4] rust-bootstrap: update to 1.75.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 5074e3ca47410..8ba0300995587 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.74.1 +version=1.75.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=" - d93054003c3b6ba8752466b27cf6f61140b3e04f1aa69315b77041ab1152af4d - de7bfa755339d81d0f375c04a6b5432fba8452fdc72154fbe5cd5e1147902b90" + a39aed533c63b4da6c0d9f30e76d7290ed5b3be2e66bde43d02764d7b50d382f + 42c0aba08ddcad191c84adcb5b6479b4599b9e4656e4e2b6d3ed5b46fa4a04fb" ;; 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=" - b30e2d1b6b139874caa3fc81fbc3098e88cf01b98e891ce591d12ad4f0299437 - df435e3254c03ccbfc9e733ae33b399f5f99bd488974bc07d8b1db91a12ee95b" + 2824ba4045acdddfa436da4f0bb72807b64a089aa2e7c9a66ca1a3a571114ce7 + 136b132199f7bbda2aa0bbff6d1e6ae7d5fca2994a2f2a432a5e99de224b6314" ;; 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=" - 8c743d9ed5490b544f7728c248804846ee6ffbdf3840b5844e7e9deb9cd71f0d - 98f190039c7e7922838f9716443b7ddfec2aa3dc229f5b1813a26591c557997e" + 692c9e78bca24010f4eb8d8a02febd8f55463ef8aa49975a780c4124f10abe5e + 3728f2d2266b5c87fe2a7ae9c46fc43d06f8c855d7d0f141de6bcd24b43ae919" ;; # placeholders for user-supplied distfiles ppc64le) From b133ec85c7e44373b0555e912031bbc0fa043c59 Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Fri, 29 Dec 2023 00:51:05 +0100 Subject: [PATCH 2/4] cargo-bootstrap: update to 1.75.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 a930360d2dbff..3728f9000ccd9 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.74.1 +version=1.75.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="9722ea1d7463f78f3098067ea3d73a153dce5a30ca2b37b0bef88be1612542d7" + checksum="ab652e4755def10f37c245245643d60f56cb28a7dcd2defb8a1d560eafbf08f1" ;; x86_64) distfiles="${_bootstrap_url}/cargo-${version}-x86_64-unknown-linux-gnu.tar.xz" - checksum="3ea1159af625c281a9d4486efbeb51e1a24ccba58a39db230af38fa331a95f34" + checksum="6ac164e7da969a1d524f747f22792e9aa08bc7446f058314445a4f3c1d31a6bd" ;; x86_64-musl) distfiles="${_bootstrap_url}/cargo-${version}-x86_64-unknown-linux-musl.tar.xz" - checksum="57a3638685d19c44ddc7283e683f30e37ca1d0fecb2b744b37f3a86376fe4c45" + checksum="202591b3efe015399329c3b1664bb832f45a76e3ec90f16ba85641e8b1688a7e" ;; # placeholders for user-supplied distfiles ppc64le) From 7c909696b0ff64115a6991230d41e05a50da563c Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Fri, 29 Dec 2023 00:54:10 +0100 Subject: [PATCH 3/4] rust: update to 1.75.0 --- .../rust/patches/0001-Fix-LLVM-build.patch | 19 +- ...dlib-and-musl_root-from-musl-targets.patch | 325 ++++++++---------- ...e-debugger-scripts-to-usr-share-rust.patch | 12 +- ...not-install-libunwind-source-removed.patch | 17 +- ...006-fix-rustdoc-when-cross-compiling.patch | 37 +- ...-stage-2-tools-dynamically-to-libstd.patch | 16 +- ...le-initial-exec-TLS-model-on-powerpc.patch | 13 +- ...ng-native-sysroot-to-use-for-linkage.patch | 58 ++-- srcpkgs/rust/template | 4 +- 9 files changed, 225 insertions(+), 276 deletions(-) diff --git a/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch b/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch index 6cf9c3a755a9a..d5368af73453e 100644 --- a/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch +++ b/srcpkgs/rust/patches/0001-Fix-LLVM-build.patch @@ -3,15 +3,11 @@ From: Samuel Holland Date: Fri, 8 Sep 2017 00:04:29 -0500 Subject: [PATCH 01/15] Fix LLVM build ---- - src/bootstrap/lib.rs | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs -index 4ac857b47..b603ae90a 100644 ---- a/src/bootstrap/lib.rs -+++ b/src/bootstrap/lib.rs -@@ -1050,7 +1050,8 @@ impl Build { +diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs +index 33b8f1a7c..f4942dd2d 100644 +--- a/src/bootstrap/src/lib.rs ++++ b/src/bootstrap/src/lib.rs +@@ -1195,7 +1195,8 @@ impl Build { .args() .iter() .map(|s| s.to_string_lossy().into_owned()) @@ -20,7 +16,4 @@ index 4ac857b47..b603ae90a 100644 + && !s.starts_with("-static")) .collect::>(); - // If we're compiling on macOS then we add a few unconditional flags --- -2.37.2 - + // If we're compiling C++ on macOS then we add a flag indicating that 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 9248d6756544f..7b7adf3a73f6d 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 @@ -5,11 +5,33 @@ Subject: [PATCH 02/15] Remove -nostdlib and musl_root from musl targets extended by various void contributors to match our musl setup +diff --git a/compiler/rustc_target/src/spec/base/linux_musl.rs b/compiler/rustc_target/src/spec/base/linux_musl.rs +index 5117cadbe..c7d0433bb 100644 +--- a/compiler/rustc_target/src/spec/base/linux_musl.rs ++++ b/compiler/rustc_target/src/spec/base/linux_musl.rs +@@ -1,16 +1,9 @@ +-use crate::spec::crt_objects; +-use crate::spec::{base, LinkSelfContainedDefault, TargetOptions}; ++use crate::spec::{base, TargetOptions}; + + pub fn opts() -> TargetOptions { + let mut base = base::linux::opts(); + + base.env = "musl".into(); +- base.pre_link_objects_self_contained = crt_objects::pre_musl_self_contained(); +- base.post_link_objects_self_contained = crt_objects::post_musl_self_contained(); +- base.link_self_contained = LinkSelfContainedDefault::InferredForMusl; +- +- // These targets statically link libc by default +- base.crt_static_default = true; + + base + } diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs -index c126390f5..7aef73d3b 100644 +index 53f710b8f..2a4eec15f 100644 --- a/compiler/rustc_target/src/spec/crt_objects.rs +++ b/compiler/rustc_target/src/spec/crt_objects.rs -@@ -63,28 +63,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects { +@@ -61,28 +61,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects { ]) } @@ -38,32 +60,11 @@ index c126390f5..7aef73d3b 100644 pub(super) fn pre_mingw_self_contained() -> CrtObjects { new(&[ (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]), -diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs -index 61553e71b..88f807a58 100644 ---- a/compiler/rustc_target/src/spec/linux_musl_base.rs -+++ b/compiler/rustc_target/src/spec/linux_musl_base.rs -@@ -1,16 +1,9 @@ --use crate::spec::crt_objects::{self, LinkSelfContainedDefault}; - use crate::spec::TargetOptions; - - pub fn opts() -> TargetOptions { - let mut base = super::linux_base::opts(); - - base.env = "musl".into(); -- base.pre_link_objects_self_contained = crt_objects::pre_musl_self_contained(); -- base.post_link_objects_self_contained = crt_objects::post_musl_self_contained(); -- base.link_self_contained = LinkSelfContainedDefault::Musl; -- -- // These targets statically link libc by default -- base.crt_static_default = true; - - base - } diff --git a/config.example.toml b/config.example.toml -index f3c2366d6..fa2b7726e 100644 +index e5df28a49..31c682ab9 100644 --- a/config.example.toml +++ b/config.example.toml -@@ -574,14 +574,6 @@ changelog-seen = 2 +@@ -589,14 +589,6 @@ change-id = 116881 # behavior -- this may lead to miscompilations or other bugs. #description = "" @@ -78,68 +79,50 @@ index f3c2366d6..fa2b7726e 100644 # 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 -diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs -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) { - 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(); -@@ -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>, -- build: &Build, - ) { - match &*target.triple { - // When compiling for android we may have the NDK configured in the -@@ -202,26 +201,6 @@ fn set_compiler( - } - } - -- "mips-unknown-linux-musl" => { -- if cfg.get_compiler().path().to_str() == Some("gcc") { -- cfg.compiler("mips-linux-musl-gcc"); -- } -- } -- "mipsel-unknown-linux-musl" => { -- if cfg.get_compiler().path().to_str() == Some("gcc") { -- cfg.compiler("mipsel-linux-musl-gcc"); -- } -- } -- -- t if t.contains("musl") => { -- if let Some(root) = build.musl_root(target) { -- let guess = root.join("bin/musl-gcc"); -- if guess.exists() { -- cfg.compiler(guess); -- } -- } -- } -- - _ => {} - } - } -diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs -index 292ccc578..d1f5ff98a 100644 ---- a/src/bootstrap/compile.rs -+++ b/src/bootstrap/compile.rs -@@ -256,39 +256,7 @@ fn copy_self_contained_objects( +diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py +index 544a42d9a..8bd3fc755 100755 +--- a/src/bootstrap/configure.py ++++ b/src/bootstrap/configure.py +@@ -99,34 +99,6 @@ v("llvm-config", None, "set path to llvm-config") + v("llvm-filecheck", None, "set path to LLVM's FileCheck utility") + v("python", "build.python", "set path to python") + v("android-ndk", "build.android-ndk", "set path to Android NDK") +-v("musl-root", "target.x86_64-unknown-linux-musl.musl-root", +- "MUSL root installation directory (deprecated)") +-v("musl-root-x86_64", "target.x86_64-unknown-linux-musl.musl-root", +- "x86_64-unknown-linux-musl install directory") +-v("musl-root-i586", "target.i586-unknown-linux-musl.musl-root", +- "i586-unknown-linux-musl install directory") +-v("musl-root-i686", "target.i686-unknown-linux-musl.musl-root", +- "i686-unknown-linux-musl install directory") +-v("musl-root-arm", "target.arm-unknown-linux-musleabi.musl-root", +- "arm-unknown-linux-musleabi install directory") +-v("musl-root-armhf", "target.arm-unknown-linux-musleabihf.musl-root", +- "arm-unknown-linux-musleabihf install directory") +-v("musl-root-armv5te", "target.armv5te-unknown-linux-musleabi.musl-root", +- "armv5te-unknown-linux-musleabi install directory") +-v("musl-root-armv7", "target.armv7-unknown-linux-musleabi.musl-root", +- "armv7-unknown-linux-musleabi install directory") +-v("musl-root-armv7hf", "target.armv7-unknown-linux-musleabihf.musl-root", +- "armv7-unknown-linux-musleabihf install directory") +-v("musl-root-aarch64", "target.aarch64-unknown-linux-musl.musl-root", +- "aarch64-unknown-linux-musl install directory") +-v("musl-root-mips", "target.mips-unknown-linux-musl.musl-root", +- "mips-unknown-linux-musl install directory") +-v("musl-root-mipsel", "target.mipsel-unknown-linux-musl.musl-root", +- "mipsel-unknown-linux-musl install directory") +-v("musl-root-mips64", "target.mips64-unknown-linux-muslabi64.musl-root", +- "mips64-unknown-linux-muslabi64 install directory") +-v("musl-root-mips64el", "target.mips64el-unknown-linux-muslabi64.musl-root", +- "mips64el-unknown-linux-muslabi64 install directory") + v("musl-root-riscv32gc", "target.riscv32gc-unknown-linux-musl.musl-root", + "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 7021a9543..b314bbb8d 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( let mut target_deps = vec![]; // Copies the libc and CRT objects. @@ -180,7 +163,7 @@ index 292ccc578..d1f5ff98a 100644 let srcdir = builder .wasi_root(target) .unwrap_or_else(|| { -@@ -390,15 +358,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car +@@ -436,15 +404,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car .arg("--manifest-path") .arg(builder.src.join("library/sysroot/Cargo.toml")); @@ -196,11 +179,11 @@ index 292ccc578..d1f5ff98a 100644 if target.contains("-wasi") { if let Some(p) = builder.wasi_root(target) { let root = format!( -diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs -index 836328f94..1d0dc3e98 100644 ---- a/src/bootstrap/config.rs -+++ b/src/bootstrap/config.rs -@@ -264,7 +264,6 @@ pub struct Config { +diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs +index 0a9175aa3..029f32912 100644 +--- a/src/bootstrap/src/core/config/config.rs ++++ b/src/bootstrap/src/core/config/config.rs +@@ -270,7 +270,6 @@ pub struct Config { pub missing_tools: bool, // Fallback musl-root for all targets @@ -208,7 +191,7 @@ index 836328f94..1d0dc3e98 100644 pub prefix: Option, pub sysconfdir: Option, pub datadir: Option, -@@ -522,8 +521,6 @@ pub struct Target { +@@ -528,8 +527,6 @@ pub struct Target { pub profiler: Option, pub rpath: Option, pub crt_static: Option, @@ -217,7 +200,7 @@ index 836328f94..1d0dc3e98 100644 pub wasi_root: Option, pub qemu_rootfs: Option, pub no_std: bool, -@@ -979,7 +976,6 @@ define_config! { +@@ -998,7 +995,6 @@ define_config! { default_linker: Option = "default-linker", channel: Option = "channel", description: Option = "description", @@ -225,7 +208,7 @@ index 836328f94..1d0dc3e98 100644 rpath: Option = "rpath", verbose_tests: Option = "verbose-tests", optimize_tests: Option = "optimize-tests", -@@ -1028,8 +1024,6 @@ define_config! { +@@ -1046,8 +1042,6 @@ define_config! { profiler: Option = "profiler", rpath: Option = "rpath", crt_static: Option = "crt-static", @@ -234,15 +217,15 @@ index 836328f94..1d0dc3e98 100644 wasi_root: Option = "wasi-root", qemu_rootfs: Option = "qemu-rootfs", no_std: Option = "no-std", -@@ -1412,7 +1406,6 @@ impl Config { - set(&mut config.llvm_tools_enabled, rust.llvm_tools); - config.rustc_parallel = rust.parallel_compiler.unwrap_or(false); +@@ -1437,7 +1431,6 @@ impl Config { + .parallel_compiler + .unwrap_or(config.channel == "dev" || config.channel == "nightly"); config.rustc_default_linker = rust.default_linker; - config.musl_root = rust.musl_root.map(PathBuf::from); config.save_toolstates = rust.save_toolstates.map(PathBuf::from); set( &mut config.deny_warnings, -@@ -1597,8 +1590,6 @@ impl Config { +@@ -1606,8 +1599,6 @@ impl Config { target.ranlib = cfg.ranlib.map(PathBuf::from); target.linker = cfg.linker.map(PathBuf::from); target.crt_static = cfg.crt_static; @@ -251,79 +234,10 @@ index 836328f94..1d0dc3e98 100644 target.wasi_root = cfg.wasi_root.map(PathBuf::from); 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 f469dbea6..fe2441e2a 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", - "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") --v("musl-root", "target.x86_64-unknown-linux-musl.musl-root", -- "MUSL root installation directory (deprecated)") --v("musl-root-x86_64", "target.x86_64-unknown-linux-musl.musl-root", -- "x86_64-unknown-linux-musl install directory") --v("musl-root-i586", "target.i586-unknown-linux-musl.musl-root", -- "i586-unknown-linux-musl install directory") --v("musl-root-i686", "target.i686-unknown-linux-musl.musl-root", -- "i686-unknown-linux-musl install directory") --v("musl-root-arm", "target.arm-unknown-linux-musleabi.musl-root", -- "arm-unknown-linux-musleabi install directory") --v("musl-root-armhf", "target.arm-unknown-linux-musleabihf.musl-root", -- "arm-unknown-linux-musleabihf install directory") --v("musl-root-armv5te", "target.armv5te-unknown-linux-musleabi.musl-root", -- "armv5te-unknown-linux-musleabi install directory") --v("musl-root-armv7", "target.armv7-unknown-linux-musleabi.musl-root", -- "armv7-unknown-linux-musleabi install directory") --v("musl-root-armv7hf", "target.armv7-unknown-linux-musleabihf.musl-root", -- "armv7-unknown-linux-musleabihf install directory") --v("musl-root-aarch64", "target.aarch64-unknown-linux-musl.musl-root", -- "aarch64-unknown-linux-musl install directory") --v("musl-root-mips", "target.mips-unknown-linux-musl.musl-root", -- "mips-unknown-linux-musl install directory") --v("musl-root-mipsel", "target.mipsel-unknown-linux-musl.musl-root", -- "mipsel-unknown-linux-musl install directory") --v("musl-root-mips64", "target.mips64-unknown-linux-muslabi64.musl-root", -- "mips64-unknown-linux-muslabi64 install directory") --v("musl-root-mips64el", "target.mips64el-unknown-linux-muslabi64.musl-root", -- "mips64el-unknown-linux-muslabi64 install directory") - v("musl-root-riscv32gc", "target.riscv32gc-unknown-linux-musl.musl-root", - "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 8b8d4b237..06c15d468 100644 ---- a/src/bootstrap/lib.rs -+++ b/src/bootstrap/lib.rs -@@ -1291,25 +1291,6 @@ impl Build { - } - } - -- /// Returns the "musl root" for this `target`, if defined -- fn musl_root(&self, target: TargetSelection) -> Option<&Path> { -- self.config -- .target_config -- .get(&target) -- .and_then(|t| t.musl_root.as_ref()) -- .or_else(|| self.config.musl_root.as_ref()) -- .map(|p| &**p) -- } -- -- /// Returns the "musl libdir" for this `target`. -- fn musl_libdir(&self, target: TargetSelection) -> Option { -- 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: 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 0febdf250..c84f31d52 100644 ---- a/src/bootstrap/sanity.rs -+++ b/src/bootstrap/sanity.rs +diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs +index eec3be66a..a2d1cb5df 100644 +--- a/src/bootstrap/src/core/sanity.rs ++++ b/src/bootstrap/src/core/sanity.rs @@ -11,7 +11,6 @@ use std::collections::HashMap; use std::env; @@ -361,3 +275,68 @@ index 0febdf250..c84f31d52 100644 if need_cmake && target.contains("msvc") { // 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 33b8f1a7c..4ba88439b 100644 +--- a/src/bootstrap/src/lib.rs ++++ b/src/bootstrap/src/lib.rs +@@ -1306,25 +1306,6 @@ impl Build { + } + } + +- /// Returns the "musl root" for this `target`, if defined +- fn musl_root(&self, target: TargetSelection) -> Option<&Path> { +- self.config +- .target_config +- .get(&target) +- .and_then(|t| t.musl_root.as_ref()) +- .or_else(|| self.config.musl_root.as_ref()) +- .map(|p| &**p) +- } +- +- /// Returns the "musl libdir" for this `target`. +- fn musl_libdir(&self, target: TargetSelection) -> Option { +- 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: 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 52b36ce75..a67d05075 100644 +--- a/src/bootstrap/src/utils/cc_detect.rs ++++ b/src/bootstrap/src/utils/cc_detect.rs +@@ -201,30 +201,6 @@ fn default_compiler( + } + } + +- "mips-unknown-linux-musl" if compiler == Language::C => { +- if cfg.get_compiler().path().to_str() == Some("gcc") { +- Some(PathBuf::from("mips-linux-musl-gcc")) +- } else { +- None +- } +- } +- "mipsel-unknown-linux-musl" if compiler == Language::C => { +- if cfg.get_compiler().path().to_str() == Some("gcc") { +- Some(PathBuf::from("mipsel-linux-musl-gcc")) +- } else { +- None +- } +- } +- +- t if t.contains("musl") && compiler == Language::C => { +- if let Some(root) = build.musl_root(target) { +- let guess = root.join("bin/musl-gcc"); +- if guess.exists() { Some(guess) } else { None } +- } else { +- None +- } +- } +- + _ => None, + } + } diff --git a/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch b/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch index b10510ca6f272..a8b2669596a96 100644 --- a/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch +++ b/srcpkgs/rust/patches/0003-move-debugger-scripts-to-usr-share-rust.patch @@ -3,11 +3,11 @@ From: Daniel Kolesa Date: Mon, 20 Dec 2021 00:45:35 +0100 Subject: [PATCH 03/15] move debugger scripts to /usr/share/rust -diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs -index 76aad16c1..db53459e8 100644 ---- a/src/bootstrap/dist.rs -+++ b/src/bootstrap/dist.rs -@@ -528,7 +528,7 @@ impl Step for DebuggerScripts { +diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs +index c485481b9..b59aaa4fa 100644 +--- a/src/bootstrap/src/core/build_steps/dist.rs ++++ b/src/bootstrap/src/core/build_steps/dist.rs +@@ -519,7 +519,7 @@ impl Step for DebuggerScripts { fn run(self, builder: &Builder<'_>) { let host = self.host; let sysroot = self.sysroot; @@ -30,7 +30,7 @@ index 9abed30ea..4c7f953ed 100755 RUSTC_COMMIT_HASH="$("$RUSTC" -vV | sed -n 's/commit-hash: \([a-zA-Z0-9_]*\)/\1/p')" diff --git a/src/etc/rust-gdbgui b/src/etc/rust-gdbgui -index 913269316..f444fbc4b 100755 +index 471810cbb..ba4e27241 100755 --- a/src/etc/rust-gdbgui +++ b/src/etc/rust-gdbgui @@ -41,7 +41,7 @@ fi diff --git a/srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch b/srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch index 92e0021ab6f4c..b5a6af13da896 100644 --- a/srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch +++ b/srcpkgs/rust/patches/0005-do-not-install-libunwind-source-removed.patch @@ -3,15 +3,11 @@ From: Daniel Kolesa Date: Mon, 20 Dec 2021 01:44:54 +0100 Subject: [PATCH 05/15] do not install libunwind source (removed) ---- - src/bootstrap/dist.rs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs -index e7a077134..74e75df4b 100644 ---- a/src/bootstrap/dist.rs -+++ b/src/bootstrap/dist.rs -@@ -804,7 +804,7 @@ impl Step for Src { +diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs +index c485481b9..33171948c 100644 +--- a/src/bootstrap/src/core/build_steps/dist.rs ++++ b/src/bootstrap/src/core/build_steps/dist.rs +@@ -909,7 +909,7 @@ impl Step for Src { copy_src_dirs( builder, &builder.src, @@ -20,6 +16,3 @@ index e7a077134..74e75df4b 100644 &[ // not needed and contains symlinks which rustup currently // chokes on when unpacking. --- -2.37.2 - diff --git a/srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch b/srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch index 88eaf65de8b77..ef61621ee32e2 100644 --- a/srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch +++ b/srcpkgs/rust/patches/0006-fix-rustdoc-when-cross-compiling.patch @@ -3,25 +3,29 @@ From: Daniel Kolesa Date: Mon, 20 Dec 2021 01:48:14 +0100 Subject: [PATCH 06/15] fix rustdoc when cross-compiling ---- - src/bootstrap/bin/rustdoc.rs | 7 ++----- - 1 file changed, 2 insertions(+), 5 deletions(-) - -diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs -index 5f85fc5aa..01e81fc39 100644 ---- a/src/bootstrap/bin/rustdoc.rs -+++ b/src/bootstrap/bin/rustdoc.rs -@@ -26,9 +26,6 @@ fn main() { - Err(_) => 0, - }; +diff --git a/src/bootstrap/src/bin/rustdoc.rs b/src/bootstrap/src/bin/rustdoc.rs +index dbbce6fe2..86365e330 100644 +--- a/src/bootstrap/src/bin/rustdoc.rs ++++ b/src/bootstrap/src/bin/rustdoc.rs +@@ -7,6 +7,7 @@ use std::ffi::OsString; + use std::path::PathBuf; + use std::process::Command; + ++#[allow(unused)] + use dylib_util::{dylib_path, dylib_path_var}; + + #[path = "../utils/bin_helpers.rs"] +@@ -29,9 +30,6 @@ fn main() { + // is passed (a bit janky...) + let target = args.windows(2).find(|w| &*w[0] == "--target").and_then(|w| w[1].to_str()); - let mut dylib_path = dylib_path(); - dylib_path.insert(0, PathBuf::from(libdir.clone())); - let mut cmd = Command::new(rustdoc); - // cfg(bootstrap) -@@ -43,7 +40,7 @@ fn main() { + if target.is_some() { +@@ -44,7 +42,7 @@ fn main() { } cmd.args(&args); @@ -30,7 +34,7 @@ index 5f85fc5aa..01e81fc39 100644 // Force all crates compiled by this compiler to (a) be unstable and (b) // allow the `rustc_private` feature to link to other unstable crates -@@ -69,7 +66,7 @@ fn main() { +@@ -78,7 +76,7 @@ fn main() { eprintln!( "rustdoc command: {:?}={:?} {:?}", dylib_path_var(), @@ -38,7 +42,4 @@ index 5f85fc5aa..01e81fc39 100644 + PathBuf::from(libdir.clone()), cmd, ); - eprintln!("sysroot: {:?}", sysroot); --- -2.37.2 - + eprintln!("sysroot: {sysroot:?}"); diff --git a/srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch b/srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch index 198e4fcc7a6a8..9eb539c10abcb 100644 --- a/srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch +++ b/srcpkgs/rust/patches/0007-link-stage-2-tools-dynamically-to-libstd.patch @@ -6,15 +6,12 @@ Subject: [PATCH 07/15] link stage 2 tools dynamically to libstd stage 2 tools are the ones that are distributed, and we distribute them together with the rust libs so there is no need to worry about unstable ABI ---- - src/bootstrap/builder.rs | 2 ++ - 1 file changed, 2 insertions(+) -diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs -index 62b5416ce..554dd4188 100644 ---- a/src/bootstrap/builder.rs -+++ b/src/bootstrap/builder.rs -@@ -2066,6 +2066,8 @@ impl<'a> Builder<'a> { +diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs +index cd276674d..4741cd11b 100644 +--- a/src/bootstrap/src/core/builder.rs ++++ b/src/bootstrap/src/core/builder.rs +@@ -2062,6 +2062,8 @@ impl<'a> Builder<'a> { // linking all deps statically into the dylib. if matches!(mode, Mode::Std | Mode::Rustc) { rustflags.arg("-Cprefer-dynamic"); @@ -23,6 +20,3 @@ index 62b5416ce..554dd4188 100644 } // When building incrementally we default to a lower ThinLTO import limit --- -2.37.2 - diff --git a/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch index 998090a3a59d5..31bc2bc687d7f 100644 --- a/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch +++ b/srcpkgs/rust/patches/0012-bootstrap-Disable-initial-exec-TLS-model-on-powerpc.patch @@ -4,15 +4,12 @@ Date: Sat, 29 May 2021 12:38:46 +0000 Subject: [PATCH 12/15] bootstrap: Disable initial-exec TLS model on powerpc Fixes #81334. ---- - src/bootstrap/builder.rs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs -index 8b144f146..acfa7cf04 100644 ---- a/src/bootstrap/builder.rs -+++ b/src/bootstrap/builder.rs -@@ -1856,7 +1856,7 @@ impl<'a> Builder<'a> { +diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs +index cd276674d..9ec0c3210 100644 +--- a/src/bootstrap/src/core/builder.rs ++++ b/src/bootstrap/src/core/builder.rs +@@ -1844,7 +1844,7 @@ impl<'a> Builder<'a> { // efficient initial-exec TLS model. This doesn't work with `dlopen`, // so we can't use it by default in general, but we can use it for tools // and our own internal libraries. 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 2414d72380b6a..0ed9659474fe2 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 @@ -5,17 +5,12 @@ Subject: [PATCH 13/15] allow specifying native sysroot to use for linkage This allows us to get around the linker attempting to use incompatible libs. ---- - src/bootstrap/builder.rs | 4 ++++ - src/bootstrap/config.rs | 3 +++ - src/bootstrap/lib.rs | 4 ++++ - 3 files changed, 11 insertions(+) -diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs -index 6a02a225c..483aa8818 100644 ---- a/src/bootstrap/builder.rs -+++ b/src/bootstrap/builder.rs -@@ -1708,6 +1708,10 @@ impl<'a> Builder<'a> { +diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs +index cd276674d..a67a0cbcc 100644 +--- a/src/bootstrap/src/core/builder.rs ++++ b/src/bootstrap/src/core/builder.rs +@@ -1687,6 +1687,10 @@ impl<'a> Builder<'a> { } } @@ -24,41 +19,41 @@ index 6a02a225c..483aa8818 100644 + } + if let Some(host_linker) = self.linker(compiler.host) { - cargo.env("RUSTC_HOST_LINKER", host_linker); + hostflags.arg(format!("-Clinker={}", host_linker.display())); } -diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs -index 18a764689..f8b9bbd96 100644 ---- a/src/bootstrap/config.rs -+++ b/src/bootstrap/config.rs -@@ -395,6 +395,7 @@ pub struct Target { +diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs +index 0a9175aa3..d6f31b0cd 100644 +--- a/src/bootstrap/src/core/config/config.rs ++++ b/src/bootstrap/src/core/config/config.rs +@@ -524,6 +524,7 @@ pub struct Target { pub ranlib: Option, pub default_linker: Option, pub linker: Option, + pub sysroot: Option, - pub ndk: Option, pub sanitizers: Option, - pub profiler: Option, -@@ -723,6 +724,7 @@ define_config! { + pub profiler: Option, + pub rpath: Option, +@@ -1038,6 +1039,7 @@ define_config! { ranlib: Option = "ranlib", default_linker: Option = "default-linker", linker: Option = "linker", + sysroot: Option = "sysroot", llvm_config: Option = "llvm-config", + llvm_has_rust_patches: Option = "llvm-has-rust-patches", llvm_filecheck: Option = "llvm-filecheck", - llvm_libunwind: Option = "llvm-libunwind", -@@ -1156,6 +1158,7 @@ impl Config { +@@ -1605,6 +1607,7 @@ impl Config { target.ar = cfg.ar.map(PathBuf::from); target.ranlib = cfg.ranlib.map(PathBuf::from); target.linker = cfg.linker.map(PathBuf::from); + target.sysroot = cfg.sysroot.map(PathBuf::from); target.crt_static = cfg.crt_static; - target.wasi_root = cfg.wasi_root.map(PathBuf::from); - target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from); -diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs -index 0a7012dbd..cded50d20 100644 ---- a/src/bootstrap/lib.rs -+++ b/src/bootstrap/lib.rs -@@ -1152,6 +1152,10 @@ impl Build { + 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 33b8f1a7c..edfafa173 100644 +--- a/src/bootstrap/src/lib.rs ++++ b/src/bootstrap/src/lib.rs +@@ -1305,6 +1305,10 @@ impl Build { self.config.target_config.get(&target).and_then(|t| t.crt_static) } } @@ -67,8 +62,5 @@ index 0a7012dbd..cded50d20 100644 + self.config.target_config.get(&target).and_then(|c| c.sysroot.as_ref()).map(|p| &**p) + } - /// Returns the sysroot for the wasi target, if defined - fn wasi_root(&self, target: TargetSelection) -> Option<&Path> { --- -2.37.2 - + /// Returns the "musl root" for this `target`, if defined + fn musl_root(&self, target: TargetSelection) -> Option<&Path> { diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template index b0fc2d3cbd734..42ff348004186 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.74.1 +version=1.75.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=67db3e22fc9921c885baae5953ba144fc474cde29ec69ab56d43ce764206231d +checksum=5b739f45bc9d341e2d1c570d65d2375591e22c2d23ef5b8a37711a0386abc088 lib32disabled=yes make_check=no # CBA for now python_version=3 # needed for python files in rust-src From d79b3b8ead45d3cc314a60ebec86f03a72fe9bfc Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Fri, 29 Dec 2023 00:54:27 +0100 Subject: [PATCH 4/4] cargo: update to 1.75.0 --- srcpkgs/cargo/patches/downgrade-git2.patch | 32 +++++++++++----------- srcpkgs/cargo/template | 6 ++-- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/srcpkgs/cargo/patches/downgrade-git2.patch b/srcpkgs/cargo/patches/downgrade-git2.patch index ace10e7702981..89002151bf348 100644 --- a/srcpkgs/cargo/patches/downgrade-git2.patch +++ b/srcpkgs/cargo/patches/downgrade-git2.patch @@ -1,23 +1,23 @@ diff --git a/Cargo.lock b/Cargo.lock -index cc0cb9a..f6de424 100644 +index a2d339b..6cdf579 100644 --- a/Cargo.lock +++ b/Cargo.lock -@@ -1006,11 +1006,11 @@ dependencies = [ +@@ -995,11 +995,11 @@ dependencies = [ [[package]] name = "git2" --version = "0.18.0" +-version = "0.18.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "12ef350ba88a33b4d524b1d1c79096c9ade5ef8c59395df0e60d1e1889414c0e" +-checksum = "fbf97ba92db08df386e10c8ede66a2a0369bd277090afd8710e19e38de9ec0cd" +checksum = "7b989d6a7ca95a362cf2cfc5ad688b3a467be1f87e480b8dad07fee8c79b0044" dependencies = [ -- "bitflags 2.3.3", +- "bitflags 2.4.0", + "bitflags 1.3.2", "libc", "libgit2-sys", "log", -@@ -1021,9 +1021,9 @@ dependencies = [ +@@ -1010,9 +1010,9 @@ dependencies = [ [[package]] name = "git2-curl" @@ -29,7 +29,7 @@ index cc0cb9a..f6de424 100644 dependencies = [ "curl", "git2", -@@ -2003,9 +2003,9 @@ checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" +@@ -2021,9 +2021,9 @@ checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libgit2-sys" @@ -42,26 +42,26 @@ index cc0cb9a..f6de424 100644 "cc", "libc", diff --git a/Cargo.toml b/Cargo.toml -index 4403044..1d50590 100644 +index 3fb36b4..ed19d0d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,8 +40,8 @@ curl = "0.4.44" curl-sys = "0.4.68" filetime = "0.2.22" - flate2 = { version = "1.0.27", default-features = false, features = ["zlib"] } --git2 = "0.18.0" + flate2 = { version = "1.0.28", default-features = false, features = ["zlib"] } +-git2 = "0.18.1" -git2-curl = "0.19.0" +git2 = "0.17.2" +git2-curl = "0.18.0" - gix = { version = "0.54.1", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "revision"] } + gix = { version = "0.55.2", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "revision"] } gix-features-for-configuration-only = { version = "0.35.0", package = "gix-features", features = [ "parallel" ] } glob = "0.3.1" -@@ -58,7 +58,7 @@ itertools = "0.10.0" - jobserver = "0.1.26" +@@ -58,7 +58,7 @@ itertools = "0.11.0" + jobserver = "0.1.27" lazycell = "1.3.0" - libc = "0.2.148" + libc = "0.2.149" -libgit2-sys = "0.16.1" +libgit2-sys = "0.15.2" - libloading = "0.8.0" - memchr = "2.6.2" + libloading = "0.8.1" + memchr = "2.6.4" miow = "0.6.0" diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template index 208c18818d570..99195fe824eae 100644 --- a/srcpkgs/cargo/template +++ b/srcpkgs/cargo/template @@ -1,8 +1,8 @@ # Template file for 'cargo' pkgname=cargo -version=1.74.0 +version=1.75.0 revision=1 -_cargo_revision=0.75.0 +_cargo_revision=0.76.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=d6b9512bca4b4d692a242188bfe83e1b696c44903007b7b48a56b287d01c063b +checksum=52d57889715cdfe0070b13f6d4dbfc4affdafc763483269e78b6ebd7166fdb83 replaces="cargo-tree>=0" build_options="static bindist"