Toolchain utilities need to be used through the <zephyr/toolchain.h>
parent header, where the right header is chosen.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
...and removed the copied macros. This allows xt-clang to
inherit macros from llvm.h to align with any LLVM related
additions.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
If XCC toolchain is clang based, enabled C11 features by
defining TOOLCHAIN_HAS_C_GENERIC and TOOLCHAIN_HAS_C_AUTO_TYPE.
Mirror the definitions in include/zephyr/toolchain/llvm.h
This is required to build Zephyr with features requiring
tagged arguments like LOG_MIPI_SYST_USE_CATALOG.
Suggested-by: Daniel Leung <daniel.leung@intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
230ddd9a7f added unreachable path hint for assertion failure. Xcc does
not support __builtin_unreachable and this was defined as a call to
ASSERT, which generated some recursion.
Replace the definition with __builtin_trap() to work around this issue.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This builtin gcc function is not available in xcc compiler.
Adding a memory compiler barrier as it is done in compiler_barrier.
compiler_barrier() and __sync_synchronize() are not the same, the
former is a sw barrier while the latter can be a hw barrier
like (mfence/sfence) in X86.
I didn't find anything equivalent for xtensa so just implementing a
SW barrier.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
In order to bring consistency in-tree, migrate all includes within
include directory to the new prefix <zephyr/...>. Note that the
conversion has been scripted, refer to zephyrproject-rtos#45388 for more
details.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Move include paths and add new target_include_directories to support
backwards compatibility:
* /include -> /include/zephyr
example: <irq.h> -> <zephyr/irq.h>
Issue #41543
Signed-off-by: Yuval Peress <peress@google.com>