Accepting request 1003588 from home:eeich:branches:science

- The toolchain and 'make' in TW have been updated to handle parallel
  makes spawned by gcc (for LTO optimization) properly. Thus, remove
  restrictions.
- Disable lto when linking test programs to speeds up building.

OBS-URL: https://build.opensuse.org/request/show/1003588
OBS-URL: https://build.opensuse.org/package/show/science/openblas?expand=0&rev=144
This commit is contained in:
Egbert Eich 2022-09-19 10:19:03 +00:00 committed by Git OBS Bridge
parent b1b5d16d6b
commit e2b7712e17
3 changed files with 17 additions and 24 deletions

View File

@ -1,21 +0,0 @@
<?xml version="1.0"?>
<constraints>
<hardware>
<disk>
<size unit="G">8</size>
</disk>
<memory>
<size unit="G">4</size>
</memory>
</hardware>
<overwrite>
<conditions>
<arch>x86_64</arch>
</conditions>
<hardware>
<memory>
<size unit="G">12</size>
</memory>
</hardware>
</overwrite>
</constraints>

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed Sep 14 06:08:40 UTC 2022 - Egbert Eich <eich@suse.com>
- The toolchain and 'make' in TW have been updated to handle parallel
makes spawned by gcc (for LTO optimization) properly. Thus, remove
restrictions.
- Disable lto when linking test programs to speeds up building.
-------------------------------------------------------------------
Thu May 5 11:56:20 UTC 2022 - Atri Bhattacharya <badshah400@gmail.com>

View File

@ -298,6 +298,8 @@ This package contains headers for OpenBLAS.
%ifarch s390
sed -i -e "s@m32@m31@" Makefile.system
%endif
sed -i -e '/FLDFLAGS = \|$(CC)\|$(CXX)/s@$@ $(LDFLAGS_TESTS)@' \
test/Makefile ctest/Makefile utest/Makefile cpp_thread_test/Makefile
%if %{without hpc}
cp %{SOURCE1} .
@ -317,10 +319,13 @@ EOF
%build
# Limit lto jobs to 1 - -flto=auto together with make -j<m>
# would cause a huge number of build jobs spawned in parallel
# For static libraries use -ffat-lto-objects to make sure the 'regular'
# assembler code is generated as well as the intermediate code will be
# stripped during pre-packaging post-processing. Also, set ldflags_tests
# to speed up building of tests.
%if "%{?_lto_cflags}" != ""
%global _lto_cflags -flto=1 -ffat-lto-objects
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
%global ldflags_tests -fno-lto
%endif
# disable lto for ppc64le, boo#1181733
@ -385,6 +390,7 @@ make MAKE_NB_JOBS=$jobs %{?openblas_target} %{?build_flags} \
OPENBLAS_CMAKE_DIR=%{p_cmakedir} \
PREFIX=%{p_prefix} \
%{!?with_hpc:LIBNAMESUFFIX=%flavor FC=gfortran CC=gcc%{?cc_v:-%{cc_v}} %{?cc_v:CEXTRALIB=""}} \
%{?ldflags_tests:LDFLAGS_TESTS=%{ldflags_tests}} \
%{?with_hpc:%{?cc_v:CC=gcc-%{cc_v} CEXTRALIB=""}}
%install