<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 - lld fails to build on targets that need -latomic"
href="https://bugs.llvm.org/show_bug.cgi?id=47123">47123</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>lld fails to build on targets that need -latomic
</td>
</tr>
<tr>
<th>Product</th>
<td>lld
</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>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jistone@redhat.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, smithp352@googlemail.com
</td>
</tr></table>
<p>
<div>
<pre>In Rust CI, while trying to upgrade to LLVM 11 rc1, arm-unknown-linux-gnueabi
failed to link lld due to missing symbols for Timer.cpp:
<a href="https://github.com/rust-lang/rust/pull/73526#issuecomment-671549737">https://github.com/rust-lang/rust/pull/73526#issuecomment-671549737</a>
<span class="quote">> [100%] Linking CXX executable ../../bin/lld
> /x-tools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/8.3.0/../../../../arm-unknown-linux-gnueabi/bin/ld: ../../lib/liblldCommon.a(Timer.cpp.o): in function `lld::ScopedTimer::stop()':
> Timer.cpp:(.text._ZN3lld11ScopedTimer4stopEv+0x44): undefined reference to `__atomic_fetch_add_8'
> /x-tools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/8.3.0/../../../../arm-unknown-linux-gnueabi/bin/ld: ../../lib/liblldCommon.a(Timer.cpp.o): in function `lld::Timer::millis() const':
> Timer.cpp:(.text._ZNK3lld5Timer6millisEv+0x8): undefined reference to `__atomic_load_8'
> /x-tools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/8.3.0/../../../../arm-unknown-linux-gnueabi/bin/ld: ../../lib/liblldCommon.a(Timer.cpp.o): in function `lld::Timer::print(int, double, bool) const':
> Timer.cpp:(.text._ZNK3lld5Timer5printEidb+0x2c0): undefined reference to `__atomic_load_8'
> /x-tools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/8.3.0/../../../../arm-unknown-linux-gnueabi/bin/ld: ../../lib/liblldCommon.a(Timer.cpp.o): in function `lld::Timer::print()':
> Timer.cpp:(.text._ZN3lld5Timer5printEv+0x34): undefined reference to `__atomic_load_8'</span >
This can be solved by linking libatomic on targets that need it. I've tried to
add this in <a href="https://reviews.llvm.org/D85691">https://reviews.llvm.org/D85691</a>, but it seems that the use of
atomics for Timer at all is controversial.</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>