claw package: support for cce11 (#22986)

This commit is contained in:
Sergey Kosukhin 2021-04-14 23:49:48 +02:00 committed by GitHub
parent 5309417f19
commit 05ebe52643
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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