<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 --- - sanitizer_platform_limits_posix.cc(git) build error in aarch64 platrom"
href="http://llvm.org/bugs/show_bug.cgi?id=21476">21476</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>sanitizer_platform_limits_posix.cc(git) build error in aarch64 platrom
</td>
</tr>
<tr>
<th>Product</th>
<td>compiler-rt
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>release blocker
</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>yuxing.tang@gmail.com
</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>Created <span class=""><a href="attachment.cgi?id=13288" name="attach_13288" title="the patch file for compiler-rt/lib/sanitizer_common/santizer_platform_limits_posix.h">attachment 13288</a> <a href="attachment.cgi?id=13288&action=edit" title="the patch file for compiler-rt/lib/sanitizer_common/santizer_platform_limits_posix.h">[details]</a></span>
the patch file for
compiler-rt/lib/sanitizer_common/santizer_platform_limits_posix.h
I got this problem during the build of llvm git source tree. Just during the
build of sanitizer_platform_limits_posix.cc.o in compiler-rt, the error rise
for wrong CHECK_TYPE_SIZE(__kernel_old_gid_t).
after dig into the source code, I find in the line #472 in
sanitizer_platform_limits_posix.h has been changed since the end of September.
The aarch64 don't use "unsigned int" for __sanitizer__kernel_old_git_t, but
change to "unsigned shot".
I just put this line back to the same as 3.5.0. The problem solved.
**** so the possible patch below **********
---
./llvmGIT/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
2014-11-04 19:25:39.907146059 +0800
+++
./llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
2014-11-04 17:08:34.903162640 +0800
@@ -472,7 +472,7 @@
typedef long __sanitizer___kernel_off_t;
#endif
-#if defined(__powerpc__) || defined(__mips__)
+#if defined(__powerpc__) || defined(__aarch64__) || defined(__mips__)
typedef unsigned int __sanitizer___kernel_old_uid_t;
typedef unsigned int __sanitizer___kernel_old_gid_t;
#else
****************************************
**** the error message below ***********
[ 62%] Building CXX object
projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSan
itizerCommon.aarch64.dir/sanitizer_platform_limits_posix.cc.o
In file included from
/home/tyx/SourceCode/llvm/projects/compiler-rt/lib/sanitizer_co
mmon/sanitizer_platform_limits_posix.cc:178:0:
/home/xxx/SourceCode/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_interna
l_defs.h:274:72: error: size of array ‘assertion_failed__1008’ is negative
typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]
...
...
/home/xxx/SourceCode/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_platfor
m_limits_posix.cc:1009:1: note: in expansion of macro ‘CHECK_TYPE_SIZE’
CHECK_TYPE_SIZE(__kernel_old_gid_t);
^
cc1plus: warning: unrecognized command line option "-Wno-c99-extensions"
[enabled by
default]
cc1plus: warning: unrecognized command line option "-Wno-gnu" [enabled by
default]
make[2]: ***
[projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.
aarch64.dir/sanitizer_platform_limits_posix.cc.o] Error 1
make[1]: ***
[projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.
aarch64.dir/all] Error 2
make: *** [all] Error 2
***************************************</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>