likwid: add compiler selection for ARM and POWER architecture (#14183)
Co-Authored-By: Massimiliano Culpo <massimiliano.culpo@gmail.com>
This commit is contained in:
parent
ad1a28ee48
commit
e916a9424c
@ -42,8 +42,6 @@ class Likwid(Package):
|
|||||||
|
|
||||||
depends_on('perl', type=('build', 'run'))
|
depends_on('perl', type=('build', 'run'))
|
||||||
|
|
||||||
supported_compilers = {'clang': 'CLANG', 'gcc': 'GCC', 'intel': 'ICC'}
|
|
||||||
|
|
||||||
def patch(self):
|
def patch(self):
|
||||||
files = glob.glob('perl/*.*') + glob.glob('bench/perl/*.*')
|
files = glob.glob('perl/*.*') + glob.glob('bench/perl/*.*')
|
||||||
|
|
||||||
@ -61,13 +59,18 @@ def filter_sbang(self):
|
|||||||
*files)
|
*files)
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
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 \
|
raise RuntimeError('{0} is not a supported compiler \
|
||||||
to compile Likwid'.format(self.compiler.name))
|
to compile Likwid'.format(self.compiler.name))
|
||||||
|
|
||||||
filter_file('^COMPILER .*',
|
filter_file('^COMPILER .*',
|
||||||
'COMPILER = ' +
|
'COMPILER = ' +
|
||||||
self.supported_compilers[self.compiler.name],
|
supported_compilers[self.compiler.name],
|
||||||
'config.mk')
|
'config.mk')
|
||||||
filter_file('^PREFIX .*',
|
filter_file('^PREFIX .*',
|
||||||
'PREFIX = ' +
|
'PREFIX = ' +
|
||||||
|
Loading…
Reference in New Issue
Block a user