From 084994db9c858b79ffe37dd1fc7205150d0a2447 Mon Sep 17 00:00:00 2001 From: TZ Date: Wed, 8 Jul 2020 08:42:49 +0200 Subject: [PATCH] ncl: fix compilation errors with Intel compilers (#17391) The Intel compilers are more strict and require special command line options (like -std=c99) to properly compile NCL. --- var/spack/repos/builtin/packages/ncl/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/ncl/package.py b/var/spack/repos/builtin/packages/ncl/package.py index 4d9980ecc5..046dd9b3a8 100644 --- a/var/spack/repos/builtin/packages/ncl/package.py +++ b/var/spack/repos/builtin/packages/ncl/package.py @@ -144,7 +144,9 @@ def prepare_site_config(self): c2f_flags.extend(['-lgfortran', '-lm']) elif self.compiler.name == 'intel': fc_flags.append('-fp-model precise') - cc_flags.append('-fp-model precise') + cc_flags.append('-fp-model precise' + ' -std=c99' + ' -D_POSIX_C_SOURCE=2 -D_GNU_SOURCE') c2f_flags.extend(['-lifcore', '-lifport']) if self.spec.satisfies('%gcc@10:'):