Subject: Re: CVS commit: pkgsrc/mk
To: None <tech-pkg@NetBSD.org>
From: Chris Gilbert <chris@dokein.co.uk>
List: tech-pkg
Date: 06/13/2004 11:40:21
On Sat, 12 Jun 2004 03:19:52 +0000 (UTC)
grant beattie <grant@netbsd.org> wrote:

> 
> Module Name:	pkgsrc
> Committed By:	grant
> Date:		Sat Jun 12 03:19:52 UTC 2004
> 
> Modified Files:
> 	pkgsrc/mk: pthread.buildlink2.mk pthread.buildlink3.mk
> 
> Log Message:
> when using native threads, only set BUILDLINK_CFLAGS.pthread=-pthread on
> systems known to support its (FreeBSD, NetBSD, Linux).
> 
> fixes breakage caused by passing -pthread to SunPro cc(1) and likely
> also fixes platforms other than the above.

I believe threaded programs using SunPro cc need -mt passing instead, so that it links libthread before libc, to get the thread safe versions of some libc functions, eg fork.

If you've access to a Solaris box you might want to check the -mt option.

Chris