From d390bb2d66070c381a54cd8c8b93fd9052aadd08 Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Mon, 16 Dec 2019 09:35:03 -0800 Subject: [PATCH] xtensa: define UINT32_C macro for XCC Newer XCC versions wrap unsigned int with UINT32_C(x) in their own macros. However, the #include chain usually does not contain UINT32_C(x). To make matters worse, including stdint.h (where UINT32_C is defined) in toolchain/xcc.h would cause the linker script to contain a bunch of typedef which are invalid for linker scripts. So define UINT32_C(x) manually. Signed-off-by: Daniel Leung --- include/toolchain/xcc.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/toolchain/xcc.h b/include/toolchain/xcc.h index 4c084edfde0..ed4030efd0f 100644 --- a/include/toolchain/xcc.h +++ b/include/toolchain/xcc.h @@ -18,6 +18,10 @@ #include +#ifndef UINT32_C +#define UINT32_C(x) x ## U +#endif + /* XCC doesn't support __COUNTER__ but this should be good enough */ #define __COUNTER__ __LINE__