Compare commits
No commits in common. "c9-beta" and "c8-stream-rhel8" have entirely different histories.
c9-beta
...
c8-stream-
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
SOURCES/rustc-1.88.0-src.tar.xz
|
||||
SOURCES/wasi-libc-640c0cfc19a96b099e0791824be5ef0105ce2084.tar.gz
|
||||
SOURCES/rustc-1.84.1-src.tar.xz
|
||||
SOURCES/wasi-libc-wasi-sdk-25.tar.gz
|
||||
|
@ -1,2 +1,2 @@
|
||||
a5772a6462f53ffc71fda030bece8442d1214198 SOURCES/rustc-1.88.0-src.tar.xz
|
||||
d6330f7ed84d311d1338796af7fd60f011f3a707 SOURCES/wasi-libc-640c0cfc19a96b099e0791824be5ef0105ce2084.tar.gz
|
||||
787899153e848b012d8bbd6ec0baf0ed5e189831 SOURCES/rustc-1.84.1-src.tar.xz
|
||||
c42dc30854ecbce5380304c38bd48b5911d1ce62 SOURCES/wasi-libc-wasi-sdk-25.tar.gz
|
||||
|
39
SOURCES/0001-Only-translate-profile-flags-for-Clang.patch
Normal file
39
SOURCES/0001-Only-translate-profile-flags-for-Clang.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From e4e678eb9cbd90acf2ba51e9ec0209b05c4403b5 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <cuviper@gmail.com>
|
||||
Date: Thu, 9 Jan 2025 16:47:10 -0800
|
||||
Subject: [PATCH] Only translate profile flags for Clang
|
||||
|
||||
---
|
||||
src/flags.rs | 16 +++++++++-------
|
||||
1 file changed, 9 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/flags.rs b/src/flags.rs
|
||||
index 81834cf625f7..1a53c1b2345c 100644
|
||||
--- a/src/flags.rs
|
||||
+++ b/src/flags.rs
|
||||
@@ -201,13 +201,15 @@ impl<'this> RustcCodegenFlags<'this> {
|
||||
if self.no_vectorize_slp {
|
||||
push_if_supported("-fno-slp-vectorize".into());
|
||||
}
|
||||
- // https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fprofile-generate
|
||||
- if let Some(value) = self.profile_generate {
|
||||
- push_if_supported(format!("-fprofile-generate={value}").into());
|
||||
- }
|
||||
- // https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fprofile-use
|
||||
- if let Some(value) = self.profile_use {
|
||||
- push_if_supported(format!("-fprofile-use={value}").into());
|
||||
+ if let ToolFamily::Clang { .. } = family {
|
||||
+ // https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fprofile-generate
|
||||
+ if let Some(value) = self.profile_generate {
|
||||
+ push_if_supported(format!("-fprofile-generate={value}").into());
|
||||
+ }
|
||||
+ // https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fprofile-use
|
||||
+ if let Some(value) = self.profile_use {
|
||||
+ push_if_supported(format!("-fprofile-use={value}").into());
|
||||
+ }
|
||||
}
|
||||
// https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-mguard
|
||||
if let Some(value) = self.control_flow_guard {
|
||||
--
|
||||
2.47.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 687112c89c9058ef1e79f1c3a974940b1ae43ea3 Mon Sep 17 00:00:00 2001
|
||||
From 3d8c6d095581e8d7585f3772cfd16f6367f3c008 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,7 +12,7 @@ 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 f237391016e7..08bcd9699b4a 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 {
|
||||
@ -26,10 +26,10 @@ 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 222d5651b521..4b780bc8a8e7 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 {
|
||||
@@ -14,7 +14,7 @@ pub fn target() -> Target {
|
||||
let opts = TargetOptions {
|
||||
abi: "softfloat".into(),
|
||||
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
|
||||
@ -39,10 +39,10 @@ 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 429303170b6b..19d4ec53f6d8 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 {
|
||||
@@ -9,6 +9,7 @@ pub fn target() -> Target {
|
||||
base.max_atomic_width = Some(128);
|
||||
base.add_pre_link_args(LinkerFlavor::Msvc(Lld::No), &["/machine:arm64"]);
|
||||
base.features = "+v8a".into();
|
||||
@ -51,23 +51,23 @@ 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 549706998d46..b7e9158ddef5 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 {
|
||||
@@ -17,7 +17,7 @@ pub fn target() -> Target {
|
||||
static_position_independent_executables: true,
|
||||
relro_level: RelroLevel::Full,
|
||||
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
|
||||
- linker: Some("rust-lld".into()),
|
||||
+ linker: Some("lld".into()),
|
||||
rustc_abi: Some(RustcAbi::X86Softfloat),
|
||||
features: "-mmx,-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2,+soft-float".into(),
|
||||
supported_sanitizers: SanitizerSet::KCFI | SanitizerSet::KERNELADDRESS,
|
||||
disable_redzone: true,
|
||||
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 6da1fcca58c8..c84ae44576d4 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 {
|
||||
@@ -16,6 +16,7 @@ pub fn target() -> Target {
|
||||
base.plt_by_default = false;
|
||||
base.max_atomic_width = Some(64);
|
||||
base.entry_abi = Conv::X86_64Win64;
|
||||
@ -76,5 +76,5 @@ index bce6aa0ebc6b..7fa1148a1de7 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.48.1
|
||||
2.46.0
|
||||
|
||||
|
@ -1,22 +1,22 @@
|
||||
From e8833a9032b9f5773ef891b3f12b93322d6b4950 Mon Sep 17 00:00:00 2001
|
||||
From: Jesus Checa Hidalgo <jchecahi@redhat.com>
|
||||
Date: Mon, 7 Apr 2025 16:59:10 +0200
|
||||
From 8d4d52446347872816ab51958e9f3162cf722ee6 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Thu, 28 Sep 2023 18:14:28 -0700
|
||||
Subject: [PATCH 1/2] bootstrap: allow disabling target self-contained
|
||||
|
||||
---
|
||||
bootstrap.example.toml | 5 +++++
|
||||
config.example.toml | 5 +++++
|
||||
src/bootstrap/src/core/build_steps/compile.rs | 4 ++++
|
||||
src/bootstrap/src/core/config/config.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
|
||||
--- a/bootstrap.example.toml
|
||||
+++ b/bootstrap.example.toml
|
||||
@@ -948,6 +948,11 @@
|
||||
# This overrides the global `rust.jemalloc` option. See that option for more info.
|
||||
#jemalloc = rust.jemalloc (bool)
|
||||
diff --git a/config.example.toml b/config.example.toml
|
||||
index d3233ad17b51..6a1f097c20cb 100644
|
||||
--- a/config.example.toml
|
||||
+++ b/config.example.toml
|
||||
@@ -916,6 +916,11 @@
|
||||
# argument as the test binary.
|
||||
#runner = <none> (string)
|
||||
|
||||
+# Copy libc and CRT objects into the target lib/self-contained/ directory.
|
||||
+# Enabled by default on `musl`, `wasi`, and `windows-gnu` targets. Other
|
||||
@ -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 8e088682f92d..843b7123b120 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(
|
||||
@@ -346,6 +346,10 @@ fn copy_self_contained_objects(
|
||||
compiler: &Compiler,
|
||||
target: TargetSelection,
|
||||
) -> Vec<(PathBuf, DependencyType)> {
|
||||
@ -42,18 +42,18 @@ index 18b5d4426b1..3de9667123b 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 bbb0fbfbb93..8642a86cbf8 100644
|
||||
index e706aba977b6..a55d98e94dd8 100644
|
||||
--- a/src/bootstrap/src/core/config/config.rs
|
||||
+++ b/src/bootstrap/src/core/config/config.rs
|
||||
@@ -666,6 +666,7 @@ pub struct Target {
|
||||
@@ -627,6 +627,7 @@ pub struct Target {
|
||||
pub runner: Option<String>,
|
||||
pub no_std: bool,
|
||||
pub codegen_backends: Option<Vec<String>>,
|
||||
pub optimized_compiler_builtins: Option<bool>,
|
||||
pub jemalloc: Option<bool>,
|
||||
+ pub self_contained: bool,
|
||||
}
|
||||
|
||||
impl Target {
|
||||
@@ -677,6 +678,9 @@ pub fn from_triple(triple: &str) -> Self {
|
||||
@@ -638,6 +639,9 @@ pub fn from_triple(triple: &str) -> Self {
|
||||
if triple.contains("emscripten") {
|
||||
target.runner = Some("node".into());
|
||||
}
|
||||
@ -63,15 +63,15 @@ index bbb0fbfbb93..8642a86cbf8 100644
|
||||
target
|
||||
}
|
||||
}
|
||||
@@ -1292,6 +1296,7 @@ struct TomlTarget {
|
||||
@@ -1213,6 +1217,7 @@ struct TomlTarget {
|
||||
no_std: Option<bool> = "no-std",
|
||||
codegen_backends: Option<Vec<String>> = "codegen-backends",
|
||||
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> {
|
||||
@@ -2038,6 +2043,9 @@ fn get_table(option: &str) -> Result<TomlConfig, toml::de::Error> {
|
||||
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 c384fd6bf435..a101c010b740 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> {
|
||||
@@ -1351,6 +1351,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.47.1
|
||||
|
||||
|
@ -1,20 +1,19 @@
|
||||
From 35a37bd892939b8a1cd194632de3b9dd3a3d479b Mon Sep 17 00:00:00 2001
|
||||
From: Jesus Checa Hidalgo <jchecahi@redhat.com>
|
||||
Date: Mon, 7 Apr 2025 17:22:56 +0200
|
||||
From 21d53eca2af5f04c0aa6b898f99f58e0e093cfdd Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Thu, 28 Sep 2023 18:18:16 -0700
|
||||
Subject: [PATCH 2/2] set an external library path for wasm32-wasi
|
||||
|
||||
---
|
||||
compiler/rustc_codegen_ssa/src/back/link.rs | 10 ++++++++++
|
||||
compiler/rustc_target/src/spec/json.rs | 2 ++
|
||||
compiler/rustc_target/src/spec/mod.rs | 2 ++
|
||||
compiler/rustc_target/src/spec/mod.rs | 4 ++++
|
||||
.../rustc_target/src/spec/targets/wasm32_wasip1.rs | 7 ++++---
|
||||
4 files changed, 18 insertions(+), 3 deletions(-)
|
||||
3 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 5149e3a12f23..cf62fbdc7f59 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
|
||||
@@ -1663,6 +1663,12 @@ fn get_object_file_path(sess: &Session, name: &str, self_contained: bool) -> Pat
|
||||
return file_path;
|
||||
}
|
||||
}
|
||||
@ -27,10 +26,10 @@ 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(
|
||||
}
|
||||
ControlFlow::<()>::Continue(())
|
||||
});
|
||||
@@ -2163,6 +2169,10 @@ fn add_library_search_dirs(
|
||||
ControlFlow::<()>::Continue(())
|
||||
},
|
||||
);
|
||||
+
|
||||
+ if let Some(lib_path) = &sess.target.options.external_lib_path {
|
||||
+ cmd.include_path(Path::new(lib_path.as_ref()));
|
||||
@ -38,31 +37,11 @@ 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
|
||||
--- a/compiler/rustc_target/src/spec/json.rs
|
||||
+++ b/compiler/rustc_target/src/spec/json.rs
|
||||
@@ -559,6 +559,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`
|
||||
@@ -744,6 +745,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);
|
||||
+ target_option_val!(external_lib_path);
|
||||
target_option_val!(pre_link_objects_self_contained, "pre-link-objects-fallback");
|
||||
target_option_val!(post_link_objects_self_contained, "post-link-objects-fallback");
|
||||
target_option_val!(link_args - pre_link_args_json, "pre-link-args");
|
||||
diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
|
||||
index 7234d1dc63e..3ec85bbf279 100644
|
||||
index 321ab40403a3..54791c8892d8 100644
|
||||
--- a/compiler/rustc_target/src/spec/mod.rs
|
||||
+++ b/compiler/rustc_target/src/spec/mod.rs
|
||||
@@ -2301,6 +2301,7 @@ pub struct TargetOptions {
|
||||
@@ -2155,6 +2155,7 @@ pub struct TargetOptions {
|
||||
/// Objects to link before and after all other object code.
|
||||
pub pre_link_objects: CrtObjects,
|
||||
pub post_link_objects: CrtObjects,
|
||||
@ -70,7 +49,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 {
|
||||
@@ -2651,6 +2652,7 @@ fn default() -> TargetOptions {
|
||||
relro_level: RelroLevel::None,
|
||||
pre_link_objects: Default::default(),
|
||||
post_link_objects: Default::default(),
|
||||
@ -78,11 +57,27 @@ index 7234d1dc63e..3ec85bbf279 100644
|
||||
pre_link_objects_self_contained: Default::default(),
|
||||
post_link_objects_self_contained: Default::default(),
|
||||
link_self_contained: LinkSelfContainedDefault::False,
|
||||
@@ -3355,6 +3357,7 @@ macro_rules! key {
|
||||
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`
|
||||
@@ -3636,6 +3639,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);
|
||||
+ target_option_val!(external_lib_path);
|
||||
target_option_val!(pre_link_objects_self_contained, "pre-link-objects-fallback");
|
||||
target_option_val!(post_link_objects_self_contained, "post-link-objects-fallback");
|
||||
target_option_val!(link_args - pre_link_args_json, "pre-link-args");
|
||||
diff --git a/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs b/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs
|
||||
index 26add451ed2..3eaf050e682 100644
|
||||
index 1cd30f21bec1..9a752d5712a6 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 {
|
||||
@@ -19,11 +19,12 @@ pub(crate) fn target() -> Target {
|
||||
options.env = "p1".into();
|
||||
options.add_pre_link_args(LinkerFlavor::WasmLld(Cc::Yes), &["--target=wasm32-wasip1"]);
|
||||
|
||||
@ -99,5 +94,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.47.1
|
||||
|
||||
|
@ -29,12 +29,6 @@
|
||||
# -Copt-level: set optimization level (default: highest optimization level)
|
||||
# -Cdebuginfo: set debuginfo verbosity (default: full debug information)
|
||||
# -Ccodegen-units: set number of parallel code generation units (default: 1)
|
||||
# -Cforce-frame-pointers: force inclusion of frame pointers (default: enabled
|
||||
# on x86_64 and aarch64 on Fedora 37+)
|
||||
#
|
||||
# Additionally, some linker flags are set which correspond to the default
|
||||
# Fedora compiler flags for hardening and for embedding package versions into
|
||||
# compiled binaries.
|
||||
#
|
||||
# ref. https://doc.rust-lang.org/rustc/codegen-options/index.html
|
||||
%build_rustflags %{shrink:
|
||||
@ -42,8 +36,6 @@
|
||||
-Cdebuginfo=%rustflags_debuginfo
|
||||
-Ccodegen-units=%rustflags_codegen_units
|
||||
-Cstrip=none
|
||||
%{expr:0%{?_include_frame_pointers} && ("%{_arch}" != "ppc64le" && "%{_arch}" != "s390x" && "%{_arch}" != "i386") ? "-Cforce-frame-pointers=yes" : ""}
|
||||
%[0%{?_package_note_status} ? "-Clink-arg=%_package_note_flags" : ""]
|
||||
}
|
||||
|
||||
# __cargo: cargo command with environment variables
|
||||
|
@ -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(
|
44
SOURCES/rustc-1.84.0-disable-libssh2.patch
Normal file
44
SOURCES/rustc-1.84.0-disable-libssh2.patch
Normal file
@ -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 2024-12-12 14:07:10.755481543 -0800
|
||||
+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2024-12-12 14:07:10.756481534 -0800
|
||||
@@ -2272,7 +2272,6 @@ checksum = "10472326a8a6477c3c20a64547b0
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
- "libssh2-sys",
|
||||
"libz-sys",
|
||||
"openssl-sys",
|
||||
"pkg-config",
|
||||
@@ -2313,20 +2312,6 @@ dependencies = [
|
||||
"pkg-config",
|
||||
"vcpkg",
|
||||
]
|
||||
-
|
||||
-[[package]]
|
||||
-name = "libssh2-sys"
|
||||
-version = "0.3.0"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee"
|
||||
-dependencies = [
|
||||
- "cc",
|
||||
- "libc",
|
||||
- "libz-sys",
|
||||
- "openssl-sys",
|
||||
- "pkg-config",
|
||||
- "vcpkg",
|
||||
-]
|
||||
|
||||
[[package]]
|
||||
name = "libz-sys"
|
||||
diff -up rustc-beta-src/src/tools/cargo/Cargo.toml.orig rustc-beta-src/src/tools/cargo/Cargo.toml
|
||||
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2024-12-12 14:07:10.756481534 -0800
|
||||
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2024-12-12 14:07:56.866087428 -0800
|
||||
@@ -47,7 +47,7 @@ curl = "0.4.46"
|
||||
curl-sys = "0.4.73"
|
||||
filetime = "0.2.23"
|
||||
flate2 = { version = "1.0.30", default-features = false, features = ["zlib"] }
|
||||
-git2 = "0.19.0"
|
||||
+git2 = { version = "0.19.0", default-features = false, features = ["https"] }
|
||||
git2-curl = "0.20.0"
|
||||
gix = { version = "0.67.0", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "parallel", "dirwalk"] }
|
||||
glob = "0.3.1"
|
23
SOURCES/rustc-1.84.0-unbundle-sqlite.patch
Normal file
23
SOURCES/rustc-1.84.0-unbundle-sqlite.patch
Normal file
@ -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 2024-12-07 06:47:38.000000000 -0800
|
||||
+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2024-12-12 14:02:54.412672539 -0800
|
||||
@@ -2310,7 +2310,6 @@ version = "0.30.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149"
|
||||
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 2024-12-12 14:02:54.412672539 -0800
|
||||
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2024-12-12 14:03:25.665405417 -0800
|
||||
@@ -80,7 +80,7 @@ proptest = "1.5.0"
|
||||
pulldown-cmark = { version = "0.12.0", default-features = false, features = ["html"] }
|
||||
rand = "0.8.5"
|
||||
regex = "1.10.5"
|
||||
-rusqlite = { version = "0.32.0", features = ["bundled"] }
|
||||
+rusqlite = { version = "0.32.0", features = [] }
|
||||
rustc-hash = "2.0.0"
|
||||
rustfix = { version = "0.9.0", path = "crates/rustfix" }
|
||||
same-file = "1.0.6"
|
@ -1,44 +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 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
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
- "libssh2-sys",
|
||||
"libz-sys",
|
||||
"openssl-sys",
|
||||
"pkg-config",
|
||||
@@ -2576,20 +2575,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-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"
|
||||
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.71.0", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "parallel", "dirwalk"] }
|
@ -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" }
|
616
SPECS/rust.spec
616
SPECS/rust.spec
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user