From owner-freebsd-current@FreeBSD.ORG Thu Apr 1 08:41:05 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E09FE16A4CE; Thu, 1 Apr 2004 08:41:05 -0800 (PST) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9804B43D2D; Thu, 1 Apr 2004 08:41:05 -0800 (PST) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id i31Gehtf024059; Thu, 1 Apr 2004 11:40:43 -0500 (EST) Date: Thu, 1 Apr 2004 11:40:43 -0500 (EST) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Oliver Eikemeier In-Reply-To: <406C34CA.1070707@fillmore-labs.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: "Jacques A. Vidrine" cc: freebsd-current@FreeBSD.org cc: Sean McNeil Subject: Re: nss_ldap broken X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2004 16:41:06 -0000 On Thu, 1 Apr 2004, Oliver Eikemeier wrote: > Daniel Eischen wrote: > > > On Thu, 1 Apr 2004, Jacques A. Vidrine wrote: > > > > [...] > >>It seems to me we need one of a few things to happen to our threads > >>implementation*s*: > >> > >> (a) pthread.h provides all the magic needed to make pthread_* > >> symbols weak, i.e. transparently providing the functionality of > >> the `libgcc hack' which Dan says would avoid the problem. > > > > > > I don't think that will work; it'll break applications/libraries > > not expecting those functions to be NULL. > > > > > >> (b) ``somehow'' arrange for the unloading of a thread library to > >> fixup the pthread stubs `back to normal'. er, that sounds like > >> a load of work and dangerous to boot. > >> > >> (c) teach rtld to treat thread libraries specially: ignore them during > >> dlopen even if they are specified in DT_NEEDED. perhaps we could > >> add some info to the ELF headers of our thread libraries that rtld > >> could use to implement this. hacky. > > > > > > I think the best way is to avoid having shared libraries needlessly linked to > > a threads library. > > I don't think this is really an option, since you expect too much testing from Isn't it being tested with -pthread under -stable enough to indicate that it isn't going to break anything? > ports maintainers here. It may be difficult to tweak the ports Makefiles if > the port has shared libraries and applications, and most maintainers won't > notice this anyway. For example Berkeley DB is linked against libpthread, so > I had to be careful what OpenLDAP parts I link to Berkeley DB. You can build > nice and complex chains here. -- Dan Eischen