From edb46592033b13b39ec74d3b2b3cee74ed6268bf Mon Sep 17 00:00:00 2001 From: Paul Olaru Date: Fri, 28 Apr 2023 13:11:09 +0300 Subject: [PATCH] arch: xtensa: core.h: Add define for UINT32_C This define is used by the new 2023 xt-clang toolchain and, while there are a few definitions (identical to this one) in various implementations such as newlib, none of them is in use when building SOF with Zephyr and XtensaTools. Add this define so that the toolchain provided headers work correctly. Signed-off-by: Paul Olaru --- src/arch/xtensa/include/xtensa/config/core.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/arch/xtensa/include/xtensa/config/core.h b/src/arch/xtensa/include/xtensa/config/core.h index f5bb44faf2ab..4cf7606df707 100644 --- a/src/arch/xtensa/include/xtensa/config/core.h +++ b/src/arch/xtensa/include/xtensa/config/core.h @@ -36,6 +36,24 @@ #ifndef XTENSA_CONFIG_CORE_H #define XTENSA_CONFIG_CORE_H +/* + * This define is used by the new 2023 xt-clang toolchain and, while there are a few definitions + * (identical to this one) in various implementations such as newlib, none of them is in use when + * building SOF with Zephyr and XtensaTools. + */ + +#if defined(__ZEPHYR__) + +#ifndef __UINT32_C +#define __UINT32_C(x) x ## U +#endif + +#ifndef UINT32_C +#define UINT32_C(x) __UINT32_C(x) +#endif + +#endif + /* CONFIGURATION INDEPENDENT DEFINITIONS: */ #ifdef __XTENSA__ #include