From dc66aec53efa73e2b38da8670a76c6ba8224716f Mon Sep 17 00:00:00 2001 From: tranzystorekk Date: Thu, 9 Jan 2025 21:45:10 +0100 Subject: [PATCH 1/4] rust-bootstrap: update to 1.84.1 --- srcpkgs/rust-bootstrap/template | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/srcpkgs/rust-bootstrap/template b/srcpkgs/rust-bootstrap/template index aa17a184aa624f..534061b9c8701a 100644 --- a/srcpkgs/rust-bootstrap/template +++ b/srcpkgs/rust-bootstrap/template @@ -1,8 +1,7 @@ # Template file for 'rust-bootstrap' pkgname=rust-bootstrap -reverts="1.83.0_1" -version=1.82.0 -revision=2 +version=1.84.1 +revision=1 short_desc="Rust programming language bootstrap toolchain" maintainer="Orphaned " license="Apache-2.0 OR MIT" @@ -32,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=" - 92bab38ce88b7738fb62a1bccf496b1b2975fe984cc4fc506903a03ed37e1e4a - c7ebb02b6ca349999b3b7dce768efaca5e0d9060f55397523e11a64cd10a9405" + a32f9738bd721ecf864e3119ff64043c742e7e0e7094d324931785d4dfd24cc1 + b3fa601f227db66ee64825847d0b39aa2cfc37beff0f99c0b7a1bd9025864c42" ;; 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=" - 90b61494f5ccfd4d1ca9a5ce4a0af49a253ca435c701d9c44e3e44b5faf70cb8 - 2eca3d36f7928f877c334909f35fe202fbcecce109ccf3b439284c2cb7849594" + ae9e4c996707a7152443639bd09de49afdcc37830ff8561872e718b0600a4fcf + 553727eeee81f1b1e7f3c7b7fd023abfb62fe5aff7fe0b1c81d3b5b92ab8a474" ;; 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=" - e08b8490246ae1b6278274f6dd0a648c590a42e0af6aaf220a030cdf1dadf30a - 1c99a4c81f51b687ba55746c7d3f19b5b860fe4eff604d3c7d803e08c9cc89bb" + fa899d104bfe55b78fd1af4f2eff710130fdb23aa07f22e2bdc5dbfc5f2f20ef + 415f838c11c5f15d18fc2f9a4bc9a07c489ba0a48b423f1f2020c2bb09e348fb" ;; # placeholders for user-supplied distfiles ppc64le) From c70f83cac51aa891587bb52980187da3294d5965 Mon Sep 17 00:00:00 2001 From: tranzystorekk Date: Thu, 9 Jan 2025 21:45:40 +0100 Subject: [PATCH 2/4] cargo-bootstrap: update to 1.84.1 --- srcpkgs/cargo-bootstrap/template | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/srcpkgs/cargo-bootstrap/template b/srcpkgs/cargo-bootstrap/template index 6c22cac676ab00..d2ad4def9088a4 100644 --- a/srcpkgs/cargo-bootstrap/template +++ b/srcpkgs/cargo-bootstrap/template @@ -1,8 +1,7 @@ # Template file for 'cargo-bootstrap' pkgname=cargo-bootstrap -reverts="1.83.0_1" -version=1.82.0 -revision=2 +version=1.84.1 +revision=1 short_desc="Bootstrap binaries of Rust package manager" maintainer="Orphaned " license="Apache-2.0 OR MIT" @@ -25,15 +24,15 @@ esac case "$XBPS_TARGET_MACHINE" in i686) distfiles="${_bootstrap_url}/cargo-${version}-i686-unknown-linux-gnu.tar.xz" - checksum="1cf5bae93e9724f50f1a20a752f05870565e0ce83baa157aad632aa162fd97d5" + checksum="41c0cf94e4414a1af3dd2420c2969567daeb364002fbb91264af897705cd8f8f" ;; x86_64) distfiles="${_bootstrap_url}/cargo-${version}-x86_64-unknown-linux-gnu.tar.xz" - checksum="97aeae783874a932c4500f4d36473297945edf6294d63871784217d608718e70" + checksum="792214e185297d8a3fa65949f9f3001ddd7cc06e1e8afd2a042f7ca5a8af727b" ;; x86_64-musl) distfiles="${_bootstrap_url}/cargo-${version}-x86_64-unknown-linux-musl.tar.xz" - checksum="a66b3129cb483d55188742769bf8282d9546630f2e25434ff233b22bbec5009e" + checksum="3c5d4a7aa3fabc447700e70bf62b5243f079c4e7ba03c9c9f99bb425ac39a1b3" ;; # placeholders for user-supplied distfiles ppc64le) From bd9159bbe2bfe4b9db6ba8dcb3cb6727be14ad28 Mon Sep 17 00:00:00 2001 From: tranzystorekk Date: Thu, 9 Jan 2025 21:46:06 +0100 Subject: [PATCH 3/4] rust: update to 1.84.1 --- ...dlib-and-musl_root-from-musl-targets.patch | 66 +++++++++---------- ...-stage-2-tools-dynamically-to-libstd.patch | 19 +++--- ...kage-of-musl-libc-for-the-libc-crate.patch | 20 +++--- ...e-ELFv2-ABI-on-all-powerpc64-targets.patch | 12 ++-- ...le-initial-exec-TLS-model-on-powerpc.patch | 10 +-- ...ng-native-sysroot-to-use-for-linkage.patch | 24 +++---- .../patches/0015-rustc-dylib-cross-fix.patch | 34 ++++++++++ srcpkgs/rust/template | 13 ++-- 8 files changed, 119 insertions(+), 79 deletions(-) create mode 100644 srcpkgs/rust/patches/0015-rustc-dylib-cross-fix.patch 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 cfde28620ba34e..25b78cb88307fe 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 @@ -6,14 +6,14 @@ 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 42aa1e1a6..c7d0433bb 100644 +index e020bb8523..7b0cc7b556 100644 --- a/compiler/rustc_target/src/spec/base/linux_musl.rs +++ b/compiler/rustc_target/src/spec/base/linux_musl.rs @@ -1,15 +1,9 @@ --use crate::spec::{base, crt_objects, LinkSelfContainedDefault, TargetOptions}; +-use crate::spec::{LinkSelfContainedDefault, TargetOptions, base, crt_objects}; +use crate::spec::{base, TargetOptions}; - pub fn opts() -> TargetOptions { + pub(crate) fn opts() -> TargetOptions { let mut base = base::linux::opts(); base.env = "musl".into(); @@ -27,7 +27,7 @@ index 42aa1e1a6..c7d0433bb 100644 base } diff --git a/compiler/rustc_target/src/spec/crt_objects.rs b/compiler/rustc_target/src/spec/crt_objects.rs -index e3b6430a4..13a96e2cb 100644 +index e3b6430a46..13a96e2cb7 100644 --- a/compiler/rustc_target/src/spec/crt_objects.rs +++ b/compiler/rustc_target/src/spec/crt_objects.rs @@ -62,28 +62,6 @@ pub(super) fn all(obj: &'static str) -> CrtObjects { @@ -60,10 +60,10 @@ index e3b6430a4..13a96e2cb 100644 new(&[ (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]), diff --git a/config.example.toml b/config.example.toml -index f1dc32234..462a86f5b 100644 +index d3233ad17b..8c1c336ea5 100644 --- a/config.example.toml +++ b/config.example.toml -@@ -599,14 +599,6 @@ +@@ -627,14 +627,6 @@ # behavior -- this may lead to miscompilations or other bugs. #description = "" @@ -79,10 +79,10 @@ index f1dc32234..462a86f5b 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 768aac912..6aebd9189 100755 +index 70f4e70962..51e33251b2 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py -@@ -99,34 +99,6 @@ v("llvm-config", None, "set path to llvm-config") +@@ -102,34 +102,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") @@ -118,10 +118,10 @@ index 768aac912..6aebd9189 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 edf18e2eb..7597d6cd2 100644 +index 8e088682f9..2ea50a068f 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs -@@ -372,39 +372,7 @@ fn copy_self_contained_objects( +@@ -352,39 +352,7 @@ fn copy_self_contained_objects( let mut target_deps = vec![]; // Copies the libc and CRT objects. @@ -162,7 +162,7 @@ index edf18e2eb..7597d6cd2 100644 let srcdir = builder.wasi_libdir(target).unwrap_or_else(|| { panic!( "Target {:?} does not have a \"wasi-root\" key in Config.toml \ -@@ -566,15 +534,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car +@@ -546,15 +514,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car .arg("--manifest-path") .arg(builder.src.join("library/sysroot/Cargo.toml")); @@ -179,10 +179,10 @@ index edf18e2eb..7597d6cd2 100644 if let Some(dir) = builder.wasi_libdir(target) { let root = format!("native={}", dir.to_str().unwrap()); diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs -index bdfee55d8..18db92320 100644 +index e706aba977..b876972c0a 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs -@@ -321,7 +321,6 @@ pub struct Config { +@@ -346,7 +346,6 @@ pub struct Config { pub print_step_rusage: bool, // Fallback musl-root for all targets @@ -190,7 +190,7 @@ index bdfee55d8..18db92320 100644 pub prefix: Option, pub sysconfdir: Option, pub datadir: Option, -@@ -582,8 +581,6 @@ pub struct Target { +@@ -620,8 +619,6 @@ pub struct Target { pub profiler: Option, pub rpath: Option, pub crt_static: Option, @@ -199,7 +199,7 @@ index bdfee55d8..18db92320 100644 pub wasi_root: Option, pub qemu_rootfs: Option, pub runner: Option, -@@ -1104,7 +1101,6 @@ define_config! { +@@ -1151,7 +1148,6 @@ define_config! { default_linker: Option = "default-linker", channel: Option = "channel", description: Option = "description", @@ -207,7 +207,7 @@ index bdfee55d8..18db92320 100644 rpath: Option = "rpath", strip: Option = "strip", frame_pointers: Option = "frame-pointers", -@@ -1158,8 +1154,6 @@ define_config! { +@@ -1206,8 +1202,6 @@ define_config! { profiler: Option = "profiler", rpath: Option = "rpath", crt_static: Option = "crt-static", @@ -216,23 +216,23 @@ index bdfee55d8..18db92320 100644 wasi_root: Option = "wasi-root", qemu_rootfs: Option = "qemu-rootfs", no_std: Option = "no-std", -@@ -1632,7 +1626,6 @@ impl Config { +@@ -1736,7 +1730,6 @@ impl Config { default_linker, - channel, + channel: _, // already handled above description, - musl_root, rpath, verbose_tests, optimize_tests, -@@ -1722,7 +1715,6 @@ impl Config { - config.rustc_parallel = - parallel_compiler.unwrap_or(config.channel == "dev" || config.channel == "nightly"); +@@ -1822,7 +1815,6 @@ impl Config { + config.llvm_enzyme = + llvm_enzyme.unwrap_or(config.channel == "dev" || config.channel == "nightly"); config.rustc_default_linker = default_linker; - config.musl_root = musl_root.map(PathBuf::from); config.save_toolstates = save_toolstates.map(PathBuf::from); - set( - &mut config.deny_warnings, -@@ -1973,8 +1965,6 @@ impl Config { + set(&mut config.deny_warnings, match flags.warnings { + Warnings::Deny => Some(true), +@@ -2044,8 +2036,6 @@ impl Config { target.ranlib = cfg.ranlib.map(PathBuf::from); target.linker = cfg.linker.map(PathBuf::from); target.crt_static = cfg.crt_static; @@ -241,8 +241,8 @@ index bdfee55d8..18db92320 100644 target.wasi_root = cfg.wasi_root.map(PathBuf::from); target.qemu_rootfs = cfg.qemu_rootfs.map(PathBuf::from); target.runner = cfg.runner; -@@ -2919,7 +2909,6 @@ fn check_incompatible_options_for_ci_rustc( - split_debuginfo: _, +@@ -3123,7 +3113,6 @@ fn check_incompatible_options_for_ci_rustc( + debuginfo_level_tests: _, backtrace: _, parallel_compiler: _, - musl_root: _, @@ -250,7 +250,7 @@ index bdfee55d8..18db92320 100644 optimize_tests: _, codegen_tests: _, diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs -index 60ec57d0d..31b411259 100644 +index fabb4f2b13..7246668378 100644 --- a/src/bootstrap/src/core/sanity.rs +++ b/src/bootstrap/src/core/sanity.rs @@ -11,7 +11,7 @@ @@ -260,9 +260,9 @@ index 60ec57d0d..31b411259 100644 -use std::{env, fs}; +use std::env; + use crate::Build; #[cfg(not(feature = "bootstrap-self-test"))] - use crate::builder::Builder; -@@ -325,28 +325,6 @@ than building it. +@@ -326,28 +326,6 @@ than building it. continue; } @@ -292,10 +292,10 @@ index 60ec57d0d..31b411259 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 82b640f54..d906d2186 100644 +index c384fd6bf4..cadb129e2c 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs -@@ -1282,25 +1282,6 @@ Executed at: {executed_at}"#, +@@ -1307,25 +1307,6 @@ Executed at: {executed_at}"#, } } @@ -322,10 +322,10 @@ index 82b640f54..d906d2186 100644 /// configured. /// diff --git a/src/bootstrap/src/utils/cc_detect.rs b/src/bootstrap/src/utils/cc_detect.rs -index 29e6b74aa..a32fddbac 100644 +index 0df0046945..f044b1791e 100644 --- a/src/bootstrap/src/utils/cc_detect.rs +++ b/src/bootstrap/src/utils/cc_detect.rs -@@ -197,30 +197,6 @@ fn default_compiler( +@@ -210,30 +210,6 @@ fn default_compiler( } } 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 9eb539c10abcbd..6a2ff485055b5c 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 @@ -7,16 +7,19 @@ 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 -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> { +diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs +index 0688a1d..e09164d 100644 +--- a/src/bootstrap/src/core/builder/cargo.rs ++++ b/src/bootstrap/src/core/builder/cargo.rs +@@ -1148,8 +1148,9 @@ impl Builder<'_> { // linking all deps statically into the dylib. - if matches!(mode, Mode::Std | Mode::Rustc) { + if matches!(mode, Mode::Std) { rustflags.arg("-Cprefer-dynamic"); -+ } else if stage >= 2 { +- } +- if matches!(mode, Mode::Rustc) && !self.link_std_into_rustc_driver(target) { ++ } else if matches!(mode, Mode::Rustc) && !self.link_std_into_rustc_driver(target) { + rustflags.arg("-Cprefer-dynamic"); ++ } else if stage >= 2 { + rustflags.arg("-Cprefer-dynamic"); } - // When building incrementally we default to a lower ThinLTO import limit diff --git a/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch b/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch index f4e6962ca55c97..f322b1a86ee72c 100644 --- a/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch +++ b/srcpkgs/rust/patches/0010-Fix-dynamic-linkage-of-musl-libc-for-the-libc-crate.patch @@ -3,11 +3,11 @@ From: q66 Date: Sun, 3 May 2020 18:02:03 +0200 Subject: [PATCH 10/15] Fix dynamic linkage of musl libc for the libc crate -diff --git a/vendor/libc-0.2.157/src/unix/mod.rs b/vendor/libc-0.2.157/src/unix/mod.rs -index 8b3d988ae..b4ab3db3f 100644 ---- a/vendor/libc-0.2.157/src/unix/mod.rs -+++ b/vendor/libc-0.2.157/src/unix/mod.rs -@@ -347,7 +347,14 @@ cfg_if! { +diff --git a/vendor/libc-0.2.162/src/unix/mod.rs b/vendor/libc-0.2.162/src/unix/mod.rs +index d26d905355..b6b59e38d0 100644 +--- a/vendor/libc-0.2.162/src/unix/mod.rs ++++ b/vendor/libc-0.2.162/src/unix/mod.rs +@@ -384,7 +384,14 @@ cfg_if! { #[link(name = "dl", cfg(not(target_feature = "crt-static")))] #[link(name = "c", cfg(not(target_feature = "crt-static")))] extern {} @@ -23,11 +23,11 @@ index 8b3d988ae..b4ab3db3f 100644 #[cfg_attr(feature = "rustc-dep-of-std", link(name = "c", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static")))] -diff --git a/vendor/libc-0.2.158/src/unix/mod.rs b/vendor/libc-0.2.158/src/unix/mod.rs -index 8b3d988ae..b4ab3db3f 100644 ---- a/vendor/libc-0.2.158/src/unix/mod.rs -+++ b/vendor/libc-0.2.158/src/unix/mod.rs -@@ -347,7 +347,14 @@ cfg_if! { +diff --git a/vendor/libc-0.2.164/src/unix/mod.rs b/vendor/libc-0.2.164/src/unix/mod.rs +index db60f8ef29..fd506f7d56 100644 +--- a/vendor/libc-0.2.164/src/unix/mod.rs ++++ b/vendor/libc-0.2.164/src/unix/mod.rs +@@ -384,7 +384,14 @@ cfg_if! { #[link(name = "dl", cfg(not(target_feature = "crt-static")))] #[link(name = "c", cfg(not(target_feature = "crt-static")))] extern {} diff --git a/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch index a66bb55ec3500f..8151219234c01a 100644 --- a/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch +++ b/srcpkgs/rust/patches/0011-Use-ELFv2-ABI-on-all-powerpc64-targets.patch @@ -8,10 +8,10 @@ LLVM. While this is not perfect (it does not allow rustc to compile legacy binaries), rustc never requests specific ABI from llvm in the first place, so at least match the environment we have. -diff --git a/compiler/rustc_target/src/abi/call/powerpc64.rs b/compiler/rustc_target/src/abi/call/powerpc64.rs -index 749eea0ef..1dfa3cbd0 100644 ---- a/compiler/rustc_target/src/abi/call/powerpc64.rs -+++ b/compiler/rustc_target/src/abi/call/powerpc64.rs +diff --git a/compiler/rustc_target/src/callconv/powerpc64.rs b/compiler/rustc_target/src/callconv/powerpc64.rs +index 71e533b8cc..24beb8254c 100644 +--- a/compiler/rustc_target/src/callconv/powerpc64.rs ++++ b/compiler/rustc_target/src/callconv/powerpc64.rs @@ -3,7 +3,7 @@ // need to be fixed when PowerPC vector support is added. @@ -21,12 +21,14 @@ index 749eea0ef..1dfa3cbd0 100644 use crate::spec::HasTargetSpec; #[derive(Debug, Clone, Copy, PartialEq)] -@@ -91,14 +91,7 @@ where +@@ -99,16 +99,7 @@ where Ty: TyAbiInterface<'a, C> + Copy, C: HasDataLayout + HasTargetSpec, { - let abi = if cx.target_spec().env == "musl" { - ELFv2 +- } else if cx.target_spec().os == "aix" { +- AIX - } else { - match cx.data_layout().endian { - Endian::Big => ELFv1, 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 31bc2bc687d7f3..f0c31b36a81bfd 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 @@ -5,11 +5,11 @@ Subject: [PATCH 12/15] bootstrap: Disable initial-exec TLS model on powerpc Fixes #81334. -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> { +diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs +index 0688a1d689..a57df11344 100644 +--- a/src/bootstrap/src/core/builder/cargo.rs ++++ b/src/bootstrap/src/core/builder/cargo.rs +@@ -956,7 +956,7 @@ impl Builder<'_> { // 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 9ce295415b5f1c..33c17f6d435748 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 @@ -6,11 +6,11 @@ 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. -diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs -index 7f93fdc72..f52644b57 100644 ---- a/src/bootstrap/src/core/builder.rs -+++ b/src/bootstrap/src/core/builder.rs -@@ -2429,6 +2429,10 @@ impl Cargo { +diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs +index 0688a1d689..1b65ce6395 100644 +--- a/src/bootstrap/src/core/builder/cargo.rs ++++ b/src/bootstrap/src/core/builder/cargo.rs +@@ -251,6 +251,10 @@ impl Cargo { self.hostflags.arg(&arg); } @@ -20,12 +20,12 @@ index 7f93fdc72..f52644b57 100644 + if let Some(target_linker) = builder.linker(target) { let target = crate::envify(&target.triple); - self.command.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 3e1bc9a9a..e0038b9ac 100644 +index e706aba977..c4fbbbb514 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs -@@ -575,6 +575,7 @@ pub struct Target { +@@ -616,6 +616,7 @@ pub struct Target { pub default_linker: Option, pub linker: Option, pub split_debuginfo: Option, @@ -33,7 +33,7 @@ index 3e1bc9a9a..e0038b9ac 100644 pub sanitizers: Option, pub profiler: Option, pub rpath: Option, -@@ -1135,6 +1136,7 @@ define_config! { +@@ -1198,6 +1199,7 @@ define_config! { default_linker: Option = "default-linker", linker: Option = "linker", split_debuginfo: Option = "split-debuginfo", @@ -41,7 +41,7 @@ index 3e1bc9a9a..e0038b9ac 100644 llvm_config: Option = "llvm-config", llvm_has_rust_patches: Option = "llvm-has-rust-patches", llvm_filecheck: Option = "llvm-filecheck", -@@ -1875,6 +1877,7 @@ impl Config { +@@ -2043,6 +2045,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 3e1bc9a9a..e0038b9ac 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 5ed6b357e..0d4392dd8 100644 +index c384fd6bf4..e9125cba3f 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs -@@ -1318,6 +1318,10 @@ impl Build { +@@ -1306,6 +1306,10 @@ Executed at: {executed_at}"#, self.config.target_config.get(&target).and_then(|t| t.crt_static) } } diff --git a/srcpkgs/rust/patches/0015-rustc-dylib-cross-fix.patch b/srcpkgs/rust/patches/0015-rustc-dylib-cross-fix.patch new file mode 100644 index 00000000000000..3dc3ca8f8f2a14 --- /dev/null +++ b/srcpkgs/rust/patches/0015-rustc-dylib-cross-fix.patch @@ -0,0 +1,34 @@ +From 139d6ba054a1a4cc5fe64981ad46fd5547bd4916 Mon Sep 17 00:00:00 2001 +From: onur-ozkan +Date: Thu, 30 Jan 2025 16:51:08 +0000 +Subject: [PATCH] set rustc dylib on manually constructed rustc command + +Signed-off-by: onur-ozkan +--- + src/bootstrap/src/core/builder/cargo.rs | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs +index 1b413dcb07efb..79a65aedd9edb 100644 +--- a/src/bootstrap/src/core/builder/cargo.rs ++++ b/src/bootstrap/src/core/builder/cargo.rs +@@ -653,7 +653,10 @@ impl Builder<'_> { + // Build proc macros both for the host and the target unless proc-macros are not + // supported by the target. + if target != compiler.host && cmd_kind != Kind::Check { +- let error = command(self.rustc(compiler)) ++ let mut rustc_cmd = command(self.rustc(compiler)); ++ self.add_rustc_lib_path(compiler, &mut rustc_cmd); ++ ++ let error = rustc_cmd + .arg("--target") + .arg(target.rustc_target_arg()) + .arg("--print=file-names") +@@ -661,6 +664,7 @@ impl Builder<'_> { + .arg("-") + .run_capture(self) + .stderr(); ++ + let not_supported = error + .lines() + .any(|line| line.contains("unsupported crate type `proc-macro`")); diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template index 812ae176052ab0..9cd03be3c5b9c3 100644 --- a/srcpkgs/rust/template +++ b/srcpkgs/rust/template @@ -8,9 +8,8 @@ # uploaded to https://repo-default.voidlinux.org/distfiles/ # pkgname=rust -reverts="1.83.0_1" -version=1.82.0 -revision=3 +version=1.84.1 +revision=1 _llvmver=19 hostmakedepends="curl pkg-config python3 tar cargo-bootstrap" makedepends="libffi-devel ncurses-devel libxml2-devel zlib-devel llvm${_llvmver}-devel" @@ -20,7 +19,7 @@ maintainer="Enno Boland " license="Apache-2.0 OR MIT" homepage="https://www.rust-lang.org/" distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz" -checksum=7c53f4509eda184e174efa6ba7d5eeb586585686ce8edefc781a2b11a7cf512a +checksum=5e2fb5d49628a549f7671b2ccf9855ab379fd442831a7c2af16e0cdcc31bb375 lib32disabled=yes make_check=no # CBA for now python_version=3 # needed for python files in rust-src @@ -60,8 +59,8 @@ post_patch() { fi # clear out all the checksum nonsense of patched vendor crates - _clear_vendor_checksums libc-0.2.157 - _clear_vendor_checksums libc-0.2.158 + _clear_vendor_checksums libc-0.2.162 + _clear_vendor_checksums libc-0.2.164 # pre-configure 01-override-config overwrites vendor files _clear_vendor_checksums onig_sys-69.8.1 @@ -117,6 +116,7 @@ do_configure() { --enable-verbose-tests \ --disable-full-bootstrap \ --enable-extended \ + --enable-profiler \ --disable-codegen-tests \ --disable-dist-src \ --${_llvm_shared}-llvm-link-shared \ @@ -140,6 +140,7 @@ do_configure() { --set="rust.incremental=false" \ --set="rust.parallel-compiler=false" \ --set="rust.jemalloc=false" \ + --set="rust.llvm-tools=false" \ --set="build.submodules=false" \ --set="build.rustc=/usr/bin/rustc" \ --set="build.cargo=/usr/bin/cargo" \ From 59c53a11e9137570f5799b89b442b56c3497d815 Mon Sep 17 00:00:00 2001 From: tranzystorekk Date: Thu, 9 Jan 2025 21:46:19 +0100 Subject: [PATCH 4/4] cargo: update to 1.84.0 --- srcpkgs/cargo/template | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/srcpkgs/cargo/template b/srcpkgs/cargo/template index 4e83401f19a0cd..724eaaddfcab11 100644 --- a/srcpkgs/cargo/template +++ b/srcpkgs/cargo/template @@ -1,9 +1,8 @@ # Template file for 'cargo' pkgname=cargo -reverts="1.83.0_1" -version=1.82.0 -revision=2 -_cargo_revision=0.83.0 +version=1.84.0 +revision=1 +_cargo_revision=0.85.0 build_helper=rust hostmakedepends="cargo-bootstrap rust python3 curl pkg-config zlib-devel" makedepends="rust libcurl-devel openssl-devel" @@ -13,7 +12,7 @@ maintainer="Enno Boland " license="Apache-2.0 OR MIT" homepage="https://crates.io/" distfiles="https://github.com/rust-lang/cargo/archive/refs/tags/${_cargo_revision}.tar.gz" -checksum=53fbf5eb9d0c42ce184bd1b170606db7c878e7ef07ed3b513a67e62e14ca4661 +checksum=5e708627470d41be5d615b0f064d5cbe40509cab62e751a2876936fb53ca0bcd replaces="cargo-tree>=0" build_options="static bindist"