Initial list of ports that fail due to -pthread

John Birrell jb at cimlogic.com.au
Tue Sep 23 23:09:46 PDT 2003


On Wed, Sep 24, 2003 at 08:01:35AM +0200, Stijn Hoop wrote:
> - 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).

I think you are probably right. We need to remember that third party apps
fit best in ports if they work out of the box without patches and twiddles.
We probably should only rely on PTHREAD_LIBS for the non-standard cases where
people want to be clever.

-- 
John Birrell


More information about the freebsd-ports mailing list