!42 add loongarch support for openblas
From: @zhaozhen-zz Reviewed-by: @caodongxia Signed-off-by: @caodongxia
This commit is contained in:
commit
585a811d65
27
0001-modify-the-ABI-for-loongarch.patch
Normal file
27
0001-modify-the-ABI-for-loongarch.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From b13db2656d6e983a77b3d203b4af51ba15f2f815 Mon Sep 17 00:00:00 2001
|
||||
From: zhaozhen <zhaozhen@loongson.cn>
|
||||
Date: Thu, 9 Mar 2023 11:50:01 +0000
|
||||
Subject: [PATCH] modify the ABI for loongarch64
|
||||
|
||||
---
|
||||
OpenBLAS-0.3.18/Makefile.system | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git OpenBLAS-0.3.18/Makefile.system OpenBLAS-0.3.18/Makefile.system
|
||||
index 150dbef..f9101af 100644
|
||||
--- OpenBLAS-0.3.18/Makefile.system
|
||||
+++ OpenBLAS-0.3.18/Makefile.system
|
||||
@@ -869,8 +869,8 @@ endif
|
||||
|
||||
ifeq ($(ARCH), loongarch64)
|
||||
ifeq ($(CORE), LOONGSON3R5)
|
||||
-CCOMMON_OPT += -march=loongarch64 -mabi=lp64
|
||||
-FCOMMON_OPT += -march=loongarch64 -mabi=lp64
|
||||
+CCOMMON_OPT += -march=loongarch64 -mabi=lp64d
|
||||
+FCOMMON_OPT += -march=loongarch64 -mabi=lp64d
|
||||
endif
|
||||
endif
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
Name: openblas
|
||||
Version: 0.3.18
|
||||
Release: 2
|
||||
Release: 3
|
||||
Summary: An optimized BLAS library based on GotoBLAS2 1.13 BSD version
|
||||
License: BSD-3-Clause
|
||||
URL: https://github.com/xianyi/OpenBLAS/
|
||||
@ -10,6 +10,7 @@ Source0: https://github.com/xianyi/OpenBLAS/archive/v%{version}/openblas-
|
||||
Patch0000: openblas-0.2.15-system_lapack.patch
|
||||
Patch0001: openblas-0.2.5-libname.patch
|
||||
Patch0002: openblas-0.3.7-tests.patch
|
||||
Patch0003: 0001-modify-the-ABI-for-loongarch.patch
|
||||
Requires: %{name}-devel = %{version}-%{release}
|
||||
BuildRequires: gcc gcc-gfortran perl-devel gcc-c++
|
||||
|
||||
@ -34,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
|
||||
ExclusiveArch: x86_64 aarch64 loongarch64
|
||||
|
||||
%description
|
||||
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD \
|
||||
@ -57,6 +58,7 @@ cd OpenBLAS-%{version}
|
||||
%endif
|
||||
%patch0001 -p1 -b .libname
|
||||
%patch0002 -p1 -b .tests
|
||||
%patch0003 -p1
|
||||
|
||||
# Set source permissions
|
||||
find -name \*.f -exec chmod 644 {} \;
|
||||
@ -213,6 +215,9 @@ cp -a %{_includedir}/lapacke %{buildroot}%{_includedir}/%{name}
|
||||
%endif
|
||||
|
||||
# Fix name of libraries
|
||||
%ifarch loongarch64
|
||||
suffix="_loongson3r5"
|
||||
%endif
|
||||
slibname=`basename %{buildroot}%{_libdir}/libopenblas${suffix}-*.so .so`
|
||||
mv %{buildroot}%{_libdir}/${slibname}.a %{buildroot}%{_libdir}/lib%{name}.a
|
||||
if [[ "$suffix" != "" ]]; then
|
||||
@ -351,6 +356,9 @@ rm -rf %{buildroot}%{_libdir}/pkgconfig
|
||||
%{_libdir}/lib%{name}*64_.so
|
||||
|
||||
%changelog
|
||||
* Thu Mar 9 2023 zhaozhen <zhaozhen@loongson.cn> - 0.3.18-3
|
||||
- add loongarch support for openblas
|
||||
|
||||
* Wed May 11 2022 wulei <wulei80@h-partners.com> - 0.3.18-2
|
||||
- License compliance rectification
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user