diff --git a/.gitignore b/.gitignore index ef946c2..771739a 100644 --- a/.gitignore +++ b/.gitignore @@ -448,3 +448,4 @@ /rustc-1.84.0-src.tar.xz /wasi-libc-wasi-sdk-25.tar.gz /rustc-1.84.1-src.tar.xz +/rustc-1.85.0-src.tar.xz diff --git a/0001-bootstrap-allow-disabling-target-self-contained.patch b/0001-bootstrap-allow-disabling-target-self-contained.patch index 34d735d..bd6d0ed 100644 --- a/0001-bootstrap-allow-disabling-target-self-contained.patch +++ b/0001-bootstrap-allow-disabling-target-self-contained.patch @@ -1,4 +1,4 @@ -From 8d4d52446347872816ab51958e9f3162cf722ee6 Mon Sep 17 00:00:00 2001 +From eeb171e5de6da8790d01135754cbb9b6c248c476 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 28 Sep 2023 18:14:28 -0700 Subject: [PATCH 1/2] bootstrap: allow disabling target self-contained @@ -11,10 +11,10 @@ Subject: [PATCH 1/2] bootstrap: allow disabling target self-contained 4 files changed, 22 insertions(+) diff --git a/config.example.toml b/config.example.toml -index d3233ad17b51..6a1f097c20cb 100644 +index 5ea6774ce035..ec08a319e77f 100644 --- a/config.example.toml +++ b/config.example.toml -@@ -916,6 +916,11 @@ +@@ -922,6 +922,11 @@ # argument as the test binary. #runner = (string) @@ -27,10 +27,10 @@ index d3233ad17b51..6a1f097c20cb 100644 # Distribution options # diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs -index 8e088682f92d..843b7123b120 100644 +index ca337aa9f4c3..6175f93e50ed 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs -@@ -346,6 +346,10 @@ fn copy_self_contained_objects( +@@ -325,6 +325,10 @@ fn copy_self_contained_objects( compiler: &Compiler, target: TargetSelection, ) -> Vec<(PathBuf, DependencyType)> { @@ -42,10 +42,10 @@ index 8e088682f92d..843b7123b120 100644 builder.sysroot_target_libdir(*compiler, target).join("self-contained"); t!(fs::create_dir_all(&libdir_self_contained)); diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs -index e706aba977b6..a55d98e94dd8 100644 +index dd2f11ad4690..e10ed666099c 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs -@@ -627,6 +627,7 @@ pub struct Target { +@@ -634,6 +634,7 @@ pub struct Target { pub runner: Option, pub no_std: bool, pub codegen_backends: Option>, @@ -53,7 +53,7 @@ index e706aba977b6..a55d98e94dd8 100644 } impl Target { -@@ -638,6 +639,9 @@ pub fn from_triple(triple: &str) -> Self { +@@ -645,6 +646,9 @@ pub fn from_triple(triple: &str) -> Self { if triple.contains("emscripten") { target.runner = Some("node".into()); } @@ -63,7 +63,7 @@ index e706aba977b6..a55d98e94dd8 100644 target } } -@@ -1213,6 +1217,7 @@ struct TomlTarget { +@@ -1219,6 +1223,7 @@ struct TomlTarget { no_std: Option = "no-std", codegen_backends: Option> = "codegen-backends", runner: Option = "runner", @@ -71,7 +71,7 @@ index e706aba977b6..a55d98e94dd8 100644 } } -@@ -2038,6 +2043,9 @@ fn get_table(option: &str) -> Result { +@@ -2082,6 +2087,9 @@ fn get_table(option: &str) -> Result { if let Some(s) = cfg.no_std { target.no_std = s; } @@ -82,10 +82,10 @@ index e706aba977b6..a55d98e94dd8 100644 target.cxx = cfg.cxx.map(PathBuf::from); target.ar = cfg.ar.map(PathBuf::from); diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs -index c384fd6bf435..a101c010b740 100644 +index 8405c22aff08..7e1582207b8a 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs -@@ -1351,6 +1351,11 @@ fn no_std(&self, target: TargetSelection) -> Option { +@@ -1327,6 +1327,11 @@ fn no_std(&self, target: TargetSelection) -> Option { self.config.target_config.get(&target).map(|t| t.no_std) } diff --git a/0002-set-an-external-library-path-for-wasm32-wasi.patch b/0002-set-an-external-library-path-for-wasm32-wasi.patch index 3a05424..3534abb 100644 --- a/0002-set-an-external-library-path-for-wasm32-wasi.patch +++ b/0002-set-an-external-library-path-for-wasm32-wasi.patch @@ -1,19 +1,20 @@ -From 21d53eca2af5f04c0aa6b898f99f58e0e093cfdd Mon Sep 17 00:00:00 2001 +From e8e50258df70b39d2425dacf90c3d5f6d0720bc0 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 28 Sep 2023 18:18:16 -0700 Subject: [PATCH 2/2] set an external library path for wasm32-wasi --- compiler/rustc_codegen_ssa/src/back/link.rs | 10 ++++++++++ - compiler/rustc_target/src/spec/mod.rs | 4 ++++ + compiler/rustc_target/src/spec/json.rs | 2 ++ + compiler/rustc_target/src/spec/mod.rs | 2 ++ .../rustc_target/src/spec/targets/wasm32_wasip1.rs | 7 ++++--- - 3 files changed, 18 insertions(+), 3 deletions(-) + 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs -index 5149e3a12f23..cf62fbdc7f59 100644 +index e2081ad75633..a308bae8b644 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs -@@ -1663,6 +1663,12 @@ fn get_object_file_path(sess: &Session, name: &str, self_contained: bool) -> Pat +@@ -1639,6 +1639,12 @@ fn get_object_file_path(sess: &Session, name: &str, self_contained: bool) -> Pat return file_path; } } @@ -26,7 +27,7 @@ index 5149e3a12f23..cf62fbdc7f59 100644 for search_path in sess.target_filesearch().search_paths(PathKind::Native) { let file_path = search_path.dir.join(name); if file_path.exists() { -@@ -2163,6 +2169,10 @@ fn add_library_search_dirs( +@@ -2139,6 +2145,10 @@ fn add_library_search_dirs( ControlFlow::<()>::Continue(()) }, ); @@ -37,27 +38,11 @@ index 5149e3a12f23..cf62fbdc7f59 100644 } /// Add options making relocation sections in the produced ELF files read-only -diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs -index 321ab40403a3..54791c8892d8 100644 ---- a/compiler/rustc_target/src/spec/mod.rs -+++ b/compiler/rustc_target/src/spec/mod.rs -@@ -2155,6 +2155,7 @@ pub struct TargetOptions { - /// Objects to link before and after all other object code. - pub pre_link_objects: CrtObjects, - pub post_link_objects: CrtObjects, -+ pub external_lib_path: Option>, - /// Same as `(pre|post)_link_objects`, but when self-contained linking mode is enabled. - pub pre_link_objects_self_contained: CrtObjects, - pub post_link_objects_self_contained: CrtObjects, -@@ -2651,6 +2652,7 @@ fn default() -> TargetOptions { - relro_level: RelroLevel::None, - pre_link_objects: Default::default(), - post_link_objects: Default::default(), -+ external_lib_path: None, - pre_link_objects_self_contained: Default::default(), - post_link_objects_self_contained: Default::default(), - link_self_contained: LinkSelfContainedDefault::False, -@@ -3355,6 +3357,7 @@ macro_rules! key { +diff --git a/compiler/rustc_target/src/spec/json.rs b/compiler/rustc_target/src/spec/json.rs +index 9cdc0801b1f0..70fe8396b353 100644 +--- a/compiler/rustc_target/src/spec/json.rs ++++ b/compiler/rustc_target/src/spec/json.rs +@@ -527,6 +527,7 @@ macro_rules! key { key!(linker_is_gnu_json = "linker-is-gnu", bool); key!(pre_link_objects = "pre-link-objects", link_objects); key!(post_link_objects = "post-link-objects", link_objects); @@ -65,7 +50,7 @@ index 321ab40403a3..54791c8892d8 100644 key!(pre_link_objects_self_contained = "pre-link-objects-fallback", link_objects); key!(post_link_objects_self_contained = "post-link-objects-fallback", link_objects); // Deserializes the backwards-compatible variants of `-Clink-self-contained` -@@ -3636,6 +3639,7 @@ macro_rules! target_option_val { +@@ -708,6 +709,7 @@ macro_rules! target_option_val { target_option_val!(linker_is_gnu_json, "linker-is-gnu"); target_option_val!(pre_link_objects); target_option_val!(post_link_objects); @@ -73,8 +58,28 @@ index 321ab40403a3..54791c8892d8 100644 target_option_val!(pre_link_objects_self_contained, "pre-link-objects-fallback"); target_option_val!(post_link_objects_self_contained, "post-link-objects-fallback"); target_option_val!(link_args - pre_link_args_json, "pre-link-args"); +diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs +index 02962d55a60e..169f5a74bbfd 100644 +--- a/compiler/rustc_target/src/spec/mod.rs ++++ b/compiler/rustc_target/src/spec/mod.rs +@@ -2197,6 +2197,7 @@ pub struct TargetOptions { + /// Objects to link before and after all other object code. + pub pre_link_objects: CrtObjects, + pub post_link_objects: CrtObjects, ++ pub external_lib_path: Option>, + /// Same as `(pre|post)_link_objects`, but when self-contained linking mode is enabled. + pub pre_link_objects_self_contained: CrtObjects, + pub post_link_objects_self_contained: CrtObjects, +@@ -2712,6 +2713,7 @@ fn default() -> TargetOptions { + relro_level: RelroLevel::None, + pre_link_objects: Default::default(), + post_link_objects: Default::default(), ++ external_lib_path: None, + pre_link_objects_self_contained: Default::default(), + post_link_objects_self_contained: Default::default(), + link_self_contained: LinkSelfContainedDefault::False, diff --git a/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs b/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs -index 1cd30f21bec1..9a752d5712a6 100644 +index 0862958d05da..b1e736d68627 100644 --- a/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs +++ b/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs @@ -19,11 +19,12 @@ pub(crate) fn target() -> Target { diff --git a/rust.spec b/rust.spec index c03e245..737e46c 100644 --- a/rust.spec +++ b/rust.spec @@ -1,8 +1,8 @@ Name: rust -Version: 1.84.1 +Version: 1.85.0 Release: %autorelease Summary: The Rust Programming Language -License: (Apache-2.0 OR MIT) AND (Artistic-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unicode-DFS-2016) +License: (Apache-2.0 OR MIT) AND (Artistic-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unicode-3.0) # ^ written as: (rust itself) and (bundled libraries) URL: https://www.rust-lang.org @@ -14,9 +14,9 @@ ExclusiveArch: %{rust_arches} # To bootstrap from scratch, set the channel and date from src/stage0.json # e.g. 1.59.0 wants rustc: 1.58.0-2022-01-13 # or nightly wants some beta-YYYY-MM-DD -%global bootstrap_version 1.83.0 -%global bootstrap_channel 1.83.0 -%global bootstrap_date 2024-11-28 +%global bootstrap_version 1.84.0 +%global bootstrap_channel 1.84.0 +%global bootstrap_date 2025-01-09 # Only the specified arches will use bootstrap binaries. # NOTE: Those binaries used to be uploaded with every new release, but that was @@ -44,8 +44,8 @@ ExclusiveArch: %{rust_arches} # We can also choose to just use Rust's bundled LLVM, in case the system LLVM # is insufficient. Rust currently requires LLVM 18.0+. %global min_llvm_version 18.0.0 -%global bundled_llvm_version 19.1.5 -#global llvm_compat_version 17 +%global bundled_llvm_version 19.1.7 +#global llvm_compat_version 18 %global llvm llvm%{?llvm_compat_version} %bcond_with bundled_llvm @@ -112,7 +112,7 @@ ExclusiveArch: %{rust_arches} # Detect non-stable channels from the version, like 1.74.0~beta.1 %{lua: do local version = rpm.expand("%{version}") - local version_channel, subs = string.gsub(version, "^.*~(%w+).*$", "%1", 1) + local version_channel, subs = version:gsub("^.*~(%w+).*$", "%1", 1) rpm.define("channel " .. (subs ~= 0 and version_channel or "stable")) rpm.define("rustc_package rustc-" .. version_channel .. "-src") end} @@ -137,7 +137,7 @@ Patch4: 0001-bootstrap-allow-disabling-target-self-contained.patch Patch5: 0002-set-an-external-library-path-for-wasm32-wasi.patch # We don't want to use the bundled library in libsqlite3-sys -Patch6: rustc-1.84.0-unbundle-sqlite.patch +Patch6: rustc-1.85.0-unbundle-sqlite.patch # https://github.com/rust-lang/cc-rs/issues/1354 Patch7: 0001-Only-translate-profile-flags-for-Clang.patch @@ -151,7 +151,7 @@ Source102: cargo_vendor.attr Source103: cargo_vendor.prov # Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949) -Patch100: rustc-1.84.0-disable-libssh2.patch +Patch100: rustc-1.85.0-disable-libssh2.patch # Get the Rust triple for any architecture and ABI. %{lua: function rust_triple(arch, abi) @@ -202,7 +202,7 @@ end} %endif %global all_targets %{?mingw_targets} %{?wasm_targets} %{?extra_targets} %define target_enabled() %{lua: - print(string.find(rpm.expand(" %{all_targets} "), rpm.expand(" %1 "), 1, true) or 0) + print(rpm.expand(" %{all_targets} "):find(rpm.expand(" %1 "), 1, true) or 0) } %if %defined bootstrap_arches @@ -210,7 +210,7 @@ end} # Also define bootstrap_source just for the current target. %{lua: do local bootstrap_arches = {} - for arch in string.gmatch(rpm.expand("%{bootstrap_arches}"), "%S+") do + for arch in rpm.expand("%{bootstrap_arches}"):gmatch("%S+") do table.insert(bootstrap_arches, arch) end local base = rpm.expand("https://static.rust-lang.org/dist/%{bootstrap_date}") @@ -306,12 +306,6 @@ BuildRequires: python3-rpm # For src/test/run-make/static-pie BuildRequires: glibc-static -# For tests/run-make/pgo-branch-weights -# riscv64 does not support binutils-gold yet -%ifnarch riscv64 -BuildRequires: binutils-gold -%endif - # Virtual provides for folks who attempt "dnf install rustc" Provides: rustc = %{version}-%{release} Provides: rustc%{?_isa} = %{version}-%{release} @@ -671,7 +665,7 @@ rm -rf %{wasi_libc_dir}/dlmalloc/ %if %without bundled_sqlite3 %patch -P6 -p1 %endif -%patch -P7 -p1 -d vendor/cc-1.2.5 +%patch -P7 -p1 -d vendor/cc-1.2.6 %if %with disabled_libssh2 %patch -P100 -p1 diff --git a/rustc-1.84.0-disable-libssh2.patch b/rustc-1.85.0-disable-libssh2.patch similarity index 66% rename from rustc-1.84.0-disable-libssh2.patch rename to rustc-1.85.0-disable-libssh2.patch index 267bc3c..09be945 100644 --- a/rustc-1.84.0-disable-libssh2.patch +++ b/rustc-1.85.0-disable-libssh2.patch @@ -1,7 +1,7 @@ diff -up rustc-beta-src/src/tools/cargo/Cargo.lock.orig rustc-beta-src/src/tools/cargo/Cargo.lock ---- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2024-12-12 14:07:10.755481543 -0800 -+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2024-12-12 14:07:10.756481534 -0800 -@@ -2272,7 +2272,6 @@ checksum = "10472326a8a6477c3c20a64547b0 +--- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2025-01-17 14:26:49.845587361 -0800 ++++ rustc-beta-src/src/tools/cargo/Cargo.lock 2025-01-17 14:26:49.848587324 -0800 +@@ -2296,7 +2296,6 @@ checksum = "10472326a8a6477c3c20a64547b0 dependencies = [ "cc", "libc", @@ -9,7 +9,7 @@ diff -up rustc-beta-src/src/tools/cargo/Cargo.lock.orig rustc-beta-src/src/tools "libz-sys", "openssl-sys", "pkg-config", -@@ -2313,20 +2312,6 @@ dependencies = [ +@@ -2337,20 +2336,6 @@ dependencies = [ "pkg-config", "vcpkg", ] @@ -31,8 +31,8 @@ diff -up rustc-beta-src/src/tools/cargo/Cargo.lock.orig rustc-beta-src/src/tools [[package]] name = "libz-sys" diff -up rustc-beta-src/src/tools/cargo/Cargo.toml.orig rustc-beta-src/src/tools/cargo/Cargo.toml ---- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2024-12-12 14:07:10.756481534 -0800 -+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2024-12-12 14:07:56.866087428 -0800 +--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2025-01-17 14:26:49.848587324 -0800 ++++ rustc-beta-src/src/tools/cargo/Cargo.toml 2025-01-17 14:27:49.035844397 -0800 @@ -47,7 +47,7 @@ curl = "0.4.46" curl-sys = "0.4.73" filetime = "0.2.23" @@ -40,5 +40,5 @@ diff -up rustc-beta-src/src/tools/cargo/Cargo.toml.orig rustc-beta-src/src/tools -git2 = "0.19.0" +git2 = { version = "0.19.0", default-features = false, features = ["https"] } git2-curl = "0.20.0" - gix = { version = "0.67.0", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "parallel", "dirwalk"] } + gix = { version = "0.69.1", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "parallel", "dirwalk"] } glob = "0.3.1" diff --git a/rustc-1.84.0-unbundle-sqlite.patch b/rustc-1.85.0-unbundle-sqlite.patch similarity index 64% rename from rustc-1.84.0-unbundle-sqlite.patch rename to rustc-1.85.0-unbundle-sqlite.patch index 2e3ecc3..08c395f 100644 --- a/rustc-1.84.0-unbundle-sqlite.patch +++ b/rustc-1.85.0-unbundle-sqlite.patch @@ -1,7 +1,7 @@ diff -up rustc-beta-src/src/tools/cargo/Cargo.lock.orig rustc-beta-src/src/tools/cargo/Cargo.lock ---- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2024-12-07 06:47:38.000000000 -0800 -+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2024-12-12 14:02:54.412672539 -0800 -@@ -2310,7 +2310,6 @@ version = "0.30.1" +--- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2025-01-11 07:18:58.000000000 -0800 ++++ rustc-beta-src/src/tools/cargo/Cargo.lock 2025-01-17 14:14:33.072839703 -0800 +@@ -2334,7 +2334,6 @@ version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" dependencies = [ @@ -10,8 +10,8 @@ diff -up rustc-beta-src/src/tools/cargo/Cargo.lock.orig rustc-beta-src/src/tools "vcpkg", ] diff -up rustc-beta-src/src/tools/cargo/Cargo.toml.orig rustc-beta-src/src/tools/cargo/Cargo.toml ---- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2024-12-12 14:02:54.412672539 -0800 -+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2024-12-12 14:03:25.665405417 -0800 +--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2025-01-17 14:14:33.072839703 -0800 ++++ rustc-beta-src/src/tools/cargo/Cargo.toml 2025-01-17 14:15:48.497891366 -0800 @@ -80,7 +80,7 @@ proptest = "1.5.0" pulldown-cmark = { version = "0.12.0", default-features = false, features = ["html"] } rand = "0.8.5" @@ -19,5 +19,5 @@ diff -up rustc-beta-src/src/tools/cargo/Cargo.toml.orig rustc-beta-src/src/tools -rusqlite = { version = "0.32.0", features = ["bundled"] } +rusqlite = { version = "0.32.0", features = [] } rustc-hash = "2.0.0" + rustc-stable-hash = "0.1.1" rustfix = { version = "0.9.0", path = "crates/rustfix" } - same-file = "1.0.6" diff --git a/sources b/sources index 24d06bc..b0e42b4 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rustc-1.84.1-src.tar.xz) = f1cc4765736551508408126e44086988e8ddc30c1a929bf7b61c6be85ad0d65928dd5fb1041cfaeee8eb37d2208f2c1917e276aef2bc9a8e40e34f6713b349e1 +SHA512 (rustc-1.85.0-src.tar.xz) = 3e9c933d1d9b6e5fb081837cf07eb1638b1a6b4fd1cb607dd860c5021ba7b521edbaf8ba0fa8f182f62178b72a3e1a3e6b26675e8fb6530871137852a074443c SHA512 (wasi-libc-wasi-sdk-25.tar.gz) = 580716fbc152be19e2e9724f3483a0a580a168be0cd6d105d37b0ebd0d11bd36d7d9db63984eb2cc7b3aaff2fc9446d9558d1469b538a79b7de465a1113560ea