The armclang.h includes the toolchain/llvm.h header.
Also it redifines the __GENERIC_SECTION and Z_GENERIC_SECTION so that
they includes the `used` attribute which is needed by armlink.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
To ensure that an off-tree toolchain gets the toolchain/other.h header
included, such that it can include the correct header for the
toolchain via the other.h, the define __TOOLCHAIN_CUSTOM__ will be set
when ever the cmake flag TOOLCHAIN_USE_CUSTOM is set.
An off-tree toolchain needs to set the set(TOOLCHAIN_USE_CUSTOM 1) in
the off-tree generic.cmake and/or target.cmake, in order for the
include/other.h to be included. The generic.cmake and target.cmake will
be under ${TOOLCHAIN_ROOT}/cmake/toolchain/${ZEPHYR_TOOLCHAIN_VARIANT}/
As the TOOLCHAIN_USE_CUSTOM is only set for off-tree toolchains, this
has no impact on in-tree toolchains and their functionality.
Fixes zephyrproject-rtos#36117
Signed-off-by: Danny Oerndrup <daor@demant.com>
Add abstraction for llvm to allow for toolchain customizations that are
different from the gcc defaults.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Create include/toolchain/mwdt.h to handle difference in
several macros for MWDT and ARC GNU toolchains.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Revert 1b5e6072ca which
broke things for off-tree toolchains,
and add a note about the reason for that line so it is not
removed again.
That include line is, logically, not there for the compilers which
are supported in the tree, but for other compilers which would
be supported thru off-tree headers and cmake files.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
This commit adds a global check for __BYTE_ORDER__,
__ORDER_LITTLE_ENDIAN__ and __ORDER_BIG_ENDIAN__ preprocessor
definitions that are used throughout the Zephyr codebase.
These preprocessor definitions being not defined can easily
go unnoticed and cause unexpected behaviours, as detailed in
PR #18922.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Compilers based on Clang provide a __has_builtin(x) macro which can be
used to detect in the preprocessor if a given builtin function is
supported by the compiler.
For other compilers (notably GCC), we provide an alternative definition
of HAS_BUILTIN(x) that depends on the toolchain-specific header file to
declare which builtin functions are supported based on the current
compiler version.
Signed-off-by: Jakob Olesen <jolesen@fb.com>
Any word started with underscore followed by and uppercase letter or a
second underscore is a reserved word according with C99.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
These are macros that are expected to be defined at all times by
the compiler. We need them at the very beginning of kernel.h for
the k_thread definition, before it's possible to include arch.h.
Make a special toolchain header for XCC compiler and place these
defines in there. Otherwise inherit all the other GCC defines.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Replace the existing Apache 2.0 boilerplate header with an SPDX tag
throughout the zephyr code tree. This patch was generated via a
script run over the master branch.
Also updated doc/porting/application.rst that had a dependency on
line numbers in a literal include.
Manually updated subsys/logging/sys_log.c that had a malformed
header in the original file. Also cleanup several cases that already
had a SPDX tag and we either got a duplicate or missed updating.
Jira: ZEP-1457
Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
A workaround used to silence a warning in the doc generation process
which involved tagging a structure with a #define can now be solved
with a cleaner approach which is non-code-invasive.
Backup said change and update documentation on what to do when the
issue is found.
Change-Id: I1ef5224cd1b2df2e57c2ace438dba90ba3fc8528
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Fix with a workaround in unnamed unions / structs in bluetooth, i2c,
sensor and uart.
Current documentation parsers (sphinx under Doxygen) don't seem to
understand well unnamed structs / unions. They will not generate any
documentation for any documented members (see left side of
http://imgur.com/mcpBXWc).
A workaround is to make the parser think there is something like a
struct/union/enum name that is actually something with no effect to
the compiler.
Naming it with __unnamed_workaround__ ensures it is clear it is a
workaround while we wait for a final fix. It is #defined to be a NO-OP
to the compiler and rearrange the member documentation as *@param* so
we have some documentation that the non-worked around code fails to
document.
Anonymous structs/union that declare a variable are just given an
internal name.
Workarounds documented in the contribution guidelines.
Change-Id: I4d32cf444f3c5e7d2fb11581e4b41f80e93c9786
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Removed old style file description and documnetation and apply
doxygen synatx.
Change-Id: I3ac9f06d4f574bf3c79c6f6044cec3a7e2f6e4c8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The \NOMANUAL tag is a remnant from days of yore and is no longer
needed or useful. Cleaning up the code references to this.
Change-Id: I1b8cc9c9560d1dbb711f05fa63fd23386789875c
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
Change-Id: I6da43e41f9c6efee577b70513ec368ae3cce0144
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Change all the Intel and Wind River code license from BSD-3 to Apache 2.
Change-Id: Id8be2c1c161a06ea8a0b9f38e17660e11dbb384b
Signed-off-by: Javier B Perez Hernandez <javier.b.perez.hernandez@linux.intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The change replaces multiple asterisks to ** at
the beginning of comments and adds a space before
the asterisks at the beginning of lines.
Change-Id: I7656bde3bf4d9a31e38941e43b580520432dabc1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
If a source code file depends on a configuration option,
that, in turn, depends on a compiler, this file has to
include toolchain.h.
toolchain.h includes a compiler specific header file that
sets the proper configuration option.
Change-Id: I7c9002522a8c6d6fd945e27a450ebe46ba9d4892
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>