14 |
# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24 |
# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24 |
15 |
# or nightly wants some beta-YYYY-MM-DD |
# or nightly wants some beta-YYYY-MM-DD |
16 |
# Note that cargo matches the program version here, not its crate version. |
# Note that cargo matches the program version here, not its crate version. |
17 |
%global bootstrap_rust 1.33.0 |
%global bootstrap_rust 1.34.0 |
18 |
%global bootstrap_cargo 1.33.0 |
%global bootstrap_cargo 1.34.0 |
19 |
%global bootstrap_channel %{bootstrap_rust} |
%global bootstrap_channel 1.34.2 |
20 |
%global bootstrap_date 2019-02-28 |
%global bootstrap_date 2019-05-14 |
21 |
|
|
22 |
# Only the specified arches will use bootstrap binaries. |
# Only the specified arches will use bootstrap binaries. |
23 |
#global bootstrap_arches %%{rust_arches} |
#global bootstrap_arches %%{rust_arches} |
56 |
%bcond_with bundled_libssh2 |
%bcond_with bundled_libssh2 |
57 |
%endif |
%endif |
58 |
|
|
|
# LLDB only works on some architectures |
|
|
%ifarch %{arm} aarch64 %{ix86} x86_64 |
|
59 |
# LLDB isn't available everywhere... |
# LLDB isn't available everywhere... |
60 |
%if !0%{?rhel} |
%if !0%{?rhel} |
61 |
%bcond_without lldb |
%bcond_without lldb |
62 |
%else |
%else |
63 |
%bcond_with lldb |
%bcond_with lldb |
64 |
%endif |
%endif |
|
%else |
|
|
%bcond_with lldb |
|
|
%endif |
|
65 |
|
|
66 |
Name: rust |
Name: rust |
67 |
Version: 1.34.2 |
Version: 1.35.0 |
68 |
Release: %mkrel 1 |
Release: %mkrel 1 |
69 |
Summary: The Rust Programming Language |
Summary: The Rust Programming Language |
70 |
%if 0%{?mageia} |
%if 0%{?mageia} |
89 |
# https://github.com/rust-lang/rust/pull/60313 |
# https://github.com/rust-lang/rust/pull/60313 |
90 |
Patch2: 0001-Limit-internalization-in-LLVM-8-ThinLTO.patch |
Patch2: 0001-Limit-internalization-in-LLVM-8-ThinLTO.patch |
91 |
|
|
92 |
|
# https://github.com/rust-lang/rust/pull/61085 |
93 |
|
Patch3: rust-pr61085-fix-ICE-with-incorrect-turbofish.patch |
94 |
|
|
95 |
# Upstream patch to fix typenum crate build on i386/i486/i586. |
# Upstream patch to fix typenum crate build on i386/i486/i586. |
96 |
Patch3: typenum-pr115-fix-log2-rounding-error.patch |
Patch4: typenum-pr115-fix-log2-rounding-error.patch |
97 |
|
|
98 |
# Get the Rust triple for any arch. |
# Get the Rust triple for any arch. |
99 |
%{lua: function rust_triple(arch) |
%{lua: function rust_triple(arch) |
292 |
|
|
293 |
%package lldb |
%package lldb |
294 |
Summary: LLDB pretty printers for Rust |
Summary: LLDB pretty printers for Rust |
295 |
|
BuildArch: noarch |
|
# It could be noarch, but lldb has limited availability |
|
|
#BuildArch: noarch |
|
|
|
|
296 |
Requires: lldb |
Requires: lldb |
297 |
Requires: python2-lldb |
Requires: python2-lldb |
298 |
Requires: %{name}-debugger-common = %{version}-%{release} |
Requires: %{name}-debugger-common = %{version}-%{release} |
428 |
%patch1 -p1 -R |
%patch1 -p1 -R |
429 |
%patch2 -p1 |
%patch2 -p1 |
430 |
%patch3 -p1 |
%patch3 -p1 |
431 |
|
%patch4 -p1 |
432 |
|
|
433 |
%if "%{python}" == "python3" |
%if "%{python}" == "python3" |
434 |
sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure |
sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure |
498 |
%define enable_debuginfo --enable-debuginfo --disable-debuginfo-only-std --enable-debuginfo-tools --disable-debuginfo-lines |
%define enable_debuginfo --enable-debuginfo --disable-debuginfo-only-std --enable-debuginfo-tools --disable-debuginfo-lines |
499 |
%endif |
%endif |
500 |
|
|
501 |
|
# We want the best optimization for std, but it caused problems for rpm-ostree |
502 |
|
# on ppc64le to have all of the compiler_builtins in a single object: |
503 |
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1713090 |
504 |
|
%ifnarch %{power64} |
505 |
|
%define codegen_units_std --set rust.codegen-units-std=1 |
506 |
|
%endif |
507 |
|
|
508 |
%configure --disable-option-checking \ |
%configure --disable-option-checking \ |
509 |
--libdir=%{common_libdir} \ |
--libdir=%{common_libdir} \ |
510 |
--build=%{rust_triple} --host=%{rust_triple} --target=%{target_triple} \ |
--build=%{rust_triple} --host=%{rust_triple} --target=%{target_triple} \ |
517 |
--enable-extended \ |
--enable-extended \ |
518 |
--enable-vendor \ |
--enable-vendor \ |
519 |
--enable-verbose-tests \ |
--enable-verbose-tests \ |
520 |
--set rust.codegen-units-std=1 \ |
%{?codegen_units_std} \ |
521 |
--release-channel=%{channel} |
--release-channel=%{channel} |
522 |
|
|
523 |
%{python} ./x.py build |
%{python} ./x.py build |