summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/openblas/package.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py
index a2bd7da1cb..9ec69cc24d 100644
--- a/var/spack/repos/builtin/packages/openblas/package.py
+++ b/var/spack/repos/builtin/packages/openblas/package.py
@@ -218,8 +218,10 @@ class Openblas(MakefilePackage):
if microarch.vendor == 'generic':
# User requested a generic platform, or we couldn't find a good
# match for the requested one. Allow OpenBLAS to determine
- # an optimized kernel at run time.
- args.append('DYNAMIC_ARCH=1')
+ # 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'])
elif microarch.name in skylake:
# Special case for renaming skylake family
args.append('TARGET=SKYLAKEX')