Update to Rust 1.89.0
Resolves: RHEL-111847 Resolves: RHEL-111867
This commit is contained in:
parent
54e4b48d95
commit
d20ad927ef
2
.gitignore
vendored
2
.gitignore
vendored
@ -435,3 +435,5 @@
|
||||
/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
|
||||
|
@ -0,0 +1,39 @@
|
||||
From 9bdd3b0ee6a6fd5914fea0f56f3b754410733e53 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Murphy <paumurph@redhat.com>
|
||||
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
|
||||
|
@ -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 <jistone@redhat.com>
|
||||
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
|
||||
|
||||
|
@ -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 <jistone@redhat.com>
|
||||
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
|
||||
|
||||
|
@ -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 <jchecahi@redhat.com>
|
||||
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<String> = "runner",
|
||||
optimized_compiler_builtins: Option<bool> = "optimized-compiler-builtins",
|
||||
jemalloc: Option<bool> = "jemalloc",
|
||||
+ self_contained: Option<bool> = "self-contained",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,6 +80,7 @@ pub struct Target {
|
||||
pub codegen_backends: Option<Vec<String>>,
|
||||
pub optimized_compiler_builtins: Option<bool>,
|
||||
pub jemalloc: Option<bool>,
|
||||
@ -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<String> = "runner",
|
||||
optimized_compiler_builtins: Option<bool> = "optimized-compiler-builtins",
|
||||
jemalloc: Option<bool> = "jemalloc",
|
||||
+ self_contained: Option<bool> = "self-contained",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2245,6 +2250,9 @@ fn get_table(option: &str) -> Result<TomlConfig, toml::de::Error> {
|
||||
@@ -126,6 +131,9 @@ pub fn apply_target_config(&mut self, toml_target: Option<HashMap<String, TomlTa
|
||||
if let Some(s) = cfg.no_std {
|
||||
target.no_std = s;
|
||||
}
|
||||
@ -82,10 +82,10 @@ index bbb0fbfbb93..8642a86cbf8 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 843d474f92d..3a4398ee1f8 100644
|
||||
index f44fe4548a1..8ce9f09efb1 100644
|
||||
--- a/src/bootstrap/src/lib.rs
|
||||
+++ b/src/bootstrap/src/lib.rs
|
||||
@@ -1434,6 +1434,11 @@ fn no_std(&self, target: TargetSelection) -> Option<bool> {
|
||||
@@ -1331,6 +1331,11 @@ fn no_std(&self, target: TargetSelection) -> Option<bool> {
|
||||
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
|
||||
|
||||
|
28
0001-only-copy-rustlib-into-stage0-sysroot.patch
Normal file
28
0001-only-copy-rustlib-into-stage0-sysroot.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From 7d83bae4e2577ffa2afaf2fddb6948c1756a403c Mon Sep 17 00:00:00 2001
|
||||
From: Paul Murphy <paumurph@redhat.com>
|
||||
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
|
||||
|
@ -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 <jchecahi@redhat.com>
|
||||
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
|
||||
|
||||
|
@ -1,79 +0,0 @@
|
||||
From 925e76167ce2465c5c9d990d97c2db99f459640b Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
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 <jistone@redhat.com>
|
||||
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<Ty>> {
|
||||
- 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(
|
29
rust.spec
29
rust.spec
@ -1,5 +1,5 @@
|
||||
Name: rust
|
||||
Version: 1.88.0
|
||||
Version: 1.89.0
|
||||
Release: %autorelease
|
||||
Summary: The Rust Programming Language
|
||||
License: (Apache-2.0 OR MIT) AND (Artistic-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unicode-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)
|
||||
@ -673,6 +674,7 @@ rm -rf %{wasi_libc_dir}/dlmalloc/
|
||||
%patch -P6 -p1
|
||||
%endif
|
||||
%patch -P7 -p1
|
||||
%patch -P8 -p1
|
||||
|
||||
%if %with disabled_libssh2
|
||||
%patch -P100 -p1
|
||||
@ -861,6 +863,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 \
|
||||
|
@ -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"] }
|
4
sources
4
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
|
||||
|
Loading…
Reference in New Issue
Block a user