hpcc: add explicit C99 flag for older GCC versions (#18556)
This commit is contained in:
parent
850924e423
commit
73110b415d
@ -205,3 +205,9 @@ def install(self, spec, prefix):
|
||||
mkdirp(self.prefix.doc.hpcc)
|
||||
install('README.html', self.prefix.doc.hpcc)
|
||||
install('README.txt', self.prefix.doc.hpcc)
|
||||
|
||||
def flag_handler(self, name, flags):
|
||||
# old GCC defaults to -std=c90 but C99 is required for "restrict"
|
||||
if self.spec.satisfies('%gcc@:5.1') and name == 'cflags':
|
||||
flags.append(self.compiler.c99_flag)
|
||||
return (flags, None, None)
|
||||
|
Loading…
Reference in New Issue
Block a user