From e5103b69149f7bcc4ce83a620939b06e44cb6434 Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Wed, 17 Mar 2021 23:21:58 -0400 Subject: openblas: fix older versions (#22358) --- var/spack/repos/builtin/packages/openblas/package.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 9ec69cc24d..47da4859e7 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -220,8 +220,13 @@ class Openblas(MakefilePackage): # match for the requested one. Allow OpenBLAS to determine # an optimized kernel at run time, including older CPUs, while # forcing it not to add flags for the current host compiler. - args.extend(['DYNAMIC_ARCH=1', 'DYNAMIC_OLDER=1', - 'TARGET=GENERIC']) + args.append('DYNAMIC_ARCH=1') + if self.spec.version >= Version('0.3.12'): + # These are necessary to prevent OpenBLAS from targeting the + # host architecture on newer version of OpenBLAS, but they + # cause build errors on 0.3.5 . + args.extend(['DYNAMIC_OLDER=1', 'TARGET=GENERIC']) + elif microarch.name in skylake: # Special case for renaming skylake family args.append('TARGET=SKYLAKEX') -- cgit v1.2.3-70-g09d2