<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 - Atomics support missing on 32-bit SPARC"
href="https://bugs.llvm.org/show_bug.cgi?id=42535">42535</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Atomics support missing on 32-bit SPARC
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Sun
</td>
</tr>
<tr>
<th>OS</th>
<td>Solaris
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Keywords</th>
<td>missing-feature
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: Sparc
</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, venkatra@cs.wisc.edu
</td>
</tr></table>
<p>
<div>
<pre>When trying a 2-stage build of llvm trunk on Solaris 11.5/SPARC, quite a number
of tests FAILed compared to a 1-stage build with gcc 9. Many failed due to
missing atomics support in 32-bit sparc. The problem can easily be seen with
the tests used in llvm `cmake/modules/CheckAtomic.cmake`:
```
$ cat atomic.c
#include <atomic>
std::atomic<int> x;
int main() {
return x;
}
$ clang++ -m32 -std=c++11 atomic.c
symbol in file
__atomic_load_4 /var/tmp/atomics-04089b.o
ld: fatal: symbol referencing errors
clang-9: error: linker command failed with exit code 1 (use -v to see
invocation)
$ gcc -m32 -std=c++11 atomic.c
```
While I can hack the driver to link with `-latomics` to avoid this issue, it
would make way more sense if clang would handle this like gcc.</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>