https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214258
Yuta Satoh <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #2 from Yuta Satoh <[email protected]> --- Created attachment 179304 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=179304&action=edit ports/devel/openmp/files/patch-link-libm.patch Sample patch for devel/openmp-3.9.0. The attached patch links libm. -Wl,--no-as-needed is necessary for forced linking. Before applying the patch) # ldd /usr/local/lib/libomp.so /usr/local/lib/libomp.so: libthr.so.3 => /lib/libthr.so.3 (0x801288000) libc.so.7 => /lib/libc.so.7 (0x800823000) After applying the patch) # ldd /usr/local/lib/libomp.so /usr/local/lib/libomp.so: libm.so.5 => /lib/libm.so.5 (0x801288000) libthr.so.3 => /lib/libthr.so.3 (0x8014b3000) libc.so.7 => /lib/libc.so.7 (0x800823000) $ echo 'int main() { }' | cc -fopenmp -L/usr/local/lib -xc - -v FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0) Target: x86_64-unknown-freebsd11.0 Thread model: posix InstalledDir: /usr/bin "/usr/bin/cc" -cc1 -triple x86_64-unknown-freebsd11.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name - -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.8.0 -fdebug-compilation-dir /usr/home/nigoro -ferror-limit 19 -fmessage-length 172 -fopenmp -fobjc-runtime=gnustep -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/--26d632.o -x c - clang -cc1 version 3.8.0 based upon LLVM 3.8.0 default target x86_64-unknown-freebsd11.0 #include "..." search starts here: #include <...> search starts here: /usr/bin/../lib/clang/3.8.0/include /usr/include End of search list. "/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o a.out /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/local/lib -L/usr/lib /tmp/--26d632.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 -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "[email protected]"
