[packages/rust] add support for armhf
atler
atler at pld-linux.org
Fri Dec 4 14:13:42 CET 2020
commit 1fe729c8276c7c91756dcc191043f0e11563732a
Author: Jan Palus <atler at pld-linux.org>
Date: Fri Dec 4 10:42:35 2020 +0100
add support for armhf
rust.spec | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/rust.spec b/rust.spec
index b80fb14..26b7b90 100644
--- a/rust.spec
+++ b/rust.spec
@@ -44,6 +44,8 @@ Source2: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_ru
# Source2-md5: 9c351771a541e38416dd99ca85309059
Source3: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-aarch64-unknown-linux-gnu.tar.xz
# Source3-md5: 1bb96238b441204e2b47561857ca9916
+Source4: https://static.rust-lang.org/dist/%{bootstrap_date}/rust-%{bootstrap_rust}-arm-unknown-linux-gnueabihf.tar.xz
+# Source4-md5: e178fcecb4bfdbacc967b76a5313c889
Patch0: %{name}-x32.patch
URL: https://www.rust-lang.org/
# for src/compiler-rt
@@ -97,7 +99,7 @@ Requires: gcc
# Only x86_64 and i686 are Tier 1 platforms at this time.
# x32 is Tier 2, only rust-std is available (no rustc or cargo).
# https://doc.rust-lang.org/nightly/rustc/platform-support.html
-ExclusiveArch: %{x8664} %{ix86} x32 aarch64
+ExclusiveArch: %{x8664} %{ix86} x32 aarch64 armv6hl armv7hl armv7hnl
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%ifarch x32
@@ -105,10 +107,16 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define rust_host_triple x86_64-unknown-linux-gnu
%define rust_bootstrap_triple x86_64-unknown-linux-gnu
%else
+%ifarch armv6hl armv7hl armv7hnl
+%define rust_triple arm-unknown-linux-gnueabihf
+%define rust_host_triple %{rust_triple}
+%define rust_bootstrap_triple %{rust_triple}
+%else
%define rust_triple %{_target_cpu}-unknown-linux-gnu
%define rust_host_triple %{rust_triple}
%define rust_bootstrap_triple %{rust_triple}
%endif
+%endif
%if %{without bootstrap}
%define local_rust_root %{_prefix}
@@ -289,6 +297,9 @@ tar xf %{SOURCE2}
%ifarch aarch64
tar xf %{SOURCE3}
%endif
+%ifarch armv6hl armv7hl armv7hnl
+tar xf %{SOURCE4}
+%endif
%{__mv} %{bootstrap_root} %{bootstrap_root}-root
%{bootstrap_root}-root/install.sh \
--components=cargo,rustc,rust-std-%{rust_bootstrap_triple} \
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rust.git/commitdiff/669f5a3be68c599fded0a631038a2461547ce531
More information about the pld-cvs-commit
mailing list