diff --git a/0001-Use-lld-provided-by-system-for-wasm.patch b/0001-Use-lld-provided-by-system-for-wasm.patch index 4dcb322f1dbd4703806469f5c7d0ed243cc71dd5..681b21a1d65467b76c224478c18e2f78f959e9b9 100644 --- a/0001-Use-lld-provided-by-system-for-wasm.patch +++ b/0001-Use-lld-provided-by-system-for-wasm.patch @@ -1,4 +1,4 @@ -From 3582a262d27fd5a2f8705bad6018241eaca8aadd Mon Sep 17 00:00:00 2001 +From 9ac837c237568a6c1c5f0e979fcce208cd9c926a Mon Sep 17 00:00:00 2001 From: Ivan Mironov Date: Sun, 8 Dec 2019 17:23:08 +0500 Subject: [PATCH] Use lld provided by system for wasm @@ -8,10 +8,10 @@ Subject: [PATCH] Use lld provided by system for wasm 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 b208eb92f8ff..94a701a11c8b 100644 +index 4c954a1e567c..15c4f1bda5eb 100644 --- a/compiler/rustc_target/src/spec/wasm_base.rs +++ b/compiler/rustc_target/src/spec/wasm_base.rs -@@ -98,8 +98,7 @@ pub fn options() -> TargetOptions { +@@ -99,8 +99,7 @@ pub fn options() -> TargetOptions { // arguments just yet limit_rdylib_exports: false, @@ -19,8 +19,8 @@ index b208eb92f8ff..94a701a11c8b 100644 - linker: Some("rust-lld".to_owned()), + linker: Some("lld".to_owned()), lld_flavor: LldFlavor::Wasm, + linker_is_gnu: false, - // No need for indirection here, simd types can always be passed by -- 2.31.1 diff --git a/rust.spec b/rust.spec index 3553eccf7a69eab35ef85c81cb019de3668d9daf..96a2b2ddec25cd6f44f3f0f2a93b02590bbdbf46 100644 --- a/rust.spec +++ b/rust.spec @@ -10,10 +10,10 @@ # e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24 # or nightly wants some beta-YYYY-MM-DD # Note that cargo matches the program version here, not its crate version. -%global bootstrap_rust 1.52.0 -%global bootstrap_cargo 1.52.0 -%global bootstrap_channel 1.52.0 -%global bootstrap_date 2021-05-06 +%global bootstrap_rust 1.53.0 +%global bootstrap_cargo 1.53.0 +%global bootstrap_channel 1.53.0 +%global bootstrap_date 2021-06-17 # Only the specified arches will use bootstrap binaries. #global bootstrap_arches %%{rust_arches} @@ -21,7 +21,11 @@ # Define a space-separated list of targets to ship rust-std-static-$triple for # cross-compilation. The packages are noarch, but they're not fully # reproducible between hosts, so only x86_64 actually builds it. -%ifarch x86_64 +#ifarch x86_64 +# FIX: Except on RHEL8 modules, we can't filter a noarch package from shipping +# on certain arches, namely s390x for its lack of lld. So we need to make it an +# arch-specific package only for the supported arches. +%ifnarch s390x %if 0%{?fedora} || 0%{?rhel} >= 8 %global cross_targets wasm32-unknown-unknown %endif @@ -62,8 +66,8 @@ %endif Name: rust -Version: 1.53.0 -Release: 1%{?dist} +Version: 1.54.0 +Release: 2%{?dist} Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) # ^ written as: (rust itself) and (bundled libraries) @@ -260,7 +264,7 @@ BuildRequires: %{devtoolset_name}-gcc-c++ # brp-strip-static-archive breaks the archive index for wasm %global __os_install_post \ %__os_install_post \ -find %{buildroot}%{rustlibdir} -type f -path '*/wasm*/lib/*.rlib' -exec ranlib '{}' ';' \ +find %{buildroot}%{rustlibdir} -type f -path '*/wasm*/lib/*.rlib' -exec llvm-ranlib '{}' ';' \ %{nil} %endif @@ -292,7 +296,8 @@ written in Rust. local s = string.gsub([[ %package std-static-{{triple}} Summary: Standard library for Rust -BuildArch: noarch +# FIX: we can't be noarch while excluding s390x for lack of lld +# BuildArch: noarch {{requires}} %description std-static-{{triple}} @@ -611,6 +616,9 @@ for triple in %{cross_targets}; do done %endif +# These are transient files used by x.py dist and install +rm -rf ./build/dist/ ./build/tmp/ + # Make sure the shared libraries are in the proper libdir %if "%{_libdir}" != "%{common_libdir}" mkdir -p %{buildroot}%{_libdir} @@ -682,8 +690,13 @@ rm -f %{buildroot}%{rustlibdir}/%{rust_triple}/bin/rust-ll* export %{rust_env} # 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. %{python} ./x.py test --no-fail-fast --stage 2 || : +rm -rf "./build/%{rust_triple}/test/" + %{python} ./x.py test --no-fail-fast --stage 2 cargo || : +rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/" + %{python} ./x.py test --no-fail-fast --stage 2 clippy || : %{python} ./x.py test --no-fail-fast --stage 2 rls || : %{python} ./x.py test --no-fail-fast --stage 2 rustfmt || : @@ -816,6 +829,15 @@ end} %changelog +* Tue Aug 17 2021 Josh Stone - 1.54.0-2 +- Make std-static-wasm* arch-specific to avoid s390x. + +* Thu Jul 29 2021 Josh Stone - 1.54.0-1 +- Update to 1.54.0. + +* Tue Jul 20 2021 Josh Stone - 1.53.0-2 +- Use llvm-ranlib to fix wasm archives. + * Mon Jun 21 2021 Josh Stone - 1.53.0-1 - Update to 1.53.0. diff --git a/rustc-1.53.0-src.tar.xz b/rustc-1.54.0-src.tar.xz similarity index 86% rename from rustc-1.53.0-src.tar.xz rename to rustc-1.54.0-src.tar.xz index 5db9b7f16eb3b2125963d1dbd63a6aedab324b77..87e07b98bd36e36cb591d0f31bea897c96771e75 100644 Binary files a/rustc-1.53.0-src.tar.xz and b/rustc-1.54.0-src.tar.xz differ