2007-05-08 Hans Boehm <Hans.Boehm@hp.com>
authorhboehm <hboehm>
Tue, 8 May 2007 22:30:15 +0000 (22:30 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:39 +0000 (21:06 +0400)
* Makefile.am: Dont distribute copied atomic_ops files.  Include
libatomic_ops with "make dist".
* Makefile.in: Regenerate.
* configure: Regenerate.
* configure.ac: Enable THREAD_LOCAL_ALLOC for Cygwin with threads.
* win32_threads.c: Report error for Cygwin + GC_DLL.

ChangeLog
Makefile.am
Makefile.in
configure
configure.ac
win32_threads.c

index 95b1ae3..6f4dac3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2007-05-08  Hans Boehm <Hans.Boehm@hp.com>
 
+       * Makefile.am: Dont distribute copied atomic_ops files.  Include
+       libatomic_ops with "make dist".
+       * Makefile.in: Regenerate.
+       * configure: Regenerate.
+       * configure.ac: Enable THREAD_LOCAL_ALLOC for Cygwin with threads.
+       * win32_threads.c: Report error for Cygwin + GC_DLL.
+
+2007-05-08  Hans Boehm <Hans.Boehm@hp.com>
+
        * Makefile.direct: Update THREAD_LOCAL_ALLOC documentation.
        * cord/de_win.c: Rename and move AboutBox.  Call GC_INIT.  Remove
        MakeProcInstance anachronism.
        * ltmain.sh: Likewise.
        * ChangeLog: Created.
 
+See doc/README.changes for earlier changes.
+
index f4ab1aa..16dc814 100644 (file)
@@ -80,11 +80,11 @@ libgc_la_SOURCES += win32_threads.c
 endif
 
 if USE_INTERNAL_LIBATOMIC_OPS
-libgc_la_SOURCES += atomic_ops.c
+nodist_libgc_la_SOURCES = atomic_ops.c
 endif
 
 if NEED_ATOMIC_OPS_ASM
-libgc_la_SOURCES += atomic_ops_sysdeps.S
+nodist_libgc_la_SOURCES = atomic_ops_sysdeps.S
 endif
 
 extra_ldflags_libgc = @extra_ldflags_libgc@
@@ -186,8 +186,10 @@ EXTRA_DIST += add_gc_prefix.c gcname.c if_mach.c if_not_there.c \
     Mac_files/datastart.c Mac_files/dataend.c \
     Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \
     include/private/msvc_dbg.h msvc_dbg.c
-# :CHECK: If pc_excludes still around, re-add to EXTRA_DIST.
 
+# The libatomic_ops library.  This is not ideal, since we pick up junk from
+# there.  The hard-coded version number should also go.
+EXTRA_DIST += libatomic_ops-1.2
 
 # this is an auxiliary shell file used by Makefile and Makefile.direct
 #
index b39ab6b..877026f 100644 (file)
@@ -121,13 +121,11 @@ DIST_COMMON = $(am__configure_deps) $(am__pkginclude_HEADERS_DIST) \
 @PTHREADS_TRUE@am__append_5 = pthread_support.c pthread_stop_world.c
 @DARWIN_THREADS_TRUE@am__append_6 = darwin_stop_world.c
 @WIN32_THREADS_TRUE@am__append_7 = win32_threads.c
-@USE_INTERNAL_LIBATOMIC_OPS_TRUE@am__append_8 = atomic_ops.c
-@NEED_ATOMIC_OPS_ASM_TRUE@am__append_9 = atomic_ops_sysdeps.S
 
 # C++ Interface
 # -------------
-@CPLUSPLUS_TRUE@am__append_10 = libgccpp.la
-@CPLUSPLUS_TRUE@am__append_11 = include/gc_cpp.h include/gc_allocator.h
+@CPLUSPLUS_TRUE@am__append_8 = libgccpp.la
+@CPLUSPLUS_TRUE@am__append_9 = include/gc_cpp.h include/gc_allocator.h
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
@@ -161,23 +159,22 @@ am__libgc_la_SOURCES_DIST = allchblk.c alloc.c blacklst.c checksums.c \
        new_hblk.c obj_map.c os_dep.c pcr_interface.c ptr_chck.c \
        real_malloc.c reclaim.c specific.c stubborn.c typd_mlc.c \
        backgraph.c thread_local_alloc.c pthread_support.c \
-       pthread_stop_world.c darwin_stop_world.c win32_threads.c \
-       atomic_ops.c atomic_ops_sysdeps.S
+       pthread_stop_world.c darwin_stop_world.c win32_threads.c
 @PTHREADS_TRUE@am__objects_1 = pthread_support.lo \
 @PTHREADS_TRUE@        pthread_stop_world.lo
 @DARWIN_THREADS_TRUE@am__objects_2 = darwin_stop_world.lo
 @WIN32_THREADS_TRUE@am__objects_3 = win32_threads.lo
-@USE_INTERNAL_LIBATOMIC_OPS_TRUE@am__objects_4 = atomic_ops.lo
-@NEED_ATOMIC_OPS_ASM_TRUE@am__objects_5 = atomic_ops_sysdeps.lo
 am_libgc_la_OBJECTS = allchblk.lo alloc.lo blacklst.lo checksums.lo \
        dbg_mlc.lo dyn_load.lo finalize.lo gc_dlopen.lo gcj_mlc.lo \
        headers.lo malloc.lo mallocx.lo mark.lo mark_rts.lo misc.lo \
        new_hblk.lo obj_map.lo os_dep.lo pcr_interface.lo ptr_chck.lo \
        real_malloc.lo reclaim.lo specific.lo stubborn.lo typd_mlc.lo \
        backgraph.lo thread_local_alloc.lo $(am__objects_1) \
-       $(am__objects_2) $(am__objects_3) $(am__objects_4) \
-       $(am__objects_5)
-libgc_la_OBJECTS = $(am_libgc_la_OBJECTS)
+       $(am__objects_2) $(am__objects_3)
+@NEED_ATOMIC_OPS_ASM_FALSE@@USE_INTERNAL_LIBATOMIC_OPS_TRUE@nodist_libgc_la_OBJECTS = atomic_ops.lo
+@NEED_ATOMIC_OPS_ASM_TRUE@nodist_libgc_la_OBJECTS =  \
+@NEED_ATOMIC_OPS_ASM_TRUE@     atomic_ops_sysdeps.lo
+libgc_la_OBJECTS = $(am_libgc_la_OBJECTS) $(nodist_libgc_la_OBJECTS)
 @CPLUSPLUS_TRUE@libgccpp_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
 @CPLUSPLUS_TRUE@       $(am__DEPENDENCIES_1)
 am__libgccpp_la_SOURCES_DIST = gc_cpp.cc
@@ -230,9 +227,10 @@ CXXLD = $(CXX)
 CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
        $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 SOURCES = $(libcord_la_SOURCES) $(libgc_la_SOURCES) \
-       $(EXTRA_libgc_la_SOURCES) $(libgccpp_la_SOURCES) \
-       $(gctest_SOURCES) $(leaktest_SOURCES) $(middletest_SOURCES) \
-       $(test_cpp_SOURCES) $(threadleaktest_SOURCES)
+       $(EXTRA_libgc_la_SOURCES) $(nodist_libgc_la_SOURCES) \
+       $(libgccpp_la_SOURCES) $(gctest_SOURCES) $(leaktest_SOURCES) \
+       $(middletest_SOURCES) $(test_cpp_SOURCES) \
+       $(threadleaktest_SOURCES)
 DIST_SOURCES = $(libcord_la_SOURCES) $(am__libgc_la_SOURCES_DIST) \
        $(EXTRA_libgc_la_SOURCES) $(am__libgccpp_la_SOURCES_DIST) \
        $(gctest_SOURCES) $(leaktest_SOURCES) $(middletest_SOURCES) \
@@ -444,6 +442,9 @@ SUBDIRS = .
 # files used by makefiles other than Makefile.am
 #
 
+# The libatomic_ops library.  This is not ideal, since we pick up junk from
+# there.  The hard-coded version number should also go.
+
 # :FIXME: why do we distribute this one???
 #
 EXTRA_DIST = cord/cordbscs.c cord/cordtest.c cord/de.c cord/cordprnt.c \
@@ -457,11 +458,12 @@ EXTRA_DIST = cord/cordbscs.c cord/cordtest.c cord/de.c cord/cordprnt.c \
        mach_dep.c setjmp_t.c threadlibs.c AmigaOS.c \
        Mac_files/datastart.c Mac_files/dataend.c \
        Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \
-       include/private/msvc_dbg.h msvc_dbg.c libtool.m4
+       include/private/msvc_dbg.h msvc_dbg.c libatomic_ops-1.2 \
+       libtool.m4
 
 # C Library
 # ---------
-lib_LTLIBRARIES = libcord.la libgc.la $(am__append_10)
+lib_LTLIBRARIES = libcord.la libgc.la $(am__append_8)
 include_HEADERS = 
 
 # installed headers
@@ -472,7 +474,7 @@ pkginclude_HEADERS = include/gc.h include/gc_typed.h \
        include/gc_allocator.h include/gc_backptr.h include/gc_gcj.h \
        include/leak_detector.h include/gc_amiga_redirects.h \
        include/gc_pthread_redirects.h include/gc_config_macros.h \
-       include/gc_tiny_fl.h $(am__append_11)
+       include/gc_tiny_fl.h $(am__append_9)
 
 # headers which are not installed
 #
@@ -562,7 +564,9 @@ libgc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
        os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \
        specific.c stubborn.c typd_mlc.c backgraph.c \
        thread_local_alloc.c $(am__append_5) $(am__append_6) \
-       $(am__append_7) $(am__append_8) $(am__append_9)
+       $(am__append_7)
+@NEED_ATOMIC_OPS_ASM_TRUE@nodist_libgc_la_SOURCES = atomic_ops_sysdeps.S
+@USE_INTERNAL_LIBATOMIC_OPS_TRUE@nodist_libgc_la_SOURCES = atomic_ops.c
 
 # Include THREADDLLIBS here to ensure that the correct versions of
 # linuxthread semaphore functions get linked:
@@ -593,7 +597,6 @@ AM_CFLAGS = @GC_CFLAGS@
 #include/gc_mark.h @addincludes@
 @COMPILER_XLC_TRUE@ASM_CPP_OPTIONS = 
 dist_noinst_SCRIPTS = callprocs configure.host
-# :CHECK: If pc_excludes still around, re-add to EXTRA_DIST.
 
 # this is an auxiliary shell file used by Makefile and Makefile.direct
 #
index 0244999..4eb860a 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 1.21 .
+# From configure.ac Revision: 1.22 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for gc 7.0alpha8.
 #
@@ -4853,6 +4853,10 @@ _ACEOF
 #define GC_WIN32_THREADS 1
 _ACEOF
 
+       cat >>confdefs.h <<\_ACEOF
+#define THREAD_LOCAL_ALLOC 1
+_ACEOF
+
        win32_threads=true
        ;;
      *-*-darwin*)
@@ -6850,7 +6854,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 6853 "configure"' > conftest.$ac_ext
+  echo '#line 6857 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -9113,11 +9117,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9116: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:9120: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:9120: \$? = $ac_status" >&5
+   echo "$as_me:9124: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -9381,11 +9385,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9384: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:9388: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:9388: \$? = $ac_status" >&5
+   echo "$as_me:9392: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -9485,11 +9489,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9488: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:9492: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:9492: \$? = $ac_status" >&5
+   echo "$as_me:9496: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -11793,7 +11797,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 11796 "configure"
+#line 11800 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11893,7 +11897,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 11896 "configure"
+#line 11900 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -14233,11 +14237,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14236: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14240: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14240: \$? = $ac_status" >&5
+   echo "$as_me:14244: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -14337,11 +14341,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14340: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14344: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:14344: \$? = $ac_status" >&5
+   echo "$as_me:14348: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -15907,11 +15911,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15910: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:15914: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:15914: \$? = $ac_status" >&5
+   echo "$as_me:15918: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -16011,11 +16015,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16014: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16018: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:16018: \$? = $ac_status" >&5
+   echo "$as_me:16022: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -18213,11 +18217,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:18216: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:18220: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:18220: \$? = $ac_status" >&5
+   echo "$as_me:18224: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -18481,11 +18485,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:18484: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:18488: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:18488: \$? = $ac_status" >&5
+   echo "$as_me:18492: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -18585,11 +18589,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:18588: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:18592: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:18592: \$? = $ac_status" >&5
+   echo "$as_me:18596: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
index 6855e7e..54335f4 100644 (file)
@@ -22,7 +22,7 @@ AC_INIT(gc,7.0alpha8,Hans.Boehm@hp.com)
 AC_CONFIG_SRCDIR(gcj_mlc.c)
 AC_CANONICAL_TARGET 
 AC_PREREQ(2.53)
-AC_REVISION($Revision: 1.22 $)
+AC_REVISION($Revision: 1.23 $)
 GC_SET_VERSION
 AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects nostdinc])
 AM_MAINTAINER_MODE
@@ -155,6 +155,7 @@ case "$THREADS" in
        ;;
      *-*-cygwin*)
        AC_DEFINE(GC_WIN32_THREADS)
+       AC_DEFINE(THREAD_LOCAL_ALLOC)
        win32_threads=true
        ;;
      *-*-darwin*)
index edfe80e..8381407 100644 (file)
 #ifdef CYGWIN32
 # include <errno.h>
 
+/* GC_DLL should not normally be defined, especially since we often do turn on */
+/* THREAD_LOCAL_ALLOC, which is currently incompatible.                        */
+/* It might be possible to get GC_DLL and DllMain-based        thread registration to  */
+/* work with Cygwin, but if you try you are on your own.                       */
+#ifdef GC_DLL
+# error GC_DLL untested with Cygwin
+#endif
+
  /* Cygwin-specific forward decls */
 # undef pthread_create 
 # undef pthread_sigmask