Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust 1.84 #54163

Merged
merged 4 commits into from
Feb 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions srcpkgs/cargo-bootstrap/template
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"
license="Apache-2.0 OR MIT"
Expand All @@ -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)
Expand Down
9 changes: 4 additions & 5 deletions srcpkgs/cargo/template
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -13,7 +12,7 @@ maintainer="Enno Boland <[email protected]>"
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"
Expand Down
17 changes: 8 additions & 9 deletions srcpkgs/rust-bootstrap/template
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"
license="Apache-2.0 OR MIT"
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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 {
Expand Down Expand Up @@ -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 = ""

Expand All @@ -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")
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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"));

Expand All @@ -179,18 +179,18 @@ 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
- pub musl_root: Option<PathBuf>,
pub prefix: Option<PathBuf>,
pub sysconfdir: Option<PathBuf>,
pub datadir: Option<PathBuf>,
@@ -582,8 +581,6 @@ pub struct Target {
@@ -620,8 +619,6 @@ pub struct Target {
pub profiler: Option<StringOrBool>,
pub rpath: Option<bool>,
pub crt_static: Option<bool>,
Expand All @@ -199,15 +199,15 @@ index bdfee55d8..18db92320 100644
pub wasi_root: Option<PathBuf>,
pub qemu_rootfs: Option<PathBuf>,
pub runner: Option<String>,
@@ -1104,7 +1101,6 @@ define_config! {
@@ -1151,7 +1148,6 @@ define_config! {
default_linker: Option<String> = "default-linker",
channel: Option<String> = "channel",
description: Option<String> = "description",
- musl_root: Option<String> = "musl-root",
rpath: Option<bool> = "rpath",
strip: Option<bool> = "strip",
frame_pointers: Option<bool> = "frame-pointers",
@@ -1158,8 +1154,6 @@ define_config! {
@@ -1206,8 +1202,6 @@ define_config! {
profiler: Option<StringOrBool> = "profiler",
rpath: Option<bool> = "rpath",
crt_static: Option<bool> = "crt-static",
Expand All @@ -216,23 +216,23 @@ index bdfee55d8..18db92320 100644
wasi_root: Option<String> = "wasi-root",
qemu_rootfs: Option<String> = "qemu-rootfs",
no_std: Option<bool> = "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;
Expand All @@ -241,16 +241,16 @@ 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: _,
verbose_tests: _,
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 @@
Expand All @@ -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;
}

Expand Down Expand Up @@ -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}"#,
}
}

Expand All @@ -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(
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ From: q66 <[email protected]>
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 {}
Expand All @@ -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 {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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,
Expand Down
Loading