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
This commit is contained in:
Neal Gompa 2019-07-03 14:01:10 +00:00 committed by Git OBS Bridge
parent f7540d974d
commit 1d98fa19e2
4 changed files with 33 additions and 4 deletions

View File

@ -15,6 +15,7 @@
<arch>i586</arch> <arch>i586</arch>
<arch>armv6l</arch> <arch>armv6l</arch>
<arch>armv7l</arch> <arch>armv7l</arch>
<arch>ppc</arch>
</conditions> </conditions>
<hardware> <hardware>
<processors>2</processors> <processors>2</processors>

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7fb2f2dab95df490ef029f9dcfa8175b002dd345e4585c7ea70da4343d63d9f7
size 128414412

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jul 2 07:21:24 UTC 2019 - Andreas Schwab <schwab@suse.de>
- Add support for ppc
------------------------------------------------------------------- -------------------------------------------------------------------
Wed May 29 21:38:13 UTC 2019 - Luke Jones <jones_ld@protonmail.com> Wed May 29 21:38:13 UTC 2019 - Luke Jones <jones_ld@protonmail.com>

View File

@ -35,6 +35,9 @@
%global rust_arch arm %global rust_arch arm
%global abi gnueabihf %global abi gnueabihf
%endif %endif
%ifarch ppc
%global rust_arch powerpc
%endif
%ifarch ppc64 %ifarch ppc64
%global rust_arch powerpc64 %global rust_arch powerpc64
%endif %endif
@ -61,6 +64,13 @@
%bcond_without bundled_llvm %bcond_without bundled_llvm
%endif %endif
# RLS requires 64-bit atomics
%ifarch ppc
%bcond_with rls
%else
%bcond_without rls
%endif
# enable the --with-rust_bootstrap flag # enable the --with-rust_bootstrap flag
%bcond_with rust_bootstrap %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 Source105: %{dl_url}/rust-%{version_bootstrap}-powerpc64-unknown-linux-gnu.tar.xz
Source106: %{dl_url}/rust-%{version_bootstrap}-powerpc64le-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 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 # PATCH-FIX-OPENSUSE: edit src/librustc_llvm/build.rs to ignore GCC incompatible flag
Patch0: ignore-Wstring-conversion.patch Patch0: ignore-Wstring-conversion.patch
# PATCH-FIX-UPSTREAM: gh#rust-lang/rust#60184 # PATCH-FIX-UPSTREAM: gh#rust-lang/rust#60184
@ -133,7 +144,7 @@ Conflicts: rust
Conflicts: rustc-bootstrap Conflicts: rustc-bootstrap
# Restrict the architectures as building rust relies on being initially # Restrict the architectures as building rust relies on being initially
# bootstrapped before we can build the n+1 release # 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} %ifarch %{ix86}
ExclusiveArch: i686 ExclusiveArch: i686
%endif %endif
@ -266,9 +277,9 @@ A tool for formatting Rust code according to style guidelines.
%package -n clippy %package -n clippy
Summary: Lints to catch common mistakes and improve Rust code 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 License: MPL-2.0
Group: Development/Languages/Rust Group: Development/Languages/Rust
# /usr/bin/clippy-driver is dynamically linked against internal rustc libs
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires: cargo = %{version} Requires: cargo = %{version}
Provides: clippy = %{clippy_version} Provides: clippy = %{clippy_version}
@ -290,10 +301,10 @@ Cargo downloads dependencies of Rust projects and compiles it.
%package -n cargo-doc %package -n cargo-doc
Summary: Documentation for Cargo 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 License: MIT OR Apache-2.0
Group: Development/Languages/Rust Group: Development/Languages/Rust
# Cargo no longer builds its own documentation
# https://github.com/rust-lang/cargo/pull/4904
Requires: rust-doc = %{version} Requires: rust-doc = %{version}
BuildArch: noarch BuildArch: noarch
@ -326,6 +337,9 @@ This package includes HTML documentation for Cargo.
%ifarch s390x %ifarch s390x
%setup -q -T -b 107 -n rust-%{version_bootstrap}-%{rust_triple} %setup -q -T -b 107 -n rust-%{version_bootstrap}-%{rust_triple}
%endif %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 ./install.sh --components=cargo,rustc,rust-std-%{rust_triple} --prefix=.%{_prefix} --disable-ldconfig
%endif %endif
@ -394,7 +408,11 @@ chmod +x src/libcore/unicode/printable.py
%{codegen_units} \ %{codegen_units} \
--enable-vendor \ --enable-vendor \
--enable-extended \ --enable-extended \
%if %{with rls}
--tools="cargo","rls","clippy","rustfmt","analysis","src" \ --tools="cargo","rls","clippy","rustfmt","analysis","src" \
%else
--tools="cargo","clippy","rustfmt","analysis","src" \
%endif
--release-channel="stable" --release-channel="stable"
# Sometimes we may be rebuilding with the same compiler, # Sometimes we may be rebuilding with the same compiler,
@ -533,6 +551,7 @@ rm -rf %{buildroot}%{_sysconfdir}
%dir %{rustlibdir} %dir %{rustlibdir}
%{rustlibdir}/src %{rustlibdir}/src
%if %{with rls}
%files -n rls %files -n rls
%if 0%{?suse_version} == 1315 %if 0%{?suse_version} == 1315
%doc src/tools/rls/LICENSE-{APACHE,MIT} %doc src/tools/rls/LICENSE-{APACHE,MIT}
@ -541,6 +560,7 @@ rm -rf %{buildroot}%{_sysconfdir}
%endif %endif
%doc src/tools/rls/{README.md,COPYRIGHT,debugging.md} %doc src/tools/rls/{README.md,COPYRIGHT,debugging.md}
%{_bindir}/rls %{_bindir}/rls
%endif
%files analysis %files analysis
%{rustlibdir}/%{rust_triple}/analysis/ %{rustlibdir}/%{rust_triple}/analysis/