From 1d98fa19e283b16386cb2ddeb490c72339e3c59f1e0137b5f8ffb8a3af7393f2 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Wed, 3 Jul 2019 14:01:10 +0000 Subject: [PATCH] Accepting request 713004 from home:Andreas_Schwab:Factory - Add support for ppc OBS-URL: https://build.opensuse.org/request/show/713004 OBS-URL: https://build.opensuse.org/package/show/devel:languages:rust/rust?expand=0&rev=221 --- _constraints | 1 + rust-1.35.0-powerpc-unknown-linux-gnu.tar.xz | 3 +++ rust.changes | 5 ++++ rust.spec | 28 +++++++++++++++++--- 4 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 rust-1.35.0-powerpc-unknown-linux-gnu.tar.xz diff --git a/_constraints b/_constraints index bf5e186..7cdbe04 100644 --- a/_constraints +++ b/_constraints @@ -15,6 +15,7 @@ i586 armv6l armv7l + ppc 2 diff --git a/rust-1.35.0-powerpc-unknown-linux-gnu.tar.xz b/rust-1.35.0-powerpc-unknown-linux-gnu.tar.xz new file mode 100644 index 0000000..55fef1d --- /dev/null +++ b/rust-1.35.0-powerpc-unknown-linux-gnu.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fb2f2dab95df490ef029f9dcfa8175b002dd345e4585c7ea70da4343d63d9f7 +size 128414412 diff --git a/rust.changes b/rust.changes index 041555b..10ecd15 100644 --- a/rust.changes +++ b/rust.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jul 2 07:21:24 UTC 2019 - Andreas Schwab + +- Add support for ppc + ------------------------------------------------------------------- Wed May 29 21:38:13 UTC 2019 - Luke Jones diff --git a/rust.spec b/rust.spec index 83cb50c..2563308 100644 --- a/rust.spec +++ b/rust.spec @@ -35,6 +35,9 @@ %global rust_arch arm %global abi gnueabihf %endif +%ifarch ppc +%global rust_arch powerpc +%endif %ifarch ppc64 %global rust_arch powerpc64 %endif @@ -61,6 +64,13 @@ %bcond_without bundled_llvm %endif +# RLS requires 64-bit atomics +%ifarch ppc +%bcond_with rls +%else +%bcond_without rls +%endif + # enable the --with-rust_bootstrap flag %bcond_with rust_bootstrap @@ -94,6 +104,7 @@ Source103: %{dl_url}/rust-%{version_bootstrap}-armv7-unknown-linux-gnueabih Source105: %{dl_url}/rust-%{version_bootstrap}-powerpc64-unknown-linux-gnu.tar.xz Source106: %{dl_url}/rust-%{version_bootstrap}-powerpc64le-unknown-linux-gnu.tar.xz Source107: %{dl_url}/rust-%{version_bootstrap}-s390x-unknown-linux-gnu.tar.xz +Source108: %{dl_url}/rust-%{version_bootstrap}-powerpc-unknown-linux-gnu.tar.xz # PATCH-FIX-OPENSUSE: edit src/librustc_llvm/build.rs to ignore GCC incompatible flag Patch0: ignore-Wstring-conversion.patch # PATCH-FIX-UPSTREAM: gh#rust-lang/rust#60184 @@ -133,7 +144,7 @@ Conflicts: rust Conflicts: rustc-bootstrap # Restrict the architectures as building rust relies on being initially # bootstrapped before we can build the n+1 release -ExclusiveArch: x86_64 %{arm} aarch64 ppc64 ppc64le s390x %{ix86} +ExclusiveArch: x86_64 %{arm} aarch64 ppc ppc64 ppc64le s390x %{ix86} %ifarch %{ix86} ExclusiveArch: i686 %endif @@ -266,9 +277,9 @@ A tool for formatting Rust code according to style guidelines. %package -n clippy Summary: Lints to catch common mistakes and improve Rust code -# /usr/bin/clippy-driver is dynamically linked against internal rustc libs License: MPL-2.0 Group: Development/Languages/Rust +# /usr/bin/clippy-driver is dynamically linked against internal rustc libs Requires: %{name} = %{version} Requires: cargo = %{version} Provides: clippy = %{clippy_version} @@ -290,10 +301,10 @@ Cargo downloads dependencies of Rust projects and compiles it. %package -n cargo-doc Summary: Documentation for Cargo -# Cargo no longer builds its own documentation -# https://github.com/rust-lang/cargo/pull/4904 License: MIT OR Apache-2.0 Group: Development/Languages/Rust +# Cargo no longer builds its own documentation +# https://github.com/rust-lang/cargo/pull/4904 Requires: rust-doc = %{version} BuildArch: noarch @@ -326,6 +337,9 @@ This package includes HTML documentation for Cargo. %ifarch s390x %setup -q -T -b 107 -n rust-%{version_bootstrap}-%{rust_triple} %endif +%ifarch ppc +%setup -q -T -b 108 -n rust-%{version_bootstrap}-%{rust_triple} +%endif ./install.sh --components=cargo,rustc,rust-std-%{rust_triple} --prefix=.%{_prefix} --disable-ldconfig %endif @@ -394,7 +408,11 @@ chmod +x src/libcore/unicode/printable.py %{codegen_units} \ --enable-vendor \ --enable-extended \ +%if %{with rls} --tools="cargo","rls","clippy","rustfmt","analysis","src" \ +%else + --tools="cargo","clippy","rustfmt","analysis","src" \ +%endif --release-channel="stable" # Sometimes we may be rebuilding with the same compiler, @@ -533,6 +551,7 @@ rm -rf %{buildroot}%{_sysconfdir} %dir %{rustlibdir} %{rustlibdir}/src +%if %{with rls} %files -n rls %if 0%{?suse_version} == 1315 %doc src/tools/rls/LICENSE-{APACHE,MIT} @@ -541,6 +560,7 @@ rm -rf %{buildroot}%{_sysconfdir} %endif %doc src/tools/rls/{README.md,COPYRIGHT,debugging.md} %{_bindir}/rls +%endif %files analysis %{rustlibdir}/%{rust_triple}/analysis/