diff --git a/0001-Drop-cfg-bootstrap-code.patch b/0001-Drop-cfg-bootstrap-code.patch new file mode 100644 index 0000000..3d8f202 --- /dev/null +++ b/0001-Drop-cfg-bootstrap-code.patch @@ -0,0 +1,25 @@ +From 31dcdc9e13c324d33a18db3aed7f4b3208ff3744 Mon Sep 17 00:00:00 2001 +From: Mark Rousskov +Date: Fri, 31 Jan 2020 12:30:17 -0500 +Subject: [PATCH] Drop cfg(bootstrap) code + +--- + src/bootstrap/lib.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs +index 1fee3fd9ac1d..637323331f58 100644 +--- a/src/bootstrap/lib.rs ++++ b/src/bootstrap/lib.rs +@@ -1026,7 +1026,7 @@ impl Build { + } + + fn llvm_link_tools_dynamically(&self, target: Interned) -> bool { +- (target.contains("linux-gnu") || target.contains("apple-darwin")) ++ target.contains("linux-gnu") || target.contains("apple-darwin") + } + + /// Returns the `version` string associated with this compiler for Rust +-- +2.24.1 + diff --git a/rust.spec b/rust.spec index fdef18b..f0875a3 100644 --- a/rust.spec +++ b/rust.spec @@ -67,6 +67,10 @@ Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz # We do have the necessary fix in our LLVM 7. Patch1: rust-pr57840-llvm7-debuginfo-variants.patch +# Fix 1.42 bootstrapping itself +# https://github.com/rust-lang/rust/issues/69953 +Patch2: 0001-Drop-cfg-bootstrap-code.patch + # Get the Rust triple for any arch. %{lua: function rust_triple(arch) local abi = "gnu" @@ -403,6 +407,7 @@ test -f '%{local_rust_root}/bin/rustc' %setup -q -n %{rustc_package} %patch1 -p1 -R +%patch2 -p1 %if "%{python}" == "python3" sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure