Subject: modular Xorg and pthreads
To: None <pkgsrc-users@netbsd.org>
From: Blair Sadewitz <blair.sadewitz@gmail.com>
List: pkgsrc-users
Date: 04/12/2007 12:12:27
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.

What is the proper way to handle this?  Am I missing something?  In
modular Xorg head/master, the netbsd*) case defines
_POSIX_THREAD_SAFE_FUNCTIONS and -lpthread as the cflags and
xthreadlib. This doesn't seem right in pkgsrc, as our xproto is
patched because NetBSD doesn't provide _POSIX_THREAD_SAFE_FUNCTIONS.

If someone could clue me in, I'd appreciate it.

--Blair

-- 
Support WFMU-FM: free-form radio for the masses!
<http://www.wfmu.org/>

"The frivolity and boredom which unsettle the established order, the
vague foreboding of something unknown, these are the heralds of
approaching change.  The gradual crumbling that left unaltered the
face of the whole is cut short by a sunburst which, in one flash,
illuminates the features of the new world."  --G.W.F. Hegel,
_Phenomenology of Spirit_ 5:11