Subject: Re: pthread + pkgsrc proposal
To: Johnny C. Lam <jlam@buildlink.org>
From: grant beattie <grant@NetBSD.org>
List: tech-pkg
Date: 11/24/2004 18:25:19
On Wed, Nov 24, 2004 at 07:01:37AM +0000, Johnny C. Lam wrote:

> For pkgsrc, I will be making changes so that if the package uses 
> dlopen(), then it will be automatically linked with pthread support. 
> This follows the suggestion mentioned on tech-kern:
> 
>      http://mail-index.netbsd.org/tech-kern/2004/11/23/0014.html
> 
> The precise description of what will happen is that a package should
> include dlopen.buildlink3.mk in the package Makefile if it uses dlopen().
> If there are native pthreads available, then the package will be
> automatically built and linked with -pthread/-lpthread/-lc_r (depending
> on the OS; gory details in pkgsrc/mk/pthread.{buildlink3,builtin}.mk).
> On platforms that do not have native pthreads, pkgsrc can be forced
> to follow this same behavior by setting DLOPEN_REQUIRE_PTHREADS=yes
> in /etc/mk.conf.

is this mutex locking behaviour true on systems other than NetBSD?
specifically those which have had pthreads for a lot longer than
NetBSD?

from a quick search, it sounds a lot like NetBSD is on its own in
this particular mode of behaviour. maybe that needs to be fixed, but
that is out of my area of expertise...

grant.