From owner-freebsd-current@FreeBSD.ORG Wed Sep 24 06:22:32 2003 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 C30B816A4B3; Wed, 24 Sep 2003 06:22:32 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id E572244029; Wed, 24 Sep 2003 06:22:29 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.9/8.12.9) with ESMTP id h8ODMCgL066585; Wed, 24 Sep 2003 09:22:12 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)h8ODMCrL066582; Wed, 24 Sep 2003 09:22:12 -0400 (EDT) Date: Wed, 24 Sep 2003 09:22:11 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Scott Long In-Reply-To: <3F71396A.6070508@freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: deischen@freebsd.org cc: Doug Barton cc: Freebsd Current Subject: Re: Fixing -pthreads (Re: ports and -current) 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: Wed, 24 Sep 2003 13:22:32 -0000 On Wed, 24 Sep 2003, Scott Long wrote: > I'm a big advocate of using libmap to deal with this. Ditto. Based on the results seen thus far, my preference would really be for: (1) Keep -pthread, make it imply -lpthread, saving a lot of hassle. (2) Ship all packages and binaries using threading with -lpthread -- i.e., a dynamic library dependency on libpthread. This will mean that administrators don't have to list each possible threading library in /etc/libmap.conf in order to be sure they caught all of them. (3) Use libmap to perform the necessary substitution on a per-application or per-system basis. If libpthread isn't available on an architecture, default ship libmap.conf to substitute libthr for libpthread on the platform for all applications. Or libc_r, or whatever. This will result in all applications we ship having a consistent thread library name so that administrators can substitute more easily. libpthread would give you M:N threading by default, but it would be easy to perform local changes to improve performance for applications that specifically benefit from 1:1 threading, cothreads, etc. Or if a serious compatibility bug is found between libpthread and an application, they can substitute easily as well. I suppose this case might imply (4): (4) If an application is known to be compatible only with a specific threading model, do hard-code that in the application build somehow. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories