|
11 | 11 | #error Please do not include toolchain-specific headers directly, use <zephyr/toolchain.h> instead |
12 | 12 | #endif |
13 | 13 |
|
| 14 | +/* |
| 15 | + * XCC does not support using deprecated attribute in enum, |
| 16 | + * so just nullify it here to avoid compilation errors. |
| 17 | + */ |
| 18 | +#define __deprecated |
| 19 | + |
| 20 | +#define __in_section_unique(seg) \ |
| 21 | + __attribute__((section("." STRINGIFY(seg) "." STRINGIFY(__COUNTER__)))) |
| 22 | + |
| 23 | +#define __in_section_unique_named(seg, name) \ |
| 24 | + __attribute__((section("." STRINGIFY(seg) \ |
| 25 | + "." STRINGIFY(__COUNTER__) \ |
| 26 | + "." STRINGIFY(name)))) |
| 27 | + |
14 | 28 | /* toolchain/gcc.h errors out if __BYTE_ORDER__ cannot be determined |
15 | 29 | * there. However, __BYTE_ORDER__ is actually being defined later in |
16 | 30 | * this file. So define __BYTE_ORDER__ to skip the check in gcc.h |
|
121 | 135 | #define __COUNTER__ __LINE__ |
122 | 136 | #endif |
123 | 137 |
|
124 | | -#undef __in_section_unique |
125 | | -#define __in_section_unique(seg) \ |
126 | | - __attribute__((section("." STRINGIFY(seg) "." STRINGIFY(__COUNTER__)))) |
127 | | - |
128 | | -#undef __in_section_unique_named |
129 | | -#define __in_section_unique_named(seg, name) \ |
130 | | - __attribute__((section("." STRINGIFY(seg) \ |
131 | | - "." STRINGIFY(__COUNTER__) \ |
132 | | - "." STRINGIFY(name)))) |
133 | | - |
134 | 138 | #ifndef __GCC_LINKER_CMD__ |
135 | 139 | #include <xtensa/config/core.h> |
136 | 140 |
|
|
155 | 159 | #define __sync_synchronize() do { __asm__ __volatile__ ("" ::: "memory"); } \ |
156 | 160 | while (false) |
157 | 161 |
|
158 | | -#ifdef __deprecated |
159 | | -/* |
160 | | - * XCC does not support using deprecated attribute in enum, |
161 | | - * so just nullify it here to avoid compilation errors. |
162 | | - */ |
163 | | -#undef __deprecated |
164 | | -#define __deprecated |
165 | | -#endif |
166 | | - |
167 | 162 | #endif |
0 commit comments