Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Sep 2003 13:21:12 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        freebsd-threads@FreeBSD.org
Subject:   Re: Removing -pthread from gcc
Message-ID:  <20030902182110.GA46649@dan.emsphone.com>
In-Reply-To: <3F4F8D58.5F4523AE@mindspring.com>
References:  <20030829042613.80458.qmail@web13406.mail.yahoo.com> <3F4F8D58.5F4523AE@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030902182110.GA46649>