diff options
author | Tom Epperly <tepperly@gmail.com> | 2021-02-11 17:14:09 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-12 01:14:09 +0000 |
commit | 58b9c6daddb84e34f4a6439d3ada978a4467e730 (patch) | |
tree | 086fb59252fe97cdf2bf4dd5e601dbff7fa1581d | |
parent | 0724467ad2f12a4c7324beb04e4a255507f9b03f (diff) | |
download | spack-58b9c6daddb84e34f4a6439d3ada978a4467e730.tar.gz spack-58b9c6daddb84e34f4a6439d3ada978a4467e730.tar.bz2 spack-58b9c6daddb84e34f4a6439d3ada978a4467e730.tar.xz spack-58b9c6daddb84e34f4a6439d3ada978a4467e730.zip |
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
-rw-r--r-- | var/spack/repos/builtin/packages/mumps/package.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index b04a1b073c..3ba3ca26b5 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -155,8 +155,7 @@ class Mumps(Package): 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 @@ class Mumps(Package): 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() |