]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
On HP-UX, use -mt for thread support master 1454/head
authorMichael Osipov <michael.osipov@innomotics.com>
Wed, 17 Sep 2025 10:38:40 +0000 (12:38 +0200)
committerGreg Hudson <ghudson@mit.edu>
Thu, 23 Oct 2025 21:16:03 +0000 (17:16 -0400)
In aclocal.m4, do not override the result of AX_PTHREAD for HP-UX; the
overrides do not work for building the C++ programs in the tests.
Just use "-mt" and avoid weak pthreads references on that platform.

[ghudson@mit.edu: edited comment and commit message]

src/aclocal.m4

index 7397bdcc2bf4c0cb743817de77fb454033376128..bd75a8d7323b0b5b52c42abb8902b670c79c1485 100644 (file)
@@ -188,10 +188,9 @@ if test "$enable_thread_support" = yes; then
       PTHREAD_CFLAGS=
       ;;
     hpux*)
-      # These are the flags that "gcc -pthread" adds.  But we don't
-      # want "-pthread" because that has link-time effects, and we
-      # don't exclude CFLAGS when linking.  *sigh*
-      PTHREAD_CFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_C_SOURCE=199506L"
+      # On HP-UX, thread support is always available with the '-mt'
+      # compiler and linker flag.
+      AC_DEFINE(NO_WEAK_PTHREADS,1,[Define if references to pthread routines should be non-weak.])
       ;;
     solaris2.[[1-9]])
       # On Solaris 10 with gcc 3.4.3, the autoconf archive macro doesn't