Date: Wed, 25 Jan 2017 10:43:58 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-toolchain@FreeBSD.org Subject: [Bug 214258] devel/openmp: spurious libm dependency Message-ID: <bug-214258-29464-JyR6YaTcQX@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-214258-29464@https.bugs.freebsd.org/bugzilla/> References: <bug-214258-29464@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214258 Yuta Satoh <nigoro.dev@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nigoro.dev@gmail.com --- Comment #2 from Yuta Satoh <nigoro.dev@gmail.com> --- Created attachment 179304 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D179304&action= =3Dedit 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 =3D> /lib/libthr.so.3 (0x801288000) libc.so.7 =3D> /lib/libc.so.7 (0x800823000) After applying the patch) # ldd /usr/local/lib/libomp.so /usr/local/lib/libomp.so: libm.so.5 =3D> /lib/libm.so.5 (0x801288000) libthr.so.3 =3D> /lib/libthr.so.3 (0x8014b3000) libc.so.7 =3D> /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-i= nfo -debugger-tuning=3Dgdb -resource-dir /usr/bin/../lib/clang/3.8.0 -fdebug-compilation-dir /usr/home/nigoro -ferror-limit 19 -fmessage-length = 172 -fopenmp -fobjc-runtime=3Dgnustep -fdiagnostics-show-option -fcolor-diagnos= tics -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=3Dboth --enable-new-dtags -o a.out /usr/lib/crt1.o /usr/lib/cr= ti.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-ne= eded /usr/lib/crtend.o /usr/lib/crtn.o --=20 You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-214258-29464-JyR6YaTcQX>