Commit graph

7 commits

Author SHA1 Message Date
Gerard Marull-Paretas 6ee650a917 toolchain: do not allow including toolchain-specific headers
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>
2023-09-15 09:27:30 +02:00
Daniel Leung 56a8123eed toolchain: xcc/xt-clang: include llvm.h for xt-clang...
...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>
2023-07-28 08:08:13 -04:00
Kai Vehmanen 9db44fa281 toolchain: xtensa: enable C11 features with xt-clang
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>
2023-06-05 13:53:12 -04:00
Anas Nashif f991fe0197 xcc: do not call ASSERT in CODE_UNREACHABLE
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>
2022-08-12 14:40:26 -04:00
Flavio Ceolin 87b4759663 toolchain: xtensa: Define __sync_synchronize
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>
2022-05-12 16:11:39 -04:00
Gerard Marull-Paretas fb9b3bcd93 include: migrate includes to <zephyr/...>
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>
2022-05-06 20:03:00 +02:00
Yuval Peress 53ef68d459 include: Prefix includes to use a scope
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>
2022-04-08 19:03:32 +02:00
Renamed from include/toolchain/xcc.h (Browse further)