Commit ce4c30fc authored by Keith Packard's avatar Keith Packard Committed by Chris Friedt
Browse files

toolchain: Replace GCC_VERSION, CLANG_VERSION and BUILD_ASSERT macros

GCC_VERSION is defined in a few modules, and those headers are often
included first, so replace the one used in zephyr with
TOOLCHAIN_GCC_VERSION. Do the same with CLANG_VERSION, replacing it with
TOOLCHAIN_CLANG_VERSION.

BUILD_ASSERT is also defined in include/toolchain/common.h, which might
get included before gcc.h. We want to use the gcc-specific one instead
of the general one.

Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
(cherry picked from commit c58c76ef)
parent 5d382fa5
Loading
Loading
Loading
Loading
+2 −1
Changes for include/toolchain/gcc.h: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -48,8 +48,9 @@
#endif


#undef BUILD_ASSERT /* clear out common version */
/* C++11 has static_assert built in */
#ifdef __cplusplus
#if defined(__cplusplus) && (__cplusplus >= 201103L)
#define BUILD_ASSERT(EXPR, MSG...) static_assert(EXPR, "" MSG)

/*