Initial list of ports that fail due to -pthread

Stijn Hoop stijn at
Tue Sep 23 23:01:03 PDT 2003

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


"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
		-- Mike Meyer, from a posting at questions at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-ports mailing list