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>
This commit is contained in:
parent
aaeb0a672e
commit
6ee650a917
|
@ -7,6 +7,9 @@
|
|||
#ifndef ZEPHYR_INCLUDE_TOOLCHAIN_ARMCLANG_H_
|
||||
#define ZEPHYR_INCLUDE_TOOLCHAIN_ARMCLANG_H_
|
||||
|
||||
#ifndef ZEPHYR_INCLUDE_TOOLCHAIN_H_
|
||||
#error Please do not include toolchain-specific headers directly, use <zephyr/toolchain.h> instead
|
||||
#endif
|
||||
|
||||
#include <zephyr/toolchain/llvm.h>
|
||||
|
||||
|
|
|
@ -6,6 +6,11 @@
|
|||
|
||||
#ifndef ZEPHYR_INCLUDE_TOOLCHAIN_COMMON_H_
|
||||
#define ZEPHYR_INCLUDE_TOOLCHAIN_COMMON_H_
|
||||
|
||||
#ifndef ZEPHYR_INCLUDE_TOOLCHAIN_H_
|
||||
#error Please do not include toolchain-specific headers directly, use <zephyr/toolchain.h> instead
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief Common toolchain abstraction
|
||||
|
|
|
@ -7,6 +7,10 @@
|
|||
#ifndef ZEPHYR_INCLUDE_TOOLCHAIN_GCC_H_
|
||||
#define ZEPHYR_INCLUDE_TOOLCHAIN_GCC_H_
|
||||
|
||||
#ifndef ZEPHYR_INCLUDE_TOOLCHAIN_H_
|
||||
#error Please do not include toolchain-specific headers directly, use <zephyr/toolchain.h> instead
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief GCC toolchain abstraction
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
#ifndef ZEPHYR_INCLUDE_TOOLCHAIN_LLVM_H_
|
||||
#define ZEPHYR_INCLUDE_TOOLCHAIN_LLVM_H_
|
||||
|
||||
#ifndef ZEPHYR_INCLUDE_TOOLCHAIN_H_
|
||||
#error Please do not include toolchain-specific headers directly, use <zephyr/toolchain.h> instead
|
||||
#endif
|
||||
|
||||
#define __no_optimization __attribute__((optnone))
|
||||
|
||||
|
|
|
@ -8,6 +8,10 @@
|
|||
#ifndef ZEPHYR_INCLUDE_TOOLCHAIN_MWDT_H_
|
||||
#define ZEPHYR_INCLUDE_TOOLCHAIN_MWDT_H_
|
||||
|
||||
#ifndef ZEPHYR_INCLUDE_TOOLCHAIN_H_
|
||||
#error Please do not include toolchain-specific headers directly, use <zephyr/toolchain.h> instead
|
||||
#endif
|
||||
|
||||
#ifndef _LINKER
|
||||
#if defined(_ASMLANGUAGE)
|
||||
|
||||
|
|
|
@ -7,6 +7,10 @@
|
|||
#ifndef ZEPHYR_INCLUDE_TOOLCHAIN_XCC_H_
|
||||
#define ZEPHYR_INCLUDE_TOOLCHAIN_XCC_H_
|
||||
|
||||
#ifndef ZEPHYR_INCLUDE_TOOLCHAIN_H_
|
||||
#error Please do not include toolchain-specific headers directly, use <zephyr/toolchain.h> instead
|
||||
#endif
|
||||
|
||||
/* toolchain/gcc.h errors out if __BYTE_ORDER__ cannot be determined
|
||||
* there. However, __BYTE_ORDER__ is actually being defined later in
|
||||
* this file. So define __BYTE_ORDER__ to skip the check in gcc.h
|
||||
|
|
Loading…
Reference in a new issue