Skip to content

Commit 1fe729c

Browse files
committed
add support for armhf
1 parent 9e7854c commit 1fe729c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

rust.spec

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ Source2: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_ru
4444
# Source2-md5: 9c351771a541e38416dd99ca85309059
4545
Source3: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-aarch64-unknown-linux-gnu.tar.xz
4646
# Source3-md5: 1bb96238b441204e2b47561857ca9916
47+
Source4: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-arm-unknown-linux-gnueabihf.tar.xz
48+
# Source4-md5: e178fcecb4bfdbacc967b76a5313c889
4749
Patch0: %{name}-x32.patch
4850
URL: https://www.rust-lang.org/
4951
# for src/compiler-rt
@@ -97,18 +99,24 @@ Requires: gcc
9799
# Only x86_64 and i686 are Tier 1 platforms at this time.
98100
# x32 is Tier 2, only rust-std is available (no rustc or cargo).
99101
# https://doc.rust-lang.org/nightly/rustc/platform-support.html
100-
ExclusiveArch: %{x8664} %{ix86} x32 aarch64
102+
ExclusiveArch: %{x8664} %{ix86} x32 aarch64 armv6hl armv7hl armv7hnl
101103
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
102104

103105
%ifarch x32
104106
%define rust_triple x86_64-unknown-linux-gnux32
105107
%define rust_host_triple x86_64-unknown-linux-gnu
106108
%define rust_bootstrap_triple x86_64-unknown-linux-gnu
107109
%else
110+
%ifarch armv6hl armv7hl armv7hnl
111+
%define rust_triple arm-unknown-linux-gnueabihf
112+
%define rust_host_triple %{rust_triple}
113+
%define rust_bootstrap_triple %{rust_triple}
114+
%else
108115
%define rust_triple %{_target_cpu}-unknown-linux-gnu
109116
%define rust_host_triple %{rust_triple}
110117
%define rust_bootstrap_triple %{rust_triple}
111118
%endif
119+
%endif
112120

113121
%if %{without bootstrap}
114122
%define local_rust_root %{_prefix}
@@ -289,6 +297,9 @@ tar xf %{SOURCE2}
289297
%ifarch aarch64
290298
tar xf %{SOURCE3}
291299
%endif
300+
%ifarch armv6hl armv7hl armv7hnl
301+
tar xf %{SOURCE4}
302+
%endif
292303
%{__mv} %{bootstrap_root} %{bootstrap_root}-root
293304
%{bootstrap_root}-root/install.sh \
294305
--components=cargo,rustc,rust-std-%{rust_bootstrap_triple} \

0 commit comments

Comments
 (0)