From 01ea0451709345b4ecdabffb526d72e98094b25f Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 6 Nov 2025 11:49:02 -0800 Subject: [PATCH 1/5] Update to Rust 1.89.0 Resolves: RHEL-111861 Resolves: RHEL-111869 --- .gitignore | 2 + ...ic-if-WASI_SDK_PATH-is-not-set-when-.patch | 39 +++++++++ ...variables-override-some-default-CPUs.patch | 18 ++--- 0001-Use-lld-provided-by-system.patch | 20 ++--- ...llow-disabling-target-self-contained.patch | 48 +++++------ ...nly-copy-rustlib-into-stage0-sysroot.patch | 28 +++++++ ...xternal-library-path-for-wasm32-wasi.patch | 22 +++--- rpminspect.yaml | 2 + rust-pr142047.patch | 79 ------------------- rust.spec | 32 +++++--- ...atch => rustc-1.89.0-disable-libssh2.patch | 18 ++--- sources | 4 +- 12 files changed, 154 insertions(+), 158 deletions(-) create mode 100644 0001-Don-t-always-panic-if-WASI_SDK_PATH-is-not-set-when-.patch create mode 100644 0001-only-copy-rustlib-into-stage0-sysroot.patch delete mode 100644 rust-pr142047.patch rename rustc-1.88.0-disable-libssh2.patch => rustc-1.89.0-disable-libssh2.patch (55%) diff --git a/.gitignore b/.gitignore index b77fb07..788085a 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,5 @@ SOURCES/wasi-libc-wasi-sdk-17.tar.gz /wasi-libc-640c0cfc19a96b099e0791824be5ef0105ce2084.tar.gz /rustc-1.87.0-src.tar.xz /rustc-1.88.0-src.tar.xz +/wasi-libc-wasi-sdk-27.tar.gz +/rustc-1.89.0-src.tar.xz diff --git a/0001-Don-t-always-panic-if-WASI_SDK_PATH-is-not-set-when-.patch b/0001-Don-t-always-panic-if-WASI_SDK_PATH-is-not-set-when-.patch new file mode 100644 index 0000000..4864900 --- /dev/null +++ b/0001-Don-t-always-panic-if-WASI_SDK_PATH-is-not-set-when-.patch @@ -0,0 +1,39 @@ +From 9bdd3b0ee6a6fd5914fea0f56f3b754410733e53 Mon Sep 17 00:00:00 2001 +From: Paul Murphy +Date: Thu, 10 Jul 2025 10:58:58 -0500 +Subject: [PATCH] Don't always panic if WASI_SDK_PATH is not set when detecting + compilers + +They are not always needed when building std, as is the case when +packaging on Fedora. Panic if building from CI, but warn otherwise. +--- + src/bootstrap/src/utils/cc_detect.rs | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +diff --git a/src/bootstrap/src/utils/cc_detect.rs b/src/bootstrap/src/utils/cc_detect.rs +index dcafeb80f90..2569f95e3ef 100644 +--- a/src/bootstrap/src/utils/cc_detect.rs ++++ b/src/bootstrap/src/utils/cc_detect.rs +@@ -221,10 +221,15 @@ fn default_compiler( + } + + t if t.contains("-wasi") => { +- let root = build +- .wasi_sdk_path +- .as_ref() +- .expect("WASI_SDK_PATH mut be configured for a -wasi target"); ++ let root = if let Some(path) = build.wasi_sdk_path.as_ref() { ++ path ++ } else { ++ if build.config.is_running_on_ci { ++ panic!("ERROR: WASI_SDK_PATH must be configured for a -wasi target on CI"); ++ } ++ println!("WARNING: WASI_SDK_PATH not set, using default cc/cxx compiler"); ++ return None; ++ }; + let compiler = match compiler { + Language::C => format!("{t}-clang"), + Language::CPlusPlus => format!("{t}-clang++"), +-- +2.49.0 + diff --git a/0001-Let-environment-variables-override-some-default-CPUs.patch b/0001-Let-environment-variables-override-some-default-CPUs.patch index 302c7fd..fa654c6 100644 --- a/0001-Let-environment-variables-override-some-default-CPUs.patch +++ b/0001-Let-environment-variables-override-some-default-CPUs.patch @@ -1,4 +1,4 @@ -From 5273432acfae75d6e509bbebcf8d28b0f3d820d0 Mon Sep 17 00:00:00 2001 +From e54c0a4cc8bd8a76b155714b23a61d1d32a8d069 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 9 Jun 2023 15:23:08 -0700 Subject: [PATCH] Let environment variables override some default CPUs @@ -10,10 +10,10 @@ Subject: [PATCH] Let environment variables override some default CPUs 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_target/src/spec/targets/powerpc64le_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/powerpc64le_unknown_linux_gnu.rs -index 23913687a1fd..3253fbc84c74 100644 +index 9e406af53b5..9104903673f 100644 --- a/compiler/rustc_target/src/spec/targets/powerpc64le_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc64le_unknown_linux_gnu.rs -@@ -2,7 +2,7 @@ +@@ -4,7 +4,7 @@ pub(crate) fn target() -> Target { let mut base = base::linux_gnu::opts(); @@ -23,23 +23,23 @@ index 23913687a1fd..3253fbc84c74 100644 base.max_atomic_width = Some(64); base.stack_probes = StackProbeType::Inline; diff --git a/compiler/rustc_target/src/spec/targets/s390x_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/s390x_unknown_linux_gnu.rs -index a84a18a433ff..441af1018ff3 100644 +index cdcf7d62a3e..02f24274ed2 100644 --- a/compiler/rustc_target/src/spec/targets/s390x_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/s390x_unknown_linux_gnu.rs -@@ -5,7 +5,7 @@ pub(crate) fn target() -> Target { +@@ -6,7 +6,7 @@ pub(crate) fn target() -> Target { let mut base = base::linux_gnu::opts(); base.endian = Endian::Big; // z10 is the oldest CPU supported by LLVM - base.cpu = "z10".into(); + base.cpu = option_env!("RUSTC_TARGET_CPU_S390X").unwrap_or("z10").into(); base.max_atomic_width = Some(128); - base.min_global_align = Some(16); + base.min_global_align = Some(Align::from_bits(16).unwrap()); base.stack_probes = StackProbeType::Inline; diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs -index 59ec6c7f9d5f..b6f1be890b20 100644 +index 0c8353fad18..c2515e700bb 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs -@@ -2,7 +2,7 @@ +@@ -4,7 +4,7 @@ pub(crate) fn target() -> Target { let mut base = base::linux_gnu::opts(); @@ -49,5 +49,5 @@ index 59ec6c7f9d5f..b6f1be890b20 100644 base.max_atomic_width = Some(64); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]); -- -2.47.1 +2.49.0 diff --git a/0001-Use-lld-provided-by-system.patch b/0001-Use-lld-provided-by-system.patch index 63c9b14..1e5816b 100644 --- a/0001-Use-lld-provided-by-system.patch +++ b/0001-Use-lld-provided-by-system.patch @@ -1,4 +1,4 @@ -From 687112c89c9058ef1e79f1c3a974940b1ae43ea3 Mon Sep 17 00:00:00 2001 +From 0641fdd833785914f1ead6e1ab374beea5b55437 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 16 Aug 2024 10:12:58 -0700 Subject: [PATCH] Use lld provided by system @@ -12,10 +12,10 @@ Subject: [PATCH] Use lld provided by system 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/compiler/rustc_target/src/spec/base/wasm.rs b/compiler/rustc_target/src/spec/base/wasm.rs -index 81b96cd39ffa..4c9916af826b 100644 +index 88e7af5e669..14100a683f9 100644 --- a/compiler/rustc_target/src/spec/base/wasm.rs +++ b/compiler/rustc_target/src/spec/base/wasm.rs -@@ -85,8 +85,7 @@ macro_rules! args { +@@ -86,8 +86,7 @@ macro_rules! args { // arguments just yet limit_rdylib_exports: false, @@ -26,7 +26,7 @@ index 81b96cd39ffa..4c9916af826b 100644 pre_link_args, diff --git a/compiler/rustc_target/src/spec/targets/aarch64_unknown_none_softfloat.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_none_softfloat.rs -index 3b719ebaf07e..8b4fecee68f0 100644 +index 35a4dd72b86..a9c8fc5edb8 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_none_softfloat.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_none_softfloat.rs @@ -15,7 +15,7 @@ pub(crate) fn target() -> Target { @@ -39,7 +39,7 @@ index 3b719ebaf07e..8b4fecee68f0 100644 relocation_model: RelocModel::Static, disable_redzone: true, diff --git a/compiler/rustc_target/src/spec/targets/aarch64_unknown_uefi.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_uefi.rs -index 9656024ddaa1..2099fa17229f 100644 +index 327b52389b9..17313d7e8b3 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_uefi.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_uefi.rs @@ -9,6 +9,7 @@ pub(crate) fn target() -> Target { @@ -51,7 +51,7 @@ index 9656024ddaa1..2099fa17229f 100644 Target { llvm_target: "aarch64-unknown-windows".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_none.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_none.rs -index e14a36735894..b493d7d98b46 100644 +index 1a6343595f5..8015b082cd1 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_none.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_none.rs @@ -19,7 +19,7 @@ pub(crate) fn target() -> Target { @@ -64,17 +64,17 @@ index e14a36735894..b493d7d98b46 100644 features: "-mmx,-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2,+soft-float".into(), supported_sanitizers: SanitizerSet::KCFI | SanitizerSet::KERNELADDRESS, diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_uefi.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_uefi.rs -index bce6aa0ebc6b..7fa1148a1de7 100644 +index 0cf6a879462..3677fc662de 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_uefi.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_uefi.rs -@@ -14,6 +14,7 @@ pub(crate) fn target() -> Target { +@@ -15,6 +15,7 @@ pub(crate) fn target() -> Target { base.plt_by_default = false; base.max_atomic_width = Some(64); - base.entry_abi = Conv::X86_64Win64; + base.entry_abi = CanonAbi::X86(X86Call::Win64); + base.linker = Some("lld".into()); // We disable MMX and SSE for now, even though UEFI allows using them. Problem is, you have to // enable these CPU features explicitly before their first use, otherwise their instructions -- -2.48.1 +2.49.0 diff --git a/0001-bootstrap-allow-disabling-target-self-contained.patch b/0001-bootstrap-allow-disabling-target-self-contained.patch index 655496c..c00d2b9 100644 --- a/0001-bootstrap-allow-disabling-target-self-contained.patch +++ b/0001-bootstrap-allow-disabling-target-self-contained.patch @@ -1,4 +1,4 @@ -From e8833a9032b9f5773ef891b3f12b93322d6b4950 Mon Sep 17 00:00:00 2001 +From 6af71d8ff0932bc14102cd9cbfbca16354c5cd2a Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Mon, 7 Apr 2025 16:59:10 +0200 Subject: [PATCH 1/2] bootstrap: allow disabling target self-contained @@ -6,15 +6,15 @@ Subject: [PATCH 1/2] bootstrap: allow disabling target self-contained --- bootstrap.example.toml | 5 +++++ src/bootstrap/src/core/build_steps/compile.rs | 4 ++++ - src/bootstrap/src/core/config/config.rs | 8 ++++++++ + src/bootstrap/src/core/config/toml/target.rs | 8 ++++++++ src/bootstrap/src/lib.rs | 5 +++++ 4 files changed, 22 insertions(+) diff --git a/bootstrap.example.toml b/bootstrap.example.toml -index 2a98821f225..580d6b2a8a2 100644 +index 19cf360b0fb..916bae8dc7d 100644 --- a/bootstrap.example.toml +++ b/bootstrap.example.toml -@@ -948,6 +948,11 @@ +@@ -974,6 +974,11 @@ # This overrides the global `rust.jemalloc` option. See that option for more info. #jemalloc = rust.jemalloc (bool) @@ -27,10 +27,10 @@ index 2a98821f225..580d6b2a8a2 100644 # Distribution options # diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs -index 18b5d4426b1..3de9667123b 100644 +index f6efb23e8d8..4d0ae54e1ef 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs -@@ -370,6 +370,10 @@ fn copy_self_contained_objects( +@@ -374,6 +374,10 @@ fn copy_self_contained_objects( compiler: &Compiler, target: TargetSelection, ) -> Vec<(PathBuf, DependencyType)> { @@ -41,11 +41,19 @@ index 18b5d4426b1..3de9667123b 100644 let libdir_self_contained = 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 bbb0fbfbb93..8642a86cbf8 100644 ---- a/src/bootstrap/src/core/config/config.rs -+++ b/src/bootstrap/src/core/config/config.rs -@@ -666,6 +666,7 @@ pub struct Target { +diff --git a/src/bootstrap/src/core/config/toml/target.rs b/src/bootstrap/src/core/config/toml/target.rs +index b9f6780ca3f..41a4a815d31 100644 +--- a/src/bootstrap/src/core/config/toml/target.rs ++++ b/src/bootstrap/src/core/config/toml/target.rs +@@ -47,6 +47,7 @@ struct TomlTarget { + runner: Option = "runner", + optimized_compiler_builtins: Option = "optimized-compiler-builtins", + jemalloc: Option = "jemalloc", ++ self_contained: Option = "self-contained", + } + } + +@@ -79,6 +80,7 @@ pub struct Target { pub codegen_backends: Option>, pub optimized_compiler_builtins: Option, pub jemalloc: Option, @@ -53,7 +61,7 @@ index bbb0fbfbb93..8642a86cbf8 100644 } impl Target { -@@ -677,6 +678,9 @@ pub fn from_triple(triple: &str) -> Self { +@@ -90,6 +92,9 @@ pub fn from_triple(triple: &str) -> Self { if triple.contains("emscripten") { target.runner = Some("node".into()); } @@ -63,15 +71,7 @@ index bbb0fbfbb93..8642a86cbf8 100644 target } } -@@ -1292,6 +1296,7 @@ struct TomlTarget { - runner: Option = "runner", - optimized_compiler_builtins: Option = "optimized-compiler-builtins", - jemalloc: Option = "jemalloc", -+ self_contained: Option = "self-contained", - } - } - -@@ -2245,6 +2250,9 @@ fn get_table(option: &str) -> Result { +@@ -126,6 +131,9 @@ pub fn apply_target_config(&mut self, toml_target: Option Option { +@@ -1331,6 +1331,11 @@ fn no_std(&self, target: TargetSelection) -> Option { self.config.target_config.get(&target).map(|t| t.no_std) } @@ -98,5 +98,5 @@ index 843d474f92d..3a4398ee1f8 100644 /// and `remote-test-server` binaries. fn remote_tested(&self, target: TargetSelection) -> bool { -- -2.48.1 +2.49.0 diff --git a/0001-only-copy-rustlib-into-stage0-sysroot.patch b/0001-only-copy-rustlib-into-stage0-sysroot.patch new file mode 100644 index 0000000..6cf8aa9 --- /dev/null +++ b/0001-only-copy-rustlib-into-stage0-sysroot.patch @@ -0,0 +1,28 @@ +From 7d83bae4e2577ffa2afaf2fddb6948c1756a403c Mon Sep 17 00:00:00 2001 +From: Paul Murphy +Date: Thu, 10 Jul 2025 09:06:22 -0500 +Subject: [PATCH] only copy rustlib into stage0 sysroot + +Otherwise, much more is copied, and doing so likely runs into +permissions errors if the bootstrap toolchain lives in the host's +sysroot. +--- + src/bootstrap/src/core/build_steps/compile.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs +index 4d0ae54e1ef..4ef70dd9b97 100644 +--- a/src/bootstrap/src/core/build_steps/compile.rs ++++ b/src/bootstrap/src/core/build_steps/compile.rs +@@ -811,7 +811,7 @@ fn run(self, builder: &Builder<'_>) { + let _ = fs::remove_dir_all(sysroot.join("lib/rustlib/src/rust")); + } + +- builder.cp_link_r(&builder.initial_sysroot.join("lib"), &sysroot.join("lib")); ++ builder.cp_link_r(&builder.initial_sysroot.join("lib/rustlib"), &sysroot.join("lib/rustlib")); + } else { + if builder.download_rustc() { + // Ensure there are no CI-rustc std artifacts. +-- +2.49.0 + 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 b1f2476..79f06ad 100644 --- a/0002-set-an-external-library-path-for-wasm32-wasi.patch +++ b/0002-set-an-external-library-path-for-wasm32-wasi.patch @@ -1,4 +1,4 @@ -From 35a37bd892939b8a1cd194632de3b9dd3a3d479b Mon Sep 17 00:00:00 2001 +From 0539027ae7a60cd6ddf2190450240d35a147599d Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Mon, 7 Apr 2025 17:22:56 +0200 Subject: [PATCH 2/2] set an external library path for wasm32-wasi @@ -11,10 +11,10 @@ Subject: [PATCH 2/2] set an external library path for wasm32-wasi 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 b59d73a9aae..2369d73b4e3 100644 +index 8882ba359b7..914e5c1398f 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs -@@ -1583,6 +1583,12 @@ fn get_object_file_path(sess: &Session, name: &str, self_contained: bool) -> Pat +@@ -1548,6 +1548,12 @@ fn get_object_file_path(sess: &Session, name: &str, self_contained: bool) -> Pat return file_path; } } @@ -27,7 +27,7 @@ index b59d73a9aae..2369d73b4e3 100644 for search_path in sess.target_filesearch().search_paths(PathKind::Native) { let file_path = search_path.dir.join(name); if file_path.exists() { -@@ -2140,6 +2146,10 @@ fn add_library_search_dirs( +@@ -2121,6 +2127,10 @@ fn add_library_search_dirs( } ControlFlow::<()>::Continue(()) }); @@ -39,10 +39,10 @@ index b59d73a9aae..2369d73b4e3 100644 /// Add options making relocation sections in the produced ELF files read-only diff --git a/compiler/rustc_target/src/spec/json.rs b/compiler/rustc_target/src/spec/json.rs -index 4b6de5e18f5..373301d85ab 100644 +index 6c716f87125..187cc93b2d3 100644 --- a/compiler/rustc_target/src/spec/json.rs +++ b/compiler/rustc_target/src/spec/json.rs -@@ -559,6 +559,7 @@ macro_rules! key { +@@ -572,6 +572,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); @@ -50,7 +50,7 @@ index 4b6de5e18f5..373301d85ab 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` -@@ -744,6 +745,7 @@ macro_rules! target_option_val { +@@ -771,6 +772,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); @@ -59,10 +59,10 @@ index 4b6de5e18f5..373301d85ab 100644 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 7234d1dc63e..3ec85bbf279 100644 +index 7a49f004072..a693fd74887 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs -@@ -2301,6 +2301,7 @@ pub struct TargetOptions { +@@ -2293,6 +2293,7 @@ pub struct TargetOptions { /// Objects to link before and after all other object code. pub pre_link_objects: CrtObjects, pub post_link_objects: CrtObjects, @@ -70,7 +70,7 @@ index 7234d1dc63e..3ec85bbf279 100644 /// 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, -@@ -2821,6 +2822,7 @@ fn default() -> TargetOptions { +@@ -2813,6 +2814,7 @@ fn default() -> TargetOptions { relro_level: RelroLevel::None, pre_link_objects: Default::default(), post_link_objects: Default::default(), @@ -99,5 +99,5 @@ index 26add451ed2..3eaf050e682 100644 // Right now this is a bit of a workaround but we're currently saying that // the target by default has a static crt which we're taking as a signal -- -2.48.1 +2.49.0 diff --git a/rpminspect.yaml b/rpminspect.yaml index ca2acb2..8e1205b 100644 --- a/rpminspect.yaml +++ b/rpminspect.yaml @@ -30,3 +30,5 @@ unicode: - rustc-*-src/vendor/wast-*/tests/parse-fail/confusing-line-comment?.wat - rustc-*-src/src/llvm-project/clang-tools-extra/docs/clang-tidy/checks/misc/misleading-bidirectional.rst - rustc-*-src/src/gcc/gcc/testsuite/c-c++-common/*Wbidi*.c + - rustc-*-src/tests/ui/parser/macro/unicode-control-codepoints-macros.rs + - rustc-*-src/tests/ui/parser/macro/auxiliary/unicode-control.rs diff --git a/rust-pr142047.patch b/rust-pr142047.patch deleted file mode 100644 index d64d71d..0000000 --- a/rust-pr142047.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 925e76167ce2465c5c9d990d97c2db99f459640b Mon Sep 17 00:00:00 2001 -From: Josh Stone -Date: Wed, 4 Jun 2025 15:03:19 -0700 -Subject: [PATCH 1/2] Ensure stack in `ThirBuildCx::mirror_exprs` - -This solve a stack overflow found on Fedora s390x when building -`tests/ui/parser/survive-peano-lesson-queue.rs`. Note that the singular -`mirror_expr` method already has this stack check, but in this case the -plural method was the one recursing too deeply. ---- - compiler/rustc_mir_build/src/thir/cx/expr.rs | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/compiler/rustc_mir_build/src/thir/cx/expr.rs b/compiler/rustc_mir_build/src/thir/cx/expr.rs -index 226dc920a496c..78c168778ac9d 100644 ---- a/compiler/rustc_mir_build/src/thir/cx/expr.rs -+++ b/compiler/rustc_mir_build/src/thir/cx/expr.rs -@@ -38,7 +38,10 @@ impl<'tcx> ThirBuildCx<'tcx> { - } - - pub(crate) fn mirror_exprs(&mut self, exprs: &'tcx [hir::Expr<'tcx>]) -> Box<[ExprId]> { -- exprs.iter().map(|expr| self.mirror_expr_inner(expr)).collect() -+ // `mirror_exprs` may also recurse deeply, so it needs protection from stack overflow. -+ // Note that we *could* forward to `mirror_expr` for that, but we can consolidate the -+ // overhead of stack growth by doing it outside the iteration. -+ ensure_sufficient_stack(|| exprs.iter().map(|expr| self.mirror_expr_inner(expr)).collect()) - } - - #[instrument(level = "trace", skip(self, hir_expr))] - -From af2a85bd75c011fb3453a4963400918e096e1896 Mon Sep 17 00:00:00 2001 -From: Josh Stone -Date: Wed, 4 Jun 2025 15:16:38 -0700 -Subject: [PATCH 2/2] Ensure stack in `Parser::parse_ty` - -This solve a stack overflow found on Fedora s390x when building -`tests/ui/associated-consts/issue-93775.rs`. ---- - compiler/rustc_parse/src/parser/ty.rs | 20 ++++++++++++-------- - 1 file changed, 12 insertions(+), 8 deletions(-) - -diff --git a/compiler/rustc_parse/src/parser/ty.rs b/compiler/rustc_parse/src/parser/ty.rs -index 17481731b1107..6eaec2e29ad48 100644 ---- a/compiler/rustc_parse/src/parser/ty.rs -+++ b/compiler/rustc_parse/src/parser/ty.rs -@@ -7,6 +7,7 @@ use rustc_ast::{ - Pinnedness, PolyTraitRef, PreciseCapturingArg, TraitBoundModifiers, TraitObjectSyntax, Ty, - TyKind, UnsafeBinderTy, - }; -+use rustc_data_structures::stack::ensure_sufficient_stack; - use rustc_errors::{Applicability, Diag, PResult}; - use rustc_span::{ErrorGuaranteed, Ident, Span, kw, sym}; - use thin_vec::{ThinVec, thin_vec}; -@@ -104,14 +105,17 @@ fn can_begin_dyn_bound_in_edition_2015(t: &Token) -> bool { - impl<'a> Parser<'a> { - /// Parses a type. - pub fn parse_ty(&mut self) -> PResult<'a, P> { -- self.parse_ty_common( -- AllowPlus::Yes, -- AllowCVariadic::No, -- RecoverQPath::Yes, -- RecoverReturnSign::Yes, -- None, -- RecoverQuestionMark::Yes, -- ) -+ // Make sure deeply nested types don't overflow the stack. -+ ensure_sufficient_stack(|| { -+ self.parse_ty_common( -+ AllowPlus::Yes, -+ AllowCVariadic::No, -+ RecoverQPath::Yes, -+ RecoverReturnSign::Yes, -+ None, -+ RecoverQuestionMark::Yes, -+ ) -+ }) - } - - pub(super) fn parse_ty_with_generics_recovery( diff --git a/rust.spec b/rust.spec index b7df812..8e42e47 100644 --- a/rust.spec +++ b/rust.spec @@ -1,5 +1,5 @@ Name: rust -Version: 1.88.0 +Version: 1.89.0 Release: 1%{?dist} 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-3.0) @@ -12,11 +12,11 @@ URL: https://www.rust-lang.org ExclusiveArch: %{rust_arches} # To bootstrap from scratch, set the channel and date from src/stage0 -# e.g. 1.88.0 wants rustc: 1.87.0-2025-05-15 +# e.g. 1.89.0 wants rustc: 1.88.0-2025-06-26 # or nightly wants some beta-YYYY-MM-DD -%global bootstrap_version 1.87.0 -%global bootstrap_channel 1.87.0 -%global bootstrap_date 2025-05-15 +%global bootstrap_version 1.88.0 +%global bootstrap_channel 1.88.0 +%global bootstrap_date 2025-06-26 # Only the specified arches will use bootstrap binaries. # NOTE: Those binaries used to be uploaded with every new release, but that was @@ -28,8 +28,7 @@ ExclusiveArch: %{rust_arches} # We need CRT files for *-wasi targets, at least as new as the commit in # src/ci/docker/host-x86_64/dist-various-2/build-wasi-toolchain.sh %global wasi_libc_url https://github.com/WebAssembly/wasi-libc -#global wasi_libc_ref wasi-sdk-25 -%global wasi_libc_ref 640c0cfc19a96b099e0791824be5ef0105ce2084 +%global wasi_libc_ref wasi-sdk-27 %global wasi_libc_name wasi-libc-%{wasi_libc_ref} %global wasi_libc_source %{wasi_libc_url}/archive/%{wasi_libc_ref}/%{wasi_libc_name}.tar.gz %global wasi_libc_dir %{_builddir}/%{wasi_libc_name} @@ -46,7 +45,7 @@ ExclusiveArch: %{rust_arches} # is insufficient. Rust currently requires LLVM 19.0+. # See src/bootstrap/src/core/build_steps/llvm.rs, fn check_llvm_version %global min_llvm_version 19.0.0 -%global bundled_llvm_version 20.1.5 +%global bundled_llvm_version 20.1.7 #global llvm_compat_version 19 %global llvm llvm%{?llvm_compat_version} %bcond_with bundled_llvm @@ -63,7 +62,7 @@ ExclusiveArch: %{rust_arches} %endif # Try to use system oniguruma (only used at build time for rust-docs) -# src/tools/rustbook -> ... -> onig_sys v69.8.1 needs at least 6.9.3 +# src/tools/rustbook -> ... -> onig_sys v69.9.1 needs at least 6.9.3 %global min_oniguruma_version 6.9.3 %if 0%{?rhel} && 0%{?rhel} < 9 %bcond_without bundled_oniguruma @@ -141,9 +140,11 @@ 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.88.0-unbundle-sqlite.patch -# Ensure stack in two places that affect s390x -# https://github.com/rust-lang/rust/pull/142047 -Patch7: rust-pr142047.patch +# stage0 tries to copy all of /usr/lib, sometimes unsuccessfully, see #143735 +Patch7: 0001-only-copy-rustlib-into-stage0-sysroot.patch + +# PR #143752, fixed upstream. +Patch8: 0001-Don-t-always-panic-if-WASI_SDK_PATH-is-not-set-when-.patch ### RHEL-specific patches below ### @@ -153,7 +154,7 @@ Source101: cargo_vendor.attr Source102: cargo_vendor.prov # Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949) -Patch100: rustc-1.88.0-disable-libssh2.patch +Patch100: rustc-1.89.0-disable-libssh2.patch # Get the Rust triple for any architecture and ABI. %{lua: function rust_triple(arch, abi) @@ -672,6 +673,7 @@ rm -rf %{wasi_libc_dir}/dlmalloc/ %patch -P6 -p1 %endif %patch -P7 -p1 +%patch -P8 -p1 %if %with disabled_libssh2 %patch -P100 -p1 @@ -860,6 +862,7 @@ test -r "%{profiler}" --set build.test-stage=2 \ --set build.optimized-compiler-builtins=false \ --set rust.llvm-tools=false \ + --set rust.verify-llvm-ir=true \ --enable-extended \ --tools=cargo,clippy,rust-analyzer,rustfmt,src \ --enable-vendor \ @@ -1201,6 +1204,9 @@ timeout -v 30m %{__x} test --no-fail-fast rustfmt || : %changelog +* Thu Nov 06 2025 Josh Stone - 1.89.0-1 +- Update to 1.89.0 + * Fri Jul 11 2025 Josh Stone - 1.88.0-1 - Update to 1.88.0 diff --git a/rustc-1.88.0-disable-libssh2.patch b/rustc-1.89.0-disable-libssh2.patch similarity index 55% rename from rustc-1.88.0-disable-libssh2.patch rename to rustc-1.89.0-disable-libssh2.patch index bf39d35..52690b2 100644 --- a/rustc-1.88.0-disable-libssh2.patch +++ b/rustc-1.89.0-disable-libssh2.patch @@ -1,7 +1,6 @@ -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 2025-06-13 15:47:08.609927319 -0700 -+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2025-06-13 15:47:54.463092386 -0700 -@@ -2530,7 +2530,6 @@ checksum = "e1a117465e7e1597e8febea8bb0c +--- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2025-07-14 11:57:13.773604132 -0500 ++++ rustc-beta-src/src/tools/cargo/Cargo.lock 2025-07-14 11:58:13.305337361 -0500 +@@ -2523,7 +2523,6 @@ dependencies = [ "cc", "libc", @@ -9,7 +8,7 @@ diff -up rustc-beta-src/src/tools/cargo/Cargo.lock.orig rustc-beta-src/src/tools "libz-sys", "openssl-sys", "pkg-config", -@@ -2576,20 +2575,6 @@ dependencies = [ +@@ -2569,20 +2568,6 @@ "pkg-config", "vcpkg", ] @@ -30,10 +29,9 @@ diff -up rustc-beta-src/src/tools/cargo/Cargo.lock.orig rustc-beta-src/src/tools [[package]] name = "libz-rs-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 2025-06-13 15:47:08.610402846 -0700 -+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2025-06-13 15:47:51.696071356 -0700 -@@ -46,7 +46,7 @@ curl = "0.4.47" +--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2025-07-14 11:57:13.773954247 -0500 ++++ rustc-beta-src/src/tools/cargo/Cargo.toml 2025-07-14 11:58:13.305708130 -0500 +@@ -46,7 +46,7 @@ curl-sys = "0.4.79" filetime = "0.2.25" flate2 = { version = "1.1.1", default-features = false, features = ["zlib-rs"] } @@ -41,4 +39,4 @@ diff -up rustc-beta-src/src/tools/cargo/Cargo.toml.orig rustc-beta-src/src/tools +git2 = { version = "0.20.0", default-features = false, features = ["https"] } git2-curl = "0.21.0" # When updating this, also see if `gix-transport` further down needs updating or some auth-related tests will fail. - gix = { version = "0.71.0", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "parallel", "dirwalk"] } + gix = { version = "0.72.0", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "parallel", "dirwalk"] } diff --git a/sources b/sources index 79ee571..0a7d170 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rustc-1.88.0-src.tar.xz) = e6c62af2953f49462b2369e9551b12f2bec114577f90e3e76049636da4279b1e7f4d53bc6896f5d0d4715d90ef6d29dacff529a45690ffac6af62ad64600db40 -SHA512 (wasi-libc-640c0cfc19a96b099e0791824be5ef0105ce2084.tar.gz) = 7626200112b6e55567855b950baf7c9eeaf47e7de34a30eb9e8b785e0e03063197102d2f39d0846055d6aab7c06232f947a6b8af3dda62c8f02ea39d8f765a5e +SHA512 (wasi-libc-wasi-sdk-27.tar.gz) = dfc2c36fabf32f465fc833ed0b10efffc9a35c68162ecc3e8d656d1d684d170b734d55e790614d12d925d17f49d60f0d2d01c46cecac941cf62d68eda84df13e +SHA512 (rustc-1.89.0-src.tar.xz) = 3ac0f02baaff12c67fe35cef4d56b315134d0a043bb6103a248a2842456c74733c6e3039f079bacfb8b8ab9b7487f92d678987e588bd41276abf9bf7c2f7870b From 24b92952550dc3f871c34a26d65446c8268dbafb Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 7 Nov 2025 09:00:50 -0800 Subject: [PATCH 2/5] Update to Rust 1.90 Resolves: RHEL-111875 Resolves: RHEL-111861 --- .gitignore | 1 + ...prebuilt-optimized-compiler-rt-built.patch | 278 ++++++++++++++++++ ...ic-if-WASI_SDK_PATH-is-not-set-when-.patch | 39 --- ...llow-disabling-target-self-contained.patch | 31 +- ...ure-stack-in-InvocationCollector-vis.patch | 49 +++ ...xternal-library-path-for-wasm32-wasi.patch | 51 ++-- rust.spec | 60 ++-- rustc-1.88.0-unbundle-sqlite.patch | 23 -- rustc-1.89.0-disable-libssh2.patch | 42 --- rustc-1.90.0-disable-libssh2.patch | 44 +++ rustc-1.90.0-unbundle-sqlite.patch | 23 ++ sources | 2 +- 12 files changed, 483 insertions(+), 160 deletions(-) create mode 100644 0001-Allow-linking-a-prebuilt-optimized-compiler-rt-built.patch delete mode 100644 0001-Don-t-always-panic-if-WASI_SDK_PATH-is-not-set-when-.patch create mode 100644 0001-rustc_expand-ensure-stack-in-InvocationCollector-vis.patch delete mode 100644 rustc-1.88.0-unbundle-sqlite.patch delete mode 100644 rustc-1.89.0-disable-libssh2.patch create mode 100644 rustc-1.90.0-disable-libssh2.patch create mode 100644 rustc-1.90.0-unbundle-sqlite.patch diff --git a/.gitignore b/.gitignore index 788085a..d7d8cb0 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ SOURCES/wasi-libc-wasi-sdk-17.tar.gz /rustc-1.88.0-src.tar.xz /wasi-libc-wasi-sdk-27.tar.gz /rustc-1.89.0-src.tar.xz +/rustc-1.90.0-src.tar.xz diff --git a/0001-Allow-linking-a-prebuilt-optimized-compiler-rt-built.patch b/0001-Allow-linking-a-prebuilt-optimized-compiler-rt-built.patch new file mode 100644 index 0000000..3071556 --- /dev/null +++ b/0001-Allow-linking-a-prebuilt-optimized-compiler-rt-built.patch @@ -0,0 +1,278 @@ +From 4815c3cd733812bec777970ff4b1e73c2fcad1a6 Mon Sep 17 00:00:00 2001 +From: Paul Murphy +Date: Tue, 24 Jun 2025 11:07:54 -0500 +Subject: [PATCH] Allow linking a prebuilt optimized compiler-rt builtins + library + +Extend the .optimized-compiler-builtins bootstrap option to accept a +path to a prebuilt compiler-rt builtins library, and update compiler-builtins +to enable optimized builtins without building compiler-rt builtins. + +(cherry picked from commit b382478bba7b8f75c73673c239fa86a29db66223) +--- + bootstrap.example.toml | 4 +- + .../compiler-builtins/build.rs | 55 ++++++++++++++++--- + src/bootstrap/src/core/build_steps/compile.rs | 44 ++++++++------- + src/bootstrap/src/core/config/config.rs | 10 +++- + src/bootstrap/src/core/config/tests.rs | 4 +- + src/bootstrap/src/core/config/toml/target.rs | 4 +- + 6 files changed, 87 insertions(+), 34 deletions(-) + +diff --git a/bootstrap.example.toml b/bootstrap.example.toml +index 82041167b444..a11aec1b60e5 100644 +--- a/bootstrap.example.toml ++++ b/bootstrap.example.toml +@@ -1038,7 +1038,9 @@ + # sources are available. + # + # Setting this to `false` generates slower code, but removes the requirement for a C toolchain in +-# order to run `x check`. ++# order to run `x check`. This may also be given a path to an existing build of the builtins ++# runtime library from LLVM's compiler-rt. This option will override the same option under [build] ++# section. + #optimized-compiler-builtins = build.optimized-compiler-builtins (bool) + + # Link the compiler and LLVM against `jemalloc` instead of the default libc allocator. +diff --git a/library/compiler-builtins/compiler-builtins/build.rs b/library/compiler-builtins/compiler-builtins/build.rs +index 8f51c12b535d..b8de1789ebc7 100644 +--- a/library/compiler-builtins/compiler-builtins/build.rs ++++ b/library/compiler-builtins/compiler-builtins/build.rs +@@ -547,12 +547,20 @@ pub fn compile(llvm_target: &[&str], target: &Target) { + sources.extend(&[("__emutls_get_address", "emutls.c")]); + } + ++ // Optionally, link against a prebuilt llvm compiler-rt containing the builtins ++ // library. Only the builtins library is required. On many platforms, this is ++ // available as a library named libclang_rt.builtins.a. ++ let link_against_prebuilt_rt = env::var_os("LLVM_COMPILER_RT_LIB").is_some(); ++ + // When compiling the C code we require the user to tell us where the + // source code is, and this is largely done so when we're compiling as + // part of rust-lang/rust we can use the same llvm-project repository as + // rust-lang/rust. + let root = match env::var_os("RUST_COMPILER_RT_ROOT") { + Some(s) => PathBuf::from(s), ++ // If a prebuild libcompiler-rt is provided, set a valid ++ // path to simplify later logic. Nothing should be compiled. ++ None if link_against_prebuilt_rt => PathBuf::new(), + None => { + panic!( + "RUST_COMPILER_RT_ROOT is not set. You may need to run \ +@@ -560,7 +568,7 @@ pub fn compile(llvm_target: &[&str], target: &Target) { + ); + } + }; +- if !root.exists() { ++ if !link_against_prebuilt_rt && !root.exists() { + panic!("RUST_COMPILER_RT_ROOT={} does not exist", root.display()); + } + +@@ -576,7 +584,7 @@ pub fn compile(llvm_target: &[&str], target: &Target) { + let src_dir = root.join("lib/builtins"); + if target.arch == "aarch64" && target.env != "msvc" && target.os != "uefi" { + // See below for why we're building these as separate libraries. +- build_aarch64_out_of_line_atomics_libraries(&src_dir, cfg); ++ build_aarch64_out_of_line_atomics_libraries(&src_dir, cfg, link_against_prebuilt_rt); + + // Some run-time CPU feature detection is necessary, as well. + let cpu_model_src = if src_dir.join("cpu_model.c").exists() { +@@ -590,20 +598,45 @@ pub fn compile(llvm_target: &[&str], target: &Target) { + let mut added_sources = HashSet::new(); + for (sym, src) in sources.map.iter() { + let src = src_dir.join(src); +- if added_sources.insert(src.clone()) { ++ if !link_against_prebuilt_rt && added_sources.insert(src.clone()) { + cfg.file(&src); + println!("cargo:rerun-if-changed={}", src.display()); + } + println!("cargo:rustc-cfg={}=\"optimized-c\"", sym); + } + +- cfg.compile("libcompiler-rt.a"); ++ if link_against_prebuilt_rt { ++ let rt_builtins_ext = PathBuf::from(env::var_os("LLVM_COMPILER_RT_LIB").unwrap()); ++ if !rt_builtins_ext.exists() { ++ panic!( ++ "LLVM_COMPILER_RT_LIB={} does not exist", ++ rt_builtins_ext.display() ++ ); ++ } ++ if let Some(dir) = rt_builtins_ext.parent() { ++ println!("cargo::rustc-link-search=native={}", dir.display()); ++ } ++ if let Some(lib) = rt_builtins_ext.file_name() { ++ println!( ++ "cargo::rustc-link-lib=static:+verbatim={}", ++ lib.to_str().unwrap() ++ ); ++ } ++ } else { ++ cfg.compile("libcompiler-rt.a"); ++ } + } + +- fn build_aarch64_out_of_line_atomics_libraries(builtins_dir: &Path, cfg: &mut cc::Build) { ++ fn build_aarch64_out_of_line_atomics_libraries( ++ builtins_dir: &Path, ++ cfg: &mut cc::Build, ++ link_against_prebuilt_rt: bool, ++ ) { + let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap()); + let outlined_atomics_file = builtins_dir.join("aarch64").join("lse.S"); +- println!("cargo:rerun-if-changed={}", outlined_atomics_file.display()); ++ if !link_against_prebuilt_rt { ++ println!("cargo:rerun-if-changed={}", outlined_atomics_file.display()); ++ } + + cfg.include(&builtins_dir); + +@@ -616,6 +649,13 @@ fn build_aarch64_out_of_line_atomics_libraries(builtins_dir: &Path, cfg: &mut cc + for (model_number, model_name) in + &[(1, "relax"), (2, "acq"), (3, "rel"), (4, "acq_rel")] + { ++ let sym = format!("__aarch64_{}{}_{}", instruction_type, size, model_name); ++ println!("cargo:rustc-cfg={}=\"optimized-c\"", sym); ++ ++ if link_against_prebuilt_rt { ++ continue; ++ } ++ + // The original compiler-rt build system compiles the same + // source file multiple times with different compiler + // options. Here we do something slightly different: we +@@ -639,9 +679,6 @@ fn build_aarch64_out_of_line_atomics_libraries(builtins_dir: &Path, cfg: &mut cc + .unwrap(); + drop(file); + cfg.file(path); +- +- let sym = format!("__aarch64_{}{}_{}", instruction_type, size, model_name); +- println!("cargo:rustc-cfg={}=\"optimized-c\"", sym); + } + } + } +diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs +index 7a5533346adf..39c9db3d6c35 100644 +--- a/src/bootstrap/src/core/build_steps/compile.rs ++++ b/src/bootstrap/src/core/build_steps/compile.rs +@@ -572,25 +572,31 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car + // `compiler-builtins` crate is enabled and it's configured to learn where + // `compiler-rt` is located. + let compiler_builtins_c_feature = if builder.config.optimized_compiler_builtins(target) { +- // NOTE: this interacts strangely with `llvm-has-rust-patches`. In that case, we enforce `submodules = false`, so this is a no-op. +- // But, the user could still decide to manually use an in-tree submodule. +- // +- // NOTE: if we're using system llvm, we'll end up building a version of `compiler-rt` that doesn't match the LLVM we're linking to. +- // That's probably ok? At least, the difference wasn't enforced before. There's a comment in +- // the compiler_builtins build script that makes me nervous, though: +- // https://github.com/rust-lang/compiler-builtins/blob/31ee4544dbe47903ce771270d6e3bea8654e9e50/build.rs#L575-L579 +- builder.require_submodule( +- "src/llvm-project", +- Some( +- "The `build.optimized-compiler-builtins` config option \ +- requires `compiler-rt` sources from LLVM.", +- ), +- ); +- let compiler_builtins_root = builder.src.join("src/llvm-project/compiler-rt"); +- assert!(compiler_builtins_root.exists()); +- // The path to `compiler-rt` is also used by `profiler_builtins` (above), +- // so if you're changing something here please also change that as appropriate. +- cargo.env("RUST_COMPILER_RT_ROOT", &compiler_builtins_root); ++ if let Some(path) = builder.config.optimized_compiler_builtins_path(target) { ++ cargo.env("LLVM_COMPILER_RT_LIB", path); ++ } else { ++ // NOTE: this interacts strangely with `llvm-has-rust-patches`. In that case, we enforce ++ // `submodules = false`, so this is a no-op. But, the user could still decide to ++ // manually use an in-tree submodule. ++ // ++ // NOTE: if we're using system llvm, we'll end up building a version of `compiler-rt` ++ // that doesn't match the LLVM we're linking to. That's probably ok? At least, the ++ // difference wasn't enforced before. There's a comment in the compiler_builtins build ++ // script that makes me nervous, though: ++ // https://github.com/rust-lang/compiler-builtins/blob/31ee4544dbe47903ce771270d6e3bea8654e9e50/build.rs#L575-L579 ++ builder.require_submodule( ++ "src/llvm-project", ++ Some( ++ "The `build.optimized-compiler-builtins` config option \ ++ requires `compiler-rt` sources from LLVM.", ++ ), ++ ); ++ let compiler_builtins_root = builder.src.join("src/llvm-project/compiler-rt"); ++ assert!(compiler_builtins_root.exists()); ++ // The path to `compiler-rt` is also used by `profiler_builtins` (above), ++ // so if you're changing something here please also change that as appropriate. ++ cargo.env("RUST_COMPILER_RT_ROOT", &compiler_builtins_root); ++ } + " compiler-builtins-c" + } else { + "" +diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs +index 6055876c4757..588c3489f898 100644 +--- a/src/bootstrap/src/core/config/config.rs ++++ b/src/bootstrap/src/core/config/config.rs +@@ -1769,10 +1769,18 @@ pub fn rpath_enabled(&self, target: TargetSelection) -> bool { + pub fn optimized_compiler_builtins(&self, target: TargetSelection) -> bool { + self.target_config + .get(&target) +- .and_then(|t| t.optimized_compiler_builtins) ++ .and_then(|t| t.optimized_compiler_builtins.as_ref()) ++ .map(StringOrBool::is_string_or_true) + .unwrap_or(self.optimized_compiler_builtins) + } + ++ pub fn optimized_compiler_builtins_path(&self, target: TargetSelection) -> Option<&str> { ++ match self.target_config.get(&target)?.optimized_compiler_builtins.as_ref()? { ++ StringOrBool::String(s) => Some(s), ++ StringOrBool::Bool(_) => None, ++ } ++ } ++ + pub fn llvm_enabled(&self, target: TargetSelection) -> bool { + self.codegen_backends(target).contains(&CodegenBackendKind::Llvm) + } +diff --git a/src/bootstrap/src/core/config/tests.rs b/src/bootstrap/src/core/config/tests.rs +index 50eba12aba74..c32e4384cf62 100644 +--- a/src/bootstrap/src/core/config/tests.rs ++++ b/src/bootstrap/src/core/config/tests.rs +@@ -17,7 +17,7 @@ + use crate::core::build_steps::llvm; + use crate::core::build_steps::llvm::LLVM_INVALIDATION_PATHS; + use crate::core::config::toml::TomlConfig; +-use crate::core::config::{LldMode, Target, TargetSelection}; ++use crate::core::config::{LldMode, StringOrBool, Target, TargetSelection}; + use crate::utils::tests::git::git_test; + + pub(crate) fn parse(config: &str) -> Config { +@@ -212,7 +212,7 @@ fn override_toml() { + let darwin = TargetSelection::from_user("aarch64-apple-darwin"); + let darwin_values = Target { + runner: Some("apple".into()), +- optimized_compiler_builtins: Some(false), ++ optimized_compiler_builtins: Some(StringOrBool::Bool(false)), + ..Default::default() + }; + assert_eq!( +diff --git a/src/bootstrap/src/core/config/toml/target.rs b/src/bootstrap/src/core/config/toml/target.rs +index 69afa8af3419..5ddb8c50c146 100644 +--- a/src/bootstrap/src/core/config/toml/target.rs ++++ b/src/bootstrap/src/core/config/toml/target.rs +@@ -45,7 +45,7 @@ struct TomlTarget { + no_std: Option = "no-std", + codegen_backends: Option> = "codegen-backends", + runner: Option = "runner", +- optimized_compiler_builtins: Option = "optimized-compiler-builtins", ++ optimized_compiler_builtins: Option = "optimized-compiler-builtins", + jemalloc: Option = "jemalloc", + self_contained: Option = "self-contained", + } +@@ -78,7 +78,7 @@ pub struct Target { + pub runner: Option, + pub no_std: bool, + pub codegen_backends: Option>, +- pub optimized_compiler_builtins: Option, ++ pub optimized_compiler_builtins: Option, + pub jemalloc: Option, + pub self_contained: bool, + } +-- +2.50.1 + diff --git a/0001-Don-t-always-panic-if-WASI_SDK_PATH-is-not-set-when-.patch b/0001-Don-t-always-panic-if-WASI_SDK_PATH-is-not-set-when-.patch deleted file mode 100644 index 4864900..0000000 --- a/0001-Don-t-always-panic-if-WASI_SDK_PATH-is-not-set-when-.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 9bdd3b0ee6a6fd5914fea0f56f3b754410733e53 Mon Sep 17 00:00:00 2001 -From: Paul Murphy -Date: Thu, 10 Jul 2025 10:58:58 -0500 -Subject: [PATCH] Don't always panic if WASI_SDK_PATH is not set when detecting - compilers - -They are not always needed when building std, as is the case when -packaging on Fedora. Panic if building from CI, but warn otherwise. ---- - src/bootstrap/src/utils/cc_detect.rs | 13 +++++++++---- - 1 file changed, 9 insertions(+), 4 deletions(-) - -diff --git a/src/bootstrap/src/utils/cc_detect.rs b/src/bootstrap/src/utils/cc_detect.rs -index dcafeb80f90..2569f95e3ef 100644 ---- a/src/bootstrap/src/utils/cc_detect.rs -+++ b/src/bootstrap/src/utils/cc_detect.rs -@@ -221,10 +221,15 @@ fn default_compiler( - } - - t if t.contains("-wasi") => { -- let root = build -- .wasi_sdk_path -- .as_ref() -- .expect("WASI_SDK_PATH mut be configured for a -wasi target"); -+ let root = if let Some(path) = build.wasi_sdk_path.as_ref() { -+ path -+ } else { -+ if build.config.is_running_on_ci { -+ panic!("ERROR: WASI_SDK_PATH must be configured for a -wasi target on CI"); -+ } -+ println!("WARNING: WASI_SDK_PATH not set, using default cc/cxx compiler"); -+ return None; -+ }; - let compiler = match compiler { - Language::C => format!("{t}-clang"), - Language::CPlusPlus => format!("{t}-clang++"), --- -2.49.0 - diff --git a/0001-bootstrap-allow-disabling-target-self-contained.patch b/0001-bootstrap-allow-disabling-target-self-contained.patch index c00d2b9..5949461 100644 --- a/0001-bootstrap-allow-disabling-target-self-contained.patch +++ b/0001-bootstrap-allow-disabling-target-self-contained.patch @@ -1,6 +1,6 @@ -From 6af71d8ff0932bc14102cd9cbfbca16354c5cd2a Mon Sep 17 00:00:00 2001 -From: Jesus Checa Hidalgo -Date: Mon, 7 Apr 2025 16:59:10 +0200 +From b51b8d1854e7e2e7b7b431da26adad6b3677f6d2 Mon Sep 17 00:00:00 2001 +From: Josh Stone +Date: Mon, 18 Aug 2025 17:11:07 -0700 Subject: [PATCH 1/2] bootstrap: allow disabling target self-contained --- @@ -11,26 +11,23 @@ Subject: [PATCH 1/2] bootstrap: allow disabling target self-contained 4 files changed, 22 insertions(+) diff --git a/bootstrap.example.toml b/bootstrap.example.toml -index 19cf360b0fb..916bae8dc7d 100644 +index 31966af33012..82041167b444 100644 --- a/bootstrap.example.toml +++ b/bootstrap.example.toml -@@ -974,6 +974,11 @@ +@@ -1044,3 +1044,8 @@ + # Link the compiler and LLVM against `jemalloc` instead of the default libc allocator. # This overrides the global `rust.jemalloc` option. See that option for more info. #jemalloc = rust.jemalloc (bool) - ++ +# Copy libc and CRT objects into the target lib/self-contained/ directory. +# Enabled by default on `musl`, `wasi`, and `windows-gnu` targets. Other +# targets may ignore this setting if they have nothing to be contained. +#self-contained = (bool) -+ - # ============================================================================= - # Distribution options - # diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs -index f6efb23e8d8..4d0ae54e1ef 100644 +index 59541bf12def..7a5533346adf 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs -@@ -374,6 +374,10 @@ fn copy_self_contained_objects( +@@ -370,6 +370,10 @@ fn copy_self_contained_objects( compiler: &Compiler, target: TargetSelection, ) -> Vec<(PathBuf, DependencyType)> { @@ -42,7 +39,7 @@ index f6efb23e8d8..4d0ae54e1ef 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/toml/target.rs b/src/bootstrap/src/core/config/toml/target.rs -index b9f6780ca3f..41a4a815d31 100644 +index 9dedadff3a19..69afa8af3419 100644 --- a/src/bootstrap/src/core/config/toml/target.rs +++ b/src/bootstrap/src/core/config/toml/target.rs @@ -47,6 +47,7 @@ struct TomlTarget { @@ -54,7 +51,7 @@ index b9f6780ca3f..41a4a815d31 100644 } @@ -79,6 +80,7 @@ pub struct Target { - pub codegen_backends: Option>, + pub codegen_backends: Option>, pub optimized_compiler_builtins: Option, pub jemalloc: Option, + pub self_contained: bool, @@ -82,10 +79,10 @@ index b9f6780ca3f..41a4a815d31 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 f44fe4548a1..8ce9f09efb1 100644 +index 011b52df97bb..77b2d9205a43 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs -@@ -1331,6 +1331,11 @@ fn no_std(&self, target: TargetSelection) -> Option { +@@ -1423,6 +1423,11 @@ fn no_std(&self, target: TargetSelection) -> Option { self.config.target_config.get(&target).map(|t| t.no_std) } @@ -98,5 +95,5 @@ index f44fe4548a1..8ce9f09efb1 100644 /// and `remote-test-server` binaries. fn remote_tested(&self, target: TargetSelection) -> bool { -- -2.49.0 +2.50.1 diff --git a/0001-rustc_expand-ensure-stack-in-InvocationCollector-vis.patch b/0001-rustc_expand-ensure-stack-in-InvocationCollector-vis.patch new file mode 100644 index 0000000..e847c1d --- /dev/null +++ b/0001-rustc_expand-ensure-stack-in-InvocationCollector-vis.patch @@ -0,0 +1,49 @@ +From 8ff00974436f25585850e3029d8e5a3e2a8340da Mon Sep 17 00:00:00 2001 +From: Josh Stone +Date: Thu, 14 Aug 2025 16:02:31 -0700 +Subject: [PATCH] rustc_expand: ensure stack in + `InvocationCollector::visit_expr` + +In Fedora, when we built rustc with PGO on ppc64le, we started failing +the test `issue-74564-if-expr-stack-overflow.rs`. This could also be +reproduced on other arches by setting a smaller `RUST_MIN_STACK`, so +it's probably just unlucky that ppc64le PGO created a large stack frame +somewhere in this recursion path. Adding an `ensure_sufficient_stack` +solves the stack overflow. + +Historically, that test and its fix were added in rust-lang/rust#74708, +which was also an `ensure_sufficient_stack` in this area of code at the +time. However, the refactor in rust-lang/rust#92573 basically left that +to the general `MutVisitor`, and then rust-lang/rust#142240 removed even +that ensure call. It may be luck that our tier-1 tested targets did not +regress the original issue across those refactors. + +(cherry picked from commit f68bcb376da2a34b6809ba76dad20ca400bd9966) +--- + compiler/rustc_expand/src/expand.rs | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/compiler/rustc_expand/src/expand.rs b/compiler/rustc_expand/src/expand.rs +index f02aa6c120f9..0cfda7c4739f 100644 +--- a/compiler/rustc_expand/src/expand.rs ++++ b/compiler/rustc_expand/src/expand.rs +@@ -15,6 +15,7 @@ + use rustc_ast_pretty::pprust; + use rustc_attr_parsing::{EvalConfigResult, ShouldEmit}; + use rustc_data_structures::flat_map_in_place::FlatMapInPlace; ++use rustc_data_structures::stack::ensure_sufficient_stack; + use rustc_errors::PResult; + use rustc_feature::Features; + use rustc_parse::parser::{ +@@ -2439,7 +2440,7 @@ fn visit_expr(&mut self, node: &mut ast::Expr) { + if let Some(attr) = node.attrs.first() { + self.cfg().maybe_emit_expr_attr_err(attr); + } +- self.visit_node(node) ++ ensure_sufficient_stack(|| self.visit_node(node)) + } + + fn visit_method_receiver_expr(&mut self, node: &mut ast::Expr) { +-- +2.50.1 + 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 79f06ad..4921bb9 100644 --- a/0002-set-an-external-library-path-for-wasm32-wasi.patch +++ b/0002-set-an-external-library-path-for-wasm32-wasi.patch @@ -1,17 +1,17 @@ -From 0539027ae7a60cd6ddf2190450240d35a147599d Mon Sep 17 00:00:00 2001 -From: Jesus Checa Hidalgo -Date: Mon, 7 Apr 2025 17:22:56 +0200 +From 3730abcf2b86d650da97a11190af8dcbfeae311a Mon Sep 17 00:00:00 2001 +From: Josh Stone +Date: Mon, 18 Aug 2025 17:13:28 -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/json.rs | 2 ++ + compiler/rustc_target/src/spec/json.rs | 4 ++++ compiler/rustc_target/src/spec/mod.rs | 2 ++ .../rustc_target/src/spec/targets/wasm32_wasip1.rs | 7 ++++--- - 4 files changed, 18 insertions(+), 3 deletions(-) + 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs -index 8882ba359b7..914e5c1398f 100644 +index 162fbf3d6e24..2acfd6dd96b2 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -1548,6 +1548,12 @@ fn get_object_file_path(sess: &Session, name: &str, self_contained: bool) -> Pat @@ -39,18 +39,18 @@ index 8882ba359b7..914e5c1398f 100644 /// Add options making relocation sections in the produced ELF files read-only diff --git a/compiler/rustc_target/src/spec/json.rs b/compiler/rustc_target/src/spec/json.rs -index 6c716f87125..187cc93b2d3 100644 +index d27c1929aef7..b995896450e0 100644 --- a/compiler/rustc_target/src/spec/json.rs +++ b/compiler/rustc_target/src/spec/json.rs -@@ -572,6 +572,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); -+ key!(external_lib_path, optional); - 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` -@@ -771,6 +772,7 @@ macro_rules! target_option_val { +@@ -84,6 +84,7 @@ macro_rules! forward_opt { + forward!(linker_is_gnu_json); + forward!(pre_link_objects); + forward!(post_link_objects); ++ forward_opt!(external_lib_path); + forward!(pre_link_objects_self_contained); + forward!(post_link_objects_self_contained); + +@@ -306,6 +307,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); @@ -58,11 +58,20 @@ index 6c716f87125..187cc93b2d3 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"); +@@ -490,6 +492,8 @@ struct TargetSpecJson { + pre_link_objects: Option, + #[serde(rename = "post-link-objects")] + post_link_objects: Option, ++ #[serde(rename = "external-lib-path")] ++ external_lib_path: Option>, + #[serde(rename = "pre-link-objects-fallback")] + pre_link_objects_self_contained: Option, + #[serde(rename = "post-link-objects-fallback")] diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs -index 7a49f004072..a693fd74887 100644 +index 033590e01a67..15a012639472 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs -@@ -2293,6 +2293,7 @@ pub struct TargetOptions { +@@ -2439,6 +2439,7 @@ pub struct TargetOptions { /// Objects to link before and after all other object code. pub pre_link_objects: CrtObjects, pub post_link_objects: CrtObjects, @@ -70,7 +79,7 @@ index 7a49f004072..a693fd74887 100644 /// 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, -@@ -2813,6 +2814,7 @@ fn default() -> TargetOptions { +@@ -2964,6 +2965,7 @@ fn default() -> TargetOptions { relro_level: RelroLevel::None, pre_link_objects: Default::default(), post_link_objects: Default::default(), @@ -79,7 +88,7 @@ index 7a49f004072..a693fd74887 100644 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 26add451ed2..3eaf050e682 100644 +index 26add451ed25..3eaf050e6823 100644 --- a/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs +++ b/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs @@ -21,11 +21,12 @@ pub(crate) fn target() -> Target { @@ -99,5 +108,5 @@ index 26add451ed2..3eaf050e682 100644 // Right now this is a bit of a workaround but we're currently saying that // the target by default has a static crt which we're taking as a signal -- -2.49.0 +2.50.1 diff --git a/rust.spec b/rust.spec index 8e42e47..dc6de72 100644 --- a/rust.spec +++ b/rust.spec @@ -1,5 +1,5 @@ Name: rust -Version: 1.89.0 +Version: 1.90.0 Release: 1%{?dist} 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-3.0) @@ -14,9 +14,9 @@ ExclusiveArch: %{rust_arches} # To bootstrap from scratch, set the channel and date from src/stage0 # e.g. 1.89.0 wants rustc: 1.88.0-2025-06-26 # or nightly wants some beta-YYYY-MM-DD -%global bootstrap_version 1.88.0 -%global bootstrap_channel 1.88.0 -%global bootstrap_date 2025-06-26 +%global bootstrap_version 1.89.0 +%global bootstrap_channel 1.89.0 +%global bootstrap_date 2025-08-07 # Only the specified arches will use bootstrap binaries. # NOTE: Those binaries used to be uploaded with every new release, but that was @@ -45,7 +45,7 @@ ExclusiveArch: %{rust_arches} # is insufficient. Rust currently requires LLVM 19.0+. # See src/bootstrap/src/core/build_steps/llvm.rs, fn check_llvm_version %global min_llvm_version 19.0.0 -%global bundled_llvm_version 20.1.7 +%global bundled_llvm_version 20.1.8 #global llvm_compat_version 19 %global llvm llvm%{?llvm_compat_version} %bcond_with bundled_llvm @@ -54,7 +54,7 @@ ExclusiveArch: %{rust_arches} # This needs to be consistent with the bindings in vendor/libgit2-sys. %global min_libgit2_version 1.9.0 %global next_libgit2_version 1.10.0~ -%global bundled_libgit2_version 1.9.0 +%global bundled_libgit2_version 1.9.1 %if 0%{?fedora} >= 41 %bcond_with bundled_libgit2 %else @@ -72,7 +72,7 @@ ExclusiveArch: %{rust_arches} # Cargo uses UPSERTs with omitted conflict targets %global min_sqlite3_version 3.35 -%global bundled_sqlite3_version 3.49.1 +%global bundled_sqlite3_version 3.49.2 %if 0%{?rhel} && 0%{?rhel} < 10 %bcond_without bundled_sqlite3 %else @@ -138,13 +138,18 @@ 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.88.0-unbundle-sqlite.patch +Patch6: rustc-1.90.0-unbundle-sqlite.patch # stage0 tries to copy all of /usr/lib, sometimes unsuccessfully, see #143735 Patch7: 0001-only-copy-rustlib-into-stage0-sysroot.patch -# PR #143752, fixed upstream. -Patch8: 0001-Don-t-always-panic-if-WASI_SDK_PATH-is-not-set-when-.patch +# Support optimized-compiler-builtins via linking against compiler-rt builtins. +# https://github.com/rust-lang/rust/pull/143689 +Patch8: 0001-Allow-linking-a-prebuilt-optimized-compiler-rt-built.patch + +# Fix a compiler stack overflow on ppc64le with PGO +# https://github.com/rust-lang/rust/pull/145410 +Patch9: 0001-rustc_expand-ensure-stack-in-InvocationCollector-vis.patch ### RHEL-specific patches below ### @@ -154,7 +159,7 @@ Source101: cargo_vendor.attr Source102: cargo_vendor.prov # Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949) -Patch100: rustc-1.89.0-disable-libssh2.patch +Patch100: rustc-1.90.0-disable-libssh2.patch # Get the Rust triple for any architecture and ABI. %{lua: function rust_triple(arch, abi) @@ -297,6 +302,7 @@ BuildRequires: %{llvm}-devel >= %{min_llvm_version} %if %with llvm_static BuildRequires: %{llvm}-static BuildRequires: libffi-devel +BuildRequires: libxml2-devel %endif %endif @@ -383,6 +389,7 @@ Obsoletes: %{name}-analysis < 1.69.0~ mkdir -p build/manifests/%{-n*} \ %{shrink: \ env RUSTC_BOOTSTRAP=1 \ + RUSTC=%{local_rust_root}/bin/rustc \ %{local_rust_root}/bin/cargo tree \ --offline --edges normal,build \ --prefix none --format "{p}" \ @@ -395,8 +402,10 @@ Obsoletes: %{name}-analysis < 1.69.0~ >build/manifests/%{-n*}/cargo-vendor.txt \ } \ ) +%ifnarch %{bootstrap_arches} %{?fedora:BuildRequires: cargo-rpm-macros} %{?rhel:BuildRequires: rust-toolset} +%endif %description Rust is a systems programming language that runs blazingly fast, prevents @@ -506,6 +515,8 @@ Summary: GDB pretty printers for Rust BuildArch: noarch Requires: gdb Requires: %{name}-debugger-common = %{version}-%{release} +# rust-gdb uses rustc to find the sysroot +Requires: %{name} = %{version}-%{release} %description gdb This package includes the rust-gdb script, which allows easier debugging of Rust @@ -518,6 +529,8 @@ BuildArch: noarch Requires: lldb Requires: python3.12-lldb Requires: %{name}-debugger-common = %{version}-%{release} +# rust-lldb uses rustc to find the sysroot +Requires: %{name} = %{version}-%{release} %description lldb This package includes the rust-lldb script, which allows easier debugging of Rust @@ -674,6 +687,7 @@ rm -rf %{wasi_libc_dir}/dlmalloc/ %endif %patch -P7 -p1 %patch -P8 -p1 +%patch -P9 -p1 %if %with disabled_libssh2 %patch -P100 -p1 @@ -730,7 +744,7 @@ sed -i.lzma -e '/LZMA_API_STATIC/d' src/bootstrap/src/core/build_steps/tool.rs %if %{without bundled_llvm} && %{with llvm_static} # Static linking to distro LLVM needs to add -lffi # https://github.com/rust-lang/rust/issues/34486 -sed -i.ffi -e '$a #[link(name = "ffi")] extern {}' \ +sed -i.ffi -e '$a #[link(name = "ffi")] extern "C" {}' \ compiler/rustc_llvm/src/lib.rs %endif @@ -827,11 +841,20 @@ end} %endif %endif -# Find the compiler-rt library for the Rust profiler_builtins crate. +# Find the compiler-rt library for the Rust profiler_builtins and optimized-builtins crates. %define clang_lib %{expand:%%clang%{?llvm_compat_version}_resource_dir}/lib %define profiler %{clang_lib}/%{_arch}-redhat-linux-gnu/libclang_rt.profile.a test -r "%{profiler}" +# llvm < 21 does not provide a builtins library for s390x. +%if "%{_arch}" != "s390x" || 0%{?clang_major_version} >= 21 +%define optimized_builtins %{clang_lib}/%{_arch}-redhat-linux-gnu/libclang_rt.builtins.a +test -r "%{optimized_builtins}" +%else +%define optimized_builtins false +%endif + + %configure --disable-option-checking \ --docdir=%{_pkgdocdir} \ --libdir=%{common_libdir} \ @@ -842,6 +865,7 @@ test -r "%{profiler}" --set target.%{rust_triple}.ar=%{__ar} \ --set target.%{rust_triple}.ranlib=%{__ranlib} \ --set target.%{rust_triple}.profiler="%{profiler}" \ + --set target.%{rust_triple}.optimized-compiler-builtins="%{optimized_builtins}" \ %{?mingw_target_config} \ %{?wasm_target_config} \ --python=%{__python3} \ @@ -872,10 +896,9 @@ test -r "%{profiler}" %global __x %{__python3} ./x.py -# - rustc is exibiting signs of miscompilation on pwr9+pgo (root cause TBD), -# so we're skipping pgo on rhel ppc64le for now. See RHEL-88598 for more. -# - Since 1.87, Fedora started getting ppc64le segfaults, and this also seems -# to be avoidable by skipping pgo. See bz2367960 for examples of that. +# pgo on ppc64le is enabled in fedora, but it had exposed bugs in +# llvm codgen on ppc64le which have since been fixed. It should be +# turned on in 1.91 if no new issues are found. %if %{with rustc_pgo} && !( "%{_target_cpu}" == "ppc64le" ) # Build the compiler with profile instrumentation %define profraw $PWD/build/profiles @@ -1204,6 +1227,9 @@ timeout -v 30m %{__x} test --no-fail-fast rustfmt || : %changelog +* Fri Nov 07 2025 Josh Stone - 1.90.0-1 +- Update to 1.90.0 + * Thu Nov 06 2025 Josh Stone - 1.89.0-1 - Update to 1.89.0 diff --git a/rustc-1.88.0-unbundle-sqlite.patch b/rustc-1.88.0-unbundle-sqlite.patch deleted file mode 100644 index 11c1e79..0000000 --- a/rustc-1.88.0-unbundle-sqlite.patch +++ /dev/null @@ -1,23 +0,0 @@ -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 2025-06-13 01:10:18.000000000 -0700 -+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2025-06-13 15:39:38.597882622 -0700 -@@ -2573,7 +2573,6 @@ version = "0.32.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "fbb8270bb4060bd76c6e96f20c52d80620f1d82a3470885694e41e0f81ef6fe7" - dependencies = [ -- "cc", - "pkg-config", - "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 2025-06-13 01:10:18.000000000 -0700 -+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2025-06-13 15:39:34.583102112 -0700 -@@ -80,7 +80,7 @@ proptest = "1.6.0" - pulldown-cmark = { version = "0.13.0", default-features = false, features = ["html"] } - rand = "0.9.0" - regex = "1.11.1" --rusqlite = { version = "0.34.0", features = ["bundled"] } -+rusqlite = { version = "0.34.0", features = [] } - rustc-hash = "2.1.1" - rustc-stable-hash = "0.1.2" - rustfix = { version = "0.9.0", path = "crates/rustfix" } diff --git a/rustc-1.89.0-disable-libssh2.patch b/rustc-1.89.0-disable-libssh2.patch deleted file mode 100644 index 52690b2..0000000 --- a/rustc-1.89.0-disable-libssh2.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2025-07-14 11:57:13.773604132 -0500 -+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2025-07-14 11:58:13.305337361 -0500 -@@ -2523,7 +2523,6 @@ - dependencies = [ - "cc", - "libc", -- "libssh2-sys", - "libz-sys", - "openssl-sys", - "pkg-config", -@@ -2569,20 +2568,6 @@ - "pkg-config", - "vcpkg", - ] -- --[[package]] --name = "libssh2-sys" --version = "0.3.1" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "220e4f05ad4a218192533b300327f5150e809b54c4ec83b5a1d91833601811b9" --dependencies = [ -- "cc", -- "libc", -- "libz-sys", -- "openssl-sys", -- "pkg-config", -- "vcpkg", --] - - [[package]] - name = "libz-rs-sys" ---- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2025-07-14 11:57:13.773954247 -0500 -+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2025-07-14 11:58:13.305708130 -0500 -@@ -46,7 +46,7 @@ - curl-sys = "0.4.79" - filetime = "0.2.25" - flate2 = { version = "1.1.1", default-features = false, features = ["zlib-rs"] } --git2 = "0.20.0" -+git2 = { version = "0.20.0", default-features = false, features = ["https"] } - git2-curl = "0.21.0" - # When updating this, also see if `gix-transport` further down needs updating or some auth-related tests will fail. - gix = { version = "0.72.0", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "parallel", "dirwalk"] } diff --git a/rustc-1.90.0-disable-libssh2.patch b/rustc-1.90.0-disable-libssh2.patch new file mode 100644 index 0000000..23dc6d8 --- /dev/null +++ b/rustc-1.90.0-disable-libssh2.patch @@ -0,0 +1,44 @@ +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 2025-08-16 15:47:14.000000000 -0700 ++++ rustc-beta-src/src/tools/cargo/Cargo.lock 2025-08-18 17:31:39.554771554 -0700 +@@ -2800,7 +2800,6 @@ checksum = "1c42fe03df2bd3c53a3a9c7317ad + dependencies = [ + "cc", + "libc", +- "libssh2-sys", + "libz-sys", + "openssl-sys", + "pkg-config", +@@ -2847,20 +2846,6 @@ dependencies = [ + "pkg-config", + "vcpkg", + ] +- +-[[package]] +-name = "libssh2-sys" +-version = "0.3.1" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "220e4f05ad4a218192533b300327f5150e809b54c4ec83b5a1d91833601811b9" +-dependencies = [ +- "cc", +- "libc", +- "libz-sys", +- "openssl-sys", +- "pkg-config", +- "vcpkg", +-] + + [[package]] + name = "libz-rs-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 2025-08-16 15:47:14.000000000 -0700 ++++ rustc-beta-src/src/tools/cargo/Cargo.toml 2025-08-18 17:33:02.401743230 -0700 +@@ -46,7 +46,7 @@ curl = "0.4.48" + curl-sys = "0.4.82" + filetime = "0.2.25" + flate2 = { version = "1.1.2", default-features = false, features = ["zlib-rs"] } +-git2 = "0.20.2" ++git2 = { version = "0.20.2", default-features = false, features = ["https"] } + git2-curl = "0.21.0" + # When updating this, also see if `gix-transport` further down needs updating or some auth-related tests will fail. + gix = { version = "0.73.0", default-features = false, features = ["progress-tree", "parallel", "dirwalk", "status"] } diff --git a/rustc-1.90.0-unbundle-sqlite.patch b/rustc-1.90.0-unbundle-sqlite.patch new file mode 100644 index 0000000..645e95c --- /dev/null +++ b/rustc-1.90.0-unbundle-sqlite.patch @@ -0,0 +1,23 @@ +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 2025-08-16 15:47:14.000000000 -0700 ++++ rustc-beta-src/src/tools/cargo/Cargo.lock 2025-08-18 17:17:50.150641231 -0700 +@@ -2843,7 +2843,6 @@ version = "0.34.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "91632f3b4fb6bd1d72aa3d78f41ffecfcf2b1a6648d8c241dbe7dbfaf4875e15" + dependencies = [ +- "cc", + "pkg-config", + "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 2025-08-16 15:47:14.000000000 -0700 ++++ rustc-beta-src/src/tools/cargo/Cargo.toml 2025-08-18 17:17:46.729082558 -0700 +@@ -81,7 +81,7 @@ proptest = "1.7.0" + pulldown-cmark = { version = "0.13.0", default-features = false, features = ["html"] } + rand = "0.9.1" + regex = "1.11.1" +-rusqlite = { version = "0.36.0", features = ["bundled"] } ++rusqlite = { version = "0.36.0", features = [] } + rustc-hash = "2.1.1" + rustc-stable-hash = "0.1.2" + rustfix = { version = "0.9.2", path = "crates/rustfix" } diff --git a/sources b/sources index 0a7d170..9588449 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ +SHA512 (rustc-1.90.0-src.tar.xz) = fb0798b4c7450754db2fcbb641202909d209c6db2d9181d7df7282217b8320dc52f5e9853de9d7bdb79177f1f920389450cab07674dea5fb5501eaab5816662a SHA512 (wasi-libc-wasi-sdk-27.tar.gz) = dfc2c36fabf32f465fc833ed0b10efffc9a35c68162ecc3e8d656d1d684d170b734d55e790614d12d925d17f49d60f0d2d01c46cecac941cf62d68eda84df13e -SHA512 (rustc-1.89.0-src.tar.xz) = 3ac0f02baaff12c67fe35cef4d56b315134d0a043bb6103a248a2842456c74733c6e3039f079bacfb8b8ab9b7487f92d678987e588bd41276abf9bf7c2f7870b From a0836cf324a49026ae317675d91683e0d1d89e31 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 7 Nov 2025 13:56:36 -0800 Subject: [PATCH 3/5] Update to Rust 1.91.0 Resolves: RHEL-111881 Resolves: RHEL-111861 --- .gitignore | 1 + ...prebuilt-optimized-compiler-rt-built.patch | 278 ------------------ ...llow-disabling-target-self-contained.patch | 85 +++--- ...ure-stack-in-InvocationCollector-vis.patch | 49 --- ...xternal-library-path-for-wasm32-wasi.patch | 24 +- rust.spec | 37 +-- rustc-1.90.0-unbundle-sqlite.patch | 23 -- rustc-1.91.0-unbundle-sqlite.patch | 23 ++ sources | 2 +- 9 files changed, 96 insertions(+), 426 deletions(-) delete mode 100644 0001-Allow-linking-a-prebuilt-optimized-compiler-rt-built.patch delete mode 100644 0001-rustc_expand-ensure-stack-in-InvocationCollector-vis.patch delete mode 100644 rustc-1.90.0-unbundle-sqlite.patch create mode 100644 rustc-1.91.0-unbundle-sqlite.patch diff --git a/.gitignore b/.gitignore index d7d8cb0..decfd4b 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,4 @@ SOURCES/wasi-libc-wasi-sdk-17.tar.gz /wasi-libc-wasi-sdk-27.tar.gz /rustc-1.89.0-src.tar.xz /rustc-1.90.0-src.tar.xz +/rustc-1.91.0-src.tar.xz diff --git a/0001-Allow-linking-a-prebuilt-optimized-compiler-rt-built.patch b/0001-Allow-linking-a-prebuilt-optimized-compiler-rt-built.patch deleted file mode 100644 index 3071556..0000000 --- a/0001-Allow-linking-a-prebuilt-optimized-compiler-rt-built.patch +++ /dev/null @@ -1,278 +0,0 @@ -From 4815c3cd733812bec777970ff4b1e73c2fcad1a6 Mon Sep 17 00:00:00 2001 -From: Paul Murphy -Date: Tue, 24 Jun 2025 11:07:54 -0500 -Subject: [PATCH] Allow linking a prebuilt optimized compiler-rt builtins - library - -Extend the .optimized-compiler-builtins bootstrap option to accept a -path to a prebuilt compiler-rt builtins library, and update compiler-builtins -to enable optimized builtins without building compiler-rt builtins. - -(cherry picked from commit b382478bba7b8f75c73673c239fa86a29db66223) ---- - bootstrap.example.toml | 4 +- - .../compiler-builtins/build.rs | 55 ++++++++++++++++--- - src/bootstrap/src/core/build_steps/compile.rs | 44 ++++++++------- - src/bootstrap/src/core/config/config.rs | 10 +++- - src/bootstrap/src/core/config/tests.rs | 4 +- - src/bootstrap/src/core/config/toml/target.rs | 4 +- - 6 files changed, 87 insertions(+), 34 deletions(-) - -diff --git a/bootstrap.example.toml b/bootstrap.example.toml -index 82041167b444..a11aec1b60e5 100644 ---- a/bootstrap.example.toml -+++ b/bootstrap.example.toml -@@ -1038,7 +1038,9 @@ - # sources are available. - # - # Setting this to `false` generates slower code, but removes the requirement for a C toolchain in --# order to run `x check`. -+# order to run `x check`. This may also be given a path to an existing build of the builtins -+# runtime library from LLVM's compiler-rt. This option will override the same option under [build] -+# section. - #optimized-compiler-builtins = build.optimized-compiler-builtins (bool) - - # Link the compiler and LLVM against `jemalloc` instead of the default libc allocator. -diff --git a/library/compiler-builtins/compiler-builtins/build.rs b/library/compiler-builtins/compiler-builtins/build.rs -index 8f51c12b535d..b8de1789ebc7 100644 ---- a/library/compiler-builtins/compiler-builtins/build.rs -+++ b/library/compiler-builtins/compiler-builtins/build.rs -@@ -547,12 +547,20 @@ pub fn compile(llvm_target: &[&str], target: &Target) { - sources.extend(&[("__emutls_get_address", "emutls.c")]); - } - -+ // Optionally, link against a prebuilt llvm compiler-rt containing the builtins -+ // library. Only the builtins library is required. On many platforms, this is -+ // available as a library named libclang_rt.builtins.a. -+ let link_against_prebuilt_rt = env::var_os("LLVM_COMPILER_RT_LIB").is_some(); -+ - // When compiling the C code we require the user to tell us where the - // source code is, and this is largely done so when we're compiling as - // part of rust-lang/rust we can use the same llvm-project repository as - // rust-lang/rust. - let root = match env::var_os("RUST_COMPILER_RT_ROOT") { - Some(s) => PathBuf::from(s), -+ // If a prebuild libcompiler-rt is provided, set a valid -+ // path to simplify later logic. Nothing should be compiled. -+ None if link_against_prebuilt_rt => PathBuf::new(), - None => { - panic!( - "RUST_COMPILER_RT_ROOT is not set. You may need to run \ -@@ -560,7 +568,7 @@ pub fn compile(llvm_target: &[&str], target: &Target) { - ); - } - }; -- if !root.exists() { -+ if !link_against_prebuilt_rt && !root.exists() { - panic!("RUST_COMPILER_RT_ROOT={} does not exist", root.display()); - } - -@@ -576,7 +584,7 @@ pub fn compile(llvm_target: &[&str], target: &Target) { - let src_dir = root.join("lib/builtins"); - if target.arch == "aarch64" && target.env != "msvc" && target.os != "uefi" { - // See below for why we're building these as separate libraries. -- build_aarch64_out_of_line_atomics_libraries(&src_dir, cfg); -+ build_aarch64_out_of_line_atomics_libraries(&src_dir, cfg, link_against_prebuilt_rt); - - // Some run-time CPU feature detection is necessary, as well. - let cpu_model_src = if src_dir.join("cpu_model.c").exists() { -@@ -590,20 +598,45 @@ pub fn compile(llvm_target: &[&str], target: &Target) { - let mut added_sources = HashSet::new(); - for (sym, src) in sources.map.iter() { - let src = src_dir.join(src); -- if added_sources.insert(src.clone()) { -+ if !link_against_prebuilt_rt && added_sources.insert(src.clone()) { - cfg.file(&src); - println!("cargo:rerun-if-changed={}", src.display()); - } - println!("cargo:rustc-cfg={}=\"optimized-c\"", sym); - } - -- cfg.compile("libcompiler-rt.a"); -+ if link_against_prebuilt_rt { -+ let rt_builtins_ext = PathBuf::from(env::var_os("LLVM_COMPILER_RT_LIB").unwrap()); -+ if !rt_builtins_ext.exists() { -+ panic!( -+ "LLVM_COMPILER_RT_LIB={} does not exist", -+ rt_builtins_ext.display() -+ ); -+ } -+ if let Some(dir) = rt_builtins_ext.parent() { -+ println!("cargo::rustc-link-search=native={}", dir.display()); -+ } -+ if let Some(lib) = rt_builtins_ext.file_name() { -+ println!( -+ "cargo::rustc-link-lib=static:+verbatim={}", -+ lib.to_str().unwrap() -+ ); -+ } -+ } else { -+ cfg.compile("libcompiler-rt.a"); -+ } - } - -- fn build_aarch64_out_of_line_atomics_libraries(builtins_dir: &Path, cfg: &mut cc::Build) { -+ fn build_aarch64_out_of_line_atomics_libraries( -+ builtins_dir: &Path, -+ cfg: &mut cc::Build, -+ link_against_prebuilt_rt: bool, -+ ) { - let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap()); - let outlined_atomics_file = builtins_dir.join("aarch64").join("lse.S"); -- println!("cargo:rerun-if-changed={}", outlined_atomics_file.display()); -+ if !link_against_prebuilt_rt { -+ println!("cargo:rerun-if-changed={}", outlined_atomics_file.display()); -+ } - - cfg.include(&builtins_dir); - -@@ -616,6 +649,13 @@ fn build_aarch64_out_of_line_atomics_libraries(builtins_dir: &Path, cfg: &mut cc - for (model_number, model_name) in - &[(1, "relax"), (2, "acq"), (3, "rel"), (4, "acq_rel")] - { -+ let sym = format!("__aarch64_{}{}_{}", instruction_type, size, model_name); -+ println!("cargo:rustc-cfg={}=\"optimized-c\"", sym); -+ -+ if link_against_prebuilt_rt { -+ continue; -+ } -+ - // The original compiler-rt build system compiles the same - // source file multiple times with different compiler - // options. Here we do something slightly different: we -@@ -639,9 +679,6 @@ fn build_aarch64_out_of_line_atomics_libraries(builtins_dir: &Path, cfg: &mut cc - .unwrap(); - drop(file); - cfg.file(path); -- -- let sym = format!("__aarch64_{}{}_{}", instruction_type, size, model_name); -- println!("cargo:rustc-cfg={}=\"optimized-c\"", sym); - } - } - } -diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs -index 7a5533346adf..39c9db3d6c35 100644 ---- a/src/bootstrap/src/core/build_steps/compile.rs -+++ b/src/bootstrap/src/core/build_steps/compile.rs -@@ -572,25 +572,31 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car - // `compiler-builtins` crate is enabled and it's configured to learn where - // `compiler-rt` is located. - let compiler_builtins_c_feature = if builder.config.optimized_compiler_builtins(target) { -- // NOTE: this interacts strangely with `llvm-has-rust-patches`. In that case, we enforce `submodules = false`, so this is a no-op. -- // But, the user could still decide to manually use an in-tree submodule. -- // -- // NOTE: if we're using system llvm, we'll end up building a version of `compiler-rt` that doesn't match the LLVM we're linking to. -- // That's probably ok? At least, the difference wasn't enforced before. There's a comment in -- // the compiler_builtins build script that makes me nervous, though: -- // https://github.com/rust-lang/compiler-builtins/blob/31ee4544dbe47903ce771270d6e3bea8654e9e50/build.rs#L575-L579 -- builder.require_submodule( -- "src/llvm-project", -- Some( -- "The `build.optimized-compiler-builtins` config option \ -- requires `compiler-rt` sources from LLVM.", -- ), -- ); -- let compiler_builtins_root = builder.src.join("src/llvm-project/compiler-rt"); -- assert!(compiler_builtins_root.exists()); -- // The path to `compiler-rt` is also used by `profiler_builtins` (above), -- // so if you're changing something here please also change that as appropriate. -- cargo.env("RUST_COMPILER_RT_ROOT", &compiler_builtins_root); -+ if let Some(path) = builder.config.optimized_compiler_builtins_path(target) { -+ cargo.env("LLVM_COMPILER_RT_LIB", path); -+ } else { -+ // NOTE: this interacts strangely with `llvm-has-rust-patches`. In that case, we enforce -+ // `submodules = false`, so this is a no-op. But, the user could still decide to -+ // manually use an in-tree submodule. -+ // -+ // NOTE: if we're using system llvm, we'll end up building a version of `compiler-rt` -+ // that doesn't match the LLVM we're linking to. That's probably ok? At least, the -+ // difference wasn't enforced before. There's a comment in the compiler_builtins build -+ // script that makes me nervous, though: -+ // https://github.com/rust-lang/compiler-builtins/blob/31ee4544dbe47903ce771270d6e3bea8654e9e50/build.rs#L575-L579 -+ builder.require_submodule( -+ "src/llvm-project", -+ Some( -+ "The `build.optimized-compiler-builtins` config option \ -+ requires `compiler-rt` sources from LLVM.", -+ ), -+ ); -+ let compiler_builtins_root = builder.src.join("src/llvm-project/compiler-rt"); -+ assert!(compiler_builtins_root.exists()); -+ // The path to `compiler-rt` is also used by `profiler_builtins` (above), -+ // so if you're changing something here please also change that as appropriate. -+ cargo.env("RUST_COMPILER_RT_ROOT", &compiler_builtins_root); -+ } - " compiler-builtins-c" - } else { - "" -diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs -index 6055876c4757..588c3489f898 100644 ---- a/src/bootstrap/src/core/config/config.rs -+++ b/src/bootstrap/src/core/config/config.rs -@@ -1769,10 +1769,18 @@ pub fn rpath_enabled(&self, target: TargetSelection) -> bool { - pub fn optimized_compiler_builtins(&self, target: TargetSelection) -> bool { - self.target_config - .get(&target) -- .and_then(|t| t.optimized_compiler_builtins) -+ .and_then(|t| t.optimized_compiler_builtins.as_ref()) -+ .map(StringOrBool::is_string_or_true) - .unwrap_or(self.optimized_compiler_builtins) - } - -+ pub fn optimized_compiler_builtins_path(&self, target: TargetSelection) -> Option<&str> { -+ match self.target_config.get(&target)?.optimized_compiler_builtins.as_ref()? { -+ StringOrBool::String(s) => Some(s), -+ StringOrBool::Bool(_) => None, -+ } -+ } -+ - pub fn llvm_enabled(&self, target: TargetSelection) -> bool { - self.codegen_backends(target).contains(&CodegenBackendKind::Llvm) - } -diff --git a/src/bootstrap/src/core/config/tests.rs b/src/bootstrap/src/core/config/tests.rs -index 50eba12aba74..c32e4384cf62 100644 ---- a/src/bootstrap/src/core/config/tests.rs -+++ b/src/bootstrap/src/core/config/tests.rs -@@ -17,7 +17,7 @@ - use crate::core::build_steps::llvm; - use crate::core::build_steps::llvm::LLVM_INVALIDATION_PATHS; - use crate::core::config::toml::TomlConfig; --use crate::core::config::{LldMode, Target, TargetSelection}; -+use crate::core::config::{LldMode, StringOrBool, Target, TargetSelection}; - use crate::utils::tests::git::git_test; - - pub(crate) fn parse(config: &str) -> Config { -@@ -212,7 +212,7 @@ fn override_toml() { - let darwin = TargetSelection::from_user("aarch64-apple-darwin"); - let darwin_values = Target { - runner: Some("apple".into()), -- optimized_compiler_builtins: Some(false), -+ optimized_compiler_builtins: Some(StringOrBool::Bool(false)), - ..Default::default() - }; - assert_eq!( -diff --git a/src/bootstrap/src/core/config/toml/target.rs b/src/bootstrap/src/core/config/toml/target.rs -index 69afa8af3419..5ddb8c50c146 100644 ---- a/src/bootstrap/src/core/config/toml/target.rs -+++ b/src/bootstrap/src/core/config/toml/target.rs -@@ -45,7 +45,7 @@ struct TomlTarget { - no_std: Option = "no-std", - codegen_backends: Option> = "codegen-backends", - runner: Option = "runner", -- optimized_compiler_builtins: Option = "optimized-compiler-builtins", -+ optimized_compiler_builtins: Option = "optimized-compiler-builtins", - jemalloc: Option = "jemalloc", - self_contained: Option = "self-contained", - } -@@ -78,7 +78,7 @@ pub struct Target { - pub runner: Option, - pub no_std: bool, - pub codegen_backends: Option>, -- pub optimized_compiler_builtins: Option, -+ pub optimized_compiler_builtins: Option, - pub jemalloc: Option, - pub self_contained: bool, - } --- -2.50.1 - diff --git a/0001-bootstrap-allow-disabling-target-self-contained.patch b/0001-bootstrap-allow-disabling-target-self-contained.patch index 5949461..e4645a5 100644 --- a/0001-bootstrap-allow-disabling-target-self-contained.patch +++ b/0001-bootstrap-allow-disabling-target-self-contained.patch @@ -1,4 +1,4 @@ -From b51b8d1854e7e2e7b7b431da26adad6b3677f6d2 Mon Sep 17 00:00:00 2001 +From 3a89cbb0ff0352fc6ab4bf329124f961fddb1e2a Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 18 Aug 2025 17:11:07 -0700 Subject: [PATCH 1/2] bootstrap: allow disabling target self-contained @@ -6,15 +6,16 @@ Subject: [PATCH 1/2] bootstrap: allow disabling target self-contained --- bootstrap.example.toml | 5 +++++ src/bootstrap/src/core/build_steps/compile.rs | 4 ++++ - src/bootstrap/src/core/config/toml/target.rs | 8 ++++++++ + src/bootstrap/src/core/config/config.rs | 3 +++ + src/bootstrap/src/core/config/toml/target.rs | 5 +++++ src/bootstrap/src/lib.rs | 5 +++++ - 4 files changed, 22 insertions(+) + 5 files changed, 22 insertions(+) diff --git a/bootstrap.example.toml b/bootstrap.example.toml -index 31966af33012..82041167b444 100644 +index eac939577979..db72e0fd29c5 100644 --- a/bootstrap.example.toml +++ b/bootstrap.example.toml -@@ -1044,3 +1044,8 @@ +@@ -1060,3 +1060,8 @@ # Link the compiler and LLVM against `jemalloc` instead of the default libc allocator. # This overrides the global `rust.jemalloc` option. See that option for more info. #jemalloc = rust.jemalloc (bool) @@ -24,7 +25,7 @@ index 31966af33012..82041167b444 100644 +# targets may ignore this setting if they have nothing to be contained. +#self-contained = (bool) diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs -index 59541bf12def..7a5533346adf 100644 +index 1458b0beefa8..08757f3283cf 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs @@ -370,6 +370,10 @@ fn copy_self_contained_objects( @@ -38,37 +39,11 @@ index 59541bf12def..7a5533346adf 100644 let libdir_self_contained = 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/toml/target.rs b/src/bootstrap/src/core/config/toml/target.rs -index 9dedadff3a19..69afa8af3419 100644 ---- a/src/bootstrap/src/core/config/toml/target.rs -+++ b/src/bootstrap/src/core/config/toml/target.rs -@@ -47,6 +47,7 @@ struct TomlTarget { - runner: Option = "runner", - optimized_compiler_builtins: Option = "optimized-compiler-builtins", - jemalloc: Option = "jemalloc", -+ self_contained: Option = "self-contained", - } - } - -@@ -79,6 +80,7 @@ pub struct Target { - pub codegen_backends: Option>, - pub optimized_compiler_builtins: Option, - pub jemalloc: Option, -+ pub self_contained: bool, - } - - impl Target { -@@ -90,6 +92,9 @@ pub fn from_triple(triple: &str) -> Self { - if triple.contains("emscripten") { - target.runner = Some("node".into()); - } -+ if triple.contains("-musl") || triple.contains("-wasi") || triple.contains("-windows-gnu") { -+ target.self_contained = true; -+ } - target - } - } -@@ -126,6 +131,9 @@ pub fn apply_target_config(&mut self, toml_target: Option = "runner", + optimized_compiler_builtins: Option = "optimized-compiler-builtins", + jemalloc: Option = "jemalloc", ++ self_contained: Option = "self-contained", + } + } + +@@ -75,6 +76,7 @@ pub struct Target { + pub codegen_backends: Option>, + pub optimized_compiler_builtins: Option, + pub jemalloc: Option, ++ pub self_contained: bool, + } + + impl Target { +@@ -86,6 +88,9 @@ pub fn from_triple(triple: &str) -> Self { + if triple.contains("emscripten") { + target.runner = Some("node".into()); + } ++ if triple.contains("-musl") || triple.contains("-wasi") || triple.contains("-windows-gnu") { ++ target.self_contained = true; ++ } + target + } + } diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs -index 011b52df97bb..77b2d9205a43 100644 +index a2aeed20948e..e530e1ceb99e 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs -@@ -1423,6 +1423,11 @@ fn no_std(&self, target: TargetSelection) -> Option { +@@ -1453,6 +1453,11 @@ fn no_std(&self, target: TargetSelection) -> Option { self.config.target_config.get(&target).map(|t| t.no_std) } @@ -95,5 +100,5 @@ index 011b52df97bb..77b2d9205a43 100644 /// and `remote-test-server` binaries. fn remote_tested(&self, target: TargetSelection) -> bool { -- -2.50.1 +2.51.0 diff --git a/0001-rustc_expand-ensure-stack-in-InvocationCollector-vis.patch b/0001-rustc_expand-ensure-stack-in-InvocationCollector-vis.patch deleted file mode 100644 index e847c1d..0000000 --- a/0001-rustc_expand-ensure-stack-in-InvocationCollector-vis.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 8ff00974436f25585850e3029d8e5a3e2a8340da Mon Sep 17 00:00:00 2001 -From: Josh Stone -Date: Thu, 14 Aug 2025 16:02:31 -0700 -Subject: [PATCH] rustc_expand: ensure stack in - `InvocationCollector::visit_expr` - -In Fedora, when we built rustc with PGO on ppc64le, we started failing -the test `issue-74564-if-expr-stack-overflow.rs`. This could also be -reproduced on other arches by setting a smaller `RUST_MIN_STACK`, so -it's probably just unlucky that ppc64le PGO created a large stack frame -somewhere in this recursion path. Adding an `ensure_sufficient_stack` -solves the stack overflow. - -Historically, that test and its fix were added in rust-lang/rust#74708, -which was also an `ensure_sufficient_stack` in this area of code at the -time. However, the refactor in rust-lang/rust#92573 basically left that -to the general `MutVisitor`, and then rust-lang/rust#142240 removed even -that ensure call. It may be luck that our tier-1 tested targets did not -regress the original issue across those refactors. - -(cherry picked from commit f68bcb376da2a34b6809ba76dad20ca400bd9966) ---- - compiler/rustc_expand/src/expand.rs | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/compiler/rustc_expand/src/expand.rs b/compiler/rustc_expand/src/expand.rs -index f02aa6c120f9..0cfda7c4739f 100644 ---- a/compiler/rustc_expand/src/expand.rs -+++ b/compiler/rustc_expand/src/expand.rs -@@ -15,6 +15,7 @@ - use rustc_ast_pretty::pprust; - use rustc_attr_parsing::{EvalConfigResult, ShouldEmit}; - use rustc_data_structures::flat_map_in_place::FlatMapInPlace; -+use rustc_data_structures::stack::ensure_sufficient_stack; - use rustc_errors::PResult; - use rustc_feature::Features; - use rustc_parse::parser::{ -@@ -2439,7 +2440,7 @@ fn visit_expr(&mut self, node: &mut ast::Expr) { - if let Some(attr) = node.attrs.first() { - self.cfg().maybe_emit_expr_attr_err(attr); - } -- self.visit_node(node) -+ ensure_sufficient_stack(|| self.visit_node(node)) - } - - fn visit_method_receiver_expr(&mut self, node: &mut ast::Expr) { --- -2.50.1 - 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 4921bb9..89b148f 100644 --- a/0002-set-an-external-library-path-for-wasm32-wasi.patch +++ b/0002-set-an-external-library-path-for-wasm32-wasi.patch @@ -1,4 +1,4 @@ -From 3730abcf2b86d650da97a11190af8dcbfeae311a Mon Sep 17 00:00:00 2001 +From 862d09fe2e8b0f5ce8fe7bfc592cda66a1d74c08 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 18 Aug 2025 17:13:28 -0700 Subject: [PATCH 2/2] set an external library path for wasm32-wasi @@ -11,10 +11,10 @@ Subject: [PATCH 2/2] set an external library path for wasm32-wasi 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs -index 162fbf3d6e24..2acfd6dd96b2 100644 +index 48b01ea2df19..59b87396fed2 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs -@@ -1548,6 +1548,12 @@ fn get_object_file_path(sess: &Session, name: &str, self_contained: bool) -> Pat +@@ -1559,6 +1559,12 @@ fn get_object_file_path(sess: &Session, name: &str, self_contained: bool) -> Pat return file_path; } } @@ -27,7 +27,7 @@ index 162fbf3d6e24..2acfd6dd96b2 100644 for search_path in sess.target_filesearch().search_paths(PathKind::Native) { let file_path = search_path.dir.join(name); if file_path.exists() { -@@ -2121,6 +2127,10 @@ fn add_library_search_dirs( +@@ -2140,6 +2146,10 @@ fn add_library_search_dirs( } ControlFlow::<()>::Continue(()) }); @@ -39,10 +39,10 @@ index 162fbf3d6e24..2acfd6dd96b2 100644 /// Add options making relocation sections in the produced ELF files read-only diff --git a/compiler/rustc_target/src/spec/json.rs b/compiler/rustc_target/src/spec/json.rs -index d27c1929aef7..b995896450e0 100644 +index f236be92b3b6..eea6e0c203d2 100644 --- a/compiler/rustc_target/src/spec/json.rs +++ b/compiler/rustc_target/src/spec/json.rs -@@ -84,6 +84,7 @@ macro_rules! forward_opt { +@@ -81,6 +81,7 @@ macro_rules! forward_opt { forward!(linker_is_gnu_json); forward!(pre_link_objects); forward!(post_link_objects); @@ -50,7 +50,7 @@ index d27c1929aef7..b995896450e0 100644 forward!(pre_link_objects_self_contained); forward!(post_link_objects_self_contained); -@@ -306,6 +307,7 @@ macro_rules! target_option_val { +@@ -301,6 +302,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); @@ -58,7 +58,7 @@ index d27c1929aef7..b995896450e0 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"); -@@ -490,6 +492,8 @@ struct TargetSpecJson { +@@ -511,6 +513,8 @@ struct TargetSpecJson { pre_link_objects: Option, #[serde(rename = "post-link-objects")] post_link_objects: Option, @@ -68,10 +68,10 @@ index d27c1929aef7..b995896450e0 100644 pre_link_objects_self_contained: Option, #[serde(rename = "post-link-objects-fallback")] diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs -index 033590e01a67..15a012639472 100644 +index 07fb1ce63f7c..c076c2836f84 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs -@@ -2439,6 +2439,7 @@ pub struct TargetOptions { +@@ -1992,6 +1992,7 @@ pub struct TargetOptions { /// Objects to link before and after all other object code. pub pre_link_objects: CrtObjects, pub post_link_objects: CrtObjects, @@ -79,7 +79,7 @@ index 033590e01a67..15a012639472 100644 /// 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, -@@ -2964,6 +2965,7 @@ fn default() -> TargetOptions { +@@ -2518,6 +2519,7 @@ fn default() -> TargetOptions { relro_level: RelroLevel::None, pre_link_objects: Default::default(), post_link_objects: Default::default(), @@ -108,5 +108,5 @@ index 26add451ed25..3eaf050e6823 100644 // Right now this is a bit of a workaround but we're currently saying that // the target by default has a static crt which we're taking as a signal -- -2.50.1 +2.51.0 diff --git a/rust.spec b/rust.spec index dc6de72..82970f4 100644 --- a/rust.spec +++ b/rust.spec @@ -1,5 +1,5 @@ Name: rust -Version: 1.90.0 +Version: 1.91.0 Release: 1%{?dist} 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-3.0) @@ -14,9 +14,9 @@ ExclusiveArch: %{rust_arches} # To bootstrap from scratch, set the channel and date from src/stage0 # e.g. 1.89.0 wants rustc: 1.88.0-2025-06-26 # or nightly wants some beta-YYYY-MM-DD -%global bootstrap_version 1.89.0 -%global bootstrap_channel 1.89.0 -%global bootstrap_date 2025-08-07 +%global bootstrap_version 1.90.0 +%global bootstrap_channel 1.90.0 +%global bootstrap_date 2025-09-18 # 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 19.0+. # See src/bootstrap/src/core/build_steps/llvm.rs, fn check_llvm_version -%global min_llvm_version 19.0.0 -%global bundled_llvm_version 20.1.8 +%global min_llvm_version 20.0.0 +%global bundled_llvm_version 21.1.1 #global llvm_compat_version 19 %global llvm llvm%{?llvm_compat_version} %bcond_with bundled_llvm @@ -72,7 +72,7 @@ ExclusiveArch: %{rust_arches} # Cargo uses UPSERTs with omitted conflict targets %global min_sqlite3_version 3.35 -%global bundled_sqlite3_version 3.49.2 +%global bundled_sqlite3_version 3.50.2 %if 0%{?rhel} && 0%{?rhel} < 10 %bcond_without bundled_sqlite3 %else @@ -138,19 +138,11 @@ 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.90.0-unbundle-sqlite.patch +Patch6: rustc-1.91.0-unbundle-sqlite.patch # stage0 tries to copy all of /usr/lib, sometimes unsuccessfully, see #143735 Patch7: 0001-only-copy-rustlib-into-stage0-sysroot.patch -# Support optimized-compiler-builtins via linking against compiler-rt builtins. -# https://github.com/rust-lang/rust/pull/143689 -Patch8: 0001-Allow-linking-a-prebuilt-optimized-compiler-rt-built.patch - -# Fix a compiler stack overflow on ppc64le with PGO -# https://github.com/rust-lang/rust/pull/145410 -Patch9: 0001-rustc_expand-ensure-stack-in-InvocationCollector-vis.patch - ### RHEL-specific patches below ### # Simple rpm macros for rust-toolset (as opposed to full rust-packaging) @@ -686,8 +678,6 @@ rm -rf %{wasi_libc_dir}/dlmalloc/ %patch -P6 -p1 %endif %patch -P7 -p1 -%patch -P8 -p1 -%patch -P9 -p1 %if %with disabled_libssh2 %patch -P100 -p1 @@ -888,7 +878,7 @@ test -r "%{optimized_builtins}" --set rust.llvm-tools=false \ --set rust.verify-llvm-ir=true \ --enable-extended \ - --tools=cargo,clippy,rust-analyzer,rustfmt,src \ + --tools=cargo,clippy,rust-analyzer,rustdoc,rustfmt,src \ --enable-vendor \ --enable-verbose-tests \ --release-channel=%{channel} \ @@ -896,10 +886,7 @@ test -r "%{optimized_builtins}" %global __x %{__python3} ./x.py -# pgo on ppc64le is enabled in fedora, but it had exposed bugs in -# llvm codgen on ppc64le which have since been fixed. It should be -# turned on in 1.91 if no new issues are found. -%if %{with rustc_pgo} && !( "%{_target_cpu}" == "ppc64le" ) +%if %{with rustc_pgo} # Build the compiler with profile instrumentation %define profraw $PWD/build/profiles %define profdata $PWD/build/rustc.profdata @@ -1088,6 +1075,7 @@ timeout -v 30m %{__x} test --no-fail-fast rustfmt || : %license build/manifests/rustc/cargo-vendor.txt %license %{_pkgdocdir}/COPYRIGHT.html %license %{_pkgdocdir}/licenses/ +%exclude %{_sysconfdir}/target-spec-json-schema.json %files std-static @@ -1227,6 +1215,9 @@ timeout -v 30m %{__x} test --no-fail-fast rustfmt || : %changelog +* Fri Nov 07 2025 Josh Stone - 1.91.0-1 +- Update to 1.91.0 + * Fri Nov 07 2025 Josh Stone - 1.90.0-1 - Update to 1.90.0 diff --git a/rustc-1.90.0-unbundle-sqlite.patch b/rustc-1.90.0-unbundle-sqlite.patch deleted file mode 100644 index 645e95c..0000000 --- a/rustc-1.90.0-unbundle-sqlite.patch +++ /dev/null @@ -1,23 +0,0 @@ -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 2025-08-16 15:47:14.000000000 -0700 -+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2025-08-18 17:17:50.150641231 -0700 -@@ -2843,7 +2843,6 @@ version = "0.34.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "91632f3b4fb6bd1d72aa3d78f41ffecfcf2b1a6648d8c241dbe7dbfaf4875e15" - dependencies = [ -- "cc", - "pkg-config", - "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 2025-08-16 15:47:14.000000000 -0700 -+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2025-08-18 17:17:46.729082558 -0700 -@@ -81,7 +81,7 @@ proptest = "1.7.0" - pulldown-cmark = { version = "0.13.0", default-features = false, features = ["html"] } - rand = "0.9.1" - regex = "1.11.1" --rusqlite = { version = "0.36.0", features = ["bundled"] } -+rusqlite = { version = "0.36.0", features = [] } - rustc-hash = "2.1.1" - rustc-stable-hash = "0.1.2" - rustfix = { version = "0.9.2", path = "crates/rustfix" } diff --git a/rustc-1.91.0-unbundle-sqlite.patch b/rustc-1.91.0-unbundle-sqlite.patch new file mode 100644 index 0000000..797cb03 --- /dev/null +++ b/rustc-1.91.0-unbundle-sqlite.patch @@ -0,0 +1,23 @@ +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 2025-09-27 05:39:02.000000000 -0700 ++++ rustc-beta-src/src/tools/cargo/Cargo.lock 2025-10-06 09:42:27.244710359 -0700 +@@ -2844,7 +2844,6 @@ version = "0.35.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "133c182a6a2c87864fe97778797e46c7e999672690dc9fa3ee8e241aa4a9c13f" + dependencies = [ +- "cc", + "pkg-config", + "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 2025-09-27 05:39:02.000000000 -0700 ++++ rustc-beta-src/src/tools/cargo/Cargo.toml 2025-10-06 09:42:06.219898468 -0700 +@@ -81,7 +81,7 @@ proptest = "1.7.0" + pulldown-cmark = { version = "0.13.0", default-features = false, features = ["html"] } + rand = "0.9.2" + regex = "1.11.1" +-rusqlite = { version = "0.37.0", features = ["bundled"] } ++rusqlite = { version = "0.37.0", features = [] } + rustc-hash = "2.1.1" + rustc-stable-hash = "0.1.2" + rustfix = { version = "0.9.2", path = "crates/rustfix" } diff --git a/sources b/sources index 9588449..cd3eb20 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rustc-1.90.0-src.tar.xz) = fb0798b4c7450754db2fcbb641202909d209c6db2d9181d7df7282217b8320dc52f5e9853de9d7bdb79177f1f920389450cab07674dea5fb5501eaab5816662a SHA512 (wasi-libc-wasi-sdk-27.tar.gz) = dfc2c36fabf32f465fc833ed0b10efffc9a35c68162ecc3e8d656d1d684d170b734d55e790614d12d925d17f49d60f0d2d01c46cecac941cf62d68eda84df13e +SHA512 (rustc-1.91.0-src.tar.xz) = 1e4c7a2435dc5bccfc63f34f5d210f7cafb0113787a4b5069d61f03528a32cd0a29ac516673cbc0eb564089f1dc5e13b962e6c3714bd0109de664c22ed340fb3 From fddbbf129306387cd7a83c0d1f5a3cafc508e9b9 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 7 Jan 2026 18:04:16 -0800 Subject: [PATCH 4/5] Update to Rust 1.92.0 Resolves: RHEL-111887 Resolves: RHEL-111861 Resolves: RHEL-108354 --- .gitignore | 1 + 0001-Use-lld-provided-by-system.patch | 12 ++-- ...llow-disabling-target-self-contained.patch | 56 +++++++++++-------- rust.spec | 37 +++++++++--- ...atch => rustc-1.92.0-disable-libssh2.patch | 4 +- ...atch => rustc-1.92.0-unbundle-sqlite.patch | 14 ++--- sources | 2 +- 7 files changed, 78 insertions(+), 48 deletions(-) rename rustc-1.90.0-disable-libssh2.patch => rustc-1.92.0-disable-libssh2.patch (97%) rename rustc-1.91.0-unbundle-sqlite.patch => rustc-1.92.0-unbundle-sqlite.patch (62%) diff --git a/.gitignore b/.gitignore index decfd4b..19f5341 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,4 @@ SOURCES/wasi-libc-wasi-sdk-17.tar.gz /rustc-1.89.0-src.tar.xz /rustc-1.90.0-src.tar.xz /rustc-1.91.0-src.tar.xz +/rustc-1.92.0-src.tar.xz diff --git a/0001-Use-lld-provided-by-system.patch b/0001-Use-lld-provided-by-system.patch index 1e5816b..522865f 100644 --- a/0001-Use-lld-provided-by-system.patch +++ b/0001-Use-lld-provided-by-system.patch @@ -1,4 +1,4 @@ -From 0641fdd833785914f1ead6e1ab374beea5b55437 Mon Sep 17 00:00:00 2001 +From e9405caf32dfb31bf17c3da0299df515a3755107 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 16 Aug 2024 10:12:58 -0700 Subject: [PATCH] Use lld provided by system @@ -12,12 +12,12 @@ Subject: [PATCH] Use lld provided by system 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/compiler/rustc_target/src/spec/base/wasm.rs b/compiler/rustc_target/src/spec/base/wasm.rs -index 88e7af5e669..14100a683f9 100644 +index 7ede45766ea..b22362227bb 100644 --- a/compiler/rustc_target/src/spec/base/wasm.rs +++ b/compiler/rustc_target/src/spec/base/wasm.rs -@@ -86,8 +86,7 @@ macro_rules! args { - // arguments just yet - limit_rdylib_exports: false, +@@ -81,8 +81,7 @@ macro_rules! args { + // threaded model which will legalize atomics to normal operations. + singlethread: true, - // we use the LLD shipped with the Rust toolchain by default - linker: Some("rust-lld".into()), @@ -76,5 +76,5 @@ index 0cf6a879462..3677fc662de 100644 // We disable MMX and SSE for now, even though UEFI allows using them. Problem is, you have to // enable these CPU features explicitly before their first use, otherwise their instructions -- -2.49.0 +2.51.0 diff --git a/0001-bootstrap-allow-disabling-target-self-contained.patch b/0001-bootstrap-allow-disabling-target-self-contained.patch index e4645a5..54ca101 100644 --- a/0001-bootstrap-allow-disabling-target-self-contained.patch +++ b/0001-bootstrap-allow-disabling-target-self-contained.patch @@ -1,34 +1,34 @@ -From 3a89cbb0ff0352fc6ab4bf329124f961fddb1e2a Mon Sep 17 00:00:00 2001 +From 8364de4cb8edab85efcb895824ce06f4a95bd26f Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 18 Aug 2025 17:11:07 -0700 -Subject: [PATCH 1/2] bootstrap: allow disabling target self-contained +Subject: [PATCH] bootstrap: allow disabling target self-contained --- bootstrap.example.toml | 5 +++++ src/bootstrap/src/core/build_steps/compile.rs | 4 ++++ - src/bootstrap/src/core/config/config.rs | 3 +++ + src/bootstrap/src/core/config/config.rs | 4 ++++ src/bootstrap/src/core/config/toml/target.rs | 5 +++++ src/bootstrap/src/lib.rs | 5 +++++ - 5 files changed, 22 insertions(+) + 5 files changed, 23 insertions(+) diff --git a/bootstrap.example.toml b/bootstrap.example.toml -index eac939577979..db72e0fd29c5 100644 +index 6f37e51a47d..ee21bc06bea 100644 --- a/bootstrap.example.toml +++ b/bootstrap.example.toml -@@ -1060,3 +1060,8 @@ - # Link the compiler and LLVM against `jemalloc` instead of the default libc allocator. - # This overrides the global `rust.jemalloc` option. See that option for more info. - #jemalloc = rust.jemalloc (bool) +@@ -1077,3 +1077,8 @@ + # pass `off`: + # - x86_64-unknown-linux-gnu + #default-linker-linux-override = "off" (for most targets) + +# Copy libc and CRT objects into the target lib/self-contained/ directory. +# Enabled by default on `musl`, `wasi`, and `windows-gnu` targets. Other +# targets may ignore this setting if they have nothing to be contained. +#self-contained = (bool) diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs -index 1458b0beefa8..08757f3283cf 100644 +index 6857a40ada8..9a98323a704 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs -@@ -370,6 +370,10 @@ fn copy_self_contained_objects( +@@ -368,6 +368,10 @@ fn copy_self_contained_objects( compiler: &Compiler, target: TargetSelection, ) -> Vec<(PathBuf, DependencyType)> { @@ -40,24 +40,32 @@ index 1458b0beefa8..08757f3283cf 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 678a9b639522..9e45efc72d1a 100644 +index 4b7ae6df360..6bab269a33c 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs -@@ -819,6 +819,9 @@ pub(crate) fn parse_inner( - if let Some(s) = cfg.no_std { +@@ -864,6 +864,7 @@ pub(crate) fn parse_inner( + runner: target_runner, + optimized_compiler_builtins: target_optimized_compiler_builtins, + jemalloc: target_jemalloc, ++ self_contained: target_self_contained + } = cfg; + + let mut target = Target::from_triple(&triple); +@@ -921,6 +922,9 @@ pub(crate) fn parse_inner( + if let Some(s) = target_no_std { target.no_std = s; } -+ if let Some(s) = cfg.self_contained { ++ if let Some(s) = target_self_contained { + target.self_contained = s; + } - target.cc = cfg.cc.map(PathBuf::from); - target.cxx = cfg.cxx.map(PathBuf::from); - target.ar = cfg.ar.map(PathBuf::from); + target.cc = target_cc.map(PathBuf::from); + target.cxx = target_cxx.map(PathBuf::from); + target.ar = target_ar.map(PathBuf::from); diff --git a/src/bootstrap/src/core/config/toml/target.rs b/src/bootstrap/src/core/config/toml/target.rs -index 020602e6a199..a944e1d194dd 100644 +index 4c7afa50b96..83b8a1b50ca 100644 --- a/src/bootstrap/src/core/config/toml/target.rs +++ b/src/bootstrap/src/core/config/toml/target.rs -@@ -43,6 +43,7 @@ struct TomlTarget { +@@ -47,6 +47,7 @@ struct TomlTarget { runner: Option = "runner", optimized_compiler_builtins: Option = "optimized-compiler-builtins", jemalloc: Option = "jemalloc", @@ -65,7 +73,7 @@ index 020602e6a199..a944e1d194dd 100644 } } -@@ -75,6 +76,7 @@ pub struct Target { +@@ -80,6 +81,7 @@ pub struct Target { pub codegen_backends: Option>, pub optimized_compiler_builtins: Option, pub jemalloc: Option, @@ -73,7 +81,7 @@ index 020602e6a199..a944e1d194dd 100644 } impl Target { -@@ -86,6 +88,9 @@ pub fn from_triple(triple: &str) -> Self { +@@ -91,6 +93,9 @@ pub fn from_triple(triple: &str) -> Self { if triple.contains("emscripten") { target.runner = Some("node".into()); } @@ -84,10 +92,10 @@ index 020602e6a199..a944e1d194dd 100644 } } diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs -index a2aeed20948e..e530e1ceb99e 100644 +index dd30f05b728..cc89a84071e 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs -@@ -1453,6 +1453,11 @@ fn no_std(&self, target: TargetSelection) -> Option { +@@ -1441,6 +1441,11 @@ fn no_std(&self, target: TargetSelection) -> Option { self.config.target_config.get(&target).map(|t| t.no_std) } diff --git a/rust.spec b/rust.spec index 82970f4..8ad7e86 100644 --- a/rust.spec +++ b/rust.spec @@ -1,5 +1,5 @@ Name: rust -Version: 1.91.0 +Version: 1.92.0 Release: 1%{?dist} 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-3.0) @@ -14,9 +14,9 @@ ExclusiveArch: %{rust_arches} # To bootstrap from scratch, set the channel and date from src/stage0 # e.g. 1.89.0 wants rustc: 1.88.0-2025-06-26 # or nightly wants some beta-YYYY-MM-DD -%global bootstrap_version 1.90.0 -%global bootstrap_channel 1.90.0 -%global bootstrap_date 2025-09-18 +%global bootstrap_version 1.91.0 +%global bootstrap_channel 1.91.0 +%global bootstrap_date 2025-10-30 # Only the specified arches will use bootstrap binaries. # NOTE: Those binaries used to be uploaded with every new release, but that was @@ -45,7 +45,7 @@ ExclusiveArch: %{rust_arches} # is insufficient. Rust currently requires LLVM 19.0+. # See src/bootstrap/src/core/build_steps/llvm.rs, fn check_llvm_version %global min_llvm_version 20.0.0 -%global bundled_llvm_version 21.1.1 +%global bundled_llvm_version 21.1.3 #global llvm_compat_version 19 %global llvm llvm%{?llvm_compat_version} %bcond_with bundled_llvm @@ -138,7 +138,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.91.0-unbundle-sqlite.patch +Patch6: rustc-1.92.0-unbundle-sqlite.patch # stage0 tries to copy all of /usr/lib, sometimes unsuccessfully, see #143735 Patch7: 0001-only-copy-rustlib-into-stage0-sysroot.patch @@ -151,7 +151,7 @@ Source101: cargo_vendor.attr Source102: cargo_vendor.prov # Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949) -Patch100: rustc-1.90.0-disable-libssh2.patch +Patch100: rustc-1.92.0-disable-libssh2.patch # Get the Rust triple for any architecture and ABI. %{lua: function rust_triple(arch, abi) @@ -1047,9 +1047,27 @@ rm -rf "$TMP_HELLO" timeout -v 90m %{__x} test --no-fail-fast --skip={src/bootstrap,tests/crashes} || : rm -rf "./build/%{rust_triple}/test/" +# Cargo tests skip list +# Every test skipped here must have a documented reason to be skipped. +# Duplicates are safe to add. + +# This test relies on the DNS to fail to resolve the host. DNS is not enabled +# in mock in koji so the DNS resolution doesn't take place to begin with. +# We test this after packaging +%global cargo_test_skip_list net_err_suggests_fetch_with_cli + %ifarch aarch64 # https://github.com/rust-lang/rust/issues/123733 -%define cargo_test_skip --test-args "--skip panic_abort_doc_tests" +%global cargo_test_skip_list %{cargo_test_skip_list} panic_abort_doc_tests +%endif +%if %with disabled_libssh2 +# These tests need ssh - guaranteed to fail when libssh2 is disabled. +%global cargo_test_skip_list %{cargo_test_skip_list} \\\ + net_err_suggests_fetch_with_cli \\\ + ssh_something_happens +%endif +%if "%{cargo_test_skip_list}" != "" +%define cargo_test_skip --test-args "%(printf -- '--skip %%s ' %{cargo_test_skip_list})" %endif timeout -v 30m %{__x} test --no-fail-fast cargo %{?cargo_test_skip} || : rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/" @@ -1215,6 +1233,9 @@ timeout -v 30m %{__x} test --no-fail-fast rustfmt || : %changelog +* Wed Jan 07 2026 Josh Stone - 1.92.0-1 +- Update to 1.92.0 + * Fri Nov 07 2025 Josh Stone - 1.91.0-1 - Update to 1.91.0 diff --git a/rustc-1.90.0-disable-libssh2.patch b/rustc-1.92.0-disable-libssh2.patch similarity index 97% rename from rustc-1.90.0-disable-libssh2.patch rename to rustc-1.92.0-disable-libssh2.patch index 23dc6d8..a03668f 100644 --- a/rustc-1.90.0-disable-libssh2.patch +++ b/rustc-1.92.0-disable-libssh2.patch @@ -34,8 +34,8 @@ diff -up rustc-beta-src/src/tools/cargo/Cargo.toml.orig rustc-beta-src/src/tools --- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2025-08-16 15:47:14.000000000 -0700 +++ rustc-beta-src/src/tools/cargo/Cargo.toml 2025-08-18 17:33:02.401743230 -0700 @@ -46,7 +46,7 @@ curl = "0.4.48" - curl-sys = "0.4.82" - filetime = "0.2.25" + curl-sys = "0.4.83" + filetime = "0.2.26" flate2 = { version = "1.1.2", default-features = false, features = ["zlib-rs"] } -git2 = "0.20.2" +git2 = { version = "0.20.2", default-features = false, features = ["https"] } diff --git a/rustc-1.91.0-unbundle-sqlite.patch b/rustc-1.92.0-unbundle-sqlite.patch similarity index 62% rename from rustc-1.91.0-unbundle-sqlite.patch rename to rustc-1.92.0-unbundle-sqlite.patch index 797cb03..fb0b284 100644 --- a/rustc-1.91.0-unbundle-sqlite.patch +++ b/rustc-1.92.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 2025-09-27 05:39:02.000000000 -0700 -+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2025-10-06 09:42:27.244710359 -0700 -@@ -2844,7 +2844,6 @@ version = "0.35.0" +--- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2025-11-07 13:31:19.003737886 +0100 ++++ rustc-beta-src/src/tools/cargo/Cargo.lock 2025-11-07 13:14:41.637982893 +0100 +@@ -2835,7 +2835,6 @@ version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "133c182a6a2c87864fe97778797e46c7e999672690dc9fa3ee8e241aa4a9c13f" dependencies = [ @@ -10,12 +10,12 @@ 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 2025-09-27 05:39:02.000000000 -0700 -+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2025-10-06 09:42:06.219898468 -0700 -@@ -81,7 +81,7 @@ proptest = "1.7.0" +--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2025-11-07 13:31:28.338643618 +0100 ++++ rustc-beta-src/src/tools/cargo/Cargo.toml 2025-11-07 13:15:00.266505214 +0100 +@@ -81,7 +81,7 @@ proptest = "1.8.0" pulldown-cmark = { version = "0.13.0", default-features = false, features = ["html"] } rand = "0.9.2" - regex = "1.11.1" + regex = "1.11.3" -rusqlite = { version = "0.37.0", features = ["bundled"] } +rusqlite = { version = "0.37.0", features = [] } rustc-hash = "2.1.1" diff --git a/sources b/sources index cd3eb20..08ae3f4 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (wasi-libc-wasi-sdk-27.tar.gz) = dfc2c36fabf32f465fc833ed0b10efffc9a35c68162ecc3e8d656d1d684d170b734d55e790614d12d925d17f49d60f0d2d01c46cecac941cf62d68eda84df13e -SHA512 (rustc-1.91.0-src.tar.xz) = 1e4c7a2435dc5bccfc63f34f5d210f7cafb0113787a4b5069d61f03528a32cd0a29ac516673cbc0eb564089f1dc5e13b962e6c3714bd0109de664c22ed340fb3 +SHA512 (rustc-1.92.0-src.tar.xz) = a2c0b127933595b9bc2063d7b7c88d9af512c4664b18f29d44c9a6e2c68d194b87a3071717e8f1b7c858ae940baca888e10be95cd31e0201916d0bfc312a3b15 From 2c57de58c847c148a627d3872817b3d1af4f5ee0 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 8 Jan 2026 17:07:11 -0800 Subject: [PATCH 5/5] Use %shrink for multi-line cargo_test_skip_list This fixes macro expansion errors on el8-era rpm. Related: RHEL-111887 --- rust.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rust.spec b/rust.spec index 8ad7e86..49cea4d 100644 --- a/rust.spec +++ b/rust.spec @@ -1062,9 +1062,11 @@ rm -rf "./build/%{rust_triple}/test/" %endif %if %with disabled_libssh2 # These tests need ssh - guaranteed to fail when libssh2 is disabled. -%global cargo_test_skip_list %{cargo_test_skip_list} \\\ - net_err_suggests_fetch_with_cli \\\ +%global cargo_test_skip_list %{shrink: + %{cargo_test_skip_list} + net_err_suggests_fetch_with_cli ssh_something_happens +} %endif %if "%{cargo_test_skip_list}" != "" %define cargo_test_skip --test-args "%(printf -- '--skip %%s ' %{cargo_test_skip_list})"