15
15
%bcond_without lldb
16
16
17
17
Name: rust
18
- # TODO: Suffix version at the end with +git1
19
- Version: %{rust_version }+git2
18
+ Version: %{rust_version }+git3
20
19
Release: 1
21
20
Summary: The Rust Programming Language
22
21
License: (ASL 2.0 or MIT ) and (BSD and MIT )
23
22
# ^ written as: (rust itself) and (bundled libraries)
24
23
URL: https://www.rust-lang.org
25
24
26
25
%global rustc_package rustc-%{rust_version }-src
27
- Source0: https://static.rust-lang.org/dist/rustc-%{rust_version }-src.tar.gz
28
- Source1: https://static.rust-lang.org/dist/rust-%{rust_version }-%{rust_triple }.tar.gz
26
+ Source0: rustc-%{rust_version }-src.tar.gz
27
+ Source100: rust-%{rust_version }-i686-unknown-linux-gnu.tar.gz
28
+ Source101: rust-%{rust_version }-armv7-unknown-linux-gnueabihf.tar.gz
29
+ Source200: README.md
29
30
30
31
Patch1: 0001-Use-a-non-existent-test-path-instead-of-clobbering-d.patch
31
- Patch2: llvm-targets.patch
32
- Patch3: disable- statx.patch
32
+ Patch2: 0002-Set-proper- llvm-targets.patch
33
+ Patch3: 0003-Disable- statx-for-all-builds.-JB-50106 .patch
33
34
34
35
%global bootstrap_root rust-%{rust_version }-%{rust_triple }
35
36
%global local_rust_root %{_builddir }/%{bootstrap_root }/usr
@@ -40,7 +41,6 @@ BuildRequires: cmake
40
41
BuildRequires: gcc
41
42
BuildRequires: gcc-c++
42
43
BuildRequires: ncurses-devel
43
- # BuildRequires: curl
44
44
BuildRequires: pkgconfig(libcurl)
45
45
# build.rs and boostrap/config.rs => cargo_native_static?
46
46
BuildRequires: pkgconfig(liblzma)
@@ -56,6 +56,8 @@ BuildRequires: procps
56
56
# debuginfo-gdb tests need gdb
57
57
BuildRequires: gdb
58
58
59
+ # Disable aach64 build
60
+ ExcludeArch: aarch64
59
61
60
62
# Virtual provides for folks who attempt "dnf install rustc"
61
63
Provides: rustc = %{version }-%{release }
@@ -145,8 +147,11 @@ and ensure that you'll always get a repeatable build.
145
147
146
148
147
149
%prep
148
-
149
- %setup -q -n %{bootstrap_root } -T -b 1
150
+ %ifarch %ix86
151
+ %setup -q -n %{bootstrap_root } -T -b 100
152
+ %else
153
+ %setup -q -n %{bootstrap_root } -T -b 101
154
+ %endif
150
155
./install.sh --components=cargo,rustc,rust-std-%{rust_triple } \
151
156
--prefix=%{local_rust_root } --disable-ldconfig
152
157
test -f ' %{local_rust_root}/bin/cargo'
@@ -155,7 +160,7 @@ test -f '%{local_rust_root}/bin/rustc'
155
160
%setup -q -n %{rustc_package }
156
161
157
162
%patch1 -p1
158
- %patch2 -p0
163
+ %patch2 -p1
159
164
%patch3 -p1
160
165
161
166
sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure
@@ -212,8 +217,6 @@ export RUSTFLAGS="%{rustflags}"
212
217
# %define enable_debuginfo --disable-debuginfo --disable-debuginfo-only-std --disable-debuginfo-tools --disable-debuginfo-lines
213
218
%define enable_debuginfo --debuginfo-level= 0 --debuginfo-level-std= 2 --disable-debuginfo --disable-debuginfo-only-std --disable-debuginfo-tools --disable-debuginfo-lines
214
219
215
- %define codegen_units_std --set rust.codegen-units-std= 1
216
-
217
220
%configure --disable-option-checking \
218
221
--libdir= %{common_libdir } \
219
222
--build= %{rust_triple } --host= %{rust_triple } --target= %{rust_triple } \
@@ -233,8 +236,6 @@ export RUSTFLAGS="%{rustflags}"
233
236
--llvm-root= /usr/ \
234
237
--enable-parallel-compiler
235
238
236
- # --set="parallel-compiler=true"
237
-
238
239
%{python } ./x.py build
239
240
240
241
@@ -295,12 +296,14 @@ rm -f %{buildroot}%{_bindir}/rustdoc
295
296
rm -fr %{buildroot }%{_mandir }/man1
296
297
297
298
%check
299
+ %ifarch %ix86
298
300
%{? cmake_path:export PATH=%{cmake_path }:$PATH }
299
301
%{? rustflags:export RUSTFLAGS=" %{rustflags}" }
300
302
301
303
# The results are not stable on koji, so mask errors and just log it.
302
304
%{python } ./x.py test --no-fail-fast || :
303
305
%{python } ./x.py test --no-fail-fast cargo || :
306
+ %endif
304
307
305
308
%post -p /sbin/ldconfig
306
309
%postun -p /sbin/ldconfig
0 commit comments