openblas/Utilize-compiler-AVX512-capability-info-from-c_check-when-building-getarch.patch
Egbert Eich 9df0d0912b Accepting request 966356 from home:eeich:branches:science
- Build PPC64LE libraries with the lastest gcc available to
  take advantage of instruction sets in later CPUs used in
  the CPU specific kernels (jsc#SLE-18143, bsc#1197721).
  For fortran use the stock compiler to avoid compatibility
  issues between different versions of libfortran.
  This is relevant for Leap/SLE only. It may be dropped once
  gcc < 10 is no longer supported.
- Do the same for x86_64 on SLE to make sure Cooperlake support
  is built properly.
- Remove:
  * Do-not-attempt-to-check-host-CPU-if-TARGET-is-set.patch
  * Create-independent-kernel-Makfile-configuration-when-building-DYNAMIC_ARCH.patch
  * For-DYNAMIC_ARCH-don-t-use-sbgemm_r-as-parameter.c-doesn-t-get-build.patch
  Instead, add from upstream:
  * Define-sbgemm_r-to-fix-DYNAMIC_ARCH-builds.patch
  * Remove-extraneous-and-wrong-definition-of-sbgemm_r-on-x86_64.patch
  * Fix-checks-for-AVX512-and-atomics.patch
  * Revert-AVX512-capability-check-from-PR-1980-moved-to-build.patch
  * Use-CC-and-full-command-line-instead-of-hard-coding-gcc-for-AVX512-checking.patch
  * Utilize-compiler-AVX512-capability-info-from-c_check-when-building-getarch.patch

  BLAS/LAPACK implementation (boo#1177260).  
  'openblas-common-devel' will provide the removed 'openblas-devel-headers'
  while the arch specific 'preferred' flavor will provide the removed
  'openblas-devel'.

OBS-URL: https://build.opensuse.org/request/show/966356
OBS-URL: https://build.opensuse.org/package/show/science/openblas?expand=0&rev=131
2022-04-01 07:59:26 +00:00

29 lines
943 B
Diff

From: Martin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Date: Wed Mar 23 15:19:55 2022 +0100
Subject: Utilize compiler AVX512 capability info from c_check when building getarch
Patch-mainline: Not yet
Git-repo: https://github.com/xianyi/OpenBLAS
Git-commit: 9fbeb88fb87dcc418c9ef01c5f24c85029dfbbef
References:
Signed-off-by: Egbert Eich <eich@suse.de>
---
Makefile.prebuild | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile.prebuild b/Makefile.prebuild
index 399db956..4dad74d6 100644
--- a/Makefile.prebuild
+++ b/Makefile.prebuild
@@ -71,7 +71,8 @@ endif
getarch : getarch.c cpuid.S dummy $(CPUIDEMU)
- $(HOSTCC) $(HOST_CFLAGS) $(EXFLAGS) -o $(@F) getarch.c cpuid.S $(CPUIDEMU)
+ avx512=$$(perl c_check - - gcc | grep NO_AVX512); \
+ $(HOSTCC) $(HOST_CFLAGS) $(EXFLAGS) $${avx512:+-D$${avx512}} -o $(@F) getarch.c cpuid.S $(CPUIDEMU)
getarch_2nd : getarch_2nd.c config.h dummy
ifndef TARGET_CORE