!43 增加riscv架构支持
From: @laokz Reviewed-by: @Charlie_li Signed-off-by: @Charlie_li
This commit is contained in:
commit
501979dc26
@ -2,7 +2,7 @@
|
||||
|
||||
Name: openblas
|
||||
Version: 0.3.18
|
||||
Release: 3
|
||||
Release: 4
|
||||
Summary: An optimized BLAS library based on GotoBLAS2 1.13 BSD version
|
||||
License: BSD-3-Clause
|
||||
URL: https://github.com/xianyi/OpenBLAS/
|
||||
@ -35,7 +35,7 @@ Obsoletes: openblas-serial64_ < %{version}-%{release} openblas-openmp64_ <
|
||||
Obsoletes: openblas-threads64_ < %{version}-%{release} openblas-Rblas < %{version}-%{release}
|
||||
Obsoletes: openblas-static < %{version}-%{release}
|
||||
|
||||
ExclusiveArch: x86_64 aarch64 loongarch64
|
||||
ExclusiveArch: x86_64 aarch64 loongarch64 riscv64
|
||||
|
||||
%description
|
||||
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD \
|
||||
@ -167,6 +167,9 @@ TARGET="TARGET=CORE2 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1"
|
||||
%ifarch aarch64
|
||||
TARGET="TARGET=ARMV8 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1"
|
||||
%endif
|
||||
%ifarch riscv64
|
||||
TARGET="TARGET=RISCV64_GENERIC DYNAMIC_ARCH=0"
|
||||
%endif
|
||||
|
||||
COMMON="%{optflags} -fPIC"
|
||||
FCOMMON="%{optflags} -fPIC -frecursive"
|
||||
@ -207,7 +210,12 @@ wait
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
# Install serial library and headers
|
||||
make -C serial USE_THREAD=0 PREFIX=%{buildroot} OPENBLAS_LIBRARY_DIR=%{buildroot}%{_libdir} OPENBLAS_INCLUDE_DIR=%{buildroot}%{_includedir}/%name OPENBLAS_BINARY_DIR=%{buildroot}%{_bindir} OPENBLAS_CMAKE_DIR=%{buildroot}%{_libdir}/cmake install
|
||||
%ifarch riscv64
|
||||
TARGET="TARGET=RISCV64_GENERIC DYNAMIC_ARCH=0"
|
||||
%else
|
||||
TARGET=
|
||||
%endif
|
||||
make -C serial $TARGET USE_THREAD=0 PREFIX=%{buildroot} OPENBLAS_LIBRARY_DIR=%{buildroot}%{_libdir} OPENBLAS_INCLUDE_DIR=%{buildroot}%{_includedir}/%name OPENBLAS_BINARY_DIR=%{buildroot}%{_bindir} OPENBLAS_CMAKE_DIR=%{buildroot}%{_libdir}/cmake install
|
||||
|
||||
# Copy lapacke include files
|
||||
%if %{with system_lapack} && %{lapacke}
|
||||
@ -218,6 +226,9 @@ cp -a %{_includedir}/lapacke %{buildroot}%{_includedir}/%{name}
|
||||
%ifarch loongarch64
|
||||
suffix="_loongson3r5"
|
||||
%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
|
||||
@ -356,6 +367,9 @@ rm -rf %{buildroot}%{_libdir}/pkgconfig
|
||||
%{_libdir}/lib%{name}*64_.so
|
||||
|
||||
%changelog
|
||||
* Fri Jun 30 2023 xiaoqianlv <xiaoqian@nj.iscas.ac.cn>- 0.3.18-4
|
||||
- add support for riscv
|
||||
|
||||
* Thu Mar 9 2023 zhaozhen <zhaozhen@loongson.cn> - 0.3.18-3
|
||||
- add loongarch support for openblas
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user