Subject: Re: modular Xorg and pthreads
To: None <>
From: Joerg Sonnenberger <>
List: pkgsrc-users
Date: 04/12/2007 18:37:59
On Thu, Apr 12, 2007 at 12:12:27PM -0400, Blair Sadewitz wrote:
> For AIGLX support, various libraries have to have access to pthread
> functions.  I was told in the past that we have thread stubs in libc,
> but the libX11 configure script does not find pthread_self  there.  I
> can set XTHREAD_CFLAGS and XTHREADLIB (in libX11's configure script)
> to -pthread, but then tons of programs and libraries that don't need
> it pick up a pthread dependency that they don't need.

I have to correct myself, as I confused the libc ABI here. NetBSD falls
into the archaic systems that don't have the stubs and therefore need
the stub lib. I'll add it over the next days. Forcing the pthread
linkage adds more issues than it is worth -- e.g. AIGLX is a wonderful
example of that. Mesa for example is only a thread-aware lib, it doesn't
use pthread otherwise. Forcing it to link with pthread means that it
cannot be savely loaded via dlopen -- just what AIGLX is trying.