diff options
author | Piotr Luszczek <luszczek@icl.utk.edu> | 2020-09-08 02:30:02 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-08 08:30:02 +0200 |
commit | 73110b415d7dfeabb9f4e93f63f13c1bf10dd14d (patch) | |
tree | 8603aac5951c59cbae6c9631fb4a101336c3458a | |
parent | 850924e423c05d38e6a70a081418332624ce8376 (diff) | |
download | spack-73110b415d7dfeabb9f4e93f63f13c1bf10dd14d.tar.gz spack-73110b415d7dfeabb9f4e93f63f13c1bf10dd14d.tar.bz2 spack-73110b415d7dfeabb9f4e93f63f13c1bf10dd14d.tar.xz spack-73110b415d7dfeabb9f4e93f63f13c1bf10dd14d.zip |
hpcc: add explicit C99 flag for older GCC versions (#18556)
-rw-r--r-- | var/spack/repos/builtin/packages/hpcc/package.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/hpcc/package.py b/var/spack/repos/builtin/packages/hpcc/package.py index 9ca9b31dbe..b8888513db 100644 --- a/var/spack/repos/builtin/packages/hpcc/package.py +++ b/var/spack/repos/builtin/packages/hpcc/package.py @@ -205,3 +205,9 @@ class Hpcc(MakefilePackage): 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) |