From owner-freebsd-threads@FreeBSD.ORG Fri Aug 6 20:19:02 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F23D516A4CE; Fri, 6 Aug 2004 20:19:01 +0000 (GMT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6BA9043D45; Fri, 6 Aug 2004 20:19:01 +0000 (GMT) (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 i76KIxXd020691; Fri, 6 Aug 2004 16:18:59 -0400 (EDT) Date: Fri, 6 Aug 2004 16:18:59 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Robert Watson In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: threads@freebsd.org cc: davidxu@freebsd.org Subject: Re: A way to build and install libpthread as 1:1 as well as M:N? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Aug 2004 20:19:02 -0000 On Mon, 19 Jul 2004, Robert Watson wrote: > On Sun, 18 Jul 2004, Daniel Eischen wrote: > > > > The issue here is my keeping everything in sync and making sure testing is > > > reproduceable. If I'm manually building and installing threading > > > libraries, I'm likely to screw it up. I was hoping for a mechanism in > > > buildworld/installworld so that it all happens automatically, reducing the > > > chances of user error, stale library versions, etc. > > > > Well, like I said, if we can agree on a place to put the 1:1 version and > > what to call it, we can make it happen. My suggestion is to keep the > > libraries named the same, install them in different places, and use > > LD_LIBRARY_PATH to switch between them. > > > > Should I just do it, or is more discussion needed? > > Other than the need for something like it, I don't have much opinion on > the mechanism by which it's accomplished. I think that what you suggest > sounds pretty reasonable to me. I'd be fine with a libpthread11, a > lib/foo/libpthread, or whatever makes the most sense to you. I guess > maybe I have a slight preference for libpthread11, but agree that the > benefits of being able to use LD_LIBRARY_PATH are substantial and probably > more important than the slight asthetic preference. Well, it didn't add much to the library to allow either 1:1 or M:N. Here's a patch that lets you run in 1:1 mode if LIBPTHREAD_SYSTEM_SCOPE is defined in the environment. I'm not stuck on its name, so feel free to suggest something else. http://people.freebsd.org/~deischen/kse/libpthread.diffs Warning (*), you can still force 1:1 mode if you build the library with -DSYSTEM_SCOPE_ONLY, so be sure to remove this when rebuilding libpthread. (*) I think it's still useful for archs that don't run in M:N yet. -- Dan Eischen