Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Sep 2003 08:01:35 +0200
From:      Stijn Hoop <stijn@win.tue.nl>
To:        Daniel Eischen <deischen@freebsd.org>
Cc:        Kris Kennaway <kris@obsecurity.org>
Subject:   Re: Initial list of ports that fail due to -pthread
Message-ID:  <20030924060135.GB95116@pcwin002.win.tue.nl>
In-Reply-To: <Pine.GSO.4.10.10309240137330.28336-100000@pcnet5.pcnet.com>
References:  <20030924053413.GA28722@wombat.localnet> <Pine.GSO.4.10.10309240137330.28336-100000@pcnet5.pcnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--XOIedfhf+7KOe/yw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Sep 24, 2003 at 01:49:50AM -0400, Daniel Eischen wrote:
> If FreeBSD wants to take the simple approach and only support
> one thread library in ports (-pthread =3D=3D -lpthread) and not
> make it selectable via PTHREAD_LIBS, then its not a problem.
> It would be nice to be able to support all our thread
> libraries, but I grow weary.

Just an idea (I hope this hasn't been said before in the mega thread but at
least I didn't get it this way):

- 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 line=
s)
- 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).

--Stijn

--=20
"Linux has many different distributions, meaning that you can probably find
one that is exactly what you want (I even found one that looked like a Unix
system)."
		-- Mike Meyer, from a posting at questions@freebsd.org

--XOIedfhf+7KOe/yw
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQE/cTM/Y3r/tLQmfWcRAjXTAJ90joiJrbS+t2lOnzXqCh0raCaC3gCfQscN
kq+ntX2jVxm6LqwY846kBEg=
=SCsI
-----END PGP SIGNATURE-----

--XOIedfhf+7KOe/yw--



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