[llvm-bugs] [Bug 32279] New: Complex division requires -lm on FreeBSD since Clang 3.6

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 15 05:22:02 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=32279

            Bug ID: 32279
           Summary: Complex division requires -lm on FreeBSD since Clang
                    3.6
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Runtime Library
          Assignee: unassignedbugs at nondot.org
          Reporter: jbeich at vfemail.net
                CC: emaste at freebsd.org, joerg at NetBSD.org,
                    llvm-bugs at lists.llvm.org

Created attachment 18095
  --> https://bugs.llvm.org/attachment.cgi?id=18095&action=edit
v0

https://reviews.llvm.org/D5698 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)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170315/fd48df20/attachment.html>


More information about the llvm-bugs mailing list