From 490168be4d4cb87ea9d80a2d77b4e9c4f0d18a8d Mon Sep 17 00:00:00 2001 From: Janne Blomqvist Date: Mon, 12 Aug 2019 22:43:04 +0300 Subject: 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 --- var/spack/repos/builtin/packages/openblas/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'var') 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 @@ class Openblas(MakefilePackage): 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: -- cgit v1.2.3-70-g09d2