<html>
<head>
<base href="https://bugs.llvm.org/">
</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-x86_64-Test-Nolibc doesn't link in Linux/i686 build"
href="https://bugs.llvm.org/show_bug.cgi?id=42463">42463</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Sanitizer-x86_64-Test-Nolibc doesn't link in Linux/i686 build
</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>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</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>ro@gcc.gnu.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>[There's no sanitizer_common component, so filing for compiler-rt. Likewise
filing for unspecified version since there's no trunk.]
When running an LLVM build on a Linux/x86_64 system for target
i686-pc-linux-gnu,
make check-all FAILs:
[42/849] Generating Sanitizer-x86_64-Test-Nolibc
FAILED:
projects/compiler-rt/lib/sanitizer_common/tests/Sanitizer-x86_64-Test-Nolibc
cd
/var/gcc/llvm/dist-i686-release/projects/compiler-rt/lib/sanitizer_common/tests
&& /var/gcc/llvm/dist-i686-release/./bin/clang
sanitizer_nolibc_test_main.x86_64.o -Wl,-whole-archive
libRTSanitizerCommon.test.nolibc.x86_64.a -Wl,-no-whole-archive -o
/var/gcc/llvm/dist-i686-release/projects/compiler-rt/lib/sanitizer_common/tests/./Sanitizer-x86_64-Test-Nolibc
-Wl,-allow-shlib-undefined -nostdlib -m64
/usr/bin/ld: i386 architecture of input file
`sanitizer_nolibc_test_main.x86_64.o' is incompatible with i386:x86-64 output
/usr/bin/ld: sanitizer_nolibc_test_main.x86_64.o: in function `_start':
/vol/llvm/src/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_nolibc_test_main.cc:17:
undefined reference to `_GLOBAL_OFFSET_TABLE_'
/usr/bin/ld: sanitizer_nolibc_test_main.x86_64.o: file class ELFCLASS32
incompatible with ELFCLASS64
/usr/bin/ld: final link failed: file in wrong format
clang-9: error: linker command failed with exit code 1 (use -v to see
invocation)
The object in question (sanitizer_nolibc_test_main.x86_64.o) is build for the
default multilib (-m32), but the rest of the archive is 64-bit as it should.
The attached hack (forcing -m64) allowed the build to continue for me.</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>