Add support for riscv64

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
David Abdurachmanov 2023-03-28 11:37:53 +03:00
parent 108e16551f
commit 49b7d8fee3
Signed by: davidlt
GPG Key ID: 8B7F1DA0E2C9FDBB
1 changed files with 14 additions and 1 deletions

View File

@ -15,7 +15,7 @@
Name: openblas
Version: 0.3.21
Release: 5%{?dist}
Release: 5.0.riscv64%{?dist}
Summary: An optimized BLAS library based on GotoBLAS2
License: BSD
URL: https://github.com/xianyi/OpenBLAS/
@ -57,7 +57,11 @@ Obsoletes: %{name}-Rblas < %{version}-%{release}
%global execstack 1
%endif
%else
%ifnarch riscv64
%global execstack 1
%else
%global execstack 0
%endif
%endif
%if %{execstack}
BuildRequires: /usr/bin/execstack
@ -392,6 +396,9 @@ TARGET="TARGET=ARMV8 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1"
%ifarch s390x
TARGET="TARGET=ZARCH_GENERIC DYNAMIC_ARCH=1 DYNAMIC_OLDER=1"
%endif
%ifarch riscv64
TARGET="TARGET=RISCV64_GENERIC DYNAMIC_ARCH=0"
%endif
%if 0%{?rhel} == 5
# Gfortran too old to recognize -frecursive
@ -454,6 +461,9 @@ suffix=""
%ifarch armv7hl
suffix="_armv7"
%endif
%ifarch riscv64
suffix="_riscv64_generic"
%endif
slibname=`basename %{buildroot}%{_libdir}/libopenblas${suffix}-*.so .so`
mv %{buildroot}%{_libdir}/${slibname}.a %{buildroot}%{_libdir}/lib%{name}.a
if [[ "$suffix" != "" ]]; then
@ -660,6 +670,9 @@ rm -rf %{buildroot}%{_libdir}/pkgconfig
%endif
%changelog
* Tue Mar 28 2023 David Abdurachmanov <davidlt@rivosinc.com> - 0.3.21-5.0.riscv64
- Add support for riscv64
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.21-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild