<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 - Complex division requires -lm on FreeBSD since Clang 3.6"
href="https://bugs.llvm.org/show_bug.cgi?id=32279">32279</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Complex division requires -lm on FreeBSD since Clang 3.6
</td>
</tr>
<tr>
<th>Product</th>
<td>OpenMP
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>FreeBSD
</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>Runtime Library
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jbeich@vfemail.net
</td>
</tr>
<tr>
<th>CC</th>
<td>emaste@freebsd.org, joerg@NetBSD.org, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=18095" name="attach_18095" title="v0">attachment 18095</a> <a href="attachment.cgi?id=18095&action=edit" title="v0">[details]</a></span>
v0
<a href="https://reviews.llvm.org/D5698">https://reviews.llvm.org/D5698</a> made Clang emit calls to __divdc3 which in
compiler-rt use scalbn and reside in math library on FreeBSD. The fix was
provided by Yuta Satoh downstream.
NetBSD appears to have similar dependency on -lm. Joerg, does it work fine with
-Wl,--as-needed?
$ clang40 -fopenmp omp_hello.c
/usr/local/llvm40/lib/libomp.so: undefined reference to `scalbnl'
/usr/local/llvm40/lib/libomp.so: undefined reference to `fmaxl'
/usr/local/llvm40/lib/libomp.so: undefined reference to `logbl'
/usr/local/llvm40/lib/libomp.so: undefined reference to `scalbnf'
/usr/local/llvm40/lib/libomp.so: undefined reference to `logb'
/usr/local/llvm40/lib/libomp.so: undefined reference to `logbf'
/usr/local/llvm40/lib/libomp.so: undefined reference to `scalbn'
clang-4.0: error: linker command failed with exit code 1 (use -v to see
invocation)</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>