From owner-freebsd-threads@FreeBSD.ORG Tue Sep 2 11:21:14 2003 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 3528516A4BF for ; Tue, 2 Sep 2003 11:21:14 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B52843FD7 for ; Tue, 2 Sep 2003 11:21:13 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.9/8.12.9) id h82ILCZE075325; Tue, 2 Sep 2003 13:21:12 -0500 (CDT) (envelope-from dan) Date: Tue, 2 Sep 2003 13:21:12 -0500 From: Dan Nelson To: Terry Lambert Message-ID: <20030902182110.GA46649@dan.emsphone.com> References: <20030829042613.80458.qmail@web13406.mail.yahoo.com> <3F4F8D58.5F4523AE@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F4F8D58.5F4523AE@mindspring.com> X-OS: FreeBSD 5.1-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.4i cc: "Pedro F. Giffuni" cc: freebsd-threads@FreeBSD.org Subject: Re: Removing -pthread from gcc X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2003 18:21:14 -0000 In the last episode (Aug 29), Terry Lambert said: > "Pedro F. Giffuni" wrote: > > I'm not understanding what the new world order will be, but please > > try to agree something with the autoconf people: from my porting > > experience, autoconf is not interested on what PTHREAD_LIBS says; > > it just tries to link with pthread and if that fails it assumes the > > platform doesn't support threads at all. > > This is why autoconf sucks: it tries to identify the platform and > make the code conform to that, rather than identifying the platform > capabilities (note: different from "does -pthread work?") and using > that. Well, that's why badly-written autoconf tests suck. > This is why imake and xmkmf can compile every X application that > uses them, while autoconf and automake can only do it for the > platforms they have been explicitly told about. Then again, imake doesn't automatically realize that you've installed a new piece of software, or upgraded an existing one that has new capabilities or fixed bugs. > The autoconf program balkanizes things, while imake unites them. > > I wish autoconf would die. Well-written autoconf macros test for features, not platforms. There is a nice pthreads macro that tries a bunch of pthreads flags, and uses what works. It also respects the PTHREAD_LIBS and PTHREAD_CFLAGS environment variables, so it's easy to override. It's got some out-of-date tests (it tries -kthreads because it thinks FreeBSD supports it), but does work on all the systems I have available. http://www.gnu.org/software/ac-archive/htmldoc/acx_pthread.html -- Dan Nelson dnelson@allantgroup.com