diff --git a/include/arch/xtensa/arch.h b/include/arch/xtensa/arch.h index 318f6a86a89..e650fef22ad 100644 --- a/include/arch/xtensa/arch.h +++ b/include/arch/xtensa/arch.h @@ -24,6 +24,16 @@ extern "C" { #include #include #include +#include + +/* + * XCC does not define the following macros with the expected names, but the + * file machine/endian.h from XT_LIB defines similar ones. Thus we include it + * and define the missing macros ourselves. + */ +#define __BYTE_ORDER__ XCHAL_MEMORY_ORDER +#define __ORDER_BIG_ENDIAN__ XTHAL_BIGENDIAN +#define __ORDER_LITTLE_ENDIAN__ XTHAL_LITTLEENDIAN #define STACK_ALIGN 16 #define OCTET_TO_SIZEOFUNIT(X) (X)