!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
|
Name: openblas
|
||||||
Version: 0.3.18
|
Version: 0.3.18
|
||||||
Release: 3
|
Release: 4
|
||||||
Summary: An optimized BLAS library based on GotoBLAS2 1.13 BSD version
|
Summary: An optimized BLAS library based on GotoBLAS2 1.13 BSD version
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
URL: https://github.com/xianyi/OpenBLAS/
|
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-threads64_ < %{version}-%{release} openblas-Rblas < %{version}-%{release}
|
||||||
Obsoletes: openblas-static < %{version}-%{release}
|
Obsoletes: openblas-static < %{version}-%{release}
|
||||||
|
|
||||||
ExclusiveArch: x86_64 aarch64 loongarch64
|
ExclusiveArch: x86_64 aarch64 loongarch64 riscv64
|
||||||
|
|
||||||
%description
|
%description
|
||||||
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD \
|
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
|
%ifarch aarch64
|
||||||
TARGET="TARGET=ARMV8 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1"
|
TARGET="TARGET=ARMV8 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1"
|
||||||
%endif
|
%endif
|
||||||
|
%ifarch riscv64
|
||||||
|
TARGET="TARGET=RISCV64_GENERIC DYNAMIC_ARCH=0"
|
||||||
|
%endif
|
||||||
|
|
||||||
COMMON="%{optflags} -fPIC"
|
COMMON="%{optflags} -fPIC"
|
||||||
FCOMMON="%{optflags} -fPIC -frecursive"
|
FCOMMON="%{optflags} -fPIC -frecursive"
|
||||||
@ -207,7 +210,12 @@ wait
|
|||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
# Install serial library and headers
|
# 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
|
# Copy lapacke include files
|
||||||
%if %{with system_lapack} && %{lapacke}
|
%if %{with system_lapack} && %{lapacke}
|
||||||
@ -218,6 +226,9 @@ cp -a %{_includedir}/lapacke %{buildroot}%{_includedir}/%{name}
|
|||||||
%ifarch loongarch64
|
%ifarch loongarch64
|
||||||
suffix="_loongson3r5"
|
suffix="_loongson3r5"
|
||||||
%endif
|
%endif
|
||||||
|
%ifarch riscv64
|
||||||
|
suffix="_riscv64_generic"
|
||||||
|
%endif
|
||||||
slibname=`basename %{buildroot}%{_libdir}/libopenblas${suffix}-*.so .so`
|
slibname=`basename %{buildroot}%{_libdir}/libopenblas${suffix}-*.so .so`
|
||||||
mv %{buildroot}%{_libdir}/${slibname}.a %{buildroot}%{_libdir}/lib%{name}.a
|
mv %{buildroot}%{_libdir}/${slibname}.a %{buildroot}%{_libdir}/lib%{name}.a
|
||||||
if [[ "$suffix" != "" ]]; then
|
if [[ "$suffix" != "" ]]; then
|
||||||
@ -356,6 +367,9 @@ rm -rf %{buildroot}%{_libdir}/pkgconfig
|
|||||||
%{_libdir}/lib%{name}*64_.so
|
%{_libdir}/lib%{name}*64_.so
|
||||||
|
|
||||||
%changelog
|
%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
|
* Thu Mar 9 2023 zhaozhen <zhaozhen@loongson.cn> - 0.3.18-3
|
||||||
- add loongarch support for openblas
|
- add loongarch support for openblas
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user