summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorSeth R. Johnson <johnsonsr@ornl.gov>2021-03-17 23:21:58 -0400
committerGitHub <noreply@github.com>2021-03-18 03:21:58 +0000
commite5103b69149f7bcc4ce83a620939b06e44cb6434 (patch)
treedc7f74bc5d53d8503df638ad036ea64afe21ea5a /var
parente57053bd32f9b0857dfffe03a7c9782ea6057a8e (diff)
downloadspack-e5103b69149f7bcc4ce83a620939b06e44cb6434.tar.gz
spack-e5103b69149f7bcc4ce83a620939b06e44cb6434.tar.bz2
spack-e5103b69149f7bcc4ce83a620939b06e44cb6434.tar.xz
spack-e5103b69149f7bcc4ce83a620939b06e44cb6434.zip
openblas: fix older versions (#22358)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/openblas/package.py9
1 files changed, 7 insertions, 2 deletions
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')