http://llvm.org/bugs/show_bug.cgi?id=22515
Bug ID: 22515
Summary: Build fails for arm-none-eabi target
Product: compiler-rt
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: compiler-rt
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
I'm trying to build rust cross compiler for arm-none-eabi target on Windows.
But while attempting to build compiler-rt, it fails with following message.
C:/workspace/rust/src/compiler-rt/lib/builtins/int_endianness.h:108:2: error:
#error Unable to determine endian
It is simply because the header cannot determine target endianness for
arm-none-eabi.
Because I'm using gcc 4.8.4 for target compiler, my temporary workaround for
this is to check __BYTE_ORDER__ predefined macro.
...
#if defined(__BYTE_ORDER__)
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#define _YUGA_LITTLE_ENDIAN 0
#define _YUGA_BIG_ENDIAN 1
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#define _YUGA_LITTLE_ENDIAN 1
#define _YUGA_BIG_ENDIAN 0
#endif /* __BYTE_ORDER__ */
#endif /* GCC/clang with __BYTE_ORDER__ predefined */
...
But I don't know if it is a good idea to change source code every time we add
support to a new target/compiler.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs