Cadence XCC is based off of a very old 4.2 gcc compiler, which didn't perfectly support C99 "inline" semantics with respect to cross-translation-unit inline linkage (which Zephyr does not use, our inlines are static only) and declaration order. Fix the one spot where we were calling an inline before its ALWAYS_INLINE definition, and add a flag to suppress the warning so CI's trying to build with XCC and -Werror don't flip out. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
14 lines
580 B
CMake
14 lines
580 B
CMake
# No special flags are needed for xcc.
|
|
# Only select whether gcc or clang flags should be inherited.
|
|
if(CC STREQUAL "clang")
|
|
include(${ZEPHYR_BASE}/cmake/compiler/clang/compiler_flags.cmake)
|
|
else()
|
|
include(${ZEPHYR_BASE}/cmake/compiler/gcc/compiler_flags.cmake)
|
|
|
|
# XCC is based on GCC 4.2 which has a somewhat pedantic take on the
|
|
# fact that linkage semantics differed between C99 and GNU at the
|
|
# time. Suppress the warning, it's the best we can do given that
|
|
# it's a legacy compiler.
|
|
set_compiler_property(APPEND PROPERTY warning_base "-fgnu89-inline")
|
|
endif()
|