From e916a9424ca6195e0685071f3bf3a8f532cb22fe Mon Sep 17 00:00:00 2001 From: Thomas Gruber Date: Thu, 12 Mar 2020 14:44:43 +0100 Subject: likwid: add compiler selection for ARM and POWER architecture (#14183) Co-Authored-By: Massimiliano Culpo --- var/spack/repos/builtin/packages/likwid/package.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/likwid/package.py b/var/spack/repos/builtin/packages/likwid/package.py index c121b1ef35..8556fb0d8e 100644 --- a/var/spack/repos/builtin/packages/likwid/package.py +++ b/var/spack/repos/builtin/packages/likwid/package.py @@ -42,8 +42,6 @@ class Likwid(Package): depends_on('perl', type=('build', 'run')) - supported_compilers = {'clang': 'CLANG', 'gcc': 'GCC', 'intel': 'ICC'} - def patch(self): files = glob.glob('perl/*.*') + glob.glob('bench/perl/*.*') @@ -61,13 +59,18 @@ class Likwid(Package): *files) def install(self, spec, prefix): - if self.compiler.name not in self.supported_compilers: + supported_compilers = {'clang': 'CLANG', 'gcc': 'GCC', 'intel': 'ICC'} + if spec.target.family == 'aarch64': + supported_compilers = {'gcc': 'GCCARMv8', 'clang': 'ARMCLANG'} + elif spec.target.family == 'ppc64' or spec.target.family == 'ppc64le': + supported_compilers = {'gcc': 'GCCPOWER'} + if self.compiler.name not in supported_compilers: raise RuntimeError('{0} is not a supported compiler \ to compile Likwid'.format(self.compiler.name)) filter_file('^COMPILER .*', 'COMPILER = ' + - self.supported_compilers[self.compiler.name], + supported_compilers[self.compiler.name], 'config.mk') filter_file('^PREFIX .*', 'PREFIX = ' + -- cgit v1.2.3-70-g09d2