From 1d08f5b5c671875d6525a47923a1c1344bdf9dff Mon Sep 17 00:00:00 2001 From: Julian Morillo Date: Fri, 24 May 2024 16:34:41 +0200 Subject: [PATCH 1/3] Adding support to RISCV64 when using tagged_layout --- easybuild/easyblocks/b/boost.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easybuild/easyblocks/b/boost.py b/easybuild/easyblocks/b/boost.py index 7b88dd93e9..4baa244598 100644 --- a/easybuild/easyblocks/b/boost.py +++ b/easybuild/easyblocks/b/boost.py @@ -326,6 +326,8 @@ def sanity_check_step(self): lib_mt_suffix += '-a64' elif get_cpu_architecture() == POWER: lib_mt_suffix += '-p64' + elif get_cpu_architecture() == RISCV64: + lib_mt_suffix += '-r64' else: lib_mt_suffix += '-x64' From af8d0a2a91bc29859ab2b45a9735ce3c4282d7d3 Mon Sep 17 00:00:00 2001 From: Julian Morillo Date: Fri, 24 May 2024 16:38:12 +0200 Subject: [PATCH 2/3] Adding RISCV64 support when using tagged_layout --- easybuild/easyblocks/b/boost.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/b/boost.py b/easybuild/easyblocks/b/boost.py index 4baa244598..dd40d3b314 100644 --- a/easybuild/easyblocks/b/boost.py +++ b/easybuild/easyblocks/b/boost.py @@ -53,7 +53,7 @@ from easybuild.tools.filetools import apply_regex_substitutions, read_file, symlink, which, write_file from easybuild.tools.modules import get_software_root, get_software_version from easybuild.tools.run import run_cmd -from easybuild.tools.systemtools import AARCH64, POWER, UNKNOWN +from easybuild.tools.systemtools import RISCV64, AARCH64, POWER, UNKNOWN from easybuild.tools.systemtools import get_cpu_architecture, get_glibc_version, get_shared_lib_ext From 65720d7dcf734359be3d0b7f323d0d07dce00351 Mon Sep 17 00:00:00 2001 From: Julian Morillo Date: Fri, 31 May 2024 16:03:45 +0200 Subject: [PATCH 3/3] Update configure options for new versions of Extrae and add RISC-V clock support --- easybuild/easyblocks/e/extrae.py | 35 ++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/easybuild/easyblocks/e/extrae.py b/easybuild/easyblocks/e/extrae.py index 557ebc7785..cd4c99aad3 100644 --- a/easybuild/easyblocks/e/extrae.py +++ b/easybuild/easyblocks/e/extrae.py @@ -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): @@ -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: @@ -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):