<html>
<head>
<base href="https://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 --- - undefined "___atomic_compare_exchange and ___atomic_load emitted at -m32 on x86_64-apple-darwin12" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24038&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=g9mIoELBvdIGOPCRApCXvN-cp74KdKpqHCAwdbjEmFQ&s=R6vsWY9o0B4E08EzcR2-tIhGFTo7sKyLbU_mKyPASIY&e=">24038</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>undefined "___atomic_compare_exchange and ___atomic_load emitted at -m32 on x86_64-apple-darwin12
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</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>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>howarth.mailing.lists@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>When current llvm/clang/compiler-rt/openmp trunk svn is built on
x86_64-apple-darwin12 (OS X 10.8), the resulting compiler produces failures in
the test_omp_atomic and orph_test_omp_atomic tests of the OpenMP3.1_Validation
test suite when it is built at -m32 (but not -m64). The failures are due to
failed linkages of the form...
Testing for "omp_atomic":
Generating sources .............. success
Compiling soures ............Undefined symbols for architecture i386:
"___atomic_compare_exchange", referenced from:
_.omp_outlined..4 in test_omp_atomic-a95352.o
_.omp_outlined..6 in test_omp_atomic-a95352.o
_.omp_outlined..12 in test_omp_atomic-a95352.o
"___atomic_load", referenced from:
_.omp_outlined..4 in test_omp_atomic-a95352.o
_.omp_outlined..6 in test_omp_atomic-a95352.o
_.omp_outlined..12 in test_omp_atomic-a95352.o
ld: symbol(s) not found for architecture i386
clang-3.7: error: linker command failed with exit code 1 (use -v to see
invocation)
make[1]: *** [bin/c/test_omp_atomic] Error 1
ERROR: Compilation of the test failed.
.... failed
+ orphaned mode:
Generating sources .............. success
Compiling soures ............Undefined symbols for architecture i386:
"___atomic_compare_exchange", referenced from:
_.omp_outlined..12 in orph_test_omp_atomic-f659ef.o
"___atomic_load", referenced from:
_.omp_outlined..12 in orph_test_omp_atomic-f659ef.o
ld: symbol(s) not found for architecture i386
clang-3.7: error: linker command failed with exit code 1 (use -v to see
invocation)
make[1]: *** [bin/c/orph_test_omp_atomic] Error 1
ERROR: Compilation of the test failed.
These failures don't occur on 10.9 or later due to their support for the calls
as seem in compiler-rt-3.7.0.src/lib/builtins/apple_versioning.c...
NOT_HERE_IN_10_8_AND_EARLIER(__atomic_compare_exchange)
NOT_HERE_IN_10_8_AND_EARLIER(__atomic_compare_exchange_1)
NOT_HERE_IN_10_8_AND_EARLIER(__atomic_compare_exchange_2)
NOT_HERE_IN_10_8_AND_EARLIER(__atomic_compare_exchange_4)
NOT_HERE_IN_10_8_AND_EARLIER(__atomic_compare_exchange_8)
NOT_HERE_IN_10_8_AND_EARLIER(__atomic_load)
NOT_HERE_IN_10_8_AND_EARLIER(__atomic_load_1)
NOT_HERE_IN_10_8_AND_EARLIER(__atomic_load_2)
NOT_HERE_IN_10_8_AND_EARLIER(__atomic_load_4)
NOT_HERE_IN_10_8_AND_EARLIER(__atomic_load_8)</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>