]> granicus.if.org Git - gc/commitdiff
For boehm-gc:
authorbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 30 Dec 2000 12:18:39 +0000 (12:18 +0000)
committerguest <ivmai@mail.ru>
Fri, 29 Jul 2011 06:54:19 +0000 (10:54 +0400)
* configure.in: Rename THREADLIB to THREADLIBS.
* Makefile.am (LINK): Add $(THREADLIBS) to libtool command line. This
ensures that we link the correct version of the linuxthreads semaphore
functions.
* Makefile.in: Rebuilt.
* configure: Rebuilt.

* linux_thread.c (GC_thr_init, GC_suspend_handler): Add SIGABRT to the
list of signals which are not blocked during suspend in the NO_SIGNALS
case.

For libjava:
* Makefile.am (libgcj_la_LIBADD): Add $(THREADLIBS). This ensures that
the correct versions of various linuxthreads functions get linked.
* Makefile.in: Rebuilt.
* java/lang/natThread.cc (finalize_native): New static function. Call
_Jv_ThreadDestroyData.
(initialize_native): Register finalizer for "data".
* include/posix-threads.h (_Jv_ThreadInitData): New simpler prototype.
(_Jv_ThreadDestroyData): New prototype.
* include/win32-threads.h: Ditto.
* include/no-threads.h: Ditto.
* posix-threads.cc (_Jv_ThreadInitData): Implement new prototype.
(_Jv_ThreadDestroyData): New function. Free native thread "data" and
move mutex and condition variable destroy code from:
(really_start): ...here.
(_Jv_ThreadStart): Set PTHREAD_CREATE_DETACHED.
* win32-threads.cc (_Jv_ThreadInitData): Implement new prototype.
(_Jv_ThreadDestroyData): Implemented.
* nogc.cc (_Jv_AllocObject): Use "void *" not "ptr_t".
(_Jv_AllocArray): Ditto.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38557 138bc75d-0d04-0410-961f-82ee72b054a4

ChangeLog
Makefile.am
Makefile.in
configure
configure.in
linux_threads.c

index eb91029ea62dfb0e64f4da8472680c90115d13cd..2ae9240ed32391b5c0112d264396c5675f5f1479 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2000-12-30  Bryce McKinlay  <bryce@albatross.co.nz>
+
+       * configure.in: Rename THREADLIB to THREADLIBS.
+       * Makefile.am (LINK): Add $(THREADLIBS) to libtool command line. This
+       ensures that we link the correct version of the linuxthreads semaphore
+       functions.
+       * Makefile.in: Rebuilt.
+       * configure: Rebuilt.
+       
+       * linux_thread.c (GC_thr_init, GC_suspend_handler): Add SIGABRT to the 
+       list of signals which are not blocked during suspend in the NO_SIGNALS
+       case.
+
 2000-12-23  Hans Boehm  <Hans_Boehm@hp.com>
 
        * gcj_mlc.c (GC_gcj_malloc): Don't release allocation lock twice.
index f2286c4b2e9845a17602997250fe8a5fb171af1d..06d740b15af8b4464839618da1b5a7d8d05e61c3 100644 (file)
@@ -32,7 +32,10 @@ hpux_irix_threads.c linux_threads.c malloc.c mallocx.c mark.c mark_rts.c \
 misc.c new_hblk.c obj_map.c os_dep.c pcr_interface.c ptr_chck.c        \
 real_malloc.c reclaim.c solaris_pthreads.c solaris_threads.c \
 solaris_threads.h stubborn.c typd_mlc.c version.h weakpointer.h
-libgcjgc_la_LIBADD = @addobjs@
+
+# Include THREADLIBS here to ensure that the correct versions of
+# linuxthread semaphore functions get linked:
+libgcjgc_la_LIBADD = @addobjs@ $(THREADLIBS)
 libgcjgc_la_DEPENDENCIES = @addobjs@
 libgcjgc_la_LDFLAGS = -version-info 1:1:0 -rpath $(toolexeclibdir)
 
@@ -45,7 +48,7 @@ AM_CFLAGS = @BOEHM_GC_CFLAGS@
 
 check_PROGRAMS = gctest
 gctest_SOURCES = test.c
-gctest_LDADD = ./libgcjgc.la $(THREADLIB) $(EXTRA_TEST_LIBS)
+gctest_LDADD = ./libgcjgc.la $(THREADLIBS) $(EXTRA_TEST_LIBS)
 
 TESTS = gctest
 
index e12d68d709eef36bb6c80addaf280a21ae7732e3..ec91baa62df29c004af4800077c573c4bef4e303 100644 (file)
@@ -87,7 +87,7 @@ OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 RANLIB = @RANLIB@
 STRIP = @STRIP@
-THREADLIB = @THREADLIB@
+THREADLIBS = @THREADLIBS@
 VERSION = @VERSION@
 addobjs = @addobjs@
 boehm_gc_basedir = @boehm_gc_basedir@
@@ -102,19 +102,30 @@ MULTIDIRS =
 MULTISUBDIR = 
 MULTIDO = true
 MULTICLEAN = true
-@USE_LIBDIR_TRUE@toolexeclibdir = $(libdir)$(MULTISUBDIR)
-@USE_LIBDIR_FALSE@toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
-@USE_LIBDIR_FALSE@toolexecdir = $(exec_prefix)/$(target_alias)
+@USE_LIBDIR_TRUE@toolexeclibdir = @USE_LIBDIR_TRUE@$(libdir)$(MULTISUBDIR)
+@USE_LIBDIR_FALSE@toolexeclibdir = @USE_LIBDIR_FALSE@$(toolexecdir)/lib$(MULTISUBDIR)
+@USE_LIBDIR_FALSE@toolexecdir = @USE_LIBDIR_FALSE@$(exec_prefix)/$(target_alias)
 
 toolexeclib_LTLIBRARIES = $(target_all)
 EXTRA_LTLIBRARIES = libgcjgc.la
-libgcjgc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c        gcconfig.h dbg_mlc.c dyn_load.c finalize.c gc.h gc_alloc.h gc_cpp.h gc_hdrs.h gc_mark.h gc_priv.h gc_private.h gc_typed.h gcj_mlc.c headers.c hpux_irix_threads.c linux_threads.c malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c obj_map.c os_dep.c pcr_interface.c ptr_chck.c  real_malloc.c reclaim.c solaris_pthreads.c solaris_threads.c solaris_threads.h stubborn.c typd_mlc.c version.h weakpointer.h
-
-libgcjgc_la_LIBADD = @addobjs@
+libgcjgc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c        \
+gcconfig.h dbg_mlc.c dyn_load.c finalize.c gc.h gc_alloc.h gc_cpp.h \
+gc_hdrs.h gc_mark.h gc_priv.h gc_private.h gc_typed.h gcj_mlc.c headers.c \
+hpux_irix_threads.c linux_threads.c malloc.c mallocx.c mark.c mark_rts.c \
+misc.c new_hblk.c obj_map.c os_dep.c pcr_interface.c ptr_chck.c        \
+real_malloc.c reclaim.c solaris_pthreads.c solaris_threads.c \
+solaris_threads.h stubborn.c typd_mlc.c version.h weakpointer.h
+
+
+# Include THREADLIBS here to ensure that the correct versions of
+# linuxthread semaphore functions get linked:
+libgcjgc_la_LIBADD = @addobjs@ $(THREADLIBS)
 libgcjgc_la_DEPENDENCIES = @addobjs@
 libgcjgc_la_LDFLAGS = -version-info 1:1:0 -rpath $(toolexeclibdir)
 
-EXTRA_libgcjgc_la_SOURCES = alpha_mach_dep.s mips_sgi_mach_dep.s mips_ultrix_mach_dep.s rs6000_mach_dep.s sparc_mach_dep.s sparc_sunos4_mach_dep.s mach_dep.c ecos.cc
+EXTRA_libgcjgc_la_SOURCES = alpha_mach_dep.s mips_sgi_mach_dep.s \
+mips_ultrix_mach_dep.s rs6000_mach_dep.s sparc_mach_dep.s \
+sparc_sunos4_mach_dep.s mach_dep.c ecos.cc
 
 
 AM_CXXFLAGS = @BOEHM_GC_CFLAGS@
@@ -123,20 +134,58 @@ AM_CFLAGS = @BOEHM_GC_CFLAGS@
 
 check_PROGRAMS = gctest
 gctest_SOURCES = test.c
-gctest_LDADD = ./libgcjgc.la $(THREADLIB) $(EXTRA_TEST_LIBS)
+gctest_LDADD = ./libgcjgc.la $(THREADLIBS) $(EXTRA_TEST_LIBS)
 
 TESTS = gctest
 
 all_objs = @addobjs@ $(libgcjgc_la_OBJECTS)
 
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES)        $(AM_CPPFLAGS) $(CPPFLAGS)      $(AM_CFLAGS) $(MY_CFLAGS) $(BOEHM_GC_CFLAGS) 
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) \
+       $(AM_CFLAGS) $(MY_CFLAGS) $(BOEHM_GC_CFLAGS) 
 
 LINK = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LDFLAGS) -o $@
 
 # Work around what appears to be a GNU make bug handling MAKEFLAGS
 # values defined in terms of make variables, as is the case for CC and
 # friends when we are called from the top level Makefile.
-AM_MAKEFLAGS =         "AR_FLAGS=$(AR_FLAGS)"  "CC_FOR_BUILD=$(CC_FOR_BUILD)"  "CFLAGS=$(CFLAGS)"      "CXXFLAGS=$(CXXFLAGS)"  "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)"  "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)"        "INSTALL=$(INSTALL)"    "INSTALL_DATA=$(INSTALL_DATA)"  "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"    "INSTALL_SCRIPT=$(INSTALL_SCRIPT)"      "LDFLAGS=$(LDFLAGS)"    "LIBCFLAGS=$(LIBCFLAGS)"        "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)"  "MAKE=$(MAKE)"  "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)"         "PICFLAG=$(PICFLAG)"    "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)"      "SHELL=$(SHELL)"        "EXPECT=$(EXPECT)"      "RUNTEST=$(RUNTEST)"    "RUNTESTFLAGS=$(RUNTESTFLAGS)"  "exec_prefix=$(exec_prefix)"    "infodir=$(infodir)"    "libdir=$(libdir)"      "prefix=$(prefix)"      "tooldir=$(tooldir)"    "AR=$(AR)"      "AS=$(AS)"      "CC=$(CC)"      "CXX=$(CXX)"    "LD=$(LD)"      "LIBCFLAGS=$(LIBCFLAGS)"        "NM=$(NM)"      "PICFLAG=$(PICFLAG)"    "RANLIB=$(RANLIB)"      "DESTDIR=$(DESTDIR)"
+AM_MAKEFLAGS = \
+       "AR_FLAGS=$(AR_FLAGS)" \
+       "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+       "CFLAGS=$(CFLAGS)" \
+       "CXXFLAGS=$(CXXFLAGS)" \
+       "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
+       "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
+       "INSTALL=$(INSTALL)" \
+       "INSTALL_DATA=$(INSTALL_DATA)" \
+       "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
+       "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
+       "LDFLAGS=$(LDFLAGS)" \
+       "LIBCFLAGS=$(LIBCFLAGS)" \
+       "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
+       "MAKE=$(MAKE)" \
+       "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
+       "PICFLAG=$(PICFLAG)" \
+       "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
+       "SHELL=$(SHELL)" \
+       "EXPECT=$(EXPECT)" \
+       "RUNTEST=$(RUNTEST)" \
+       "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
+       "exec_prefix=$(exec_prefix)" \
+       "infodir=$(infodir)" \
+       "libdir=$(libdir)" \
+       "prefix=$(prefix)" \
+       "tooldir=$(tooldir)" \
+       "AR=$(AR)" \
+       "AS=$(AS)" \
+       "CC=$(CC)" \
+       "CXX=$(CXX)" \
+       "LD=$(LD)" \
+       "LIBCFLAGS=$(LIBCFLAGS)" \
+       "NM=$(NM)" \
+       "PICFLAG=$(PICFLAG)" \
+       "RANLIB=$(RANLIB)" \
+       "DESTDIR=$(DESTDIR)"
 
 
 CONFIG_STATUS_DEPENDENCIES = $(boehm_gc_basedir)/configure.host
@@ -176,7 +225,7 @@ aclocal.m4 configure configure.in
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
-TAR = gtar
+TAR = tar
 GZIP_ENV = --best
 SOURCES = $(libgcjgc_la_SOURCES) $(EXTRA_libgcjgc_la_SOURCES) $(gctest_SOURCES)
 OBJECTS = $(libgcjgc_la_OBJECTS) $(gctest_OBJECTS)
@@ -357,7 +406,7 @@ distdir: $(DISTFILES)
        @for file in $(DISTFILES); do \
          if test -f $$file; then d=.; else d=$(srcdir); fi; \
          if test -d $$d/$$file; then \
-           cp -pr $$/$$file $(distdir)/$$file; \
+           cp -pr $$d/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
index cd68c6b51e3d708b7bfff01a5c775ffe101ade96..c11cf55f7f134ef5d300a67a56f61d392d974032 100755 (executable)
--- a/configure
+++ b/configure
@@ -2609,7 +2609,7 @@ if test "$THREADS" = yes; then
 fi
 
 INCLUDES=
-THREADLIB=
+THREADLIBS=
 case "$THREADS" in
  no | none | single)
     THREADS=none
@@ -2644,7 +2644,7 @@ EOF
 
        ;;
     esac
-    THREADLIB=-lpthread
+    THREADLIBS=-lpthread
     ;;
  decosf1 | irix | mach | os2 | solaris | win32 | dce | vxworks)
     { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; }
@@ -3042,7 +3042,7 @@ s%@OBJEXT@%$OBJEXT%g
 s%@STRIP@%$STRIP%g
 s%@LIBTOOL@%$LIBTOOL%g
 s%@CXXCPP@%$CXXCPP%g
-s%@THREADLIB@%$THREADLIB%g
+s%@THREADLIBS@%$THREADLIBS%g
 s%@EXTRA_TEST_LIBS@%$EXTRA_TEST_LIBS%g
 s%@target_all@%$target_all%g
 s%@INCLUDES@%$INCLUDES%g
index ea23b5123e5ae6e4748470d126e6d52f508958a1..6a75b192b703bd7d8eda565fdbac52c30fe16ac9 100644 (file)
@@ -66,7 +66,7 @@ if test "$THREADS" = yes; then
 fi
 
 INCLUDES=
-THREADLIB=
+THREADLIBS=
 case "$THREADS" in
  no | none | single)
     THREADS=none
@@ -86,7 +86,7 @@ case "$THREADS" in
        AC_DEFINE(IRIX_THREADS)
        ;;
     esac
-    THREADLIB=-lpthread
+    THREADLIBS=-lpthread
     ;;
  decosf1 | irix | mach | os2 | solaris | win32 | dce | vxworks)
     AC_MSG_ERROR(thread package $THREADS not yet supported)
@@ -96,7 +96,7 @@ case "$THREADS" in
     ;;
 esac
 AC_MSG_RESULT($THREADS)
-AC_SUBST(THREADLIB)
+AC_SUBST(THREADLIBS)
 
 AC_CHECK_LIB(dl, dlopen, EXTRA_TEST_LIBS="$EXTRA_TEST_LIBS -ldl")
 AC_SUBST(EXTRA_TEST_LIBS)
index c3f19b8ec577b0f29edadff6a82aa413a3c86c79..cac52374d72371fb26c71326e1770771952f1d8b 100644 (file)
@@ -201,6 +201,7 @@ void GC_suspend_handler(int sig)
       if (sigdelset(&mask, SIGINT) != 0) ABORT("sigdelset() failed");
       if (sigdelset(&mask, SIGQUIT) != 0) ABORT("sigdelset() failed");
       if (sigdelset(&mask, SIGTERM) != 0) ABORT("sigdelset() failed");
+      if (sigdelset(&mask, SIGABRT) != 0) ABORT("sigdelset() failed");
 #   endif
     do {
            me->signal = 0;
@@ -487,7 +488,8 @@ void GC_thr_init()
 #   ifdef NO_SIGNALS
       if (sigdelset(&act.sa_mask, SIGINT) != 0
          || sigdelset(&act.sa_mask, SIGQUIT != 0)
-         || sigdelset(&act.sa_mask, SIGTERM != 0)) {
+         || sigdelset(&act.sa_mask, SIGTERM != 0)
+         || sigdelset(&act.sa_mask, SIGABRT != 0)) {
         ABORT("sigdelset() failed");
       }
 #   endif