<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Build fails for arm-none-eabi target"
href="http://llvm.org/bugs/show_bug.cgi?id=22515">22515</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Build fails for arm-none-eabi target
</td>
</tr>
<tr>
<th>Product</th>
<td>compiler-rt
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>compiler-rt
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>trlim@iotok.kr
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>