diff --git a/_constraints b/_constraints
deleted file mode 100644
index 28d4eb7..0000000
--- a/_constraints
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- 8
-
-
- 4
-
-
-
-
- x86_64
-
-
-
- 12
-
-
-
-
diff --git a/openblas.changes b/openblas.changes
index 374b374..93aae50 100644
--- a/openblas.changes
+++ b/openblas.changes
@@ -1,3 +1,11 @@
+-------------------------------------------------------------------
+Wed Sep 14 06:08:40 UTC 2022 - Egbert Eich
+
+- 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
diff --git a/openblas.spec b/openblas.spec
index 89dd871..1bd4787 100644
--- a/openblas.spec
+++ b/openblas.spec
@@ -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
-# 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