openblas: fix target detection for cross-compiling (#12390)

In a review of a previous pull request (
https://github.com/spack/spack/pull/10713 ) it was mentioned that the
proper way to figure out the target architecture is via
spec.architecture.target.  This patch fixes this for the openblas
package.

Signed-off-by: Janne Blomqvist <janne.blomqvist@aalto.fi>
This commit is contained in:
Janne Blomqvist 2019-08-12 22:43:04 +03:00 committed by Adam J. Stewart
parent 820b220b22
commit 490168be4d

View file

@ -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: