diff --git a/.gitignore b/.gitignore index 96a2d76..12a050d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,6 @@ SOURCES/wasi-libc-wasi-sdk-17.tar.gz /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 diff --git a/0001-Allow-using-external-builds-of-the-compiler-rt-profi.patch b/0001-Allow-using-external-builds-of-the-compiler-rt-profi.patch index 2b1ecb5..01f7847 100644 --- a/0001-Allow-using-external-builds-of-the-compiler-rt-profi.patch +++ b/0001-Allow-using-external-builds-of-the-compiler-rt-profi.patch @@ -1,4 +1,4 @@ -From f2fd2d01f96b50b039402c9ab4278230687f7922 Mon Sep 17 00:00:00 2001 +From e276ae1cb702fa830be126cccce4bb9e8676f9fb Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 25 Jul 2023 13:11:50 -0700 Subject: [PATCH] Allow using external builds of the compiler-rt profile lib @@ -15,10 +15,10 @@ reads that in a `LLVM_PROFILER_RT_LIB` environment variable. 4 files changed, 38 insertions(+), 8 deletions(-) diff --git a/config.example.toml b/config.example.toml -index d0eaa9fd7ffa..e0e991e679af 100644 +index 0c65b25fe138..249847013259 100644 --- a/config.example.toml +++ b/config.example.toml -@@ -745,8 +745,10 @@ changelog-seen = 2 +@@ -752,8 +752,10 @@ changelog-seen = 2 # This option will override the same option under [build] section. #sanitizers = build.sanitizers (bool) @@ -49,10 +49,10 @@ index 1b1f11798d74..d14d0b82229a 100644 let cfg = &mut cc::Build::new(); diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs -index 33addb90da37..1d8b3c6e5435 100644 +index 14c3ef79a78f..64bdcd1a3b97 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs -@@ -305,6 +305,10 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car +@@ -336,6 +336,10 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car cargo.env("MACOSX_DEPLOYMENT_TARGET", target); } @@ -64,10 +64,10 @@ index 33addb90da37..1d8b3c6e5435 100644 // 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 e192cda9a9a7..a4803db0a470 100644 +index fe932fd6bd30..45a743082415 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs -@@ -467,7 +467,7 @@ pub struct Target { +@@ -533,7 +533,7 @@ pub struct Target { pub linker: Option, pub ndk: Option, pub sanitizers: Option, @@ -76,7 +76,7 @@ index e192cda9a9a7..a4803db0a470 100644 pub rpath: Option, pub crt_static: Option, pub musl_root: Option, -@@ -796,9 +796,9 @@ struct Dist { +@@ -862,9 +862,9 @@ struct Dist { } } @@ -88,7 +88,7 @@ index e192cda9a9a7..a4803db0a470 100644 String(String), Bool(bool), } -@@ -809,6 +809,12 @@ fn default() -> StringOrBool { +@@ -875,6 +875,12 @@ fn default() -> StringOrBool { } } @@ -98,10 +98,10 @@ index e192cda9a9a7..a4803db0a470 100644 + } +} + - define_config! { - /// TOML representation of how the Rust build is configured. - struct Rust { -@@ -880,7 +886,7 @@ struct TomlTarget { + #[derive(Clone, Debug, Deserialize, PartialEq, Eq)] + #[serde(untagged)] + pub enum RustOptimize { +@@ -991,7 +997,7 @@ struct TomlTarget { llvm_libunwind: Option = "llvm-libunwind", android_ndk: Option = "android-ndk", sanitizers: Option = "sanitizers", @@ -110,7 +110,7 @@ index e192cda9a9a7..a4803db0a470 100644 rpath: Option = "rpath", crt_static: Option = "crt-static", musl_root: Option = "musl-root", -@@ -1744,12 +1750,24 @@ pub fn any_sanitizers_enabled(&self) -> bool { +@@ -1864,12 +1870,24 @@ pub fn any_sanitizers_enabled(&self) -> bool { self.target_config.values().any(|t| t.sanitizers == Some(true)) || self.sanitizers } diff --git a/0001-Don-t-fail-early-if-try_run-returns-an-error.patch b/0001-Don-t-fail-early-if-try_run-returns-an-error.patch new file mode 100644 index 0000000..d77ddc7 --- /dev/null +++ b/0001-Don-t-fail-early-if-try_run-returns-an-error.patch @@ -0,0 +1,201 @@ +From 98336f8f6e701ea99275f32d6e2127a621041994 Mon Sep 17 00:00:00 2001 +From: Guillaume Gomez +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 + diff --git a/0001-Let-environment-variables-override-some-default-CPUs.patch b/0001-Let-environment-variables-override-some-default-CPUs.patch index c394f78..04a0c9c 100644 --- a/0001-Let-environment-variables-override-some-default-CPUs.patch +++ b/0001-Let-environment-variables-override-some-default-CPUs.patch @@ -1,4 +1,4 @@ -From 6e2adb05860b72610291d3b0e8bd525c44cb0cc9 Mon Sep 17 00:00:00 2001 +From 87caaab3681b95fa633aac48b9794364e18c467d Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 9 Jun 2023 15:23:08 -0700 Subject: [PATCH] Let environment variables override some default CPUs @@ -36,7 +36,7 @@ index f2c722b9a89d..17a14d10b27e 100644 // 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 9af1049b8702..68f876dd18c3 100644 +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 @@ @@ -45,9 +45,9 @@ index 9af1049b8702..68f876dd18c3 100644 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"]); - base.stack_probes = StackProbeType::X86; -- -2.40.1 +2.41.0 diff --git a/0001-Skip-ExpandYamlAnchors-when-the-config-is-missing.patch b/0001-Skip-ExpandYamlAnchors-when-the-config-is-missing.patch new file mode 100644 index 0000000..62b4c56 --- /dev/null +++ b/0001-Skip-ExpandYamlAnchors-when-the-config-is-missing.patch @@ -0,0 +1,32 @@ +From ab9c5148956c2b7d177cc94533370d6a01a8d15f Mon Sep 17 00:00:00 2001 +From: Josh Stone +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 + diff --git a/0001-bootstrap-config-fix-version-comparison-bug.patch b/0001-bootstrap-config-fix-version-comparison-bug.patch deleted file mode 100644 index f0c4e55..0000000 --- a/0001-bootstrap-config-fix-version-comparison-bug.patch +++ /dev/null @@ -1,36 +0,0 @@ -From a627c8f54cab6880dc7d36c55092a94c6f750a6e Mon Sep 17 00:00:00 2001 -From: Ariadne Conill -Date: Thu, 3 Aug 2023 15:05:40 -0700 -Subject: [PATCH] bootstrap: config: fix version comparison bug - -Rust requires a previous version of Rust to build, such as the current version, or the -previous version. However, the version comparison logic did not take patch releases -into consideration when doing the version comparison for the current branch, e.g. -Rust 1.71.1 could not be built by Rust 1.71.0 because it is neither an exact version -match, or the previous version. - -Adjust the version comparison logic to tolerate mismatches in the patch version. - -Signed-off-by: Ariadne Conill -(cherry picked from commit 31a81a08786826cc6e832bd0b49fb8b934e29648) ---- - src/bootstrap/config.rs | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs -index e192cda9a9a7..2b5d0b94e968 100644 ---- a/src/bootstrap/config.rs -+++ b/src/bootstrap/config.rs -@@ -1805,7 +1805,8 @@ pub fn check_build_rustc_version(&self) { - .unwrap(); - if !(source_version == rustc_version - || (source_version.major == rustc_version.major -- && source_version.minor == rustc_version.minor + 1)) -+ && (source_version.minor == rustc_version.minor -+ || source_version.minor == rustc_version.minor + 1))) - { - let prev_version = format!("{}.{}.x", source_version.major, source_version.minor - 1); - eprintln!( --- -2.41.0 - diff --git a/0001-llvm-wrapper-adapt-for-LLVM-API-change.patch b/0001-llvm-wrapper-adapt-for-LLVM-API-change.patch new file mode 100644 index 0000000..bd49134 --- /dev/null +++ b/0001-llvm-wrapper-adapt-for-LLVM-API-change.patch @@ -0,0 +1,54 @@ +From 6fce2a3e054185fb85d5a55a9e5a35d41a2c492e Mon Sep 17 00:00:00 2001 +From: Krasimir Georgiev +Date: Wed, 12 Jul 2023 09:30:31 +0000 +Subject: [PATCH 1/2] llvm-wrapper: adapt for LLVM API change + +Adapts the wrapper for LLVM commit +https://github.com/llvm/llvm-project/commit/546ec641b4b1bbbf9e66a53983b635fe85d365e6. + +Found by the experimental rust + LLVM @ HEAD bot: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/20723#01894922-ed5d-4830-81f6-a27fb82ec8c7/210-645 + +(cherry picked from commit 71958da4854176c50a8b12470b956d5c7ed11817) +--- + compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +index c43a02724773..eb3d67e720f2 100644 +--- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp ++++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +@@ -667,6 +667,7 @@ LLVMRustOptimize( + assert(!PGOUsePath && !PGOSampleUsePath); + PGOOpt = PGOOptions(PGOGenPath, "", "", + #if LLVM_VERSION_GE(17, 0) ++ "", + FS, + #endif + PGOOptions::IRInstr, PGOOptions::NoCSAction, +@@ -675,6 +676,7 @@ LLVMRustOptimize( + assert(!PGOSampleUsePath); + PGOOpt = PGOOptions(PGOUsePath, "", "", + #if LLVM_VERSION_GE(17, 0) ++ "", + FS, + #endif + PGOOptions::IRUse, PGOOptions::NoCSAction, +@@ -682,6 +684,7 @@ LLVMRustOptimize( + } else if (PGOSampleUsePath) { + PGOOpt = PGOOptions(PGOSampleUsePath, "", "", + #if LLVM_VERSION_GE(17, 0) ++ "", + FS, + #endif + PGOOptions::SampleUse, PGOOptions::NoCSAction, +@@ -689,6 +692,7 @@ LLVMRustOptimize( + } else if (DebugInfoForProfiling) { + PGOOpt = PGOOptions("", "", "", + #if LLVM_VERSION_GE(17, 0) ++ "", + FS, + #endif + PGOOptions::NoAction, PGOOptions::NoCSAction, +-- +2.41.0 + diff --git a/0002-llvm-wrapper-update-for-LLVM-API-change.patch b/0002-llvm-wrapper-update-for-LLVM-API-change.patch new file mode 100644 index 0000000..613c432 --- /dev/null +++ b/0002-llvm-wrapper-update-for-LLVM-API-change.patch @@ -0,0 +1,32 @@ +From 00b2ba45d6631b2e0d80bf187ddd4e8bd75d3aee Mon Sep 17 00:00:00 2001 +From: Krasimir Georgiev +Date: Fri, 14 Jul 2023 12:10:29 +0000 +Subject: [PATCH 2/2] llvm-wrapper: update for LLVM API change + +No functional changes intended. + +Adds an include for llvm::SmallString. Previously, this must have been +implicitly provided by some of the existing headers. With recent LLVM +changes, not anymore: +https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/20776#01895448-44a4-4a1e-8407-9d41d0186132/209-690 + +(cherry picked from commit 6ddf9128b2b55f9def80af57f7353d2521527c6a) +--- + compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp +index 0493d6b05d03..bf00d11edf6d 100644 +--- a/compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp ++++ b/compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp +@@ -7,6 +7,7 @@ + // * https://github.com/llvm/llvm-project/blob/8ef3e895ad8ab1724e2b87cabad1dacdc7a397a3/llvm/include/llvm/Object/ArchiveWriter.h + // * https://github.com/llvm/llvm-project/blob/8ef3e895ad8ab1724e2b87cabad1dacdc7a397a3/llvm/lib/Object/ArchiveWriter.cpp + ++#include "llvm/ADT/SmallString.h" + #include "llvm/IR/LLVMContext.h" + #include "llvm/Object/ObjectFile.h" + +-- +2.41.0 + diff --git a/rust.spec b/rust.spec index a6c5c42..8a25fdd 100644 --- a/rust.spec +++ b/rust.spec @@ -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.70.0 -%global bootstrap_channel 1.70.0 -%global bootstrap_date 2023-06-01 +%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 @@ -39,7 +39,8 @@ # 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 7018e24d8fe248596819d2e884761676f3542a04 %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} @@ -87,10 +88,10 @@ %endif Name: rust -Version: 1.71.1 +Version: 1.72.1 Release: 1%{?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} @@ -118,8 +119,19 @@ Patch3: 0001-Let-environment-variables-override-some-default-CPUs.patch # https://github.com/rust-lang/rust/pull/114069 Patch4: 0001-Allow-using-external-builds-of-the-compiler-rt-profi.patch -# https://github.com/rust-lang/rust/pull/114440 -Patch5: 0001-bootstrap-config-fix-version-comparison-bug.patch +# Fix --no-fail-fast +# https://github.com/rust-lang/rust/pull/113214 +Patch5: 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 +Patch6: 0001-Skip-ExpandYamlAnchors-when-the-config-is-missing.patch + +# Compatibility fixes for LLVM 17 +# https://github.com/rust-lang/rust/pull/113615 +# https://github.com/rust-lang/rust/pull/113688 +Patch7: 0001-llvm-wrapper-adapt-for-LLVM-API-change.patch +Patch8: 0002-llvm-wrapper-update-for-LLVM-API-change.patch ### RHEL-specific patches below ### @@ -127,11 +139,11 @@ Patch5: 0001-bootstrap-config-fix-version-comparison-bug.patch Source100: macros.rust-toolset # Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949) -Patch100: rustc-1.71.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.71.0-disable-http2.patch +Patch101: rustc-1.72.0-disable-http2.patch # Get the Rust triple for any arch. %{lua: function rust_triple(arch) @@ -234,6 +246,10 @@ BuildRequires: cmake >= 2.8.11 %if 0%{?epel} == 7 %global llvm llvm14 %endif +# not ready for llvm-17 yet... +%if 0%{?fedora} >= 39 +%global llvm llvm16 +%endif %if %defined llvm %global llvm_root %{_libdir}/%{llvm} %else @@ -598,6 +614,9 @@ test -f '%{local_rust_root}/bin/rustc' %patch -P3 -p1 %patch -P4 -p1 %patch -P5 -p1 +%patch -P6 -p1 +%patch -P7 -p1 +%patch -P8 -p1 %if %with disabled_libssh2 %patch -P100 -p1 @@ -1082,6 +1101,10 @@ end} %changelog +* Thu Oct 12 2023 Josh Stone - 1.72.1-1 +- Update to 1.72.1. +- Migrated to SPDX license + * Tue Aug 08 2023 Josh Stone - 1.71.1-1 - Update to 1.71.1. - Security fix for CVE-2023-38497 diff --git a/rustc-1.71.0-disable-http2.patch b/rustc-1.72.0-disable-http2.patch similarity index 77% rename from rustc-1.71.0-disable-http2.patch rename to rustc-1.72.0-disable-http2.patch index 34fdab3..db2213e 100644 --- a/rustc-1.71.0-disable-http2.patch +++ b/rustc-1.72.0-disable-http2.patch @@ -1,6 +1,6 @@ ---- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2023-07-07 17:30:04.817452621 -0700 -+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2023-07-07 17:30:27.777988139 -0700 -@@ -734,7 +734,6 @@ +--- 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,8 +8,8 @@ "libz-sys", "openssl-sys", "pkg-config", -@@ -1954,16 +1953,6 @@ - checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" +@@ -2011,16 +2010,6 @@ + checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" [[package]] -name = "libnghttp2-sys" @@ -23,10 +23,10 @@ - -[[package]] name = "libz-sys" - version = "1.1.8" + version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" ---- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2023-07-07 17:30:04.819452581 -0700 -+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-07-07 17:30:24.133061874 -0700 +--- 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"] } @@ -36,9 +36,9 @@ curl-sys.workspace = true env_logger.workspace = true filetime.workspace = true ---- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig 2023-06-24 10:27:37.000000000 -0700 -+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2023-07-07 17:30:04.819452581 -0700 -@@ -407,16 +407,9 @@ +--- 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> { @@ -58,9 +58,9 @@ Ok(PackageSet { packages: package_ids ---- rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs.orig 2023-06-24 10:27:37.000000000 -0700 -+++ rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs 2023-07-07 17:30:04.819452581 -0700 -@@ -229,16 +229,8 @@ +--- 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-06-24 10:27:37.000000000 -0700 -+++ rustc-beta-src/src/tools/cargo/src/cargo/util/network/mod.rs 2023-07-07 17:30:04.819452581 -0700 -@@ -26,7 +26,7 @@ +--- 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); } diff --git a/rustc-1.71.0-disable-libssh2.patch b/rustc-1.72.0-disable-libssh2.patch similarity index 61% rename from rustc-1.71.0-disable-libssh2.patch rename to rustc-1.72.0-disable-libssh2.patch index ba61454..1198954 100644 --- a/rustc-1.71.0-disable-libssh2.patch +++ b/rustc-1.72.0-disable-libssh2.patch @@ -1,6 +1,6 @@ ---- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2023-06-24 10:27:37.000000000 -0700 -+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2023-07-07 17:12:23.406932870 -0700 -@@ -1942,7 +1942,6 @@ +--- 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", @@ -8,7 +8,7 @@ "libz-sys", "openssl-sys", "pkg-config", -@@ -1965,20 +1964,6 @@ +@@ -2022,20 +2021,6 @@ ] [[package]] @@ -27,10 +27,10 @@ - -[[package]] name = "libz-sys" - version = "1.1.8" + version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" ---- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2023-06-24 10:27:37.000000000 -0700 -+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-07-07 17:12:00.688392750 -0700 +--- 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"] } @@ -38,5 +38,5 @@ -git2 = "0.17.1" +git2 = { version = "0.17.1", default-features = false, features = ["https"] } git2-curl = "0.18.0" - gix = { version = "0.44.1", default-features = false, features = ["blocking-http-transport-curl", "progress-tree"] } - gix-features-for-configuration-only = { version = "0.29.0", package = "gix-features", features = [ "parallel" ] } + 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" ] } diff --git a/sources b/sources index 8a2c328..efdcb58 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rustc-1.71.1-src.tar.xz) = fd0e5a16bdbeb539184513583089e55f681cb772810df357b6b1464853f7022ac02edab3dd155b2262ed0047e2a25dea3808dd078dcdfce9d399384465009db4 -SHA512 (wasi-libc-wasi-sdk-20.tar.gz) = e264240dc7dbcf6398c8ca09bc108298f4a8aa955af22de5a3015fbcde81cb09dd83cd48349090082d5de0e8a3dbcf746c7b14657c67657b3f2f1ab28bb9cf05 +SHA512 (rustc-1.72.1-src.tar.xz) = 08232b5bf36f82a995d67f3d03d5e35b7d8914d31fb4491d4c37b72a830bc438e9d18d9e138d398b1b6ae4aa09f7f8e1e9b68da6273ab74bdae4c6123586a21b +SHA512 (wasi-libc-7018e24d8fe248596819d2e884761676f3542a04.tar.gz) = a2a4a952c3d9795792be8f055387057befaebe0675ad2464a478cb1f2c45d65f233e0ee4c4dbcaa137bf9649882ff6c6acf2f2bec07b2ad89f63ff980d972e6b