Skip to content

Commit ef38a0c

Browse files
Paul Olarudbaluta
authored andcommitted
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 <paul.olaru@nxp.com>
1 parent 8c005ef commit ef38a0c

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

  • src/arch/xtensa/include/xtensa/config

src/arch/xtensa/include/xtensa/config/core.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,24 @@
3636
#ifndef XTENSA_CONFIG_CORE_H
3737
#define XTENSA_CONFIG_CORE_H
3838

39+
/*
40+
* This define is used by the new 2023 xt-clang toolchain and, while there are a few definitions
41+
* (identical to this one) in various implementations such as newlib, none of them is in use when
42+
* building SOF with Zephyr and XtensaTools.
43+
*/
44+
45+
#if defined(__ZEPHYR__)
46+
47+
#ifndef __UINT32_C
48+
#define __UINT32_C(x) x ## U
49+
#endif
50+
51+
#ifndef UINT32_C
52+
#define UINT32_C(x) __UINT32_C(x)
53+
#endif
54+
55+
#endif
56+
3957
/* CONFIGURATION INDEPENDENT DEFINITIONS: */
4058
#ifdef __XTENSA__
4159
#include <xtensa/hal.h>

0 commit comments

Comments
 (0)