(Cherry-pick commit
3300086 from 'release-7_6' branch.)
* Makefile.am [SINGLE_GC_OBJ && PTHREAD_START_STANDALONE] (AM_CPPFLAGS):
Add -DGC_PTHREAD_START_STANDALONE.
* Makefile.am [SINGLE_GC_OBJ && PTHREAD_START_STANDALONE]
(libgc_la_SOURCES): Add pthread_start.c entry.
* Makefile.am: Add bank lines (to improve readability).
* 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.
# ---------
lib_LTLIBRARIES += libgc.la
+
if SINGLE_GC_OBJ
+
libgc_la_SOURCES = extra/gc.c
+
+if PTHREAD_START_STANDALONE
+AM_CPPFLAGS += -DGC_PTHREAD_START_STANDALONE
+libgc_la_SOURCES += pthread_start.c
+endif
+
else
+
EXTRA_DIST += extra/gc.c
libgc_la_SOURCES = \
allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
libgc_la_SOURCES += win32_threads.c
else
if PTHREADS
+# Not Cygwin or MinGW.
libgc_la_SOURCES += pthread_start.c pthread_support.c
if DARWIN_THREADS
libgc_la_SOURCES += darwin_stop_world.c
libgc_la_SOURCES += fnlz_mlc.c
endif
+# End of !SINGLE_GC_OBJ
endif
if USE_INTERNAL_LIBATOMIC_OPS
AM_CONDITIONAL(WIN32_THREADS, test x$win32_threads = xtrue)
compiler_suncc=no
+pthread_start_standalone=no
case "$host" in
- powerpc-*-darwin*)
+ *-*-*linux*)
+ # Turn on the workaround described in pthread_start.c.
+ AS_IF([test "$THREADS" = posix], [pthread_start_standalone=yes])
+ ;;
+ powerpc-*-darwin*)
powerpc_darwin=true
;;
- *-*-solaris*)
+ *-*-solaris*)
if test "$GCC" != yes; then
# Solaris SunCC
compiler_suncc=yes
CFLAGS="-O $CFLAGS"
fi
;;
- *-*-wince*)
+ *-*-wince*)
if test "$enable_gc_debug" != "no"; then
AC_DEFINE([GC_READ_ENV_FILE], 1,
[Read environment variables from the GC 'env' file.])
fi
;;
esac
+AM_CONDITIONAL(PTHREAD_START_STANDALONE,
+ test x$pthread_start_standalone = xyes)
if test "$GCC" = yes; then
# Output all warnings.