From: Ivan Maidanski Date: Thu, 8 Jun 2017 08:40:36 +0000 (+0300) Subject: Fix pthread_start compilation if single-obj-compilation (Linux) X-Git-Tag: v8.0.0~699 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8240ed0e941b8be48715f89ee074810f6cb54fe0;p=gc Fix pthread_start compilation if single-obj-compilation (Linux) * 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 [*-*-*linux*]: Add AM_CONDITIONAL(PTHREAD_START_STANDALONE). --- diff --git a/Makefile.am b/Makefile.am index 3c87ce9b..c2c5402a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -55,9 +55,18 @@ pkgconfig_DATA = bdw-gc.pc # --------- 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 \ @@ -72,6 +81,7 @@ if WIN32_THREADS 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 @@ -93,6 +103,7 @@ if ENABLE_DISCLAIM libgc_la_SOURCES += fnlz_mlc.c endif +# End of !SINGLE_GC_OBJ endif if USE_INTERNAL_LIBATOMIC_OPS diff --git a/configure.ac b/configure.ac index ed2ee642..65b977e0 100644 --- a/configure.ac +++ b/configure.ac @@ -346,17 +346,20 @@ AM_CONDITIONAL(THREAD_LOCAL_ALLOC, compiler_suncc=no case "$host" in - powerpc-*-darwin*) + *-*-*linux*) + AM_CONDITIONAL(PTHREAD_START_STANDALONE, test x$THREADS = xposix) + ;; + 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.])