Date: Fri, 10 Feb 2006 13:39:08 -0600 From: Dan Nelson <dnelson@allantgroup.com> To: Steve Kargl <sgk@troutmask.apl.washington.edu> Cc: freebsd-current@freebsd.org Subject: Re: [jakub@redhat.com:Linking against libpthread via -pthread? Message-ID: <20060210193907.GE2090@dan.emsphone.com> In-Reply-To: <20060210181715.GA21782@troutmask.apl.washington.edu> References: <20060210181715.GA21782@troutmask.apl.washington.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Feb 10), Steve Kargl said: > Some background information: I routinely build GCC mainline on > i386-*-freebsd and amd64-*-freebsd. GCC mainline is introducing > OpenMP support. When libgomp.so.1 is built, the compiler is given > the -pthread option throughout the construction of libgomp.so.1. > However, a "ldd libgomp.so.1" shows no dependence on libpthread.so.2 There was a discussion about this back when the default switched from libc_r to libpthread, and I think the consensus was that shared libraries should never record dependencies against threads libs, which means you have to add -pthread to the link line when building the final executable. This avoids problems where an executable links to three shlibs, one library is linked to libc_r, one's linked to libkse, and a third is linked to libpthread. -- Dan Nelson dnelson@allantgroup.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060210193907.GE2090>