check if we need to link pthread dynamically
On Linux, bionic and musl for instance do not need libpthread. With bionic, there is not even a stub library for compatibility.
This commit is contained in:
parent
4eb8da3e07
commit
3f189a24f2
@ -130,6 +130,7 @@ AC_CHECK_FUNCS([getauxval])
|
||||
AC_SEARCH_LIBS([dl_iterate_phdr],[dl])
|
||||
AC_CHECK_FUNCS([dl_iterate_phdr])
|
||||
|
||||
AC_SEARCH_LIBS([pthread_once],[pthread])
|
||||
AC_SEARCH_LIBS([clock_gettime],[rt posix4])
|
||||
AC_CHECK_FUNCS([clock_gettime])
|
||||
AM_CONDITIONAL([HAVE_CLOCK_GETTIME], [test "x$ac_cv_func_clock_gettime" = xyes])
|
||||
|
@ -9,7 +9,7 @@ case $host_os in
|
||||
if test "`echo $CC | cut -d ' ' -f 1`" != "gcc" ; then
|
||||
CFLAGS="-qnoansialias $USER_CFLAGS"
|
||||
fi
|
||||
AC_SUBST([PLATFORM_LDADD], ['-lperfstat -lpthread'])
|
||||
AC_SUBST([PLATFORM_LDADD], ['-lperfstat'])
|
||||
;;
|
||||
*cygwin*)
|
||||
HOST_OS=cygwin
|
||||
@ -74,13 +74,11 @@ char buf[1]; getentropy(buf, 1);
|
||||
CFLAGS="-g -O2 +DD64 +Otype_safety=off $USER_CFLAGS"
|
||||
fi
|
||||
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D__STRICT_ALIGNMENT"
|
||||
AC_SUBST([PLATFORM_LDADD], ['-lpthread'])
|
||||
;;
|
||||
*linux*)
|
||||
HOST_OS=linux
|
||||
HOST_ABI=elf
|
||||
CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -D_GNU_SOURCE"
|
||||
AC_SUBST([PLATFORM_LDADD], ['-lpthread'])
|
||||
;;
|
||||
*netbsd*)
|
||||
HOST_OS=netbsd
|
||||
|
Loading…
x
Reference in New Issue
Block a user