Skip to content

Commit

Permalink
Merge pull request easybuilders#3339 from julianmorillo/develop
Browse files Browse the repository at this point in the history
Add RISCV64 support and update config options of new versions of Extrae
  • Loading branch information
ocaisa authored Jul 6, 2024
2 parents bb86f05 + 92f02fd commit 064e3e2
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions easybuild/easyblocks/e/extrae.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@

from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.tools.modules import get_software_root
from easybuild.tools import LooseVersion
from easybuild.tools.systemtools import RISCV64
from easybuild.tools.systemtools import get_cpu_architecture


class EB_Extrae(ConfigureMake):
Expand All @@ -42,14 +45,26 @@ def configure_step(self):
self.cfg.update('configopts', "--with-mpi=%s" % get_software_root(self.toolchain.MPI_MODULE_NAME[0]))

# Optional dependences
deps = {
'binutils': ('', '--with-binutils=%s', ''),
'Boost': ('', '--with-boost=%s', ''),
'libdwarf': ('', '--with-dwarf=%s', '--without-dwarf'),
'libunwind': ('', '--with-unwind=%s', ''),
'libxml2': (' --enable-xml --enable-merge-in-trace', '', ''),
'PAPI': ('--enable-sampling', '--with-papi=%s', '--without-papi'),
}
# Both --enable-xml and --with-dwarf options are no longer available from 4.1.0 version
# Instead, --with-xml is used
if LooseVersion(self.version) >= LooseVersion('4.1.0'):
deps = {
'binutils': ('', '--with-binutils=%s', ''),
'Boost': ('', '--with-boost=%s', ''),
'libunwind': ('', '--with-unwind=%s', ''),
'libxml2': ('--enable-merge-in-trace', '--with-xml=%s', ''),
'PAPI': ('--enable-sampling', '--with-papi=%s', '--without-papi'),
}
else:
deps = {
'binutils': ('', '--with-binutils=%s', ''),
'Boost': ('', '--with-boost=%s', ''),
'libdwarf': ('', '--with-dwarf=%s', '--without-dwarf'),
'libunwind': ('', '--with-unwind=%s', ''),
'libxml2': (' --enable-xml --enable-merge-in-trace', '', ''),
'PAPI': ('--enable-sampling', '--with-papi=%s', '--without-papi'),
}

for (dep_name, (with_opts, with_root_opt, without_opt)) in deps.items():
dep_root = get_software_root(dep_name)
if dep_root:
Expand All @@ -64,6 +79,10 @@ def configure_step(self):
# TODO: make this optional dependencies
self.cfg.update('configopts', "--without-dyninst")

# Needed to build in RISC-V architectures
if get_cpu_architecture() == RISCV64:
self.cfg.update('configopts', "--enable-posix-clock")

super(EB_Extrae, self).configure_step()

def sanity_check_step(self):
Expand Down

0 comments on commit 064e3e2

Please sign in to comment.