From: Bruno Haible Date: Mon, 2 Dec 2019 01:39:38 +0000 (+0100) Subject: pthread-h: Fix link errors with --enable-threads=isoc on AIX. X-Git-Tag: v1.0~4564 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=6a44771a9975f5de3a2f505118fe8f5e901ca96c;p=gnulib.git pthread-h: Fix link errors with --enable-threads=isoc on AIX. * m4/threadlib.m4 (gl_ANYTHREADLIB_EARLY): New macro, extracted from gl_THREADLIB_EARLY_BODY. (gl_THREADLIB_EARLY_BODY): Invoke it. (gl_PTHREADLIB_BODY): New macro, extracted from gl_THREADLIB_BODY. (gl_THREADLIB_BODY): Invoke it. (gl_PTHREADLIB): New macro. * m4/pthread_h.m4 (gl_PTHREAD_H): Require gl_PTHREADLIB. Require gl_THREADLIB and test $gl_threads_api only if module 'threadlib' is present. Define LIB_PTHREAD using LIBPMULTITHREAD, not LIBMULTITHREAD. * modules/pthread-h (Files): Add threadlib.m4. (Depends-on): Remove threadlib. (configure.ac-early): Invoke gl_ANYTHREADLIB_EARLY. Don't set _REENTRANT and _THREAD_SAFE here. (Link): Use LIBPTHREAD, not LIBTHREAD. * modules/pthread-thread (Link): Use LIBPMULTITHREAD, not LIBMULTITHREAD. * modules/pthread-once (Link): Likewise. * modules/pthread-mutex (Link): Likewise. * modules/pthread-rwlock (Link): Likewise. * modules/pthread-cond (Link): Likewise. * modules/pthread-tss (Link): Likewise. * modules/pthread-spin (Link): Likewise. * modules/pthread (Link): Likewise. * modules/pthread-h-c++-tests (test_pthread_c___LDADD): Likewise. * modules/pthread-thread-tests (test_pthread_thread_LDADD): Likewise. * modules/pthread-once-tests (test_pthread_once1_LDADD, test_pthread_once2_LDADD): Likewise. * modules/pthread-mutex-tests (test_pthread_mutex_LDADD): Likewise. * modules/pthread-rwlock-tests (test_pthread_rwlock_LDADD): Likewise. * modules/pthread-cond-tests (test_pthread_cond_LDADD): Likewise. * modules/pthread-tss-tests (test_pthread_tss_LDADD): Likewise. --- diff --git a/ChangeLog b/ChangeLog index c17f8d2da2..6ca57ee3e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,38 @@ +2019-12-01 Bruno Haible + + pthread-h: Fix link errors with --enable-threads=isoc on AIX. + * m4/threadlib.m4 (gl_ANYTHREADLIB_EARLY): New macro, extracted from + gl_THREADLIB_EARLY_BODY. + (gl_THREADLIB_EARLY_BODY): Invoke it. + (gl_PTHREADLIB_BODY): New macro, extracted from gl_THREADLIB_BODY. + (gl_THREADLIB_BODY): Invoke it. + (gl_PTHREADLIB): New macro. + * m4/pthread_h.m4 (gl_PTHREAD_H): Require gl_PTHREADLIB. Require + gl_THREADLIB and test $gl_threads_api only if module 'threadlib' is + present. Define LIB_PTHREAD using LIBPMULTITHREAD, not LIBMULTITHREAD. + * modules/pthread-h (Files): Add threadlib.m4. + (Depends-on): Remove threadlib. + (configure.ac-early): Invoke gl_ANYTHREADLIB_EARLY. Don't set _REENTRANT + and _THREAD_SAFE here. + (Link): Use LIBPTHREAD, not LIBTHREAD. + * modules/pthread-thread (Link): Use LIBPMULTITHREAD, not + LIBMULTITHREAD. + * modules/pthread-once (Link): Likewise. + * modules/pthread-mutex (Link): Likewise. + * modules/pthread-rwlock (Link): Likewise. + * modules/pthread-cond (Link): Likewise. + * modules/pthread-tss (Link): Likewise. + * modules/pthread-spin (Link): Likewise. + * modules/pthread (Link): Likewise. + * modules/pthread-h-c++-tests (test_pthread_c___LDADD): Likewise. + * modules/pthread-thread-tests (test_pthread_thread_LDADD): Likewise. + * modules/pthread-once-tests (test_pthread_once1_LDADD, + test_pthread_once2_LDADD): Likewise. + * modules/pthread-mutex-tests (test_pthread_mutex_LDADD): Likewise. + * modules/pthread-rwlock-tests (test_pthread_rwlock_LDADD): Likewise. + * modules/pthread-cond-tests (test_pthread_cond_LDADD): Likewise. + * modules/pthread-tss-tests (test_pthread_tss_LDADD): Likewise. + 2019-12-01 Bruno Haible cond: State linking requirements. diff --git a/m4/pthread_h.m4 b/m4/pthread_h.m4 index 8c23a77794..bccad233af 100644 --- a/m4/pthread_h.m4 +++ b/m4/pthread_h.m4 @@ -1,4 +1,4 @@ -# pthread_h.m4 serial 4 +# pthread_h.m4 serial 5 dnl Copyright (C) 2009-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -10,13 +10,21 @@ AC_DEFUN([gl_PTHREAD_H], dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_PTHREAD_H_DEFAULTS]) - AC_REQUIRE([gl_THREADLIB]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_PTHREADLIB]) gl_CHECK_NEXT_HEADERS([pthread.h]) - dnl On mingw, if --enable-threads=windows or gl_AVOID_WINPTHREAD is used, - dnl ignore the from the mingw-w64 winpthreads library. - if test $ac_cv_header_pthread_h = yes && test $gl_threads_api != windows; then + if test $ac_cv_header_pthread_h = yes; then HAVE_PTHREAD_H=1 + dnl On mingw, if --enable-threads=windows or gl_AVOID_WINPTHREAD is used, + dnl ignore the from the mingw-w64 winpthreads library. + m4_ifdef([gl_][THREADLIB], [ + AC_REQUIRE([gl_][THREADLIB]) + if { case "$host_os" in mingw*) true;; *) false;; esac; } \ + && test $gl_threads_api = windows; then + HAVE_PTHREAD_H=0 + fi + ]) else HAVE_PTHREAD_H=0 fi @@ -125,7 +133,7 @@ AC_DEFUN([gl_PTHREAD_H], AC_REQUIRE([AC_C_RESTRICT]) dnl For backward compatibility with gnulib versions <= 2019-07. - LIB_PTHREAD="$LIBMULTITHREAD" + LIB_PTHREAD="$LIBPMULTITHREAD" AC_SUBST([LIB_PTHREAD]) ]) diff --git a/m4/threadlib.m4 b/m4/threadlib.m4 index 7972cfaebc..d22e0d666c 100644 --- a/m4/threadlib.m4 +++ b/m4/threadlib.m4 @@ -1,4 +1,4 @@ -# threadlib.m4 serial 21 +# threadlib.m4 serial 22 dnl Copyright (C) 2005-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -8,6 +8,17 @@ dnl From Bruno Haible. AC_PREREQ([2.60]) +dnl gl_PTHREADLIB +dnl ------------- +dnl Tests for the libraries needs for using the POSIX threads API. +dnl Sets the variable LIBPTHREAD to the linker options for use in a Makefile. +dnl Sets the variable LIBPMULTITHREAD, for programs that really need +dnl multithread functionality. The difference between LIBPTHREAD and +dnl LIBPMULTITHREAD is that on platforms supporting weak symbols, typically +dnl LIBPTHREAD is empty whereas LIBPMULTITHREAD is not. +dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for +dnl multithread-safe programs. + dnl gl_THREADLIB dnl ------------ dnl Tests for a multithreading library to be used. @@ -36,6 +47,32 @@ dnl Since support for GNU pth was removed, $LTLIBTHREAD and $LIBTHREAD have the dnl same value, and similarly $LTLIBMULTITHREAD and $LIBMULTITHREAD have the dnl same value. Only system libraries are needed. +AC_DEFUN([gl_ANYTHREADLIB_EARLY], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + if test -z "$gl_anythreadlib_early_done"; then + case "$host_os" in + osf*) + # On OSF/1, the compiler needs the flag -D_REENTRANT so that it + # groks . cc also understands the flag -pthread, but + # we don't use it because 1. gcc-2.95 doesn't understand -pthread, + # 2. putting a flag into CPPFLAGS that has an effect on the linker + # causes the AC_LINK_IFELSE test below to succeed unexpectedly, + # leading to wrong values of LIBTHREAD and LTLIBTHREAD. + CPPFLAGS="$CPPFLAGS -D_REENTRANT" + ;; + esac + # Some systems optimize for single-threaded programs by default, and + # need special flags to disable these optimizations. For example, the + # definition of 'errno' in . + case "$host_os" in + aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; + solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; + esac + gl_anythreadlib_early_done=done + fi +]) + AC_DEFUN([gl_THREADLIB_EARLY], [ AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) @@ -99,24 +136,91 @@ changequote([,])dnl || test "$gl_use_threads" = posix \ || test "$gl_use_threads" = isoc+posix; then # For using or : - case "$host_os" in - osf*) - # On OSF/1, the compiler needs the flag -D_REENTRANT so that it - # groks . cc also understands the flag -pthread, but - # we don't use it because 1. gcc-2.95 doesn't understand -pthread, - # 2. putting a flag into CPPFLAGS that has an effect on the linker - # causes the AC_LINK_IFELSE test below to succeed unexpectedly, - # leading to wrong values of LIBTHREAD and LTLIBTHREAD. - CPPFLAGS="$CPPFLAGS -D_REENTRANT" - ;; - esac - # Some systems optimize for single-threaded programs by default, and - # need special flags to disable these optimizations. For example, the - # definition of 'errno' in . - case "$host_os" in - aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; - solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; - esac + gl_ANYTHREADLIB_EARLY + fi +]) + +dnl The guts of gl_PTHREADLIB. Needs to be expanded only once. + +AC_DEFUN([gl_PTHREADLIB_BODY], +[ + AC_REQUIRE([gl_ANYTHREADLIB_EARLY]) + if test -z "$gl_threadlib_body_done"; then + gl_pthread_api=no + LIBPTHREAD= + LIBPMULTITHREAD= + # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that + # it groks . It's added above, in gl_ANYTHREADLIB_EARLY. + AC_CHECK_HEADER([pthread.h], + [gl_have_pthread_h=yes], [gl_have_pthread_h=no]) + if test "$gl_have_pthread_h" = yes; then + # Other possible tests: + # -lpthreads (FSU threads, PCthreads) + # -lgthreads + # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist + # in libc. IRIX 6.5 has the first one in both libc and libpthread, but + # the second one only in libpthread, and lock.c needs it. + # + # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 + # needs -pthread for some reason. See: + # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html + save_LIBS=$LIBS + for gl_pthread in '' '-pthread'; do + LIBS="$LIBS $gl_pthread" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include + pthread_mutex_t m; + pthread_mutexattr_t ma; + ]], + [[pthread_mutex_lock (&m); + pthread_mutexattr_init (&ma);]])], + [gl_pthread_api=yes + LIBPTHREAD=$gl_pthread + LIBPMULTITHREAD=$gl_pthread]) + LIBS=$save_LIBS + test $gl_pthread_api = yes && break + done + + # Test for libpthread by looking for pthread_kill. (Not pthread_self, + # since it is defined as a macro on OSF/1.) + if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then + # The program links fine without libpthread. But it may actually + # need to link with libpthread in order to create multiple threads. + AC_CHECK_LIB([pthread], [pthread_kill], + [LIBPMULTITHREAD=-lpthread + # On Solaris and HP-UX, most pthread functions exist also in libc. + # Therefore pthread_in_use() needs to actually try to create a + # thread: pthread_create from libc will fail, whereas + # pthread_create will actually create a thread. + # On Solaris 10 or newer, this test is no longer needed, because + # libc contains the fully functional pthread functions. + case "$host_os" in + solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*) + AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1], + [Define if the pthread_in_use() detection is hard.]) + esac + ]) + elif test $gl_pthread_api != yes; then + # Some library is needed. Try libpthread and libc_r. + AC_CHECK_LIB([pthread], [pthread_kill], + [gl_pthread_api=yes + LIBPTHREAD=-lpthread + LIBPMULTITHREAD=-lpthread]) + if test $gl_pthread_api != yes; then + # For FreeBSD 4. + AC_CHECK_LIB([c_r], [pthread_kill], + [gl_pthread_api=yes + LIBPTHREAD=-lc_r + LIBPMULTITHREAD=-lc_r]) + fi + fi + fi + AC_MSG_CHECKING([whether POSIX threads API is available]) + AC_MSG_RESULT([$gl_pthread_api]) + AC_SUBST([LIBPTHREAD]) + AC_SUBST([LIBPMULTITHREAD]) + gl_threadlib_body_done=done fi ]) @@ -198,89 +302,24 @@ int main () if test "$gl_use_threads" = yes \ || test "$gl_use_threads" = posix \ || test "$gl_use_threads" = isoc+posix; then - # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that - # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. - AC_CHECK_HEADER([pthread.h], - [gl_have_pthread_h=yes], [gl_have_pthread_h=no]) - if test "$gl_have_pthread_h" = yes; then - # Other possible tests: - # -lpthreads (FSU threads, PCthreads) - # -lgthreads - gl_have_pthread= - # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist - # in libc. IRIX 6.5 has the first one in both libc and libpthread, but - # the second one only in libpthread, and lock.c needs it. - # - # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 - # needs -pthread for some reason. See: - # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html - save_LIBS=$LIBS - for gl_pthread in '' '-pthread'; do - LIBS="$LIBS $gl_pthread" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include - pthread_mutex_t m; - pthread_mutexattr_t ma; - ]], - [[pthread_mutex_lock (&m); - pthread_mutexattr_init (&ma);]])], - [gl_have_pthread=yes - LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread - LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread]) - LIBS=$save_LIBS - test -n "$gl_have_pthread" && break - done - - # Test for libpthread by looking for pthread_kill. (Not pthread_self, - # since it is defined as a macro on OSF/1.) - if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then - # The program links fine without libpthread. But it may actually - # need to link with libpthread in order to create multiple threads. - AC_CHECK_LIB([pthread], [pthread_kill], - [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread - # On Solaris and HP-UX, most pthread functions exist also in libc. - # Therefore pthread_in_use() needs to actually try to create a - # thread: pthread_create from libc will fail, whereas - # pthread_create will actually create a thread. - # On Solaris 10 or newer, this test is no longer needed, because - # libc contains the fully functional pthread functions. - case "$host_os" in - solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*) - AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1], - [Define if the pthread_in_use() detection is hard.]) - esac - ]) - elif test -z "$gl_have_pthread"; then - # Some library is needed. Try libpthread and libc_r. - AC_CHECK_LIB([pthread], [pthread_kill], - [gl_have_pthread=yes - LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread - LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread]) - if test -z "$gl_have_pthread"; then - # For FreeBSD 4. - AC_CHECK_LIB([c_r], [pthread_kill], - [gl_have_pthread=yes - LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r - LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r]) - fi - fi - if test -n "$gl_have_pthread"; then - if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then - gl_threads_api='isoc+posix' - AC_DEFINE([USE_ISOC_AND_POSIX_THREADS], [1], - [Define if the combination of the ISO C and POSIX multithreading APIs can be used.]) - LIBTHREAD= LTLIBTHREAD= - else - gl_threads_api=posix - AC_DEFINE([USE_POSIX_THREADS], [1], - [Define if the POSIX multithreading library can be used.]) - if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then - AC_DEFINE([USE_POSIX_THREADS_WEAK], [1], - [Define if references to the POSIX multithreading library should be made weak.]) - LIBTHREAD= LTLIBTHREAD= - fi + gl_PTHREADLIB_BODY + LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD + LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD + if test $gl_pthread_api = yes; then + if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then + gl_threads_api='isoc+posix' + AC_DEFINE([USE_ISOC_AND_POSIX_THREADS], [1], + [Define if the combination of the ISO C and POSIX multithreading APIs can be used.]) + LIBTHREAD= LTLIBTHREAD= + else + gl_threads_api=posix + AC_DEFINE([USE_POSIX_THREADS], [1], + [Define if the POSIX multithreading library can be used.]) + if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + AC_DEFINE([USE_POSIX_THREADS_WEAK], [1], + [Define if references to the POSIX multithreading library should be made weak.]) + LIBTHREAD= LTLIBTHREAD= fi fi fi @@ -317,6 +356,12 @@ int main () AC_SUBST([LTLIBMULTITHREAD]) ]) +AC_DEFUN([gl_PTHREADLIB], +[ + AC_REQUIRE([gl_ANYTHREADLIB_EARLY]) + gl_PTHREADLIB_BODY +]) + AC_DEFUN([gl_THREADLIB], [ AC_REQUIRE([gl_THREADLIB_EARLY]) diff --git a/modules/pthread b/modules/pthread index c9c5614b21..455b73e33b 100644 --- a/modules/pthread +++ b/modules/pthread @@ -21,7 +21,7 @@ Include: Link: -$(LIBMULTITHREAD) +$(LIBPMULTITHREAD) License: LGPLv2+ diff --git a/modules/pthread-cond b/modules/pthread-cond index c07aa6316b..e5c62fe188 100644 --- a/modules/pthread-cond +++ b/modules/pthread-cond @@ -23,7 +23,7 @@ Include: Link: -$(LIBMULTITHREAD) +$(LIBPMULTITHREAD) License: LGPLv2+ diff --git a/modules/pthread-cond-tests b/modules/pthread-cond-tests index 8334b3b7cf..041047ee2d 100644 --- a/modules/pthread-cond-tests +++ b/modules/pthread-cond-tests @@ -13,4 +13,4 @@ configure.ac: Makefile.am: TESTS += test-pthread-cond check_PROGRAMS += test-pthread-cond -test_pthread_cond_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ +test_pthread_cond_LDADD = $(LDADD) @LIBPMULTITHREAD@ @YIELD_LIB@ diff --git a/modules/pthread-h b/modules/pthread-h index 3a9c1501c3..3fe5527658 100644 --- a/modules/pthread-h +++ b/modules/pthread-h @@ -4,21 +4,20 @@ A POSIX-like . Files: lib/pthread.in.h m4/pthread_h.m4 +m4/threadlib.m4 Depends-on: extensions extern-inline sched time -threadlib snippet/c++defs snippet/_Noreturn snippet/arg-nonnull snippet/warn-on-use configure.ac-early: -AC_DEFINE([_REENTRANT], 1, [For thread-safety on OSF/1, Solaris.]) -AC_DEFINE([_THREAD_SAFE], 1, [For thread-safety on AIX, FreeBSD.]) +gl_ANYTHREADLIB_EARLY configure.ac: gl_PTHREAD_H @@ -166,7 +165,7 @@ Include: Link: -$(LIBTHREAD) +$(LIBPTHREAD) License: LGPLv2+ diff --git a/modules/pthread-h-c++-tests b/modules/pthread-h-c++-tests index 225c7f8834..f69f4e170d 100644 --- a/modules/pthread-h-c++-tests +++ b/modules/pthread-h-c++-tests @@ -15,5 +15,5 @@ if ANSICXX TESTS += test-pthread-c++ check_PROGRAMS += test-pthread-c++ test_pthread_c___SOURCES = test-pthread-c++.cc -test_pthread_c___LDADD = $(LDADD) $(LIBMULTITHREAD) +test_pthread_c___LDADD = $(LDADD) $(LIBPMULTITHREAD) endif diff --git a/modules/pthread-mutex b/modules/pthread-mutex index 71496b7f9c..556ffa8f23 100644 --- a/modules/pthread-mutex +++ b/modules/pthread-mutex @@ -25,7 +25,7 @@ Include: Link: -$(LIBTHREAD) or $(LIBMULTITHREAD) +$(LIBPTHREAD) or $(LIBPMULTITHREAD) License: LGPLv2+ diff --git a/modules/pthread-mutex-tests b/modules/pthread-mutex-tests index 050d506b0e..9d9861f09f 100644 --- a/modules/pthread-mutex-tests +++ b/modules/pthread-mutex-tests @@ -11,4 +11,4 @@ configure.ac: Makefile.am: TESTS += test-pthread-mutex check_PROGRAMS += test-pthread-mutex -test_pthread_mutex_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ +test_pthread_mutex_LDADD = $(LDADD) @LIBPMULTITHREAD@ @YIELD_LIB@ diff --git a/modules/pthread-once b/modules/pthread-once index 3e25c76d3e..c7f28d1aff 100644 --- a/modules/pthread-once +++ b/modules/pthread-once @@ -22,7 +22,7 @@ Include: Link: -$(LIBMULTITHREAD) +$(LIBPMULTITHREAD) License: LGPLv2+ diff --git a/modules/pthread-once-tests b/modules/pthread-once-tests index 2765c30fd8..17b25b6d33 100644 --- a/modules/pthread-once-tests +++ b/modules/pthread-once-tests @@ -13,5 +13,5 @@ configure.ac: Makefile.am: TESTS += test-pthread-once1 test-pthread-once2 check_PROGRAMS += test-pthread-once1 test-pthread-once2 -test_pthread_once1_LDADD = $(LDADD) @LIBMULTITHREAD@ -test_pthread_once2_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ +test_pthread_once1_LDADD = $(LDADD) @LIBPMULTITHREAD@ +test_pthread_once2_LDADD = $(LDADD) @LIBPMULTITHREAD@ @YIELD_LIB@ diff --git a/modules/pthread-rwlock b/modules/pthread-rwlock index cb30e44d26..e9354149aa 100644 --- a/modules/pthread-rwlock +++ b/modules/pthread-rwlock @@ -24,7 +24,7 @@ Include: Link: -$(LIBTHREAD) or $(LIBMULTITHREAD) +$(LIBPTHREAD) or $(LIBPMULTITHREAD) License: LGPLv2+ diff --git a/modules/pthread-rwlock-tests b/modules/pthread-rwlock-tests index ddb64dcb30..a8d51ee972 100644 --- a/modules/pthread-rwlock-tests +++ b/modules/pthread-rwlock-tests @@ -12,4 +12,4 @@ configure.ac: Makefile.am: TESTS += test-pthread-rwlock check_PROGRAMS += test-pthread-rwlock -test_pthread_rwlock_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ +test_pthread_rwlock_LDADD = $(LDADD) @LIBPMULTITHREAD@ @YIELD_LIB@ diff --git a/modules/pthread-spin b/modules/pthread-spin index a58b9f7ce8..53e0051c34 100644 --- a/modules/pthread-spin +++ b/modules/pthread-spin @@ -22,7 +22,7 @@ Include: Link: -$(LIBMULTITHREAD) +$(LIBPMULTITHREAD) License: LGPLv2+ diff --git a/modules/pthread-thread b/modules/pthread-thread index b9133d82e1..af6682b8ea 100644 --- a/modules/pthread-thread +++ b/modules/pthread-thread @@ -22,7 +22,7 @@ Include: Link: -$(LIBMULTITHREAD) +$(LIBPMULTITHREAD) License: LGPLv2+ diff --git a/modules/pthread-thread-tests b/modules/pthread-thread-tests index 497ce4f27b..fde0e0ade6 100644 --- a/modules/pthread-thread-tests +++ b/modules/pthread-thread-tests @@ -9,4 +9,4 @@ configure.ac: Makefile.am: TESTS += test-pthread-thread check_PROGRAMS += test-pthread-thread -test_pthread_thread_LDADD = $(LDADD) @LIBMULTITHREAD@ +test_pthread_thread_LDADD = $(LDADD) @LIBPMULTITHREAD@ diff --git a/modules/pthread-tss b/modules/pthread-tss index f4e2fde008..ab95d08a1b 100644 --- a/modules/pthread-tss +++ b/modules/pthread-tss @@ -22,7 +22,7 @@ Include: Link: -$(LIBMULTITHREAD) +$(LIBPMULTITHREAD) License: LGPLv2+ diff --git a/modules/pthread-tss-tests b/modules/pthread-tss-tests index 52707e38a6..3a33e563f0 100644 --- a/modules/pthread-tss-tests +++ b/modules/pthread-tss-tests @@ -12,4 +12,4 @@ configure.ac: Makefile.am: TESTS += test-pthread-tss check_PROGRAMS += test-pthread-tss -test_pthread_tss_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ +test_pthread_tss_LDADD = $(LDADD) @LIBPMULTITHREAD@ @YIELD_LIB@