@@ -1110,6 +1110,31 @@ def pre_configure_hook_score_p(self, *args, **kwargs):
11101110 raise EasyBuildError ("Score-P-specific hook triggered for non-Score-P easyconfig?!" )
11111111
11121112
1113+ def pre_configure_hook_dyninst (self , * args , ** kwargs ):
1114+ """
1115+ Pre-configure hook for Dyninst
1116+ - specify correct path to binutils (in compat layer)
1117+ """
1118+ if self .name == 'Dyninst' :
1119+
1120+ # determine path to Prefix installation in compat layer via $EPREFIX
1121+ eprefix = get_eessi_envvar ('EPREFIX' )
1122+
1123+ binutils_lib_path_glob_pattern = os .path .join (eprefix , 'usr' , 'lib*' , 'binutils' , '*-linux-gnu' , '2.*' )
1124+ binutils_lib_path = glob .glob (binutils_lib_path_glob_pattern )
1125+ if len (binutils_lib_path ) == 1 :
1126+ print_msg ("Defining LibIberty variables for Dyninst..." )
1127+ self .cfg .update ('configopts' , '-DLibIberty_ROOT_DIR=' + binutils_lib_path [0 ])
1128+ self .cfg .update ('configopts' , '-DLibIberty_INCLUDE_DIRS=' + os .path .join (binutils_lib_path [0 ], 'include' ))
1129+ self .cfg .update ('configopts' , '-DLibIberty_LIBRARIES=' + os .path .join (binutils_lib_path [0 ], 'libiberty.a' ))
1130+ else :
1131+ raise EasyBuildError ("Failed to isolate path for binutils libraries using %s, got %s" ,
1132+ binutils_lib_path_glob_pattern , binutils_lib_path )
1133+
1134+ else :
1135+ raise EasyBuildError ("Dyninst-specific hook triggered for non-Dyninst easyconfig?!" )
1136+
1137+
11131138def pre_configure_hook_extrae (self , * args , ** kwargs ):
11141139 """
11151140 Pre-configure hook for Extrae
@@ -1987,6 +2012,7 @@ def pre_run_shell_cmd_hook(cmd, work_dir=None, **kwargs):
19872012 'WRF' : pre_configure_hook_wrf_aarch64 ,
19882013 'LAMMPS' : pre_configure_hook_LAMMPS_zen4_and_aarch64_cuda ,
19892014 'Score-P' : pre_configure_hook_score_p ,
2015+ 'Dyninst' : pre_configure_hook_dyninst ,
19902016 'CMake' : pre_configure_hook_cmake_system ,
19912017}
19922018
0 commit comments