]> granicus.if.org Git - gc/commitdiff
Fix non-Linux configure-based builds
authorIvan Maidanski <ivmai@mail.ru>
Thu, 8 Jun 2017 10:11:58 +0000 (13:11 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 8 Jun 2017 10:11:58 +0000 (13:11 +0300)
(fix commit 8240ed0)

* configure.ac (pthread_start_standalone): New variable.
* configure.ac [*-*-*linux* && THREADS=posix] (pthread_start_standalone):
Set to yes (instead of AM_CONDITIONAL(PTHREAD_START_STANDALONE) directly).
* configure.ac (PTHREAD_START_STANDALONE): AM_CONDITIONAL if
pthread_start_standalone.

configure.ac

index 65b977e003e9a05faf98a37e6e1bc1f3039663ed..6f78154073d3dd1e86bc7295686e27a1047455db 100644 (file)
@@ -345,9 +345,11 @@ AM_CONDITIONAL(THREAD_LOCAL_ALLOC,
             test x$enable_thread_local_alloc != xno -a x$THREADS != xnone)
 
 compiler_suncc=no
+pthread_start_standalone=no
 case "$host" in
   *-*-*linux*)
-      AM_CONDITIONAL(PTHREAD_START_STANDALONE, test x$THREADS = xposix)
+      # Turn on the workaround described in pthread_start.c.
+      AS_IF([test "$THREADS" = posix], [pthread_start_standalone=yes])
       ;;
   powerpc-*-darwin*)
       powerpc_darwin=true
@@ -366,6 +368,8 @@ case "$host" in
       fi
       ;;
 esac
+AM_CONDITIONAL(PTHREAD_START_STANDALONE,
+               test x$pthread_start_standalone = xyes)
 
 if test "$GCC" = yes; then
   # Output all warnings.