58 |
%endif |
%endif |
59 |
|
|
60 |
Name: rust |
Name: rust |
61 |
Version: 1.34.0 |
Version: 1.34.1 |
62 |
Release: %mkrel 2 |
Release: %mkrel 1 |
63 |
Summary: The Rust Programming Language |
Summary: The Rust Programming Language |
64 |
%if 0%{?mageia} |
%if 0%{?mageia} |
65 |
Group: Development/Other |
Group: Development/Other |
80 |
# We do have the necessary fix in our LLVM 7. |
# We do have the necessary fix in our LLVM 7. |
81 |
Patch1: rust-pr57840-llvm7-debuginfo-variants.patch |
Patch1: rust-pr57840-llvm7-debuginfo-variants.patch |
82 |
|
|
83 |
|
# https://github.com/rust-lang/rust/pull/60313 |
84 |
|
Patch2: 0001-Limit-internalization-in-LLVM-8-ThinLTO.patch |
85 |
|
|
86 |
# Get the Rust triple for any arch. |
# Get the Rust triple for any arch. |
87 |
%{lua: function rust_triple(arch) |
%{lua: function rust_triple(arch) |
88 |
local abi = "gnu" |
local abi = "gnu" |
232 |
# Use hardening ldflags. |
# Use hardening ldflags. |
233 |
%global rustflags -Clink-arg=-Wl,-z,relro,-z,now |
%global rustflags -Clink-arg=-Wl,-z,relro,-z,now |
234 |
|
|
235 |
|
%ifarch %{ix86} |
236 |
|
# i686 fails to link some static symbols with ThinLTO: |
237 |
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1701339 |
238 |
|
# https://github.com/rust-lang/rust/issues/60184 |
239 |
|
# and since this affects rustbook built with *stage0*, we can't just patch it. |
240 |
|
# Workaround: using a single codegen unit bypasses ThinLTO. |
241 |
|
%global rustflags %{rustflags} -Ccodegen-units=1 |
242 |
|
%endif |
243 |
|
|
244 |
%if %{without bundled_llvm} |
%if %{without bundled_llvm} |
245 |
%if "%{llvm_root}" == "%{_prefix}" || 0%{?scl:1} |
%if "%{llvm_root}" == "%{_prefix}" || 0%{?scl:1} |
246 |
%global llvm_has_filecheck 1 |
%global llvm_has_filecheck 1 |
422 |
%setup -q -n %{rustc_package} |
%setup -q -n %{rustc_package} |
423 |
|
|
424 |
%patch1 -p1 -R |
%patch1 -p1 -R |
425 |
|
%patch2 -p1 |
426 |
|
|
427 |
%if "%{python}" == "python3" |
%if "%{python}" == "python3" |
428 |
sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure |
sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure |
504 |
--enable-extended \ |
--enable-extended \ |
505 |
--enable-vendor \ |
--enable-vendor \ |
506 |
--enable-verbose-tests \ |
--enable-verbose-tests \ |
507 |
|
--set rust.codegen-units-std=1 \ |
508 |
--release-channel=%{channel} |
--release-channel=%{channel} |
509 |
|
|
510 |
%{python} ./x.py build |
%{python} ./x.py build |