RE: Fixing -pthreads (Re: ports and -current)

From: David Schwartz <davids_at_webmaster.com>
Date: Tue, 23 Sep 2003 11:53:47 -0700
> On Mon, 22 Sep 2003, David Schwartz wrote:

> No.  There are other environments that don't have -pthread
> though.

	So now FreeBSD will support a flag that numerous other platforms support,
however it will support it differently from every other platform. On every
other platform I know of where '-pthread' does anything other than generate
an error, it causes the compiler to conform to the pthreads standard.
FreeBSD will be the only platform that knows what '-pthread' is but doesn't
do the right thing when it gets it.

	Isn't it good to have one flag that, on every platform that supports it,
gives you whatever's needed to get the default pthreads implementation to
work? And isn't that what '-pthread' was supposed to be for?

> Why do you want to shoehorn -pthread onto us when it is not
> a good fit?

	Then don't support it. Return an error and nothing will break. However, I'd
also suggest making it easy for people to set '-pthread' to give whatever
pthreads library they think is the most sensible default for their
installation.

	There is a push to make all platforms that support pthreads support
'-pthread' to provide the needed compiler/linker goo to make pthreads work.
This move is a slap in the face against that standardization effort. It
means that configuration scripts will have to special case FreeBSD's current
behavior. And in the future, if FreeBSD threading libraries start requiring
compiler goo, they'll have to special case again. Another imcompatible
definition for the same compiler flag is a slap in the face to the effort to
standardize the meaning of the '-pthread' flag.

	This is, I realize, turning into a bikeshed. This is cut down from a much
longer reply that I wrote while downloading email that made most of the
other points I was going to make.

	DS
Received on Tue Sep 23 2003 - 09:53:53 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:23 UTC