toolchain: xcc: Avoid undefs
Re-order some definitions and header inclusion to avoid undef symbols. Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
This commit is contained in:
parent
e0f94f8823
commit
7e32b2069d
1 changed files with 14 additions and 19 deletions
|
|
@ -11,6 +11,20 @@
|
|||
#error Please do not include toolchain-specific headers directly, use <zephyr/toolchain.h> instead
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XCC does not support using deprecated attribute in enum,
|
||||
* so just nullify it here to avoid compilation errors.
|
||||
*/
|
||||
#define __deprecated
|
||||
|
||||
#define __in_section_unique(seg) \
|
||||
__attribute__((section("." STRINGIFY(seg) "." STRINGIFY(__COUNTER__))))
|
||||
|
||||
#define __in_section_unique_named(seg, name) \
|
||||
__attribute__((section("." STRINGIFY(seg) \
|
||||
"." STRINGIFY(__COUNTER__) \
|
||||
"." STRINGIFY(name))))
|
||||
|
||||
/* 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
|
||||
|
|
@ -121,16 +135,6 @@
|
|||
#define __COUNTER__ __LINE__
|
||||
#endif
|
||||
|
||||
#undef __in_section_unique
|
||||
#define __in_section_unique(seg) \
|
||||
__attribute__((section("." STRINGIFY(seg) "." STRINGIFY(__COUNTER__))))
|
||||
|
||||
#undef __in_section_unique_named
|
||||
#define __in_section_unique_named(seg, name) \
|
||||
__attribute__((section("." STRINGIFY(seg) \
|
||||
"." STRINGIFY(__COUNTER__) \
|
||||
"." STRINGIFY(name))))
|
||||
|
||||
#ifndef __GCC_LINKER_CMD__
|
||||
#include <xtensa/config/core.h>
|
||||
|
||||
|
|
@ -155,13 +159,4 @@
|
|||
#define __sync_synchronize() do { __asm__ __volatile__ ("" ::: "memory"); } \
|
||||
while (false)
|
||||
|
||||
#ifdef __deprecated
|
||||
/*
|
||||
* XCC does not support using deprecated attribute in enum,
|
||||
* so just nullify it here to avoid compilation errors.
|
||||
*/
|
||||
#undef __deprecated
|
||||
#define __deprecated
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue