parallel-netcdf: fix build with gcc@10: (#16620)
This commit is contained in:
parent
f6fbf8b8d3
commit
308f016f31
1 changed files with 20 additions and 6 deletions
|
@ -95,13 +95,27 @@ def configure_args(self):
|
||||||
args += self.enable_or_disable('cxx')
|
args += self.enable_or_disable('cxx')
|
||||||
args += self.enable_or_disable('fortran')
|
args += self.enable_or_disable('fortran')
|
||||||
|
|
||||||
|
flags = {
|
||||||
|
'CFLAGS': [],
|
||||||
|
'CXXFLAGS': [],
|
||||||
|
'FFLAGS': [],
|
||||||
|
'FCFLAGS': [],
|
||||||
|
}
|
||||||
|
|
||||||
if '+pic' in self.spec:
|
if '+pic' in self.spec:
|
||||||
args.extend([
|
flags['CFLAGS'].append(self.compiler.cc_pic_flag)
|
||||||
'CFLAGS=' + self.compiler.cc_pic_flag,
|
flags['CXXFLAGS'].append(self.compiler.cxx_pic_flag)
|
||||||
'CXXFLAGS=' + self.compiler.cxx_pic_flag,
|
flags['FFLAGS'].append(self.compiler.f77_pic_flag)
|
||||||
'FFLAGS=' + self.compiler.f77_pic_flag,
|
flags['FCFLAGS'].append(self.compiler.fc_pic_flag)
|
||||||
'FCFLAGS=' + self.compiler.fc_pic_flag,
|
|
||||||
])
|
# https://github.com/Parallel-NetCDF/PnetCDF/issues/61
|
||||||
|
if self.spec.satisfies('%gcc@10:'):
|
||||||
|
flags['FFLAGS'].append('-fallow-argument-mismatch')
|
||||||
|
flags['FCFLAGS'].append('-fallow-argument-mismatch')
|
||||||
|
|
||||||
|
for key, value in sorted(flags.items()):
|
||||||
|
if value:
|
||||||
|
args.append('{0}={1}'.format(key, ' '.join(value)))
|
||||||
|
|
||||||
if self.version >= Version('1.8'):
|
if self.version >= Version('1.8'):
|
||||||
args.append('--enable-relax-coord-bound')
|
args.append('--enable-relax-coord-bound')
|
||||||
|
|
Loading…
Reference in a new issue