From owner-freebsd-toolchain@freebsd.org Wed Jan 25 10:43:58 2017 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7BD3CBFFA2 for ; Wed, 25 Jan 2017 10:43:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC9631381 for ; Wed, 25 Jan 2017 10:43:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v0PAhwf1071230 for ; Wed, 25 Jan 2017 10:43:58 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-toolchain@FreeBSD.org Subject: [Bug 214258] devel/openmp: spurious libm dependency Date: Wed, 25 Jan 2017 10:43:58 +0000 X-Bugzilla-Reason: CC AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: needs-patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: nigoro.dev@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-toolchain@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: cc attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jan 2017 10:43:58 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214258 Yuta Satoh changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nigoro.dev@gmail.com --- Comment #2 from Yuta Satoh --- 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.=