From owner-freebsd-current@FreeBSD.ORG Tue Sep 23 23:09:46 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 9C61B16A4B3; Tue, 23 Sep 2003 23:09:46 -0700 (PDT) Received: from cimlogic.com.au (cimlog.lnk.telstra.net [139.130.51.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A3BA43FE9; Tue, 23 Sep 2003 23:09:42 -0700 (PDT) (envelope-from jb@cimlogic.com.au) Received: from freebsd1.cimlogic.com.au (localhost [127.0.0.1]) by cimlogic.com.au (8.12.9/8.12.9) with ESMTP id h8O6CYRP044948; Wed, 24 Sep 2003 16:12:34 +1000 (EST) (envelope-from jb@cimlogic.com.au) Received: (from jb@localhost) by freebsd1.cimlogic.com.au (8.12.9/8.12.9/Submit) id h8O6CYv0044947; Wed, 24 Sep 2003 16:12:34 +1000 (EST) Date: Wed, 24 Sep 2003 16:12:34 +1000 From: John Birrell To: Stijn Hoop Message-ID: <20030924061234.GC44314@freebsd1.cimlogic.com.au> References: <20030924053413.GA28722@wombat.localnet> <20030924060135.GB95116@pcwin002.win.tue.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030924060135.GB95116@pcwin002.win.tue.nl> User-Agent: Mutt/1.4.1i cc: Daniel Eischen cc: ports@freebsd.org cc: jb@freebsd.org cc: current@freebsd.org cc: Kris Kennaway Subject: Re: Initial list of ports that fail due to -pthread 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 06:09:46 -0000 On Wed, Sep 24, 2003 at 08:01:35AM +0200, Stijn Hoop wrote: > - fix all ports to respect PTHREAD_LIBS _ON THE LINKING STAGE_ (so no > global search & replace, for it shouldn't be used in compile command lines) > - keep '-pthread' as a compiler option, which maps to a NOOP for compiling > and '-lpthread' (aka libkse) for linking > - set PTHREAD_LIBS to the default value of -pthread > - allow PTHREAD_LIBS to be set to something other, e.g. '-lthr', in > /etc/make.conf (or the make command line) > > What is the problem with this approach? You get both a 'standard' -pthread > knob, _and_ the ability to select your threads library using ports. > Third party apps that use -pthread will work. The only case in which some > work has to be done by a FreeBSD user is when they want to link a non-ported > third-party app with a library other than libpthread (libkse). I think you are probably right. We need to remember that third party apps fit best in ports if they work out of the box without patches and twiddles. We probably should only rely on PTHREAD_LIBS for the non-standard cases where people want to be clever. -- John Birrell