From 05ebe52643b166c59cae099883f496b9b9dd2fb6 Mon Sep 17 00:00:00 2001 From: Sergey Kosukhin Date: Wed, 14 Apr 2021 23:49:48 +0200 Subject: [PATCH] claw package: support for cce11 (#22986) --- var/spack/repos/builtin/packages/claw/package.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/claw/package.py b/var/spack/repos/builtin/packages/claw/package.py index 380c53b9db..5356a89535 100644 --- a/var/spack/repos/builtin/packages/claw/package.py +++ b/var/spack/repos/builtin/packages/claw/package.py @@ -48,9 +48,14 @@ class Claw(CMakePackage): filter_compiler_wrappers('claw_f.conf', relative_root='etc') def flag_handler(self, name, flags): - # https://gcc.gnu.org/gcc-10/porting_to.html - if name == 'cflags' and self.spec.satisfies('%gcc@10:'): - flags.append('-fcommon') + if name == 'cflags': + comp_spec = self.spec.compiler + # https://gcc.gnu.org/gcc-10/porting_to.html + # https://releases.llvm.org/11.0.0/tools/clang/docs/ReleaseNotes.html#modified-compiler-flags + # TODO: take care of other Clang-based compilers when they become + # real cases + if comp_spec.satisfies('gcc@10:') or comp_spec.satisfies('cce@11:'): + flags.append('-fcommon') return flags, None, None