[PATCH libX11] Fix libpthread linkage on OpenBSD.
Alan Coopersmith
alan.coopersmith at oracle.com
Tue Jul 12 08:17:04 PDT 2011
On 07/12/11 01:15 AM, Matthieu Herrb wrote:
> From: David Coppa <dcoppa at gmail.com>
>
> OpenBSD prefers to use the -pthread to fetch pthread libs when needed.
>
> Signed-off-by: Matthieu Herrb <matthieu.herrb at laas.fr>
> ---
> configure.ac | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 0c68ff4..a449ba8 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -279,7 +279,7 @@ AM_CONDITIONAL(THRSTUBS, test x$thrstubs = xyes)
> # XXX incomplete, please fill this in
> if test x$xthreads = xyes ; then
> case $host_os in
> - linux*|openbsd*|gnu*|k*bsd*-gnu)
> + linux*|gnu*|k*bsd*-gnu)
> XTHREADLIB=-lpthread ;;
> netbsd*)
> XTHREAD_CFLAGS="-D_POSIX_THREAD_SAFE_FUNCTIONS"
> @@ -287,7 +287,7 @@ if test x$xthreads = xyes ; then
> freebsd*)
> XTHREAD_CFLAGS="-D_THREAD_SAFE"
> XTHREADLIB="-pthread" ;;
> - dragonfly*)
> + dragonfly*|openbsd*)
> XTHREADLIB="-pthread" ;;
> solaris*)
> XTHREAD_CFLAGS="-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS" ;;
I can't comment on whether that's the right flag to use, but once you've
chosen the flag, that seems like a reasonable way to do it, assuming you
don't also need the -D_THREAD_SAFE found in the freebsd case.
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Platform Engineering: X Window System
More information about the xorg-devel
mailing list