rust: update to 1.79.0

This commit is contained in:
Marcin Puc 2024-06-13 17:15:22 +02:00 committed by classabbyamp
parent c9676b962f
commit 4bb00fb167
3 changed files with 36 additions and 40 deletions

View file

@ -61,10 +61,10 @@ index 53f710b8f..2a4eec15f 100644
new(&[ new(&[
(LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]), (LinkOutputKind::DynamicNoPicExe, &["crt2.o", "rsbegin.o"]),
diff --git a/config.example.toml b/config.example.toml diff --git a/config.example.toml b/config.example.toml
index f94553dd6..65139e167 100644 index 5c1fac767..a95c9aa88 100644
--- a/config.example.toml --- a/config.example.toml
+++ b/config.example.toml +++ b/config.example.toml
@@ -591,14 +591,6 @@ @@ -588,14 +588,6 @@
# behavior -- this may lead to miscompilations or other bugs. # behavior -- this may lead to miscompilations or other bugs.
#description = "" #description = ""
@ -80,7 +80,7 @@ index f94553dd6..65139e167 100644
# platforms to ensure that the compiler is usable by default from the build # 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 # 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 diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py
index 818a7daad..5edc363f6 100755 index 768aac912..6aebd9189 100755
--- a/src/bootstrap/configure.py --- a/src/bootstrap/configure.py
+++ b/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py
@@ -99,34 +99,6 @@ v("llvm-config", None, "set path to llvm-config") @@ -99,34 +99,6 @@ v("llvm-config", None, "set path to llvm-config")
@ -119,7 +119,7 @@ index 818a7daad..5edc363f6 100755
"riscv32gc-unknown-linux-musl install directory") "riscv32gc-unknown-linux-musl install directory")
v("musl-root-riscv64gc", "target.riscv64gc-unknown-linux-musl.musl-root", 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 diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
index e927b491c..00475eb66 100644 index 1d46a158f..b9a6dd981 100644
--- a/src/bootstrap/src/core/build_steps/compile.rs --- a/src/bootstrap/src/core/build_steps/compile.rs
+++ b/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs
@@ -361,39 +361,7 @@ fn copy_self_contained_objects( @@ -361,39 +361,7 @@ fn copy_self_contained_objects(
@ -160,10 +160,10 @@ index e927b491c..00475eb66 100644
- } - }
- } else if target.contains("-wasi") { - } else if target.contains("-wasi") {
+ if target.contains("-wasi") { + if target.contains("-wasi") {
let srcdir = builder let srcdir = builder.wasi_libdir(target).unwrap_or_else(|| {
.wasi_root(target) panic!(
.unwrap_or_else(|| { "Target {:?} does not have a \"wasi-root\" key in Config.toml \
@@ -504,15 +472,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car @@ -501,15 +469,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
.arg("--manifest-path") .arg("--manifest-path")
.arg(builder.src.join("library/sysroot/Cargo.toml")); .arg(builder.src.join("library/sysroot/Cargo.toml"));
@ -177,13 +177,13 @@ index e927b491c..00475eb66 100644
- } - }
- -
if target.contains("-wasi") { if target.contains("-wasi") {
if let Some(p) = builder.wasi_root(target) { if let Some(dir) = builder.wasi_libdir(target) {
let root = format!( 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 diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs
index 3e1bc9a9a..3eef99651 100644 index 149a62f88..53b1b97be 100644
--- a/src/bootstrap/src/core/config/config.rs --- a/src/bootstrap/src/core/config/config.rs
+++ b/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs
@@ -310,7 +310,6 @@ pub struct Config { @@ -317,7 +317,6 @@ pub struct Config {
pub missing_tools: bool, // FIXME: Deprecated field. Remove it at 2024. pub missing_tools: bool, // FIXME: Deprecated field. Remove it at 2024.
// Fallback musl-root for all targets // Fallback musl-root for all targets
@ -191,7 +191,7 @@ index 3e1bc9a9a..3eef99651 100644
pub prefix: Option<PathBuf>, pub prefix: Option<PathBuf>,
pub sysconfdir: Option<PathBuf>, pub sysconfdir: Option<PathBuf>,
pub datadir: Option<PathBuf>, pub datadir: Option<PathBuf>,
@@ -579,8 +578,6 @@ pub struct Target { @@ -588,8 +587,6 @@ pub struct Target {
pub profiler: Option<StringOrBool>, pub profiler: Option<StringOrBool>,
pub rpath: Option<bool>, pub rpath: Option<bool>,
pub crt_static: Option<bool>, pub crt_static: Option<bool>,
@ -200,7 +200,7 @@ index 3e1bc9a9a..3eef99651 100644
pub wasi_root: Option<PathBuf>, pub wasi_root: Option<PathBuf>,
pub qemu_rootfs: Option<PathBuf>, pub qemu_rootfs: Option<PathBuf>,
pub runner: Option<String>, pub runner: Option<String>,
@@ -1089,7 +1086,6 @@ define_config! { @@ -1097,7 +1094,6 @@ define_config! {
default_linker: Option<String> = "default-linker", default_linker: Option<String> = "default-linker",
channel: Option<String> = "channel", channel: Option<String> = "channel",
description: Option<String> = "description", description: Option<String> = "description",
@ -208,7 +208,7 @@ index 3e1bc9a9a..3eef99651 100644
rpath: Option<bool> = "rpath", rpath: Option<bool> = "rpath",
strip: Option<bool> = "strip", strip: Option<bool> = "strip",
frame_pointers: Option<bool> = "frame-pointers", frame_pointers: Option<bool> = "frame-pointers",
@@ -1143,8 +1139,6 @@ define_config! { @@ -1151,8 +1147,6 @@ define_config! {
profiler: Option<StringOrBool> = "profiler", profiler: Option<StringOrBool> = "profiler",
rpath: Option<bool> = "rpath", rpath: Option<bool> = "rpath",
crt_static: Option<bool> = "crt-static", crt_static: Option<bool> = "crt-static",
@ -217,7 +217,7 @@ index 3e1bc9a9a..3eef99651 100644
wasi_root: Option<String> = "wasi-root", wasi_root: Option<String> = "wasi-root",
qemu_rootfs: Option<String> = "qemu-rootfs", qemu_rootfs: Option<String> = "qemu-rootfs",
no_std: Option<bool> = "no-std", no_std: Option<bool> = "no-std",
@@ -1564,7 +1558,6 @@ impl Config { @@ -1582,7 +1576,6 @@ impl Config {
default_linker, default_linker,
channel, channel,
description, description,
@ -225,7 +225,7 @@ index 3e1bc9a9a..3eef99651 100644
rpath, rpath,
verbose_tests, verbose_tests,
optimize_tests, optimize_tests,
@@ -1677,7 +1670,6 @@ impl Config { @@ -1695,7 +1688,6 @@ impl Config {
config.rustc_parallel = config.rustc_parallel =
parallel_compiler.unwrap_or(config.channel == "dev" || config.channel == "nightly"); parallel_compiler.unwrap_or(config.channel == "dev" || config.channel == "nightly");
config.rustc_default_linker = default_linker; config.rustc_default_linker = default_linker;
@ -233,7 +233,7 @@ index 3e1bc9a9a..3eef99651 100644
config.save_toolstates = save_toolstates.map(PathBuf::from); config.save_toolstates = save_toolstates.map(PathBuf::from);
set( set(
&mut config.deny_warnings, &mut config.deny_warnings,
@@ -1876,8 +1868,6 @@ impl Config { @@ -1894,8 +1886,6 @@ impl Config {
target.ranlib = cfg.ranlib.map(PathBuf::from); target.ranlib = cfg.ranlib.map(PathBuf::from);
target.linker = cfg.linker.map(PathBuf::from); target.linker = cfg.linker.map(PathBuf::from);
target.crt_static = cfg.crt_static; target.crt_static = cfg.crt_static;
@ -284,10 +284,10 @@ index e03b1e179..e61335d9b 100644
// There are three builds of cmake on windows: MSVC, MinGW, and // There are three builds of cmake on windows: MSVC, MinGW, and
// Cygwin. The Cygwin build does not have generators for Visual // Cygwin. The Cygwin build does not have generators for Visual
diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
index 5ed6b357e..9667bb0e0 100644 index 663a2d8e1..d2345a54f 100644
--- a/src/bootstrap/src/lib.rs --- a/src/bootstrap/src/lib.rs
+++ b/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs
@@ -1319,25 +1319,6 @@ impl Build { @@ -1355,25 +1355,6 @@ impl Build {
} }
} }
@ -310,14 +310,14 @@ index 5ed6b357e..9667bb0e0 100644
- self.musl_root(target).map(|root| root.join("lib")) - self.musl_root(target).map(|root| root.join("lib"))
- } - }
- -
/// Returns the sysroot for the wasi target, if defined /// Returns the `lib` directory for the WASI target specified, if
fn wasi_root(&self, target: TargetSelection) -> Option<&Path> { /// configured.
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 diff --git a/src/bootstrap/src/utils/cc_detect.rs b/src/bootstrap/src/utils/cc_detect.rs
index 3ba4e0cb6..31ffacb25 100644 index 540b86713..f01c87085 100644
--- a/src/bootstrap/src/utils/cc_detect.rs --- a/src/bootstrap/src/utils/cc_detect.rs
+++ b/src/bootstrap/src/utils/cc_detect.rs +++ b/src/bootstrap/src/utils/cc_detect.rs
@@ -199,30 +199,6 @@ fn default_compiler( @@ -197,30 +197,6 @@ fn default_compiler(
} }
} }
@ -345,6 +345,6 @@ index 3ba4e0cb6..31ffacb25 100644
- } - }
- } - }
- -
_ => None, t if t.contains("-wasi") => {
} let root = PathBuf::from(std::env::var_os("WASI_SDK_PATH")?);
} let compiler = match compiler {

View file

@ -3,11 +3,11 @@ From: q66 <daniel@octaforge.org>
Date: Sun, 3 May 2020 18:02:03 +0200 Date: Sun, 3 May 2020 18:02:03 +0200
Subject: [PATCH 10/15] Fix dynamic linkage of musl libc for the libc crate Subject: [PATCH 10/15] Fix dynamic linkage of musl libc for the libc crate
diff --git a/vendor/libc/src/unix/mod.rs b/vendor/libc/src/unix/mod.rs diff --git a/vendor/libc-0.2.153/src/unix/mod.rs b/vendor/libc-0.2.153/src/unix/mod.rs
index b005970b9..c53093a09 100644 index 3dca83305..aae5b0ca9 100644
--- a/vendor/libc/src/unix/mod.rs --- a/vendor/libc-0.2.153/src/unix/mod.rs
+++ b/vendor/libc/src/unix/mod.rs +++ b/vendor/libc-0.2.153/src/unix/mod.rs
@@ -351,7 +351,14 @@ cfg_if! { @@ -347,7 +347,14 @@ cfg_if! {
#[link(name = "dl", cfg(not(target_feature = "crt-static")))] #[link(name = "dl", cfg(not(target_feature = "crt-static")))]
#[link(name = "c", cfg(not(target_feature = "crt-static")))] #[link(name = "c", cfg(not(target_feature = "crt-static")))]
extern {} extern {}

View file

@ -8,7 +8,7 @@
# uploaded to https://repo-default.voidlinux.org/distfiles/ # uploaded to https://repo-default.voidlinux.org/distfiles/
# #
pkgname=rust pkgname=rust
version=1.78.0 version=1.79.0
revision=1 revision=1
hostmakedepends="curl pkg-config python3 tar cargo-bootstrap" hostmakedepends="curl pkg-config python3 tar cargo-bootstrap"
makedepends="libffi-devel ncurses-devel libxml2-devel zlib-devel llvm17-devel" makedepends="libffi-devel ncurses-devel libxml2-devel zlib-devel llvm17-devel"
@ -18,7 +18,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
license="MIT, Apache-2.0" license="MIT, Apache-2.0"
homepage="https://www.rust-lang.org/" homepage="https://www.rust-lang.org/"
distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz" distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"
checksum=ff544823a5cb27f2738128577f1e7e00ee8f4c83f2a348781ae4fc355e91d5a9 checksum=172ecf3c7d1f9d9fb16cd2a628869782670416ded0129e524a86751f961448c0
lib32disabled=yes lib32disabled=yes
make_check=no # CBA for now make_check=no # CBA for now
python_version=3 # needed for python files in rust-src python_version=3 # needed for python files in rust-src
@ -58,11 +58,7 @@ post_patch() {
fi fi
# clear out all the checksum nonsense of patched vendor crates # clear out all the checksum nonsense of patched vendor crates
_clear_vendor_checksums libc _clear_vendor_checksums libc-0.2.153
_clear_vendor_checksums typenum
_clear_vendor_checksums cc
_clear_vendor_checksums target-lexicon
_clear_vendor_checksums tikv-jemallocator
} }
do_configure() { do_configure() {