xtensa: conditionally define endianness macros
__BYTE_ORDER__, __ORDER_BIG_ENDIAN__ and __ORDER_LITTLE_ENDIAN__ are not defined when building with xcc, but are defined when building with gcc. Define them conditionally. Change-Id: Ib205ffee28360aa240d61731b7a3d6f45401b4c1 Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
This commit is contained in:
parent
0ad868a58c
commit
ac430f9595
1 changed files with 6 additions and 0 deletions
|
@ -31,9 +31,15 @@ extern "C" {
|
|||
* file machine/endian.h from XT_LIB defines similar ones. Thus we include it
|
||||
* and define the missing macros ourselves.
|
||||
*/
|
||||
#ifndef __BYTE_ORDER__
|
||||
#define __BYTE_ORDER__ XCHAL_MEMORY_ORDER
|
||||
#endif
|
||||
#ifndef __ORDER_BIG_ENDIAN__
|
||||
#define __ORDER_BIG_ENDIAN__ XTHAL_BIGENDIAN
|
||||
#endif
|
||||
#ifndef __ORDER_LITTLE_ENDIAN__
|
||||
#define __ORDER_LITTLE_ENDIAN__ XTHAL_LITTLEENDIAN
|
||||
#endif
|
||||
|
||||
#define STACK_ALIGN 16
|
||||
#define OCTET_TO_SIZEOFUNIT(X) (X)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue