ncl: Fix build with gcc@10: (#16624)
This commit is contained in:
parent
9b8082ecf3
commit
a9ee4da670
@ -30,6 +30,9 @@ class Ncl(Package):
|
||||
patch('ymake-filter.patch', when="@6.4.0")
|
||||
# ymake additional local library and includes will be filtered improperly
|
||||
patch('ymake.patch', when="@6.4.0:")
|
||||
# ncl does not build with gcc@10:
|
||||
# https://github.com/NCAR/ncl/issues/123
|
||||
patch('https://src.fedoraproject.org/rpms/ncl/raw/12778c55142b5b1ccc26dfbd7857da37332940c2/f/ncl-boz.patch', when='%gcc@10:', sha256='64f3502c9deab48615a4cbc26073173081c0774faf75778b044d251e45d238f7')
|
||||
|
||||
# This installation script is implemented according to this manual:
|
||||
# http://www.ncl.ucar.edu/Download/build_from_src.shtml
|
||||
@ -144,6 +147,10 @@ def prepare_site_config(self):
|
||||
cc_flags.append('-fp-model precise')
|
||||
c2f_flags.extend(['-lifcore', '-lifport'])
|
||||
|
||||
if self.spec.satisfies('%gcc@10:'):
|
||||
fc_flags.append('-fallow-argument-mismatch')
|
||||
cc_flags.append('-fcommon')
|
||||
|
||||
with open('./config/Spack', 'w') as f:
|
||||
f.writelines([
|
||||
'#define HdfDefines\n',
|
||||
|
Loading…
Reference in New Issue
Block a user