import openblas-0.3.15-6.el8

This commit is contained in:
CentOS Sources 2023-03-28 12:22:17 +00:00 committed by Stepan Oksanichenko
parent 6293654834
commit 3ad61eceb6

View File

@ -2,8 +2,8 @@
# Version of bundled lapack
%global lapackver 3.9.1
# Use strip from gcc-toolset-11
%global __strip "scl enable gcc-toolset-11 -- strip"
# Use strip from gcc-toolset-12
%global __strip "scl enable gcc-toolset-12 -- strip"
# DO NOT "CLEAN UP" OR MODIFY THIS SPEC FILE WITHOUT ASKING THE
# MAINTAINER FIRST!
@ -18,7 +18,7 @@
Name: openblas
Version: 0.3.15
Release: 4%{?dist}
Release: 6%{?dist}
Summary: An optimized BLAS library based on GotoBLAS2
Group: Development/Libraries
License: BSD
@ -40,9 +40,9 @@ Patch5: openblas-0.3.15-power-optimize.patch
Patch6: openblas-CVE-2021-4048.patch
BuildRequires: scl-utils
BuildRequires: gcc-toolset-11-gcc
BuildRequires: gcc-toolset-11-gcc-gfortran
BuildRequires: gcc-toolset-11-annobin-plugin-gcc
BuildRequires: gcc-toolset-12-gcc
BuildRequires: gcc-toolset-12-gcc-gfortran
BuildRequires: gcc-toolset-12-annobin-plugin-gcc
BuildRequires: perl-devel
BuildRequires: multilib-rpm-config
@ -344,8 +344,8 @@ rm -rf netliblapack64
%endif
%build
# Enable gcc-toolset-11
source scl_source enable gcc-toolset-11
# Enable gcc-toolset-12
source scl_source enable gcc-toolset-12
%if !%{lapacke}
LAPACKE="NO_LAPACKE=1"
@ -380,7 +380,7 @@ TARGET="TARGET=POWER7 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1"
TARGET="TARGET=POWER8 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1"
%endif
%ifarch aarch64
TARGET="TARGET=ARMV8 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1"
TARGET="TARGET=ARMV8 DYNAMIC_ARCH=0"
%endif
%ifarch s390x
TARGET="TARGET=ZARCH_GENERIC DYNAMIC_ARCH=1 DYNAMIC_OLDER=1"
@ -434,12 +434,12 @@ make -C openmp64_ $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_
%endif
%install
# Enable gcc-toolset-11
source scl_source enable gcc-toolset-11
# Enable gcc-toolset-12
source scl_source enable gcc-toolset-12
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
make -C serial USE_THREAD=0 DESTDIR=%{buildroot} OPENBLAS_LIBRARY_DIR=%{_libdir} OPENBLAS_INCLUDE_DIR=%{_includedir}/%name OPENBLAS_BINARY_DIR=%{_bindir} OPENBLAS_CMAKE_DIR=%{_libdir}/cmake install
# Copy lapacke include files
%if %{with system_lapack} && %{lapacke}
@ -455,6 +455,9 @@ suffix=""
%ifarch armv7hl
suffix="_armv7"
%endif
%ifarch aarch64
suffix="_armv8"
%endif
slibname=`basename %{buildroot}%{_libdir}/libopenblas${suffix}-*.so .so`
mv %{buildroot}%{_libdir}/${slibname}.a %{buildroot}%{_libdir}/lib%{name}.a
if [[ "$suffix" != "" ]]; then
@ -578,8 +581,6 @@ done
# Get rid of generated CMake config
rm -rf %{buildroot}%{_libdir}/cmake
# Get rid of generated pkgconfig
rm -rf %{buildroot}%{_libdir}/pkgconfig
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
@ -651,6 +652,8 @@ rm -rf %{buildroot}%{_libdir}/pkgconfig
%files devel
%{_includedir}/%{name}/
%{_libdir}/pkgconfig/
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/lib%{name}.so
%{_libdir}/lib%{name}o.so
%{_libdir}/lib%{name}p.so
@ -680,6 +683,15 @@ rm -rf %{buildroot}%{_libdir}/pkgconfig
%endif
%changelog
* Thu Feb 16 2023 Matej Mužila <mmuzila@redhat.com> - 0.3.15-6
- Include openblas.pc
- Resolves: #2115722
* Wed Feb 15 2023 Nikola Forró <nforro@redhat.com> - 0.3.15-5
- Disable dynamic CPU detection on aarch64
- Use gcc-toolset-12
- Resolves: #2170398
* Wed Jun 15 2022 Matej Mužila <mmuzila@redhat.com> - 0.3.15-4
- Fix out-of-bounds read in *larrv
- Resolves: CVE-2021-4048