Skip to content
Merged
Changes from 1 commit
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
8 changes: 7 additions & 1 deletion easybuild/easyblocks/s/siesta.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ def configure_step(self):
(r"^(FPPFLAGS_free_F90\s*=.*)$", r"\1 -ffree-line-length-none"),
]

gfortran_flags = ''
gcc_version = get_software_version('GCCcore') or get_software_version('GCC')
if LooseVersion(gcc_version) >= LooseVersion('10.0'):
# -fallow-argument-mismatch is required when compiling with GCC 10.x & more recent
gfortran_flags = '-fallow-argument-mismatch'

netcdff_loc = get_software_root('netCDF-Fortran')
if netcdff_loc:
# Needed for gfortran at least
Expand Down Expand Up @@ -181,7 +187,7 @@ def configure_step(self):
regex_subs.extend([
(r"^(LIBS\s*=).*$", r"\1 %s" % complibs),
# Needed for a couple of the utils
(r"^(FFLAGS\s*=\s*).*$", r"\1 -fPIC %s" % os.environ['FCFLAGS']),
(r"^(FFLAGS\s*=\s*).*$", r"\1 -fPIC %s %s" % (os.environ['FCFLAGS'], gfortran_flags)),
])
regex_newlines.append((r"^(COMP_LIBS\s*=.*)$", r"\1\nWXML = libwxml.a"))

Expand Down