Package compilation and installation succeed. However, when trying to actually use it, the link fails. Please add 'sys-devel/clang-runtime openmp' to package.use.mask. # clang -fopenmp=libomp test_omp.c -v -o test_omp clang version 3.9.1 (tags/RELEASE_391/final) Target: x86_64-gentoo-freebsd11.0 Thread model: posix InstalledDir: /usr/bin "/usr/bin/clang-3.9" -cc1 -triple x86_64-gentoo-freebsd11.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name test_omp.c -mrelocation-model static -mthread-model posix -mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -v -dwarf-column-info -debugger-tuning=gdb -resource-dir /usr/bin/../lib/clang/3.9.1 -fdebug-compilation-dir /tmp -ferror-limit 19 -fmessage-length 160 -fopenmp -fobjc-runtime=gnustep -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/test_omp-45c561.o -x c test_omp.c clang -cc1 version 3.9.1 based upon LLVM 3.9.1 default target x86_64-gentoo-freebsd11.0 #include "..." search starts here: #include <...> search starts here: /usr/bin/../lib/clang/3.9.1/include /usr/include End of search list. "/usr/bin/x86_64-gentoo-freebsd11.0-ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o test_omp /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib /tmp/test_omp-45c561.o -lomp -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o /usr/lib/libomp.so: undefined reference to `scalbnl' /usr/lib/libomp.so: undefined reference to `logb' /usr/lib/libomp.so: undefined reference to `scalbnf' /usr/lib/libomp.so: undefined reference to `scalbn' /usr/lib/libomp.so: undefined reference to `logbl' /usr/lib/libomp.so: undefined reference to `logbf' /usr/lib/libomp.so: undefined reference to `fmaxl' clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation) FYI, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214258 https://reviews.freebsd.org/D6362?id=20677
Looks like missing -lm when linking libomp. I wonder if that applies to all arches.
*-fbsd is gone.