Fix mumps compilation with gcc@10 (i.e., gfortran) (#21631)
* add new flag when compiling mumps with %gcc@10. * Fix style * Try to fix formatting * Use flag_handler approach suggested by @michaelkuhn in the PR review. * Delete former approach * Another style issue * Add another space * More fixes
This commit is contained in:
parent
0724467ad2
commit
58b9c6dadd
1 changed files with 10 additions and 2 deletions
|
@ -155,8 +155,7 @@ def write_makefile_inc(self):
|
|||
makefile_conf.extend([
|
||||
'OPTF = %s -O -DALLOW_NON_INIT %s' % (
|
||||
fpic,
|
||||
'-fdefault-integer-8' if using_gcc
|
||||
else '-i8'), # noqa
|
||||
'-fdefault-integer-8' if using_gcc else '-i8'), # noqa
|
||||
])
|
||||
|
||||
makefile_conf.extend([
|
||||
|
@ -275,6 +274,15 @@ def write_makefile_inc(self):
|
|||
makefile_inc = '\n'.join(makefile_conf)
|
||||
fh.write(makefile_inc)
|
||||
|
||||
def flag_handler(self, name, flags):
|
||||
if name == 'fflags':
|
||||
if self.spec.satisfies('%gcc@10:'):
|
||||
if flags is None:
|
||||
flags = []
|
||||
flags.append('-fallow-argument-mismatch')
|
||||
|
||||
return (flags, None, None)
|
||||
|
||||
def install(self, spec, prefix):
|
||||
self.write_makefile_inc()
|
||||
|
||||
|
|
Loading…
Reference in a new issue