diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 44cdb674cd..b7024265eb 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -198,7 +198,7 @@ def make_defs(self): if '+ilp64' in self.spec: make_defs += ['INTERFACE64=1'] - if 'x86' in spack.architecture.sys_type(): + if 'x86' in self.spec.architecture.target.lower(): if '~avx2' in self.spec: make_defs += ['NO_AVX2=1'] if '~avx512' in self.spec: