Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion easybuild/easyblocks/g/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ def __init__(self, *args, **kwargs):
if get_os_name() not in ['ubuntu', 'debian']:
self.cfg.update('unwanted_env_vars', ['LIBRARY_PATH'])

# disable NVPTX on RISC-V
if get_cpu_family() == RISCV:
self.log.warning('Setting withnvptx to False, since we are building on a RISC-V system')
self.cfg['withnvptx'] = False

def create_dir(self, dirname):
"""
Create a dir to build in.
Expand Down Expand Up @@ -619,6 +624,10 @@ def build_step(self):
'val': os.getenv('LD_LIBRARY_PATH')
}
env.setvar('LD_LIBRARY_PATH', ld_lib_path)
if get_cpu_family() == RISCV:
# on RISC-V the compilers built in stage 1 fail to find some libraries from the lib dir,
# so let's also set $LIBRARY_PATH to work around it
env.setvar('LIBRARY_PATH', ld_lib_path)

#
# STAGE 2: build GMP/PPL/CLooG for stage 3
Expand Down Expand Up @@ -1057,7 +1066,7 @@ def make_module_req_guess(self):
guesses.update({
'PATH': ['bin'],
'CPATH': [],
'LIBRARY_PATH': [],
'LIBRARY_PATH': ['lib', 'lib64'] if get_cpu_family() == RISCV else [],
'LD_LIBRARY_PATH': ['lib', 'lib64'],
'MANPATH': ['man', 'share/man']
})
Expand Down