openblas: fix older versions (#22358)

This commit is contained in:
Seth R. Johnson 2021-03-17 23:21:58 -04:00 committed by GitHub
parent e57053bd32
commit e5103b6914
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -220,8 +220,13 @@ def _microarch_target_args(self):
# 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')