Skip to content

Commit

Permalink
Merge pull request #3556 from lexming/modload-gcc
Browse files Browse the repository at this point in the history
adopt `module_load_environment`: GCC
  • Loading branch information
boegel authored Feb 10, 2025
2 parents 52ce665 + 736152b commit 14a5ac9
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions easybuild/easyblocks/g/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,13 @@ def __init__(self, *args, **kwargs):
self.log.warning('Setting withnvptx to False, since we are building on a RISC-V system')
self.cfg['withnvptx'] = False

# define list of subdirectories in search paths of module load environment
self.module_load_environment.PATH = ['bin']
self.module_load_environment.LD_LIBRARY_PATH = ['lib', 'lib64']
# GCC can find its own headers and libraries but the .so's need to be in LD_LIBRARY_PATH
self.module_load_environment.CPATH = []
self.module_load_environment.LIBRARY_PATH = ['lib', 'lib64'] if get_cpu_family() == RISCV else []

def create_dir(self, dirname):
"""
Create a dir to build in.
Expand Down Expand Up @@ -1194,17 +1201,3 @@ def sanity_check_step(self):

super(EB_GCC, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands,
extra_modules=extra_modules)

def make_module_req_guess(self):
"""
GCC can find its own headers and libraries but the .so's need to be in LD_LIBRARY_PATH
"""
guesses = super(EB_GCC, self).make_module_req_guess()
guesses.update({
'PATH': ['bin'],
'CPATH': [],
'LIBRARY_PATH': ['lib', 'lib64'] if get_cpu_family() == RISCV else [],
'LD_LIBRARY_PATH': ['lib', 'lib64'],
'MANPATH': ['man', 'share/man']
})
return guesses

0 comments on commit 14a5ac9

Please sign in to comment.