![](https://secure.gravatar.com/avatar/df8330968b6df8cd1c1942c5fb4b720c.jpg?s=120&d=mm&r=g)
commit 47c24b563433f5a7e1c0b1f7aa6945b4439640de Author: Tim Biermann <tbier@posteo.de> Date: Sat Aug 5 14:12:32 2023 +0200 rust: cherry picked patch to allow building with system rust 1.71.0 diff --git a/rust/.signature b/rust/.signature index 153951180..5b1bfe745 100644 --- a/rust/.signature +++ b/rust/.signature @@ -1,11 +1,12 @@ untrusted comment: verify with /etc/ports/opt.pub -RWSE3ohX2g5d/UjWgrSxElrwyxgfdEm751weUgbiLCk9EeCFGZygSR48hUHDlzcXuQyP1Ax2wYRqaQwerpTly+GIzXZj0hnvOQA= -SHA256 (Pkgfile) = fae1f05c46a52e75b7df4ac4b76229b3d650b6ac873800409d2501445be7395c +RWSE3ohX2g5d/QbDhxVTCY/P6cloi5pmR+Hb3luDClDyt7mzZrWr9yAGVAHPL0uDyKFvyvc0X4IvllkjXNqunqMoqWa+FCnnrAU= +SHA256 (Pkgfile) = d3d95d68694f7144923640fd511ec3606275a6c4adc3e85e4616d515468cf1a2 SHA256 (.footprint) = 0f5bedbeeb380de242af6b76e3bfc8e3661b5e12ab5cfa1d145c2759d2e2fbba SHA256 (rustc-1.71.1-src.tar.xz) = 371af0fbe04051e20a74dbea6d4e4e548f10f15309c49cae2688afb882b6c7f1 SHA256 (rust-std-1.70.0-x86_64-unknown-linux-gnu.tar.xz) = 0c0129717da1e27ccf2c56da950d2fe56973f71beec9e80ae6904b282d2f0ee9 SHA256 (rustc-1.70.0-x86_64-unknown-linux-gnu.tar.xz) = 7d891d3e9bc4f1151545c83cbe3bc6af9ed234388c45ca2e19641262f48615e2 SHA256 (cargo-1.70.0-x86_64-unknown-linux-gnu.tar.xz) = 650e7a890a52869cd14e2305652bff775aec7fc2cf47fc62cf4a89ff07242333 +SHA256 (114440.patch) = 5ade958be3871b4c33d96a1c0844ad0e92dad1d37ffefca522794a8afc62efa6 SHA256 (0001-bootstrap-Change-libexec-dir.patch) = 34391ebea7d9c10246c4f3cbe05b3d5587a72105887dab5ecb00d10ea6a10d6a SHA256 (0001-cargo-Change-libexec-dir.patch) = b2ef8c3bca5d72ed58ff8930e69947602f875a639c2b01de5943b1ecb1b5c3c3 SHA256 (0002-compiler-Change-LLVM-targets.patch) = 4a4ff5c294acc0b1ca800856218770f6330a878acee72193aa456d82846a8a28 diff --git a/rust/114440.patch b/rust/114440.patch new file mode 100644 index 000000000..824c2d51f --- /dev/null +++ b/rust/114440.patch @@ -0,0 +1,32 @@ +From 31a81a08786826cc6e832bd0b49fb8b934e29648 Mon Sep 17 00:00:00 2001 +From: Ariadne Conill <ariadne@dereferenced.org> +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 <ariadne@dereferenced.org> +--- + 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 45bea9608fc82..f283b2eb7e9ce 100644 +--- a/src/bootstrap/config.rs ++++ b/src/bootstrap/config.rs +@@ -2004,7 +2004,8 @@ impl Config { + .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!( diff --git a/rust/Pkgfile b/rust/Pkgfile index d1efa4fd0..c2a7d9b82 100644 --- a/rust/Pkgfile +++ b/rust/Pkgfile @@ -15,6 +15,7 @@ source=(https://static.rust-lang.org/dist/${name}c-$version-src.tar.xz https://static.rust-lang.org/dist/$_date/rust-std-$_rustc-x86_64-unknown-lin... https://static.rust-lang.org/dist/$_date/rustc-$_rustc-x86_64-unknown-linux-... https://static.rust-lang.org/dist/$_date/cargo-$_cargo-x86_64-unknown-linux-... + 114440.patch 0001-bootstrap-Change-libexec-dir.patch 0001-cargo-Change-libexec-dir.patch 0002-compiler-Change-LLVM-targets.patch) @@ -68,6 +69,7 @@ build() { # Use our *-pc-linux-gnu targets, making LTO with clang simpler patch -p1 -i $SRC/0002-compiler-Change-LLVM-targets.patch + patch -p1 -i $SRC/114440.patch cat <<- EOF > $SRC/config.toml changelog-seen = 2