Compare commits

...

17 Commits

Author SHA1 Message Date
David Abdurachmanov 2779fd2e42
Enable riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-11-08 15:24:49 +02:00
Daniel P. Berrangé afbd2cf0c4 ensure rustfmt pulls in exact matching rust evr
/usr/bin/rustfmt is linking to an internal rust library and this
results in load errors if rustfmt and rust are at different evrs:

$ rustfmt
rustfmt: error while loading shared libraries: librustc_driver-69c69b1255476b63.so: cannot open shared object file: No such file or directory
$ rpm -q rust rustfmt
rust-1.72.0-1.fc38.x86_64
rustfmt-1.72.1-1.fc38.x86_64

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2023-10-04 10:50:58 +01:00
Josh Stone fbe7f8404b Switch to unbundled wasi-libc on Fedora
Also, use emmalloc instead of CC0 dlmalloc when bundling wasi-libc.
2023-09-29 14:56:44 -07:00
Josh Stone 938db5293e Fix the profiler runtime with compiler-rt-17 2023-09-27 12:05:39 -07:00
Josh Stone 68e85e4428 Simplify the target definitions 2023-09-27 12:05:39 -07:00
Josh Stone b2411fce72 Drop noarch from embedded x86_64 targets and use lld 2023-09-25 13:45:57 -07:00
Daniel P. Berrangé 9f66968c10 add 'x86_64-unknown-uefi' build target
This target will facilitate the use of Rust in the UEFI environment

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2023-09-25 11:36:55 -07:00
Daniel P. Berrangé 58662257c8 add 'x86_64-unknown-none' build target
The coconut-svsm project which provides a low level firmware for AMD
SEV-SNP virtual machines uses 'x86_64-unknown-none' as its build
target and has recently removed the requirement to use rust nightly[1].

Thus adding 'x86_64-unknown-none' as a build target will enable us to
build coconut-svsm in Fedora using the standard Rust toolchain packages.

[1] https://github.com/coconut-svsm/svsm/pull/81
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2023-09-25 11:36:00 -07:00
Yaakov Selkowitz da52e5d316 Fix ELN build
ELN (RHEL 10) tracks rawhide and currently also has llvm-17.
2023-09-25 11:35:03 -07:00
Josh Stone b1db162b38 Update to 1.72.1.
Migrated to SPDX license
2023-09-19 10:09:40 -07:00
Josh Stone 0764fad18b Update to 1.72.0. 2023-08-24 11:15:39 -07:00
Josh Stone 1265039e13 Disable profiler_builtins for EPEL7
We don't have compiler-rt available there.
2023-08-07 16:39:57 -07:00
Josh Stone cd2d5f3610 Update to 1.71.1.
Security fix for CVE-2023-38497
2023-08-07 14:57:21 -07:00
Josh Stone 8cfe070190 Relax the suspicious_double_ref_op lint
Enable the profiler runtime for native hosts
2023-07-25 17:53:22 -07:00
Fedora Release Engineering 2f56a4c918 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-21 18:41:30 +00:00
Josh Stone 386b9914c9 Update to 1.71.0. 2023-07-17 09:24:25 -07:00
Josh Stone 356401c7f1 Override default target CPUs to match distro settings 2023-06-23 15:31:28 -07:00
15 changed files with 1043 additions and 277 deletions

6
.gitignore vendored
View File

@ -420,3 +420,9 @@
/wasi-libc-1dfe5c302d1c5ab621f7abf04620fae92700fd22.tar.gz
/rustc-1.70.0-src.tar.xz
/wasi-libc-wasi-sdk-20.tar.gz
/rustc-1.71.0-src.tar.xz
/rustc-1.71.1-src.tar.xz
/rustc-1.72.0-src.tar.xz
/wasi-libc-7018e24d8fe248596819d2e884761676f3542a04.tar.gz
/rustc-1.72.1-src.tar.xz
/wasi-libc-bd950eb128bff337153de217b11270f948d04bb4.tar.gz

View File

@ -0,0 +1,142 @@
From e276ae1cb702fa830be126cccce4bb9e8676f9fb Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Tue, 25 Jul 2023 13:11:50 -0700
Subject: [PATCH] Allow using external builds of the compiler-rt profile lib
This changes the bootstrap config `target.*.profiler` from a plain bool
to also allow a string, which will be used as a path to the pre-built
profiling runtime for that target. Then `profiler_builtins/build.rs`
reads that in a `LLVM_PROFILER_RT_LIB` environment variable.
---
config.example.toml | 6 ++++--
library/profiler_builtins/build.rs | 6 ++++++
src/bootstrap/compile.rs | 4 ++++
src/bootstrap/config.rs | 30 ++++++++++++++++++++++++------
4 files changed, 38 insertions(+), 8 deletions(-)
diff --git a/config.example.toml b/config.example.toml
index 0c65b25fe138..249847013259 100644
--- a/config.example.toml
+++ b/config.example.toml
@@ -752,8 +752,10 @@ changelog-seen = 2
# This option will override the same option under [build] section.
#sanitizers = build.sanitizers (bool)
-# Build the profiler runtime for this target(required when compiling with options that depend
-# on this runtime, such as `-C profile-generate` or `-C instrument-coverage`).
+# When true, build the profiler runtime for this target(required when compiling
+# with options that depend on this runtime, such as `-C profile-generate` or
+# `-C instrument-coverage`). This may also be given a path to an existing build
+# of the profiling runtime library from LLVM's compiler-rt.
# This option will override the same option under [build] section.
#profiler = build.profiler (bool)
diff --git a/library/profiler_builtins/build.rs b/library/profiler_builtins/build.rs
index 1b1f11798d74..d14d0b82229a 100644
--- a/library/profiler_builtins/build.rs
+++ b/library/profiler_builtins/build.rs
@@ -6,6 +6,12 @@
use std::path::Path;
fn main() {
+ println!("cargo:rerun-if-env-changed=LLVM_PROFILER_RT_LIB");
+ if let Ok(rt) = env::var("LLVM_PROFILER_RT_LIB") {
+ println!("cargo:rustc-link-lib=static:+verbatim={rt}");
+ return;
+ }
+
let target = env::var("TARGET").expect("TARGET was not set");
let cfg = &mut cc::Build::new();
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index 14c3ef79a78f..64bdcd1a3b97 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -336,6 +336,10 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
cargo.env("MACOSX_DEPLOYMENT_TARGET", target);
}
+ if let Some(path) = builder.config.profiler_path(target) {
+ cargo.env("LLVM_PROFILER_RT_LIB", path);
+ }
+
// Determine if we're going to compile in optimized C intrinsics to
// the `compiler-builtins` crate. These intrinsics live in LLVM's
// `compiler-rt` repository, but our `src/llvm-project` submodule isn't
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index fe932fd6bd30..45a743082415 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -533,7 +533,7 @@ pub struct Target {
pub linker: Option<PathBuf>,
pub ndk: Option<PathBuf>,
pub sanitizers: Option<bool>,
- pub profiler: Option<bool>,
+ pub profiler: Option<StringOrBool>,
pub rpath: Option<bool>,
pub crt_static: Option<bool>,
pub musl_root: Option<PathBuf>,
@@ -862,9 +862,9 @@ struct Dist {
}
}
-#[derive(Debug, Deserialize)]
+#[derive(Clone, Debug, Deserialize)]
#[serde(untagged)]
-enum StringOrBool {
+pub enum StringOrBool {
String(String),
Bool(bool),
}
@@ -875,6 +875,12 @@ fn default() -> StringOrBool {
}
}
+impl StringOrBool {
+ fn is_string_or_true(&self) -> bool {
+ matches!(self, Self::String(_) | Self::Bool(true))
+ }
+}
+
#[derive(Clone, Debug, Deserialize, PartialEq, Eq)]
#[serde(untagged)]
pub enum RustOptimize {
@@ -991,7 +997,7 @@ struct TomlTarget {
llvm_libunwind: Option<String> = "llvm-libunwind",
android_ndk: Option<String> = "android-ndk",
sanitizers: Option<bool> = "sanitizers",
- profiler: Option<bool> = "profiler",
+ profiler: Option<StringOrBool> = "profiler",
rpath: Option<bool> = "rpath",
crt_static: Option<bool> = "crt-static",
musl_root: Option<String> = "musl-root",
@@ -1864,12 +1870,24 @@ pub fn any_sanitizers_enabled(&self) -> bool {
self.target_config.values().any(|t| t.sanitizers == Some(true)) || self.sanitizers
}
+ pub fn profiler_path(&self, target: TargetSelection) -> Option<&str> {
+ match self.target_config.get(&target)?.profiler.as_ref()? {
+ StringOrBool::String(s) => Some(s),
+ StringOrBool::Bool(_) => None,
+ }
+ }
+
pub fn profiler_enabled(&self, target: TargetSelection) -> bool {
- self.target_config.get(&target).map(|t| t.profiler).flatten().unwrap_or(self.profiler)
+ self.target_config
+ .get(&target)
+ .and_then(|t| t.profiler.as_ref())
+ .map(StringOrBool::is_string_or_true)
+ .unwrap_or(self.profiler)
}
pub fn any_profiler_enabled(&self) -> bool {
- self.target_config.values().any(|t| t.profiler == Some(true)) || self.profiler
+ self.target_config.values().any(|t| matches!(&t.profiler, Some(p) if p.is_string_or_true()))
+ || self.profiler
}
pub fn rpath_enabled(&self, target: TargetSelection) -> bool {
--
2.41.0

View File

@ -0,0 +1,201 @@
From 98336f8f6e701ea99275f32d6e2127a621041994 Mon Sep 17 00:00:00 2001
From: Guillaume Gomez <guillaume.gomez@huawei.com>
Date: Tue, 11 Jul 2023 17:01:35 +0200
Subject: [PATCH] Don't fail early if `try_run` returns an error
---
src/bootstrap/download.rs | 2 +-
src/bootstrap/run.rs | 11 +++++------
src/bootstrap/test.rs | 36 ++++++++++++++++--------------------
3 files changed, 22 insertions(+), 27 deletions(-)
diff --git a/src/bootstrap/download.rs b/src/bootstrap/download.rs
index cb40521dda76..9478ac7d9cea 100644
--- a/src/bootstrap/download.rs
+++ b/src/bootstrap/download.rs
@@ -188,7 +188,7 @@ fn fix_bin_or_dylib(&self, fname: &Path) {
patchelf.args(&["--set-interpreter", dynamic_linker.trim_end()]);
}
- self.try_run(patchelf.arg(fname)).unwrap();
+ let _ = self.try_run(patchelf.arg(fname));
}
fn download_file(&self, url: &str, dest_path: &Path, help_on_error: &str) {
diff --git a/src/bootstrap/run.rs b/src/bootstrap/run.rs
index c97b75927371..70b917000433 100644
--- a/src/bootstrap/run.rs
+++ b/src/bootstrap/run.rs
@@ -27,8 +27,7 @@ fn run(self, builder: &Builder<'_>) {
try_run(
builder,
&mut builder.tool_cmd(Tool::ExpandYamlAnchors).arg("generate").arg(&builder.src),
- )
- .unwrap();
+ );
}
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
@@ -40,17 +39,17 @@ fn make_run(run: RunConfig<'_>) {
}
}
-fn try_run(builder: &Builder<'_>, cmd: &mut Command) -> Result<(), ()> {
+fn try_run(builder: &Builder<'_>, cmd: &mut Command) -> bool {
if !builder.fail_fast {
- if let Err(e) = builder.try_run(cmd) {
+ if builder.try_run(cmd).is_err() {
let mut failures = builder.delayed_failures.borrow_mut();
failures.push(format!("{:?}", cmd));
- return Err(e);
+ return false;
}
} else {
builder.run(cmd);
}
- Ok(())
+ true
}
#[derive(Debug, PartialOrd, Ord, Copy, Clone, Hash, PartialEq, Eq)]
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 0907291b54da..13576aa787b6 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -48,17 +48,17 @@
// build for, so there is no entry for "aarch64-apple-darwin" here.
];
-fn try_run(builder: &Builder<'_>, cmd: &mut Command) -> Result<(), ()> {
+fn try_run(builder: &Builder<'_>, cmd: &mut Command) -> bool {
if !builder.fail_fast {
- if let Err(e) = builder.try_run(cmd) {
+ if builder.try_run(cmd).is_err() {
let mut failures = builder.delayed_failures.borrow_mut();
failures.push(format!("{:?}", cmd));
- return Err(e);
+ return false;
}
} else {
builder.run(cmd);
}
- Ok(())
+ true
}
fn try_run_quiet(builder: &Builder<'_>, cmd: &mut Command) -> bool {
@@ -187,8 +187,7 @@ fn run(self, builder: &Builder<'_>) {
try_run(
builder,
builder.tool_cmd(Tool::Linkchecker).arg(builder.out.join(host.triple).join("doc")),
- )
- .unwrap();
+ );
}
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
@@ -241,8 +240,7 @@ fn run(self, builder: &Builder<'_>) {
builder.default_doc(&[]);
builder.ensure(crate::doc::Rustc::new(builder.top_stage, self.target, builder));
- try_run(builder, builder.tool_cmd(Tool::HtmlChecker).arg(builder.doc_out(self.target)))
- .unwrap();
+ try_run(builder, builder.tool_cmd(Tool::HtmlChecker).arg(builder.doc_out(self.target)));
}
}
@@ -288,8 +286,7 @@ fn run(self, builder: &Builder<'_>) {
.args(builder.config.test_args())
.env("RUSTC", builder.rustc(compiler))
.env("RUSTDOC", builder.rustdoc(compiler)),
- )
- .unwrap();
+ );
}
}
@@ -855,7 +852,7 @@ fn run(self, builder: &Builder<'_>) {
util::lld_flag_no_threads(self.compiler.host.contains("windows")),
);
}
- try_run(builder, &mut cmd).unwrap();
+ try_run(builder, &mut cmd);
}
}
@@ -1106,7 +1103,7 @@ fn run(self, builder: &Builder<'_>) {
}
builder.info("tidy check");
- try_run(builder, &mut cmd).unwrap();
+ try_run(builder, &mut cmd);
builder.ensure(ExpandYamlAnchors);
@@ -1154,8 +1151,7 @@ fn run(self, builder: &Builder<'_>) {
try_run(
builder,
&mut builder.tool_cmd(Tool::ExpandYamlAnchors).arg("check").arg(&builder.src),
- )
- .unwrap();
+ );
}
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
@@ -1948,7 +1944,7 @@ fn run_ext_doc(self, builder: &Builder<'_>) {
compiler.host,
);
let _time = util::timeit(&builder);
- let toolstate = if try_run(builder, &mut rustbook_cmd).is_ok() {
+ let toolstate = if try_run(builder, &mut rustbook_cmd) {
ToolState::TestPass
} else {
ToolState::TestFail
@@ -2106,7 +2102,7 @@ fn markdown_test(builder: &Builder<'_>, compiler: Compiler, markdown: &Path) ->
cmd.arg("--test-args").arg(test_args);
if builder.config.verbose_tests {
- try_run(builder, &mut cmd).is_ok()
+ try_run(builder, &mut cmd)
} else {
try_run_quiet(builder, &mut cmd)
}
@@ -2134,7 +2130,7 @@ fn run(self, builder: &Builder<'_>) {
let src = builder.src.join(relative_path);
let mut rustbook_cmd = builder.tool_cmd(Tool::Rustbook);
- let toolstate = if try_run(builder, rustbook_cmd.arg("linkcheck").arg(&src)).is_ok() {
+ let toolstate = if try_run(builder, rustbook_cmd.arg("linkcheck").arg(&src)) {
ToolState::TestPass
} else {
ToolState::TestFail
@@ -2684,7 +2680,7 @@ fn run(self, builder: &Builder<'_>) {
.current_dir(builder.src.join("src/bootstrap/"));
// NOTE: we intentionally don't pass test_args here because the args for unittest and cargo test are mutually incompatible.
// Use `python -m unittest` manually if you want to pass arguments.
- try_run(builder, &mut check_bootstrap).unwrap();
+ try_run(builder, &mut check_bootstrap);
let host = builder.config.build;
let compiler = builder.compiler(0, host);
@@ -2756,7 +2752,7 @@ fn run(self, builder: &Builder<'_>) {
}
builder.info("platform support check");
- try_run(builder, &mut cargo.into()).unwrap();
+ try_run(builder, &mut cargo.into());
}
}
@@ -2836,7 +2832,7 @@ fn run(self, builder: &Builder<'_>) {
cmd.env("CARGO", &builder.initial_cargo);
cmd.env("RUSTC", &builder.initial_rustc);
cmd.env("TMP_DIR", &tmpdir);
- try_run(builder, &mut cmd).unwrap();
+ try_run(builder, &mut cmd);
}
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
--
2.41.0

View File

@ -0,0 +1,53 @@
From 87caaab3681b95fa633aac48b9794364e18c467d 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
---
compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs | 2 +-
compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs | 2 +-
compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs
index fd896e086b54..08d0c43d20b4 100644
--- a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs
+++ b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs
@@ -2,7 +2,7 @@
pub fn target() -> Target {
let mut base = super::linux_gnu_base::opts();
- base.cpu = "ppc64le".into();
+ base.cpu = option_env!("RUSTC_TARGET_CPU_PPC64LE").unwrap_or("ppc64le").into();
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
base.max_atomic_width = Some(64);
base.stack_probes = StackProbeType::Inline;
diff --git a/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs
index f2c722b9a89d..17a14d10b27e 100644
--- a/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs
+++ b/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs
@@ -5,7 +5,7 @@ pub fn target() -> Target {
let mut base = super::linux_gnu_base::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();
// FIXME: The ABI implementation in cabi_s390x.rs is for now hard-coded to assume the no-vector
// ABI. Pass the -vector feature string to LLVM to respect this assumption. On LLVM < 16, we
// also strip v128 from the data_layout below to match the older LLVM's expectation.
diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs
index 2f970f87cc64..7ee62cd62a5c 100644
--- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs
+++ b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs
@@ -2,7 +2,7 @@
pub fn target() -> Target {
let mut base = super::linux_gnu_base::opts();
- base.cpu = "x86-64".into();
+ base.cpu = option_env!("RUSTC_TARGET_CPU_X86_64").unwrap_or("x86-64").into();
base.plt_by_default = false;
base.max_atomic_width = Some(64);
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
--
2.41.0

View File

@ -0,0 +1,32 @@
From ab9c5148956c2b7d177cc94533370d6a01a8d15f Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Tue, 22 Aug 2023 10:42:12 -0700
Subject: [PATCH] Skip ExpandYamlAnchors when the config is missing
The dist-src tarball does not include `.github/` at all, so we can't
check whether it needs to be regenerated.
(cherry picked from commit 35187c7e6474d346eea3113c4ae34d26d6b18756)
---
src/bootstrap/test.rs | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index eed7a584b603..d41850783c6d 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -1150,6 +1150,11 @@ impl Step for ExpandYamlAnchors {
/// appropriate configuration for all our CI providers. This step ensures the tool was called
/// by the user before committing CI changes.
fn run(self, builder: &Builder<'_>) {
+ // Note: `.github/` is not included in dist-src tarballs
+ if !builder.src.join(".github/workflows/ci.yml").exists() {
+ builder.info("Skipping YAML anchors check: GitHub Actions config not found");
+ return;
+ }
builder.info("Ensuring the YAML anchors in the GitHub Actions config were expanded");
try_run(
builder,
--
2.41.0

View File

@ -1,26 +0,0 @@
From 37cb177eb53145103ae72b67562884782dde01c3 Mon Sep 17 00:00:00 2001
From: Ivan Mironov <mironov.ivan@gmail.com>
Date: Sun, 8 Dec 2019 17:23:08 +0500
Subject: [PATCH] Use lld provided by system for wasm
---
compiler/rustc_target/src/spec/wasm_base.rs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/compiler/rustc_target/src/spec/wasm_base.rs b/compiler/rustc_target/src/spec/wasm_base.rs
index 528a84a8b37c..353d742161d1 100644
--- a/compiler/rustc_target/src/spec/wasm_base.rs
+++ b/compiler/rustc_target/src/spec/wasm_base.rs
@@ -89,8 +89,7 @@ macro_rules! args {
// arguments just yet
limit_rdylib_exports: false,
- // we use the LLD shipped with the Rust toolchain by default
- linker: Some("rust-lld".into()),
+ linker: Some("lld".into()),
linker_flavor: LinkerFlavor::WasmLld(Cc::No),
pre_link_args,
--
2.38.1

View File

@ -0,0 +1,39 @@
diff --git a/compiler/rustc_target/src/spec/wasm_base.rs b/compiler/rustc_target/src/spec/wasm_base.rs
index 341763aadbaf..ee6358e72955 100644
--- a/compiler/rustc_target/src/spec/wasm_base.rs
+++ b/compiler/rustc_target/src/spec/wasm_base.rs
@@ -89,8 +89,7 @@ macro_rules! args {
// arguments just yet
limit_rdylib_exports: false,
- // we use the LLD shipped with the Rust toolchain by default
- linker: Some("rust-lld".into()),
+ linker: Some("lld".into()),
linker_flavor: LinkerFlavor::WasmLld(Cc::No),
pre_link_args,
diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_none.rs b/compiler/rustc_target/src/spec/x86_64_unknown_none.rs
index fe3b24f2d4af..1f1731d202ca 100644
--- a/compiler/rustc_target/src/spec/x86_64_unknown_none.rs
+++ b/compiler/rustc_target/src/spec/x86_64_unknown_none.rs
@@ -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()),
features:
"-mmx,-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-3dnow,-3dnowa,-avx,-avx2,+soft-float"
.into(),
diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs b/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs
index 67664a74710a..53153cd120a3 100644
--- a/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs
+++ b/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs
@@ -12,6 +12,7 @@ pub fn target() -> Target {
base.cpu = "x86-64".into();
base.plt_by_default = false;
base.max_atomic_width = Some(64);
+ 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

View File

@ -0,0 +1,102 @@
From 19c37083cdae94105f6429350dd0b6617e3c2d56 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
---
config.example.toml | 5 +++++
src/bootstrap/compile.rs | 4 ++++
src/bootstrap/config.rs | 8 ++++++++
src/bootstrap/lib.rs | 5 +++++
4 files changed, 22 insertions(+)
diff --git a/config.example.toml b/config.example.toml
index 0c65b25fe138..6a0f1c01c328 100644
--- a/config.example.toml
+++ b/config.example.toml
@@ -789,6 +789,11 @@ changelog-seen = 2
# target triples containing `-none`, `nvptx`, `switch`, or `-uefi`.
#no-std = <platform-specific> (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 = <platform-specific> (bool)
+
# =============================================================================
# Distribution options
#
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index 14c3ef79a78f..7adbf091acbb 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -263,6 +263,10 @@ fn copy_self_contained_objects(
compiler: &Compiler,
target: TargetSelection,
) -> Vec<(PathBuf, DependencyType)> {
+ if builder.self_contained(target) != Some(true) {
+ return vec![];
+ }
+
let libdir_self_contained = builder.sysroot_libdir(*compiler, target).join("self-contained");
t!(fs::create_dir_all(&libdir_self_contained));
let mut target_deps = vec![];
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index fe932fd6bd30..a626badc3e8a 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -541,6 +541,7 @@ pub struct Target {
pub wasi_root: Option<PathBuf>,
pub qemu_rootfs: Option<PathBuf>,
pub no_std: bool,
+ pub self_contained: bool,
}
impl Target {
@@ -553,6 +554,9 @@ pub fn from_triple(triple: &str) -> Self {
{
target.no_std = true;
}
+ if triple.contains("-musl") || triple.contains("-wasi") || triple.contains("-windows-gnu") {
+ target.self_contained = true;
+ }
target
}
}
@@ -999,6 +1003,7 @@ struct TomlTarget {
wasi_root: Option<String> = "wasi-root",
qemu_rootfs: Option<String> = "qemu-rootfs",
no_std: Option<bool> = "no-std",
+ self_contained: Option<bool> = "self-contained",
}
}
@@ -1524,6 +1529,9 @@ fn get_table(option: &str) -> Result<TomlConfig, toml::de::Error> {
if let Some(s) = cfg.no_std {
target.no_std = s;
}
+ if let Some(s) = cfg.self_contained {
+ target.self_contained = s;
+ }
target.cc = cfg.cc.map(PathBuf::from).or_else(|| {
target.ndk.as_ref().map(|ndk| ndk_compiler(Language::C, &triple, ndk))
});
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 0a7aff62257a..9b7c18a3353f 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -1285,6 +1285,11 @@ fn no_std(&self, target: TargetSelection) -> Option<bool> {
self.config.target_config.get(&target).map(|t| t.no_std)
}
+ /// Returns `true` if this is a self-contained `target`, if defined
+ fn self_contained(&self, target: TargetSelection) -> Option<bool> {
+ self.config.target_config.get(&target).map(|t| t.self_contained)
+ }
+
/// Returns `true` if the target will be tested using the `remote-test-client`
/// and `remote-test-server` binaries.
fn remote_tested(&self, target: TargetSelection) -> bool {
--
2.41.0

View File

@ -0,0 +1,33 @@
From 1c6d867d78475fd8c6274e2b64ebb27735b6cabf Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Sat, 26 Aug 2023 11:50:16 -0700
Subject: [PATCH] wasi: round up the size for `aligned_alloc`
C11 `aligned_alloc` requires that the size be a multiple of the
alignment. This is enforced in the wasi-libc emmalloc implementation,
which always returns NULL if the size is not a multiple.
(The default `MALLOC_IMPL=dlmalloc` does not currently check this.)
---
library/std/src/sys/unix/alloc.rs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/library/std/src/sys/unix/alloc.rs b/library/std/src/sys/unix/alloc.rs
index 8604b53983d6..af0089978ecb 100644
--- a/library/std/src/sys/unix/alloc.rs
+++ b/library/std/src/sys/unix/alloc.rs
@@ -86,7 +86,11 @@ unsafe fn aligned_malloc(layout: &Layout) -> *mut u8 {
} else if #[cfg(target_os = "wasi")] {
#[inline]
unsafe fn aligned_malloc(layout: &Layout) -> *mut u8 {
- libc::aligned_alloc(layout.align(), layout.size()) as *mut u8
+ // C11 aligned_alloc requires that the size be a multiple of the alignment.
+ // Layout already checks that the size rounded up doesn't overflow isize::MAX.
+ let align = layout.align();
+ let size = layout.size().next_multiple_of(align);
+ libc::aligned_alloc(align, size) as *mut u8
}
} else {
#[inline]
--
2.41.0

View File

@ -0,0 +1,78 @@
From 3016b2b7052d8b01d50c3a3c6591aeb99d918ca3 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 | 9 +++++++++
compiler/rustc_target/src/spec/mod.rs | 2 ++
compiler/rustc_target/src/spec/wasm32_wasi.rs | 6 +++++-
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
index b603a8787460..40d878b64479 100644
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
@@ -1475,6 +1475,12 @@ fn get_object_file_path(sess: &Session, name: &str, self_contained: bool) -> Pat
return file_path;
}
}
+ if let Some(lib_path) = &sess.target.options.external_lib_path {
+ let file_path = Path::new(lib_path.as_ref()).join(name);
+ if file_path.exists() {
+ return file_path;
+ }
+ }
for search_path in fs.search_paths() {
let file_path = search_path.dir.join(name);
if file_path.exists() {
@@ -1967,6 +1973,9 @@ fn add_library_search_dirs(cmd: &mut dyn Linker, sess: &Session, self_contained:
let lib_path = sess.target_filesearch(PathKind::All).get_self_contained_lib_path();
cmd.include_path(&fix_windows_verbatim_for_gcc(&lib_path));
}
+ if let Some(lib_path) = &sess.target.options.external_lib_path {
+ cmd.include_path(Path::new(lib_path.as_ref()));
+ }
}
/// Add options making relocation sections in the produced ELF files read-only
diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
index 2365dfaf1af8..35f3a686cf67 100644
--- a/compiler/rustc_target/src/spec/mod.rs
+++ b/compiler/rustc_target/src/spec/mod.rs
@@ -1653,6 +1653,7 @@ pub struct TargetOptions {
/// Objects to link before and after all other object code.
pub pre_link_objects: CrtObjects,
pub post_link_objects: CrtObjects,
+ pub external_lib_path: Option<StaticCow<str>>,
/// 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,
@@ -2124,6 +2125,7 @@ fn default() -> TargetOptions {
relro_level: RelroLevel::None,
pre_link_objects: Default::default(),
post_link_objects: Default::default(),
+ external_lib_path: None,
pre_link_objects_self_contained: Default::default(),
post_link_objects_self_contained: Default::default(),
link_self_contained: LinkSelfContainedDefault::False,
diff --git a/compiler/rustc_target/src/spec/wasm32_wasi.rs b/compiler/rustc_target/src/spec/wasm32_wasi.rs
index a0476d542e64..ad7160bf5fcd 100644
--- a/compiler/rustc_target/src/spec/wasm32_wasi.rs
+++ b/compiler/rustc_target/src/spec/wasm32_wasi.rs
@@ -85,7 +85,11 @@ pub fn target() -> Target {
options.post_link_objects_self_contained = crt_objects::post_wasi_self_contained();
// FIXME: Figure out cases in which WASM needs to link with a native toolchain.
- options.link_self_contained = LinkSelfContainedDefault::True;
+ options.link_self_contained = LinkSelfContainedDefault::False;
+
+ options.pre_link_objects = options.pre_link_objects_self_contained.clone();
+ options.post_link_objects = options.post_link_objects_self_contained.clone();
+ options.external_lib_path = Some("/usr/wasm32-wasi/lib/wasm32-wasi".into());
// 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.41.0

461
rust.spec
View File

@ -8,9 +8,9 @@
# To bootstrap from scratch, set the channel and date from src/stage0.json
# e.g. 1.59.0 wants rustc: 1.58.0-2022-01-13
# or nightly wants some beta-YYYY-MM-DD
%global bootstrap_version 1.69.0
%global bootstrap_channel 1.69.0
%global bootstrap_date 2023-04-20
%global bootstrap_version 1.71.0
%global bootstrap_channel 1.71.0
%global bootstrap_date 2023-07-13
# Only the specified arches will use bootstrap binaries.
# NOTE: Those binaries used to be uploaded with every new release, but that was
@ -29,16 +29,29 @@
%if 0%{?fedora} || 0%{?rhel} >= 8
%global wasm_targets wasm32-unknown-unknown wasm32-wasi
%endif
%if 0%{?fedora} || 0%{?rhel} >= 10
%global extra_targets x86_64-unknown-none x86_64-unknown-uefi
%endif
%endif
%global all_targets %{?mingw_targets} %{?wasm_targets} %{?extra_targets}
%define target_enabled() %{lua:
print(string.find(rpm.expand(" %{all_targets} "), rpm.expand(" %1 "), 1, true) or 0)
}
# 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
# (updated per https://github.com/rust-lang/rust/pull/96907)
%global wasi_libc_url https://github.com/WebAssembly/wasi-libc
%global wasi_libc_ref wasi-sdk-20
#global wasi_libc_ref wasi-sdk-20
%global wasi_libc_ref bd950eb128bff337153de217b11270f948d04bb4
%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}
%if 0%{?fedora}
%bcond_with bundled_wasi_libc
%else
%bcond_without bundled_wasi_libc
%endif
# Using llvm-static may be helpful as an opt-in, e.g. to aid LLVM rebases.
%bcond_with llvm_static
@ -46,14 +59,14 @@
# We can also choose to just use Rust's bundled LLVM, in case the system LLVM
# is insufficient. Rust currently requires LLVM 14.0+.
%global min_llvm_version 14.0.0
%global bundled_llvm_version 16.0.2
%global bundled_llvm_version 16.0.5
%bcond_with bundled_llvm
# Requires stable libgit2 1.6, and not the next minor soname change.
# This needs to be consistent with the bindings in vendor/libgit2-sys.
%global min_libgit2_version 1.6.0
%global min_libgit2_version 1.6.4
%global next_libgit2_version 1.7.0~
%global bundled_libgit2_version 1.6.3
%global bundled_libgit2_version 1.6.4
%if 0%{?fedora} >= 38
%bcond_with bundled_libgit2
%else
@ -76,17 +89,21 @@
%endif
# LLDB isn't available everywhere...
%ifnarch riscv64
%if 0%{?rhel} && 0%{?rhel} < 8
%bcond_with lldb
%else
%bcond_without lldb
%endif
%else
%bcond_with lldb
%endif
Name: rust
Version: 1.70.0
Release: 1%{?dist}
Version: 1.72.1
Release: 3.0.riscv64%{?dist}
Summary: The Rust Programming Language
License: (ASL 2.0 or MIT) and (BSD and MIT)
License: (Apache-2.0 OR MIT) AND (Artistic-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unicode-DFS-2016)
# ^ written as: (rust itself) and (bundled libraries)
URL: https://www.rust-lang.org
ExclusiveArch: %{rust_arches}
@ -100,23 +117,49 @@ Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
Source1: %{wasi_libc_source}
# Sources for bootstrap_arches are inserted by lua below
# By default, rust tries to use "rust-lld" as a linker for WebAssembly.
Patch1: 0001-Use-lld-provided-by-system-for-wasm.patch
# By default, rust tries to use "rust-lld" as a linker for some targets.
Patch1: 0001-Use-lld-provided-by-system.patch
# Set a substitute-path in rust-gdb for standard library sources.
Patch2: rustc-1.70.0-rust-gdb-substitute-path.patch
# Override default target CPUs to match distro settings
# TODO: upstream this ability into the actual build configuration
Patch3: 0001-Let-environment-variables-override-some-default-CPUs.patch
# Override the default self-contained system libraries
# TODO: the first can probably be upstreamed, but the second is hard-coded,
# and we're only applying that if not with bundled_wasi_libc.
Patch4: 0001-bootstrap-allow-disabling-target-self-contained.patch
Patch5: 0002-set-an-external-library-path-for-wasm32-wasi.patch
# Enable the profiler runtime for native hosts
# https://github.com/rust-lang/rust/pull/114069
Patch6: 0001-Allow-using-external-builds-of-the-compiler-rt-profi.patch
# Fix --no-fail-fast
# https://github.com/rust-lang/rust/pull/113214
Patch7: 0001-Don-t-fail-early-if-try_run-returns-an-error.patch
# The dist-src tarball doesn't include .github/
# https://github.com/rust-lang/rust/pull/115109
Patch8: 0001-Skip-ExpandYamlAnchors-when-the-config-is-missing.patch
# wasi: round up the size for aligned_alloc
# https://github.com/rust-lang/rust/pull/115254
Patch9: 0001-wasi-round-up-the-size-for-aligned_alloc.patch
### RHEL-specific patches below ###
# Simple rpm macros for rust-toolset (as opposed to full rust-packaging)
Source100: macros.rust-toolset
# Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949)
Patch100: rustc-1.70.0-disable-libssh2.patch
Patch100: rustc-1.72.0-disable-libssh2.patch
# libcurl on RHEL7 doesn't have http2, but since cargo requests it, curl-sys
# will try to build it statically -- instead we turn off the feature.
Patch101: rustc-1.70.0-disable-http2.patch
Patch101: rustc-1.72.0-disable-http2.patch
# Get the Rust triple for any arch.
%{lua: function rust_triple(arch)
@ -134,14 +177,12 @@ Patch101: rustc-1.70.0-disable-http2.patch
return arch.."-unknown-linux-"..abi
end}
# Get the environment form of a Rust triple
%{lua: function rust_triple_env(triple)
local sub = string.gsub(triple, "-", "_")
return string.upper(sub)
end}
%global rust_triple %{lua: print(rust_triple(rpm.expand("%{_target_cpu}")))}
%global rust_triple_env %{lua: print(rust_triple_env(rpm.expand("%{rust_triple}")))}
# Get the environment form of the Rust triple
%global rust_triple_env %{lua:
print(string.upper(string.gsub(rpm.expand("%{rust_triple}"), "-", "_")))
}
%if %defined bootstrap_arches
# For each bootstrap arch, add an additional binary Source.
@ -219,6 +260,10 @@ BuildRequires: cmake >= 2.8.11
%if 0%{?epel} == 7
%global llvm llvm14
%endif
# not ready for llvm-17 yet...
%if 0%{?fedora} >= 39 || 0%{?rhel} >= 10
%global llvm llvm16
%endif
%if %defined llvm
%global llvm_root %{_libdir}/%{llvm}
%else
@ -310,7 +355,11 @@ BuildRequires: mingw64-winpthreads-static
%endif
%if %defined wasm_targets
%if %with bundled_wasi_libc
BuildRequires: clang
%else
BuildRequires: wasi-libc-static
%endif
BuildRequires: lld
# brp-strip-static-archive breaks the archive index for wasm
%global __os_install_post \
@ -319,6 +368,11 @@ find '%{buildroot}%{rustlibdir}'/wasm*/lib -type f -regex '.*\\.\\(a\\|rlib\\)'
%{nil}
%endif
%if 0%{?fedora} || 0%{?rhel} >= 8
# For profiler_builtins
BuildRequires: compiler-rt
%endif
# This component was removed as of Rust 1.69.0.
# https://github.com/rust-lang/rust/pull/101841
Obsoletes: %{name}-analysis < 1.69.0~
@ -340,65 +394,67 @@ Requires: glibc-devel%{?_isa} >= 2.17
This package includes the standard libraries for building applications
written in Rust.
%if %defined mingw_targets
%{lua: do
for triple in string.gmatch(rpm.expand("%{mingw_targets}"), "%S+") do
local subs = {
triple = triple,
name = rpm.expand("%{name}"),
verrel = rpm.expand("%{version}-%{release}"),
mingw = string.sub(triple, 1, 4) == "i686" and "mingw32" or "mingw64",
}
local s = string.gsub([[
%global target_package() \
%package std-static-%1 \
Summary: Standard library for Rust %1 \
Requires: %{name} = %{version}-%{release}
%package std-static-{{triple}}
Summary: Standard library for Rust {{triple}}
%global target_description() \
%description std-static-%1 \
This package includes the standard libraries for building applications \
written in Rust for the %2 target %1.
%if %target_enabled i686-pc-windows-gnu
%target_package i686-pc-windows-gnu
Requires: mingw32-crt
Requires: mingw32-gcc
Requires: mingw32-winpthreads-static
Provides: mingw32-rust = %{version}-%{release}
Provides: mingw32-rustc = %{version}-%{release}
BuildArch: noarch
Provides: {{mingw}}-rust = {{verrel}}
Provides: {{mingw}}-rustc = {{verrel}}
Requires: {{mingw}}-crt
Requires: {{mingw}}-gcc
Requires: {{mingw}}-winpthreads-static
Requires: {{name}} = {{verrel}}
%description std-static-{{triple}}
This package includes the standard libraries for building applications
written in Rust for the MinGW target {{triple}}.
]], "{{(%w+)}}", subs)
print(s)
end
end}
%target_description i686-pc-windows-gnu MinGW
%endif
%if %defined wasm_targets
%{lua: do
for triple in string.gmatch(rpm.expand("%{wasm_targets}"), "%S+") do
local subs = {
triple = triple,
name = rpm.expand("%{name}"),
verrel = rpm.expand("%{version}-%{release}"),
wasi = string.find(triple, "-wasi") and 1 or 0,
}
local s = string.gsub([[
%package std-static-{{triple}}
Summary: Standard library for Rust {{triple}}
%if %target_enabled x86_64-pc-windows-gnu
%target_package x86_64-pc-windows-gnu
Requires: mingw64-crt
Requires: mingw64-gcc
Requires: mingw64-winpthreads-static
Provides: mingw64-rust = %{version}-%{release}
Provides: mingw64-rustc = %{version}-%{release}
BuildArch: noarch
Requires: {{name}} = {{verrel}}
%target_description x86_64-pc-windows-gnu MinGW
%endif
%if %target_enabled wasm32-unknown-unknown
%target_package wasm32-unknown-unknown
Requires: lld >= 8.0
%if {{wasi}}
Provides: bundled(wasi-libc)
BuildArch: noarch
%target_description wasm32-unknown-unknown WebAssembly
%endif
%description std-static-{{triple}}
This package includes the standard libraries for building applications
written in Rust for the WebAssembly target {{triple}}.
%if %target_enabled wasm32-wasi
%target_package wasm32-wasi
Requires: lld >= 8.0
%if %with bundled_wasi_libc
Provides: bundled(wasi-libc)
%else
Requires: wasi-libc-static
%endif
BuildArch: noarch
%target_description wasm32-wasi WebAssembly
%endif
]], "{{(%w+)}}", subs)
print(s)
end
end}
%if %target_enabled x86_64-unknown-none
%target_package x86_64-unknown-none
Requires: lld
%target_description x86_64-unknown-none embedded
%endif
%if %target_enabled x86_64-unknown-uefi
%target_package x86_64-unknown-uefi
Requires: lld
%target_description x86_64-unknown-uefi embedded
%endif
@ -479,6 +535,9 @@ and ensure that you'll always get a repeatable build.
Summary: Tool to find and fix Rust formatting issues
Requires: cargo
# /usr/bin/rustfmt is dynamically linked against internal rustc libs
Requires: %{name}%{?_isa} = %{version}-%{release}
# The component/package was rustfmt-preview until Rust 1.31.
Obsoletes: rustfmt-preview < 1.0.0
Provides: rustfmt-preview = %{version}-%{release}
@ -566,14 +625,24 @@ test -f '%{local_rust_root}/bin/cargo'
test -f '%{local_rust_root}/bin/rustc'
%endif
%if %defined wasm_targets
%if %{defined wasm_targets} && %{with bundled_wasi_libc}
%setup -q -n %{wasi_libc_name} -T -b 1
rm -rf %{wasi_libc_dir}/dlmalloc/
%endif
%setup -q -n %{rustc_package}
%patch -P1 -p1
%patch -P2 -p1
%patch -P3 -p1
%patch -P4 -p1
%if %without bundled_wasi_libc
%patch -P5 -p1
%endif
%patch -P6 -p1
%patch -P7 -p1
%patch -P8 -p1
%patch -P9 -p1
%if %with disabled_libssh2
%patch -P100 -p1
@ -646,24 +715,20 @@ find -name '*.rs' -type f -perm /111 -exec chmod -v -x '{}' '+'
%endif
# These are similar to __cflags_arch_* in /usr/lib/rpm/redhat/macros
%if 0%{?fedora} || 0%{?rhel} >= 9
%ifarch x86_64
%global rust_target_cpu %[0%{?rhel} >= 10 ? "x86-64-v3" : ""]
%global rust_target_cpu %[0%{?rhel} == 9 ? "x86-64-v2" : "%{rust_target_cpu}"]
%endif
%ifarch s390x
%global rust_target_cpu %[0%{?rhel} >= 9 ? "z14" : "zEC12"]
%endif
%ifarch ppc64le
%global rust_target_cpu %[0%{?rhel} >= 9 ? "pwr9" : "pwr8"]
%endif
%endif
%global rustc_target_cpus %{lua: do
local fedora = tonumber(rpm.expand("0%{?fedora}"))
local rhel = tonumber(rpm.expand("0%{?rhel}"))
local env =
" RUSTC_TARGET_CPU_X86_64=x86-64" .. ((rhel >= 10) and "-v3" or (rhel == 9) and "-v2" or "")
.. " RUSTC_TARGET_CPU_PPC64LE=" .. ((rhel >= 9) and "pwr9" or "pwr8")
.. " RUSTC_TARGET_CPU_S390X=" ..
((rhel >= 9) and "z14" or (rhel == 8 or fedora >= 38) and "z13" or
(fedora >= 26) and "zEC12" or (rhel == 7) and "z196" or "z10")
print(env)
end}
# Set up shared environment variables for build/install/check
%global rust_env %{?rustflags:RUSTFLAGS="%{rustflags}"}
%if "%{?rust_target_cpu}" != ""
%global rust_env %{?rust_env} CARGO_TARGET_%{rust_triple_env}_RUSTFLAGS=-Ctarget-cpu=%{rust_target_cpu}
%endif
%global rust_env %{?rustflags:RUSTFLAGS="%{rustflags}"} %{rustc_target_cpus}
%if %defined cmake_path
%global rust_env %{?rust_env} PATH="%{cmake_path}:$PATH"
%endif
@ -676,7 +741,7 @@ find -name '*.rs' -type f -perm /111 -exec chmod -v -x '{}' '+'
%build
%{export_rust_env}
%ifarch %{arm} %{ix86}
%ifarch %{arm} %{ix86} riscv64
# full debuginfo is exhausting memory; just do libstd for now
# https://github.com/rust-lang/rust/issues/45854
%if 0%{?rhel} && 0%{?rhel} < 8
@ -699,38 +764,41 @@ if [ "$max_cpus" -ge 1 -a "$max_cpus" -lt "$ncpus" ]; then
fi
%if %defined mingw_targets
%{lua: do
local cfg = ""
for triple in string.gmatch(rpm.expand("%{mingw_targets}"), "%S+") do
local subs = {
triple = triple,
mingw = string.sub(triple, 1, 4) == "i686" and "mingw32" or "mingw64",
}
local s = string.gsub([[
--set target.{{triple}}.linker=%{{{mingw}}_cc}
--set target.{{triple}}.cc=%{{{mingw}}_cc}
--set target.{{triple}}.ar=%{{{mingw}}_ar}
--set target.{{triple}}.ranlib=%{{{mingw}}_ranlib}
]], "{{(%w+)}}", subs)
cfg = cfg .. " " .. s
end
cfg = string.gsub(cfg, "%s+", " ")
rpm.define("mingw_target_config " .. cfg)
end}
%define mingw_target_config %{shrink:
--set target.i686-pc-windows-gnu.linker=%{mingw32_cc}
--set target.i686-pc-windows-gnu.cc=%{mingw32_cc}
--set target.i686-pc-windows-gnu.ar=%{mingw32_ar}
--set target.i686-pc-windows-gnu.ranlib=%{mingw32_ranlib}
--set target.i686-pc-windows-gnu.self-contained=false
--set target.x86_64-pc-windows-gnu.linker=%{mingw64_cc}
--set target.x86_64-pc-windows-gnu.cc=%{mingw64_cc}
--set target.x86_64-pc-windows-gnu.ar=%{mingw64_ar}
--set target.x86_64-pc-windows-gnu.ranlib=%{mingw64_ranlib}
--set target.x86_64-pc-windows-gnu.self-contained=false
}
%endif
%if %defined wasm_targets
%make_build --quiet -C %{wasi_libc_dir} CC=clang AR=llvm-ar NM=llvm-nm
%{lua: do
local wasi_root = rpm.expand("%{wasi_libc_dir}") .. "/sysroot"
local cfg = ""
for triple in string.gmatch(rpm.expand("%{wasm_targets}"), "%S+") do
if string.find(triple, "-wasi") then
cfg = cfg .. " --set target." .. triple .. ".wasi-root=" .. wasi_root
end
end
rpm.define("wasm_target_config "..cfg)
end}
%if %with bundled_wasi_libc
%make_build --quiet -C %{wasi_libc_dir} MALLOC_IMPL=emmalloc CC=clang AR=llvm-ar NM=llvm-nm
%define wasm_target_config --set target.wasm32-wasi.wasi-root=%{wasi_libc_dir}/sysroot
%else
%define wasm_target_config %{shrink:
--set target.wasm32-wasi.wasi-root=%{_prefix}/wasm32-wasi
--set target.wasm32-wasi.self-contained=false
}
%endif
%endif
%if 0%{?fedora} || 0%{?rhel} >= 8
# Find the compiler-rt library for the Rust profiler_builtins crate.
%if 0%{?clang_major_version} >= 17
PROFILER='%{clang_resource_dir}/lib/%{_arch}-redhat-linux-gnu/libclang_rt.profile.a'
%else
# The exact profiler path is version dependent..
PROFILER=$(echo %{_libdir}/clang/*/lib/libclang_rt.profile-%{_arch}.a)
%endif
test -r "$PROFILER"
%endif
%configure --disable-option-checking \
@ -741,6 +809,7 @@ end}
--set target.%{rust_triple}.cxx=%{__cxx} \
--set target.%{rust_triple}.ar=%{__ar} \
--set target.%{rust_triple}.ranlib=%{__ranlib} \
${PROFILER:+--set target.%{rust_triple}.profiler="$PROFILER"} \
%{?mingw_target_config} \
%{?wasm_target_config} \
--python=%{__python3} \
@ -768,7 +837,7 @@ end}
%{__python3} ./x.py build -j "$ncpus"
%{__python3} ./x.py doc
for triple in %{?mingw_targets} %{?wasm_targets}; do
for triple in %{?all_targets} ; do
%{__python3} ./x.py build --target=$triple std
done
@ -780,7 +849,7 @@ done
DESTDIR=%{buildroot} %{__python3} ./x.py install
for triple in %{?mingw_targets} %{?wasm_targets}; do
for triple in %{?all_targets} ; do
DESTDIR=%{buildroot} %{__python3} ./x.py install --target=$triple std
done
@ -790,6 +859,9 @@ done
# These are transient files used by x.py dist and install
rm -rf ./build/dist/ ./build/tmp/
# Some of the components duplicate-install binaries, leaving backups we don't want
rm -f %{buildroot}%{_bindir}/*.old
# Make sure the shared libraries are in the proper libdir
%if "%{_libdir}" != "%{common_libdir}"
mkdir -p %{buildroot}%{_libdir}
@ -870,20 +942,30 @@ rm -f %{buildroot}%{rustlibdir}/%{rust_triple}/bin/rust-ll*
# Sanity-check the installed binaries, debuginfo-stripped and all.
%{buildroot}%{_bindir}/cargo new build/hello-world
env RUSTC=%{buildroot}%{_bindir}/rustc \
LD_LIBRARY_PATH="%{buildroot}%{_libdir}:$LD_LIBRARY_PATH" \
%{buildroot}%{_bindir}/cargo run --manifest-path build/hello-world/Cargo.toml
(
cd build/hello-world
export RUSTC=%{buildroot}%{_bindir}/rustc \
LD_LIBRARY_PATH="%{buildroot}%{_libdir}:$LD_LIBRARY_PATH"
%{buildroot}%{_bindir}/cargo run --verbose
# Try a build sanity-check for other targets
for triple in %{?mingw_targets} %{?wasm_targets}; do
env RUSTC=%{buildroot}%{_bindir}/rustc \
LD_LIBRARY_PATH="%{buildroot}%{_libdir}:$LD_LIBRARY_PATH" \
%{buildroot}%{_bindir}/cargo build --manifest-path build/hello-world/Cargo.toml --target=$triple
done
%if 0%{?fedora} || 0%{?rhel} >= 8
# Sanity-check that code-coverage builds and runs
env RUSTFLAGS="-Cinstrument-coverage" %{buildroot}%{_bindir}/cargo run --verbose
test -r default_*.profraw
%endif
# Try a build sanity-check for other std-enabled targets
for triple in %{?mingw_targets} %{?wasm_targets}; do
%{buildroot}%{_bindir}/cargo build --verbose --target=$triple
done
)
# The results are not stable on koji, so mask errors and just log it.
# Some of the larger test artifacts are manually cleaned to save space.
%{__python3} ./x.py test --no-fail-fast || :
# Bootstrap is excluded because it's not something we ship, and a lot of its
# tests are geared toward the upstream CI environment.
%{__python3} ./x.py test --no-fail-fast --exclude src/bootstrap || :
rm -rf "./build/%{rust_triple}/test/"
%{__python3} ./x.py test --no-fail-fast cargo || :
@ -920,58 +1002,46 @@ rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/"
%dir %{rustlibdir}/%{rust_triple}/lib
%{rustlibdir}/%{rust_triple}/lib/*.rlib
%global target_files() \
%files std-static-%1 \
%dir %{rustlibdir} \
%dir %{rustlibdir}/%1 \
%dir %{rustlibdir}/%1/lib \
%{rustlibdir}/%1/lib/*.rlib
%if %defined mingw_targets
%{lua: do
for triple in string.gmatch(rpm.expand("%{mingw_targets}"), "%S+") do
local subs = {
triple = triple,
rustlibdir = rpm.expand("%{rustlibdir}"),
}
local s = string.gsub([[
%files std-static-{{triple}}
%dir {{rustlibdir}}
%dir {{rustlibdir}}/{{triple}}
%dir {{rustlibdir}}/{{triple}}/lib
{{rustlibdir}}/{{triple}}/lib/*.rlib
{{rustlibdir}}/{{triple}}/lib/rs*.o
%exclude {{rustlibdir}}/{{triple}}/lib/*.dll
%exclude {{rustlibdir}}/{{triple}}/lib/*.dll.a
%exclude {{rustlibdir}}/{{triple}}/lib/self-contained
]], "{{(%w+)}}", subs)
print(s)
end
end}
%if %target_enabled i686-pc-windows-gnu
%target_files i686-pc-windows-gnu
%{rustlibdir}/i686-pc-windows-gnu/lib/rs*.o
%exclude %{rustlibdir}/i686-pc-windows-gnu/lib/*.dll
%exclude %{rustlibdir}/i686-pc-windows-gnu/lib/*.dll.a
%endif
%if %defined wasm_targets
%{lua: do
for triple in string.gmatch(rpm.expand("%{wasm_targets}"), "%S+") do
local subs = {
triple = triple,
rustlibdir = rpm.expand("%{rustlibdir}"),
wasi = string.find(triple, "-wasi") and 1 or 0,
}
local s = string.gsub([[
%files std-static-{{triple}}
%dir {{rustlibdir}}
%dir {{rustlibdir}}/{{triple}}
%dir {{rustlibdir}}/{{triple}}/lib
{{rustlibdir}}/{{triple}}/lib/*.rlib
%if {{wasi}}
%dir {{rustlibdir}}/{{triple}}/lib/self-contained
{{rustlibdir}}/{{triple}}/lib/self-contained/crt*.o
{{rustlibdir}}/{{triple}}/lib/self-contained/libc.a
%if %target_enabled x86_64-pc-windows-gnu
%target_files x86_64-pc-windows-gnu
%{rustlibdir}/x86_64-pc-windows-gnu/lib/rs*.o
%exclude %{rustlibdir}/x86_64-pc-windows-gnu/lib/*.dll
%exclude %{rustlibdir}/x86_64-pc-windows-gnu/lib/*.dll.a
%endif
]], "{{(%w+)}}", subs)
print(s)
end
end}
%if %target_enabled wasm32-unknown-unknown
%target_files wasm32-unknown-unknown
%endif
%if %target_enabled wasm32-wasi
%target_files wasm32-wasi
%if %with bundled_wasi_libc
%dir %{rustlibdir}/wasm32-wasi/lib/self-contained
%{rustlibdir}/wasm32-wasi/lib/self-contained/crt*.o
%{rustlibdir}/wasm32-wasi/lib/self-contained/libc.a
%endif
%endif
%if %target_enabled x86_64-unknown-none
%target_files x86_64-unknown-none
%endif
%if %target_enabled x86_64-unknown-uefi
%target_files x86_64-unknown-uefi
%endif
@ -1049,6 +1119,43 @@ end}
%changelog
* Wed Nov 08 2023 David Abdurachmanov <davidlt@rivosinc.com> - 1.72.1-3.0.riscv64
- Enable riscv64
* Fri Sep 29 2023 Josh Stone <jistone@redhat.com> - 1.72.1-3
- Fix the profiler runtime with compiler-rt-17
- Switch to unbundled wasi-libc on Fedora
- Use emmalloc instead of CC0 dlmalloc when bundling wasi-libc
* Mon Sep 25 2023 Josh Stone <jistone@redhat.com> - 1.72.1-2
- Fix LLVM dependency for ELN
- Add build target for x86_64-unknown-none
- Add build target for x86_64-unknown-uefi
* Tue Sep 19 2023 Josh Stone <jistone@redhat.com> - 1.72.1-1
- Update to 1.72.1.
- Migrated to SPDX license
* Thu Aug 24 2023 Josh Stone <jistone@redhat.com> - 1.72.0-1
- Update to 1.72.0.
* Mon Aug 07 2023 Josh Stone <jistone@redhat.com> - 1.71.1-1
- Update to 1.71.1.
- Security fix for CVE-2023-38497
* Tue Jul 25 2023 Josh Stone <jistone@redhat.com> - 1.71.0-3
- Relax the suspicious_double_ref_op lint
- Enable the profiler runtime for native hosts
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.71.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Mon Jul 17 2023 Josh Stone <jistone@redhat.com> - 1.71.0-1
- Update to 1.71.0.
* Fri Jun 23 2023 Josh Stone <jistone@redhat.com> - 1.70.0-2
- Override default target CPUs to match distro settings
* Thu Jun 01 2023 Josh Stone <jistone@redhat.com> - 1.70.0-1
- Update to 1.70.0.

View File

@ -1,43 +0,0 @@
--- rustc-beta-src/Cargo.lock.orig 2023-05-19 19:02:31.000000000 -0700
+++ rustc-beta-src/Cargo.lock 2023-05-24 16:36:33.312232441 -0700
@@ -2967,7 +2967,6 @@
dependencies = [
"cc",
"libc",
- "libssh2-sys",
"libz-sys",
"openssl-sys",
"pkg-config",
@@ -3000,20 +2999,6 @@
]
[[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"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
--- rustc-beta-src/vendor/git2/Cargo.toml.orig 2023-05-19 21:16:57.000000000 -0700
+++ rustc-beta-src/vendor/git2/Cargo.toml 2023-05-24 16:33:42.043813439 -0700
@@ -55,9 +55,7 @@
[features]
default = [
- "ssh",
"https",
- "ssh_key_from_memory",
]
https = [
"libgit2-sys/https",

View File

@ -1,6 +1,6 @@
--- rustc-beta-src/Cargo.lock.orig 2023-05-24 16:49:05.242510531 -0700
+++ rustc-beta-src/Cargo.lock 2023-05-24 16:51:11.741865603 -0700
@@ -1197,7 +1197,6 @@ checksum = "14d05c10f541ae6f3bc5b3d923c2
--- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2023-08-21 11:00:15.341608892 -0700
+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2023-08-21 11:00:46.074984901 -0700
@@ -743,7 +743,6 @@
dependencies = [
"cc",
"libc",
@ -8,14 +8,14 @@
"libz-sys",
"openssl-sys",
"pkg-config",
@@ -2989,16 +2988,6 @@ source = "registry+https://github.com/ru
checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a"
@@ -2011,16 +2010,6 @@
checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4"
[[package]]
-name = "libnghttp2-sys"
-version = "0.1.4+1.41.0"
-version = "0.1.7+1.45.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03624ec6df166e79e139a2310ca213283d6b3c30810c54844f307086d4488df1"
-checksum = "57ed28aba195b38d5ff02b9170cbff627e336a20925e43b4945390401c5dc93f"
-dependencies = [
- "cc",
- "libc",
@ -23,22 +23,22 @@
-
-[[package]]
name = "libz-sys"
version = "1.1.3"
version = "1.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2023-05-24 16:49:05.244510489 -0700
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-05-24 16:51:04.683013189 -0700
@@ -23,7 +23,7 @@ cargo-platform = { path = "crates/cargo-
cargo-util = { path = "crates/cargo-util", version = "0.2.4" }
clap = "4.2.0"
crates-io = { path = "crates/crates-io", version = "0.36.0" }
-curl = { version = "0.4.44", features = ["http2"] }
+curl = { version = "0.4.44", features = [] }
curl-sys = "0.4.61"
env_logger = "0.10.0"
filetime = "0.2.9"
--- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig 2023-05-19 19:05:42.000000000 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2023-05-24 16:49:05.244510489 -0700
@@ -407,16 +407,9 @@ impl<'cfg> PackageSet<'cfg> {
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2023-08-21 11:00:15.341608892 -0700
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-08-21 11:00:15.342608871 -0700
@@ -118,7 +118,7 @@
cargo-util.workspace = true
clap = { workspace = true, features = ["wrap_help"] }
crates-io.workspace = true
-curl = { workspace = true, features = ["http2"] }
+curl = { workspace = true, features = [] }
curl-sys.workspace = true
env_logger.workspace = true
filetime.workspace = true
--- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig 2023-08-17 20:58:39.000000000 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2023-08-21 11:00:15.343608851 -0700
@@ -408,16 +408,9 @@
sources: SourceMap<'cfg>,
config: &'cfg Config,
) -> CargoResult<PackageSet<'cfg>> {
@ -58,9 +58,9 @@
Ok(PackageSet {
packages: package_ids
--- rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs.orig 2023-05-24 16:49:05.245510468 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs 2023-05-24 16:51:57.916900146 -0700
@@ -229,16 +229,8 @@ impl<'cfg> HttpRegistry<'cfg> {
--- rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs.orig 2023-08-17 20:58:39.000000000 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs 2023-08-21 11:00:15.343608851 -0700
@@ -250,16 +250,8 @@
}
self.fetch_started = true;
@ -79,14 +79,14 @@
if !self.quiet {
self.config
--- rustc-beta-src/src/tools/cargo/src/cargo/util/network/mod.rs.orig 2023-05-19 19:05:42.000000000 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/util/network/mod.rs 2023-05-24 16:49:05.245510468 -0700
@@ -25,7 +25,7 @@ impl<T> PollExt<T> for Poll<T> {
--- rustc-beta-src/src/tools/cargo/src/cargo/util/network/mod.rs.orig 2023-08-21 11:00:15.343608851 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/util/network/mod.rs 2023-08-21 11:02:01.969443986 -0700
@@ -27,7 +27,7 @@
macro_rules! try_old_curl {
($e:expr, $msg:expr) => {
let result = $e;
- if cfg!(target_os = "macos") {
+ if cfg!(any(target_os = "linux", target_os = "macos")) {
if let Err(e) = result {
warn!("ignoring libcurl {} error: {}", $msg, e);
::log::warn!("ignoring libcurl {} error: {}", $msg, e);
}

View File

@ -0,0 +1,42 @@
--- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2023-08-17 20:58:39.000000000 -0700
+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2023-08-21 10:52:50.520622927 -0700
@@ -1999,7 +1999,6 @@
dependencies = [
"cc",
"libc",
- "libssh2-sys",
"libz-sys",
"openssl-sys",
"pkg-config",
@@ -2022,20 +2021,6 @@
]
[[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"
version = "1.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2023-08-21 10:49:34.852578202 -0700
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-08-21 10:52:11.858404449 -0700
@@ -31,7 +31,7 @@
filetime = "0.2.9"
flate2 = { version = "1.0.3", default-features = false, features = ["zlib"] }
fwdansi = "1.1.0"
-git2 = "0.17.1"
+git2 = { version = "0.17.1", default-features = false, features = ["https"] }
git2-curl = "0.18.0"
gix = { version = "0.45.1", default-features = false, features = ["blocking-http-transport-curl", "progress-tree"] }
gix-features-for-configuration-only = { version = "0.30.0", package = "gix-features", features = [ "parallel" ] }

View File

@ -1,2 +1,2 @@
SHA512 (rustc-1.70.0-src.tar.xz) = 21b35185fdcc35a059ee5ef6dca2b68f5f1d199e97f425a571cfc318a852c36a57bccf68e7673b4cb7cd83128f30d0b3eb93009a978f3ba3909b7eee50d40631
SHA512 (wasi-libc-wasi-sdk-20.tar.gz) = e264240dc7dbcf6398c8ca09bc108298f4a8aa955af22de5a3015fbcde81cb09dd83cd48349090082d5de0e8a3dbcf746c7b14657c67657b3f2f1ab28bb9cf05
SHA512 (rustc-1.72.1-src.tar.xz) = 08232b5bf36f82a995d67f3d03d5e35b7d8914d31fb4491d4c37b72a830bc438e9d18d9e138d398b1b6ae4aa09f7f8e1e9b68da6273ab74bdae4c6123586a21b
SHA512 (wasi-libc-bd950eb128bff337153de217b11270f948d04bb4.tar.gz) = 01e5cc3ebdab239f57816ff80f939fd87a5491a28951daf74b3310b118b4820c098ac9417771c9c6af55ca91d2cabe6498975ab9db4914aba754d87067cd1066