mpich: Fix @4 build with gcc@10+ (#30084)

* Also set FCFLAGS for gcc@10
* Set FCFLAGS for clang/apple-clang too
This commit is contained in:
marcost2 2022-04-16 14:53:44 -03:00 committed by GitHub
parent 1ada151d80
commit 03a7643816
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -330,11 +330,14 @@ def setup_build_environment(self, env):
# https://bugzilla.redhat.com/show_bug.cgi?id=1795817 # https://bugzilla.redhat.com/show_bug.cgi?id=1795817
if self.spec.satisfies('%gcc@10:'): if self.spec.satisfies('%gcc@10:'):
env.set('FFLAGS', '-fallow-argument-mismatch') env.set('FFLAGS', '-fallow-argument-mismatch')
env.set('FCFLAGS', '-fallow-argument-mismatch')
# Same fix but for macOS - avoids issue #17934 # Same fix but for macOS - avoids issue #17934
if self.spec.satisfies('%apple-clang@11:'): if self.spec.satisfies('%apple-clang@11:'):
env.set('FFLAGS', '-fallow-argument-mismatch') env.set('FFLAGS', '-fallow-argument-mismatch')
env.set('FCFLAGS', '-fallow-argument-mismatch')
if self.spec.satisfies('%clang@11:'): if self.spec.satisfies('%clang@11:'):
env.set('FFLAGS', '-fallow-argument-mismatch') env.set('FFLAGS', '-fallow-argument-mismatch')
env.set('FCFLAGS', '-fallow-argument-mismatch')
if 'pmi=cray' in self.spec: if 'pmi=cray' in self.spec:
env.set( env.set(