waf: require gcc 10.2 or later for ChibiOS

This commit is contained in:
Andrew Tridgell 2023-04-22 21:05:23 +10:00
parent d6e696e085
commit 52481e8355
1 changed files with 5 additions and 0 deletions

View File

@ -1001,6 +1001,11 @@ class chibios(Board):
'-g3',
]
if cfg.env.COMPILER_CXX == "g++":
if not self.cc_version_gte(cfg, 10, 2):
# require at least 10.2 compiler
cfg.fatal("ChibiOS build requires g++ version 10.2.1 or later, found %s" % '.'.join(cfg.env.CC_VERSION))
if cfg.env.ENABLE_ASSERTS:
cfg.msg("Enabling ChibiOS asserts", "yes")
env.CFLAGS += [ '-DHAL_CHIBIOS_ENABLE_ASSERTS' ]