diff --git a/cmake/toolchain/xcc.cmake b/cmake/toolchain/xcc.cmake index 56caa3fe261..15fc7fe1b6f 100644 --- a/cmake/toolchain/xcc.cmake +++ b/cmake/toolchain/xcc.cmake @@ -15,4 +15,12 @@ set(OPTIMIZE_FOR_DEBUG_FLAG "-O0") set(CC xcc) set(C++ xc++) +set(NOSYSDEF_CFLAG "") + list(APPEND TOOLCHAIN_C_FLAGS -fms-extensions) + +# xcc doesn't have this, so we need to define it here. +# This is the same as in the xcc toolchain spec files. +list(APPEND TOOLCHAIN_C_FLAGS + -D__SIZEOF_LONG__=4 + ) diff --git a/soc/xtensa/intel_s1000/soc.c b/soc/xtensa/intel_s1000/soc.c index 8eb6de31033..f4416d80090 100644 --- a/soc/xtensa/intel_s1000/soc.c +++ b/soc/xtensa/intel_s1000/soc.c @@ -11,6 +11,8 @@ #include #include +#include "soc.h" + #define LOG_LEVEL CONFIG_SOC_LOG_LEVEL #include LOG_MODULE_REGISTER(soc);