Cygnus/libgcj changes to Boehm GC.
From-SVN: r26257
This commit is contained in:
parent
537cff9c87
commit
1530be84fc
248
boehm-gc/ChangeLog
Normal file
248
boehm-gc/ChangeLog
Normal file
@ -0,0 +1,248 @@
|
||||
1999-02-23 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* configure: Rebuilt.
|
||||
* configure.in: For Linux, define _REENTRANT. For Solaris, define
|
||||
SOLARIS_THREADS and _SOLARIS_PTHREADS.
|
||||
|
||||
1999-02-18 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* quick_threads.c (GC_push_all_stacks): Change order of arguments
|
||||
to GC_push_all_stacks depending on STACK_GROWS_DOWN define. Check
|
||||
for case where LO is NULL.
|
||||
|
||||
1999-02-10 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* aclocal.m4, configure, Makefile.in: Rebuilt.
|
||||
* acinclude.m4: Updated to be used with automake 1.4.
|
||||
* configure.in: Renamed libgc to libgcjgc. Updated to be used
|
||||
with automake 1.4.
|
||||
* Makefile.am (EXTRA_LIBRARIES): Renamed libgc to libgcjgc.
|
||||
(libgcjgc_a_SOURCES): Likewise.
|
||||
(libgcjgc_a_LIBADD): Likewise.
|
||||
(libgcjgc_a_DEPENDENCIES): Likewise.
|
||||
(EXTRA_libgcjgc_a_SOURCES): Likewise.
|
||||
(gctest_LDADD): Likewise.
|
||||
(all_objs): Likewise.
|
||||
|
||||
1999-01-08 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* configure: Rebuilt.
|
||||
* configure.in: Define LINUX_THREADS if using POSIX threads on
|
||||
Linux.
|
||||
|
||||
* gc_priv.h (GC_test_and_set): Put return type into definition.
|
||||
|
||||
1998-11-24 Andrew Haley <aph@viagra.cygnus.co.uk>
|
||||
|
||||
* Makefile.am: add support for eCos. In particular, add C++
|
||||
support for compiling the file ecos.cc.
|
||||
* ecos.cc: new file.
|
||||
* acinclude.m4: add C++ support.
|
||||
* aclocal.m4: likewise
|
||||
* config.h: add eCos support.
|
||||
* configure: likewise
|
||||
* configure.in: likewise
|
||||
* misc.c (GC_write): add eCos support.
|
||||
* os_dep.c (tiny_sbrk): add eCos support.
|
||||
|
||||
Thu Dec 10 18:24:34 1998 Warren Levy <warrenl@cygnus.com>
|
||||
|
||||
* misc.c (GC_init_inner): Moved STACKBASE code to os_dep.c.
|
||||
* os_dep.c (GC_get_stack_base): Moved STACKBASE code from misc.c.
|
||||
|
||||
1998-11-23 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* configure.host (boehm_gc_cflags): Don't add `-O2'.
|
||||
|
||||
1998-11-20 Andrew Haley <aph@viagra.cygnus.co.uk>
|
||||
|
||||
* Makefile.am, Makefile.in, configure.host: tx39 build option
|
||||
"-G 0" added.
|
||||
|
||||
1998-11-17 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* configure: Rebuilt.
|
||||
* configure.in: Switch on host, not target.
|
||||
|
||||
1998-11-16 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* gc_priv.h (GC_debug_object_start): Declare.
|
||||
* mark.c (GC_mark_from_mark_stack): Call GC_debug_object_start.
|
||||
* gc.h (GC_debug_register_finalizer_no_order,
|
||||
GC_register_finalizer_no_order): Declare.
|
||||
(GC_REGISTER_FINALIZER_NO_ORDER): New macro.
|
||||
* dbg_mlc.c (GC_debug_register_finalizer_no_order): New function.
|
||||
(GC_debug_generic_malloc): Likewise.
|
||||
(GC_debug_object_start): new function.
|
||||
|
||||
1998-11-11 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* configure: Rebuilt.
|
||||
* configure.in: Recognize --enable-java-gc, not --enable-gc.
|
||||
|
||||
Tue Nov 3 18:01:12 1998 Tom Tromey <tromey@sanguine.cygnus.com>
|
||||
|
||||
* dyn_load.c: Handle QUICK_THREADS case.
|
||||
|
||||
1998-10-21 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* configure: Rebuilt.
|
||||
* configure.in: Put cpp defines here, not in config.h. Recognize
|
||||
--enable-threads. Set INCLUDES. Create boehm-cflags file. Don't
|
||||
define PACKAGE or VERSION.
|
||||
* config.h (SILENT, NO_SIGNALS, NO_DEBUGGING, JAVA_FINALIZATION):
|
||||
Don't define.
|
||||
|
||||
* os_dep.c (GC_default_push_other_roots): Define when
|
||||
QUICK_THREADS defined.
|
||||
* misc.c: Added QUICK_THREADS case.
|
||||
* gc_priv.h: Added QUICK_THREADS case to define LOCK and UNLOCK.
|
||||
* config.h (THREADS): Define if QUICK_THREADS defined.
|
||||
* Makefile.in: Rebuilt.
|
||||
* Makefile.am (libgc_a_SOURCES): Added linux_threads.c,
|
||||
quick_threads.c.
|
||||
* quick_threads.c: New file.
|
||||
|
||||
1998-10-20 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* aclocal.m4, configure: Rebuilt.
|
||||
* acinclude.m4: Don't subst machine_dir or sys_dir.
|
||||
* configure.host: Removed unused code.
|
||||
|
||||
Sun Oct 11 08:18:02 1998 Anthony Green <green@cygnus.com>
|
||||
|
||||
* configure: Rebuilt.
|
||||
* configure.in: Fix typo in previous patch.
|
||||
|
||||
Sun Oct 11 08:06:11 1998 Anthony Green <green@cygnus.com>
|
||||
|
||||
* Makefile.in, aclocal.m4, configure: Rebuilt.
|
||||
* Makefile.am, acinclude.m4, configure.in: Add multilib support.
|
||||
* configure.host: Created.
|
||||
|
||||
Tue Sep 1 10:58:15 1998 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* Makefile.in: Rebuilt.
|
||||
* Makefile.am (lib_LIBRARIES): Use target_all.
|
||||
(EXTRA_LIBRARIES): New macro.
|
||||
* configure: Rebuilt.
|
||||
* configure.in: Recognize --enable-gc.
|
||||
|
||||
Thu Aug 13 10:52:45 1998 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* Makefile.in: Rebuilt.
|
||||
* Makefile.am (COMPILE): Define.
|
||||
(LINK): Likewise.
|
||||
(.s.o): Use MY_CFLAGS.
|
||||
* configure: Rebuilt.
|
||||
* configure.in (MY_CFLAGS): Define and subst.
|
||||
|
||||
Wed Aug 12 11:41:43 1998 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* configure: Rebuilt.
|
||||
* configure.in: Added --with-cross-host argument. Use
|
||||
$with_cross_host to determine when cross-compiling.
|
||||
|
||||
* config.h (SMALL_CONFIG): Don't define.
|
||||
* configure: Rebuilt.
|
||||
* configure.in: Define SMALL_CONFIG when cross-compiling.
|
||||
|
||||
Tue Aug 11 11:41:25 1998 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* solaris_pthreads.c, misc.c, gc_priv.h, config.h, alloc.c,
|
||||
allchblk.c: Merged with 4.13a2 while preserving local changes.
|
||||
|
||||
* Makefile.orig: Updated from Makefile in 4.13a2.
|
||||
|
||||
* configure: Rebuilt.
|
||||
* configure.in: Updated version number to 4.13a2. On Solaris,
|
||||
don't build with -O when using gcc.
|
||||
|
||||
Merged in version 4.13alpha2:
|
||||
* config.h (USE_MMAP): Re-enable on Solaris.
|
||||
* solaris_pthreads.c: Removed RCS Id line.
|
||||
* alpha_mach_dep.s: Removed RCS Id line.
|
||||
|
||||
Wed Jul 22 15:38:12 1998 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* config.h (USE_MMAP): Don't define for Solaris.
|
||||
|
||||
Wed Jun 10 12:51:41 1998 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* Makefile.in: Rebuilt.
|
||||
* Makefile.am (libgc_a_SOURCES): Removed setjmp_t.c.
|
||||
|
||||
* Makefile.in: Rebuilt.
|
||||
* Makefile.am (libgc_a_SOURCES): Removed add_gc_prefix.c.
|
||||
|
||||
Thu May 14 15:32:58 1998 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* Makefile.in: Rebuilt.
|
||||
* Makefile.am ($(all_objs)): Depend on config.h.
|
||||
|
||||
* config.h: [MIPS] If DATASTART_IS_ETEXT defined then define
|
||||
DATASTART as &_etext.
|
||||
* misc.c (GC_init_inner): If STACKBASE defined, then use it.
|
||||
* configure: Rebuilt.
|
||||
* configure.in: Define STACKBASE and DATASTART_IS_ETEXT for the
|
||||
tx39.
|
||||
|
||||
Tue May 12 13:15:45 1998 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* alloc.c: Don't call GET_TIME if NO_CLOCK defined.
|
||||
(GC_maybe_gc): Likewise.
|
||||
* os_dep.c: If NO_SIGSET defined, then have empty
|
||||
GC_disable_signals and GC_enable_signals.
|
||||
* configure: Rebuilt.
|
||||
* configure.in: Added --with-target-subdir option. If
|
||||
cross-compiling, define NO_SIGSET and NO_CLOCK.
|
||||
|
||||
Wed May 6 16:40:28 1998 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* Makefile.in: Rebuilt.
|
||||
* Makefile.am (.s.o): Directly use CC -x assembler-with-cpp.
|
||||
(AS): Removed.
|
||||
* aclocal.m4, configure: Rebuilt.
|
||||
* acinclude.m4: New file.
|
||||
* configure.in: Don't run AM_EXEEXT. Use LIB_AC_PROG_CC.
|
||||
|
||||
Thu Apr 30 14:51:12 1998 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* configure: Rebuilt.
|
||||
* configure.in: Link boehm-config.h to config.h.
|
||||
* Makefile.in: Rebuilt.
|
||||
* Makefile.am (INCLUDES): Removed.
|
||||
* config.h (SILENT, SMALL_CONFIG, NO_SIGNALS, NO_DEBUGGING,
|
||||
JAVA_FINALIZATION): Define
|
||||
|
||||
Wed Apr 29 11:03:14 1998 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* Many files: Use GC_bool, not bool.
|
||||
* gc_priv.h: Define GC_bool, not bool.
|
||||
|
||||
* misc.c (GC_dont_gc): Define as int.
|
||||
(GC_quiet): Likewise.
|
||||
* gc_priv.h (GC_never_stop_func): Declare as returning bool.
|
||||
* alloc.c (GC_dont_expand): Define as int.
|
||||
* gc_priv.h: For gcc, define bool as char.
|
||||
|
||||
Tue Apr 28 22:44:16 1998 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* Makefile.in: Rebuilt.
|
||||
* Makefile.am (check_PROGRAMS): New macro.
|
||||
(gctest_SOURCES): Likewise.
|
||||
(gctest_LDADD): Likewise.
|
||||
|
||||
Mon Apr 27 23:53:24 1998 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* Makefile.in: Rebuilt.
|
||||
* Makefile.am (libgc_a_SOURCES): Added dyn_load.c.
|
||||
* configure: Rebuilt.
|
||||
* configure.in: Define SUNOS53_SHARED_LIB on Solaris 2.3.
|
||||
|
||||
Wed Apr 15 11:40:56 1998 Tom Tromey <tromey@sanguine.cygnus.com>
|
||||
|
||||
* Makefile.am, Makefile.in, configure.in, configure, aclocal.m4:
|
||||
New files.
|
||||
* Makefile.orig: Renamed from Makefile.
|
||||
|
128
boehm-gc/Makefile.am
Normal file
128
boehm-gc/Makefile.am
Normal file
@ -0,0 +1,128 @@
|
||||
## Process this file with automake to produce Makefile.in.
|
||||
|
||||
## FIXME: `make dist' in this directory will not currently work. Many
|
||||
## files that should be in the distribution are not mentioned in this
|
||||
## Makefile.am.
|
||||
|
||||
AUTOMAKE_OPTIONS = cygnus
|
||||
|
||||
# Multilib support variables.
|
||||
MULTISRCTOP =
|
||||
MULTIBUILDTOP =
|
||||
MULTIDIRS =
|
||||
MULTISUBDIR =
|
||||
MULTIDO = true
|
||||
MULTICLEAN = true
|
||||
|
||||
tooldir = $(exec_prefix)/$(target_alias)
|
||||
toollibdir = $(tooldir)/lib$(MULTISUBDIR)
|
||||
|
||||
## FIXME: when native, use libtool to provide shared libraries.
|
||||
toollib_LIBRARIES = $(target_all)
|
||||
EXTRA_LIBRARIES = libgcjgc.a
|
||||
libgcjgc_a_SOURCES = allchblk.c alloc.c blacklst.c checksums.c \
|
||||
config.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 headers.c \
|
||||
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 \
|
||||
quick_threads.c real_malloc.c reclaim.c solaris_pthreads.c stubborn.c \
|
||||
typd_mlc.c version.h weakpointer.h
|
||||
libgcjgc_a_LIBADD = @addobjs@
|
||||
libgcjgc_a_DEPENDENCIES = @addobjs@
|
||||
|
||||
EXTRA_libgcjgc_a_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@
|
||||
AM_CFLAGS = @BOEHM_GC_CFLAGS@
|
||||
|
||||
check_PROGRAMS = gctest
|
||||
gctest_SOURCES = test.c
|
||||
gctest_LDADD = ./libgcjgc.a
|
||||
|
||||
|
||||
## FIXME: relies on internal code generated by automake.
|
||||
all_objs = @addobjs@ $(libgcjgc_a_OBJECTS)
|
||||
$(all_objs) : config.h gc_priv.h gc_hdrs.h gc.h gc_mark.h
|
||||
|
||||
## FIXME: we shouldn't have to do this, but automake forces us to.
|
||||
.s.o:
|
||||
$(CC) -x assembler-with-cpp $(DEFS) $(INCLUDES) $(CPPFLAGS) $(BOEHM_GC_CFLAGS) \
|
||||
$(MY_CFLAGS) -c $<
|
||||
|
||||
## We have our own definition of COMPILE because we want to use our
|
||||
## CFLAGS, not those passed in from the top level make.
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(MY_CFLAGS) $(BOEHM_GC_CFLAGS)
|
||||
LINK = $(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
AM_CFLAGS = @BOEHM_GC_CFLAGS@
|
||||
|
||||
# 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)"
|
||||
|
||||
CONFIG_STATUS_DEPENDENCIES = $(boehm_gc_basedir)/configure.host
|
||||
|
||||
# Multilib support.
|
||||
.PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
|
||||
maintainer-clean-multi
|
||||
|
||||
all-recursive: all-multi
|
||||
install-recursive: install-multi
|
||||
mostlyclean-recursive: mostlyclean-multi
|
||||
clean-recursive: clean-multi
|
||||
distclean-recursive: distclean-multi
|
||||
maintainer-clean-recursive: maintainer-clean-multi
|
||||
|
||||
all-multi:
|
||||
$(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
|
||||
install-multi:
|
||||
$(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
|
||||
mostlyclean-multi:
|
||||
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
|
||||
clean-multi:
|
||||
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
|
||||
distclean-multi:
|
||||
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
|
||||
maintainer-clean-multi:
|
||||
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean
|
||||
|
||||
MAKEOVERRIDES=
|
441
boehm-gc/Makefile.in
Normal file
441
boehm-gc/Makefile.in
Normal file
@ -0,0 +1,441 @@
|
||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = .
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_alias = @build_alias@
|
||||
build_triplet = @build@
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
target_alias = @target_alias@
|
||||
target_triplet = @target@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
BOEHM_GC_CFLAGS = @BOEHM_GC_CFLAGS@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXINCLUDES = @CXXINCLUDES@
|
||||
EXEEXT = @EXEEXT@
|
||||
INCLUDES = @INCLUDES@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MY_CFLAGS = @MY_CFLAGS@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
addobjs = @addobjs@
|
||||
boehm_gc_basedir = @boehm_gc_basedir@
|
||||
target_all = @target_all@
|
||||
|
||||
AUTOMAKE_OPTIONS = cygnus
|
||||
|
||||
# Multilib support variables.
|
||||
MULTISRCTOP =
|
||||
MULTIBUILDTOP =
|
||||
MULTIDIRS =
|
||||
MULTISUBDIR =
|
||||
MULTIDO = true
|
||||
MULTICLEAN = true
|
||||
|
||||
tooldir = $(exec_prefix)/$(target_alias)
|
||||
toollibdir = $(tooldir)/lib$(MULTISUBDIR)
|
||||
|
||||
toollib_LIBRARIES = $(target_all)
|
||||
EXTRA_LIBRARIES = libgcjgc.a
|
||||
libgcjgc_a_SOURCES = allchblk.c alloc.c blacklst.c checksums.c config.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 headers.c 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 quick_threads.c real_malloc.c reclaim.c solaris_pthreads.c stubborn.c typd_mlc.c version.h weakpointer.h
|
||||
|
||||
libgcjgc_a_LIBADD = @addobjs@
|
||||
libgcjgc_a_DEPENDENCIES = @addobjs@
|
||||
|
||||
EXTRA_libgcjgc_a_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@
|
||||
|
||||
AM_CFLAGS = @BOEHM_GC_CFLAGS@
|
||||
|
||||
check_PROGRAMS = gctest
|
||||
gctest_SOURCES = test.c
|
||||
gctest_LDADD = ./libgcjgc.a
|
||||
|
||||
all_objs = @addobjs@ $(libgcjgc_a_OBJECTS)
|
||||
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(MY_CFLAGS) $(BOEHM_GC_CFLAGS)
|
||||
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)"
|
||||
|
||||
|
||||
CONFIG_STATUS_DEPENDENCIES = $(boehm_gc_basedir)/configure.host
|
||||
|
||||
MAKEOVERRIDES =
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
|
||||
CONFIG_CLEAN_FILES =
|
||||
LIBRARIES = $(toollib_LIBRARIES)
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir)
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
libgcjgc_a_OBJECTS = allchblk.o alloc.o blacklst.o checksums.o \
|
||||
dbg_mlc.o dyn_load.o finalize.o headers.o irix_threads.o \
|
||||
linux_threads.o malloc.o mallocx.o mark.o mark_rts.o misc.o new_hblk.o \
|
||||
obj_map.o os_dep.o pcr_interface.o ptr_chck.o quick_threads.o \
|
||||
real_malloc.o reclaim.o solaris_pthreads.o stubborn.o typd_mlc.o
|
||||
check_PROGRAMS = gctest$(EXEEXT)
|
||||
gctest_OBJECTS = test.o
|
||||
gctest_DEPENDENCIES = ./libgcjgc.a
|
||||
gctest_LDFLAGS =
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
|
||||
CFLAGS = @CFLAGS@
|
||||
CCLD = $(CC)
|
||||
DIST_COMMON = README ChangeLog Makefile.am Makefile.in acinclude.m4 \
|
||||
aclocal.m4 configure configure.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
SOURCES = $(libgcjgc_a_SOURCES) $(EXTRA_libgcjgc_a_SOURCES) $(gctest_SOURCES)
|
||||
OBJECTS = $(libgcjgc_a_OBJECTS) $(gctest_OBJECTS)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .cc .o .s
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
|
||||
cd $(srcdir) && $(ACLOCAL)
|
||||
|
||||
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
|
||||
mostlyclean-toollibLIBRARIES:
|
||||
|
||||
clean-toollibLIBRARIES:
|
||||
-test -z "$(toollib_LIBRARIES)" || rm -f $(toollib_LIBRARIES)
|
||||
|
||||
distclean-toollibLIBRARIES:
|
||||
|
||||
maintainer-clean-toollibLIBRARIES:
|
||||
|
||||
install-toollibLIBRARIES: $(toollib_LIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(toollibdir)
|
||||
@list='$(toollib_LIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(toollibdir)/$$p"; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(toollibdir)/$$p; \
|
||||
else :; fi; \
|
||||
done
|
||||
@$(POST_INSTALL)
|
||||
@list='$(toollib_LIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(RANLIB) $(DESTDIR)$(toollibdir)/$$p"; \
|
||||
$(RANLIB) $(DESTDIR)$(toollibdir)/$$p; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-toollibLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(toollib_LIBRARIES)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(toollibdir)/$$p; \
|
||||
done
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
libgcjgc.a: $(libgcjgc_a_OBJECTS) $(libgcjgc_a_DEPENDENCIES)
|
||||
-rm -f libgcjgc.a
|
||||
$(AR) cru libgcjgc.a $(libgcjgc_a_OBJECTS) $(libgcjgc_a_LIBADD)
|
||||
$(RANLIB) libgcjgc.a
|
||||
|
||||
mostlyclean-checkPROGRAMS:
|
||||
|
||||
clean-checkPROGRAMS:
|
||||
-test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
|
||||
|
||||
distclean-checkPROGRAMS:
|
||||
|
||||
maintainer-clean-checkPROGRAMS:
|
||||
|
||||
gctest$(EXEEXT): $(gctest_OBJECTS) $(gctest_DEPENDENCIES)
|
||||
@rm -f gctest$(EXEEXT)
|
||||
$(LINK) $(gctest_LDFLAGS) $(gctest_OBJECTS) $(gctest_LDADD) $(LIBS)
|
||||
.cc.o:
|
||||
$(CXXCOMPILE) -c $<
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
-rm -rf $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
dc_install_base=`cd $(distdir)/=inst && pwd`; \
|
||||
cd $(distdir)/=build \
|
||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist
|
||||
-rm -rf $(distdir)
|
||||
@banner="$(distdir).tar.gz is ready for distribution"; \
|
||||
dashes=`echo "$$banner" | sed s/./=/g`; \
|
||||
echo "$$dashes"; \
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"
|
||||
dist: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
dist-all: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
-rm -rf $(distdir)
|
||||
distdir: $(DISTFILES)
|
||||
-rm -rf $(distdir)
|
||||
mkdir $(distdir)
|
||||
-chmod 777 $(distdir)
|
||||
@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; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: $(check_PROGRAMS)
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-info-am:
|
||||
install-info: install-info-am
|
||||
install-exec-am:
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am: install-toollibLIBRARIES
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-toollibLIBRARIES
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(LIBRARIES)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(toollibdir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-toollibLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-checkPROGRAMS mostlyclean-tags \
|
||||
mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-toollibLIBRARIES clean-compile clean-checkPROGRAMS \
|
||||
clean-tags clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-toollibLIBRARIES distclean-compile \
|
||||
distclean-checkPROGRAMS distclean-tags \
|
||||
distclean-generic clean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f config.status
|
||||
|
||||
maintainer-clean-am: maintainer-clean-toollibLIBRARIES \
|
||||
maintainer-clean-compile maintainer-clean-checkPROGRAMS \
|
||||
maintainer-clean-tags maintainer-clean-generic \
|
||||
distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f config.status
|
||||
|
||||
.PHONY: mostlyclean-toollibLIBRARIES distclean-toollibLIBRARIES \
|
||||
clean-toollibLIBRARIES maintainer-clean-toollibLIBRARIES \
|
||||
uninstall-toollibLIBRARIES install-toollibLIBRARIES mostlyclean-compile \
|
||||
distclean-compile clean-compile maintainer-clean-compile \
|
||||
mostlyclean-checkPROGRAMS distclean-checkPROGRAMS clean-checkPROGRAMS \
|
||||
maintainer-clean-checkPROGRAMS tags mostlyclean-tags distclean-tags \
|
||||
clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
|
||||
check-am installcheck-am installcheck install-info-am install-info \
|
||||
install-exec-am install-exec install-data-am install-data install-am \
|
||||
install uninstall-am uninstall all-redirect all-am all installdirs \
|
||||
mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
$(all_objs) : config.h gc_priv.h gc_hdrs.h gc.h gc_mark.h
|
||||
|
||||
.s.o:
|
||||
$(CC) -x assembler-with-cpp $(DEFS) $(INCLUDES) $(CPPFLAGS) $(BOEHM_GC_CFLAGS) \
|
||||
$(MY_CFLAGS) -c $<
|
||||
|
||||
# Multilib support.
|
||||
.PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
|
||||
maintainer-clean-multi
|
||||
|
||||
all-recursive: all-multi
|
||||
install-recursive: install-multi
|
||||
mostlyclean-recursive: mostlyclean-multi
|
||||
clean-recursive: clean-multi
|
||||
distclean-recursive: distclean-multi
|
||||
maintainer-clean-recursive: maintainer-clean-multi
|
||||
|
||||
all-multi:
|
||||
$(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
|
||||
install-multi:
|
||||
$(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
|
||||
mostlyclean-multi:
|
||||
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
|
||||
clean-multi:
|
||||
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
|
||||
distclean-multi:
|
||||
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
|
||||
maintainer-clean-multi:
|
||||
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
@ -2,6 +2,9 @@ Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
|
||||
Copyright (c) 1991-1996 by Xerox Corporation. All rights reserved.
|
||||
Copyright (c) 1996-1998 by Silicon Graphics. All rights reserved.
|
||||
|
||||
[ This version of the collector modified by Cygnus Solutions.
|
||||
See the file ChangeLog for details ]
|
||||
|
||||
THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
|
||||
OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
|
||||
|
||||
|
153
boehm-gc/acinclude.m4
Normal file
153
boehm-gc/acinclude.m4
Normal file
@ -0,0 +1,153 @@
|
||||
# FIXME: We temporarily define our own version of AC_PROG_CC. This is
|
||||
# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
|
||||
# are probably using a cross compiler, which will not be able to fully
|
||||
# link an executable. This should really be fixed in autoconf
|
||||
# itself.
|
||||
|
||||
AC_DEFUN(BOEHM_CONFIGURE,
|
||||
[
|
||||
dnl Default to --enable-multilib
|
||||
AC_ARG_ENABLE(multilib,
|
||||
[ --enable-multilib build many library versions (default)],
|
||||
[case "${enableval}" in
|
||||
yes) multilib=yes ;;
|
||||
no) multilib=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
|
||||
esac], [multilib=yes])dnl
|
||||
|
||||
dnl We may get other options which we don't document:
|
||||
dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
|
||||
|
||||
if test "[$]{srcdir}" = "."; then
|
||||
if test "[$]{with_target_subdir}" != "."; then
|
||||
boehm_gc_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
|
||||
else
|
||||
boehm_gc_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
|
||||
fi
|
||||
else
|
||||
boehm_gc_basedir="[$]{srcdir}/$1"
|
||||
fi
|
||||
AC_SUBST(boehm_gc_basedir)
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AM_INIT_AUTOMAKE(boehm-gc, 4.13a2, no-define)
|
||||
|
||||
# FIXME: We temporarily define our own version of AC_PROG_CC. This is
|
||||
# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
|
||||
# are probably using a cross compiler, which will not be able to fully
|
||||
# link an executable. This should really be fixed in autoconf
|
||||
# itself.
|
||||
|
||||
AC_DEFUN(LIB_AC_PROG_CC,
|
||||
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
|
||||
AC_CHECK_PROG(CC, gcc, gcc)
|
||||
if test -z "$CC"; then
|
||||
AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
|
||||
test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
||||
fi
|
||||
|
||||
AC_PROG_CC_GNU
|
||||
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
GCC=yes
|
||||
dnl Check whether -g works, even if CFLAGS is set, in case the package
|
||||
dnl plays around with CFLAGS (such as to build both debugging and
|
||||
dnl normal versions of a library), tasteless as that idea is.
|
||||
ac_test_CFLAGS="${CFLAGS+set}"
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS=
|
||||
AC_PROG_CC_G
|
||||
if test "$ac_test_CFLAGS" = set; then
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
elif test $ac_cv_prog_cc_g = yes; then
|
||||
CFLAGS="-g -O2"
|
||||
else
|
||||
CFLAGS="-O2"
|
||||
fi
|
||||
else
|
||||
GCC=
|
||||
test "${CFLAGS+set}" = set || CFLAGS="-g"
|
||||
fi
|
||||
])
|
||||
|
||||
LIB_AC_PROG_CC
|
||||
|
||||
# Likewise for AC_PROG_CXX.
|
||||
AC_DEFUN(LIB_AC_PROG_CXX,
|
||||
[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
|
||||
AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++, gcc)
|
||||
test -z "$CXX" && AC_MSG_ERROR([no acceptable c++ found in \$PATH])
|
||||
|
||||
AC_PROG_CXX_GNU
|
||||
|
||||
if test $ac_cv_prog_gxx = yes; then
|
||||
GXX=yes
|
||||
dnl Check whether -g works, even if CXXFLAGS is set, in case the package
|
||||
dnl plays around with CXXFLAGS (such as to build both debugging and
|
||||
dnl normal versions of a library), tasteless as that idea is.
|
||||
ac_test_CXXFLAGS="${CXXFLAGS+set}"
|
||||
ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS=
|
||||
AC_PROG_CXX_G
|
||||
if test "$ac_test_CXXFLAGS" = set; then
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||
elif test $ac_cv_prog_cxx_g = yes; then
|
||||
CXXFLAGS="-g -O2"
|
||||
else
|
||||
CXXFLAGS="-O2"
|
||||
fi
|
||||
else
|
||||
GXX=
|
||||
test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
|
||||
fi
|
||||
])
|
||||
|
||||
LIB_AC_PROG_CXX
|
||||
|
||||
# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't
|
||||
# run it explicitly here, it will be run implicitly before
|
||||
# NEWLIB_CONFIGURE, which doesn't work because that means that it will
|
||||
# be run before AC_CANONICAL_HOST.
|
||||
AC_CANONICAL_BUILD
|
||||
|
||||
AC_CHECK_TOOL(AS, as)
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
||||
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
|
||||
# at least currently, we never actually build a program, so we never
|
||||
# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
|
||||
# fails, because we are probably configuring with a cross compiler
|
||||
# which can't create executables. So we include AC_EXEEXT to keep
|
||||
# automake happy, but we don't execute it, since we don't care about
|
||||
# the result.
|
||||
if false; then
|
||||
AC_EXEEXT
|
||||
fi
|
||||
|
||||
. [$]{boehm_gc_basedir}/configure.host
|
||||
|
||||
case [$]{boehm_gc_basedir} in
|
||||
/* | [A-Za-z]:[/\\]*) boehm_gc_flagbasedir=[$]{boehm_gc_basedir} ;;
|
||||
*) boehm_gc_flagbasedir='[$](top_builddir)/'[$]{boehm_gc_basedir} ;;
|
||||
esac
|
||||
|
||||
boehm_gc_cflags="[$]{boehm_gc_cflags} -I"'[$](top_builddir)'"/$1/targ-include -I[$]{boehm_gc_flagbasedir}/libc/include"
|
||||
case "${host}" in
|
||||
*-*-cygwin32*)
|
||||
boehm_gc_cflags="[$]{boehm_gc_cflags} -I[$]{boehm_gc_flagbasedir}/../winsup/include"
|
||||
;;
|
||||
esac
|
||||
|
||||
boehm_gc_cflags="[$]{boehm_gc_cflags} -fno-builtin"
|
||||
|
||||
BOEHM_GC_CFLAGS=${boehm_gc_cflags}
|
||||
AC_SUBST(BOEHM_GC_CFLAGS)
|
||||
]))
|
||||
|
||||
))))
|
291
boehm-gc/aclocal.m4
vendored
Normal file
291
boehm-gc/aclocal.m4
vendored
Normal file
@ -0,0 +1,291 @@
|
||||
dnl aclocal.m4 generated automatically by aclocal 1.4
|
||||
|
||||
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
dnl PARTICULAR PURPOSE.
|
||||
|
||||
# FIXME: We temporarily define our own version of AC_PROG_CC. This is
|
||||
# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
|
||||
# are probably using a cross compiler, which will not be able to fully
|
||||
# link an executable. This should really be fixed in autoconf
|
||||
# itself.
|
||||
|
||||
AC_DEFUN(BOEHM_CONFIGURE,
|
||||
[
|
||||
dnl Default to --enable-multilib
|
||||
AC_ARG_ENABLE(multilib,
|
||||
[ --enable-multilib build many library versions (default)],
|
||||
[case "${enableval}" in
|
||||
yes) multilib=yes ;;
|
||||
no) multilib=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
|
||||
esac], [multilib=yes])dnl
|
||||
|
||||
dnl We may get other options which we don't document:
|
||||
dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
|
||||
|
||||
if test "[$]{srcdir}" = "."; then
|
||||
if test "[$]{with_target_subdir}" != "."; then
|
||||
boehm_gc_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
|
||||
else
|
||||
boehm_gc_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
|
||||
fi
|
||||
else
|
||||
boehm_gc_basedir="[$]{srcdir}/$1"
|
||||
fi
|
||||
AC_SUBST(boehm_gc_basedir)
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AM_INIT_AUTOMAKE(boehm-gc, 4.13a2, no-define)
|
||||
|
||||
# FIXME: We temporarily define our own version of AC_PROG_CC. This is
|
||||
# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
|
||||
# are probably using a cross compiler, which will not be able to fully
|
||||
# link an executable. This should really be fixed in autoconf
|
||||
# itself.
|
||||
|
||||
AC_DEFUN(LIB_AC_PROG_CC,
|
||||
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
|
||||
AC_CHECK_PROG(CC, gcc, gcc)
|
||||
if test -z "$CC"; then
|
||||
AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
|
||||
test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
||||
fi
|
||||
|
||||
AC_PROG_CC_GNU
|
||||
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
GCC=yes
|
||||
dnl Check whether -g works, even if CFLAGS is set, in case the package
|
||||
dnl plays around with CFLAGS (such as to build both debugging and
|
||||
dnl normal versions of a library), tasteless as that idea is.
|
||||
ac_test_CFLAGS="${CFLAGS+set}"
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS=
|
||||
AC_PROG_CC_G
|
||||
if test "$ac_test_CFLAGS" = set; then
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
elif test $ac_cv_prog_cc_g = yes; then
|
||||
CFLAGS="-g -O2"
|
||||
else
|
||||
CFLAGS="-O2"
|
||||
fi
|
||||
else
|
||||
GCC=
|
||||
test "${CFLAGS+set}" = set || CFLAGS="-g"
|
||||
fi
|
||||
])
|
||||
|
||||
LIB_AC_PROG_CC
|
||||
|
||||
# Likewise for AC_PROG_CXX.
|
||||
AC_DEFUN(LIB_AC_PROG_CXX,
|
||||
[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
|
||||
AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++, gcc)
|
||||
test -z "$CXX" && AC_MSG_ERROR([no acceptable c++ found in \$PATH])
|
||||
|
||||
AC_PROG_CXX_GNU
|
||||
|
||||
if test $ac_cv_prog_gxx = yes; then
|
||||
GXX=yes
|
||||
dnl Check whether -g works, even if CXXFLAGS is set, in case the package
|
||||
dnl plays around with CXXFLAGS (such as to build both debugging and
|
||||
dnl normal versions of a library), tasteless as that idea is.
|
||||
ac_test_CXXFLAGS="${CXXFLAGS+set}"
|
||||
ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS=
|
||||
AC_PROG_CXX_G
|
||||
if test "$ac_test_CXXFLAGS" = set; then
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||
elif test $ac_cv_prog_cxx_g = yes; then
|
||||
CXXFLAGS="-g -O2"
|
||||
else
|
||||
CXXFLAGS="-O2"
|
||||
fi
|
||||
else
|
||||
GXX=
|
||||
test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
|
||||
fi
|
||||
])
|
||||
|
||||
LIB_AC_PROG_CXX
|
||||
|
||||
# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't
|
||||
# run it explicitly here, it will be run implicitly before
|
||||
# NEWLIB_CONFIGURE, which doesn't work because that means that it will
|
||||
# be run before AC_CANONICAL_HOST.
|
||||
AC_CANONICAL_BUILD
|
||||
|
||||
AC_CHECK_TOOL(AS, as)
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
||||
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
|
||||
# at least currently, we never actually build a program, so we never
|
||||
# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
|
||||
# fails, because we are probably configuring with a cross compiler
|
||||
# which can't create executables. So we include AC_EXEEXT to keep
|
||||
# automake happy, but we don't execute it, since we don't care about
|
||||
# the result.
|
||||
if false; then
|
||||
AC_EXEEXT
|
||||
fi
|
||||
|
||||
. [$]{boehm_gc_basedir}/configure.host
|
||||
|
||||
case [$]{boehm_gc_basedir} in
|
||||
/* | [A-Za-z]:[/\\]*) boehm_gc_flagbasedir=[$]{boehm_gc_basedir} ;;
|
||||
*) boehm_gc_flagbasedir='[$](top_builddir)/'[$]{boehm_gc_basedir} ;;
|
||||
esac
|
||||
|
||||
boehm_gc_cflags="[$]{boehm_gc_cflags} -I"'[$](top_builddir)'"/$1/targ-include -I[$]{boehm_gc_flagbasedir}/libc/include"
|
||||
case "${host}" in
|
||||
*-*-cygwin32*)
|
||||
boehm_gc_cflags="[$]{boehm_gc_cflags} -I[$]{boehm_gc_flagbasedir}/../winsup/include"
|
||||
;;
|
||||
esac
|
||||
|
||||
boehm_gc_cflags="[$]{boehm_gc_cflags} -fno-builtin"
|
||||
|
||||
BOEHM_GC_CFLAGS=${boehm_gc_cflags}
|
||||
AC_SUBST(BOEHM_GC_CFLAGS)
|
||||
]))
|
||||
|
||||
))))
|
||||
|
||||
# Do all the work for Automake. This macro actually does too much --
|
||||
# some checks are only needed if your package does certain things.
|
||||
# But this isn't really a big deal.
|
||||
|
||||
# serial 1
|
||||
|
||||
dnl Usage:
|
||||
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
||||
|
||||
AC_DEFUN(AM_INIT_AUTOMAKE,
|
||||
[AC_REQUIRE([AC_PROG_INSTALL])
|
||||
PACKAGE=[$1]
|
||||
AC_SUBST(PACKAGE)
|
||||
VERSION=[$2]
|
||||
AC_SUBST(VERSION)
|
||||
dnl test to see if srcdir already configured
|
||||
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
|
||||
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||
fi
|
||||
ifelse([$3],,
|
||||
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
|
||||
AC_REQUIRE([AM_SANITY_CHECK])
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])
|
||||
dnl FIXME This is truly gross.
|
||||
missing_dir=`cd $ac_aux_dir && pwd`
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])])
|
||||
|
||||
#
|
||||
# Check to make sure that the build environment is sane.
|
||||
#
|
||||
|
||||
AC_DEFUN(AM_SANITY_CHECK,
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftestfile
|
||||
# Do `set' in a subshell so we don't clobber the current shell's
|
||||
# arguments. Must try -L first in case configure is actually a
|
||||
# symlink; some systems play weird games with the mod time of symlinks
|
||||
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||
# directory).
|
||||
if (
|
||||
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
|
||||
if test "[$]*" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftestfile`
|
||||
fi
|
||||
if test "[$]*" != "X $srcdir/configure conftestfile" \
|
||||
&& test "[$]*" != "X conftestfile $srcdir/configure"; then
|
||||
|
||||
# If neither matched, then we have a broken ls. This can happen
|
||||
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||
# broken ls alias from the environment. This has actually
|
||||
# happened. Such a system could not be considered "sane".
|
||||
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
||||
alias in your environment])
|
||||
fi
|
||||
|
||||
test "[$]2" = conftestfile
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
rm -f conftest*
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
||||
dnl The program must properly implement --version.
|
||||
AC_DEFUN(AM_MISSING_PROG,
|
||||
[AC_MSG_CHECKING(for working $2)
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
# Redirect stdin to placate older versions of autoconf. Sigh.
|
||||
if ($2 --version) < /dev/null > /dev/null 2>&1; then
|
||||
$1=$2
|
||||
AC_MSG_RESULT(found)
|
||||
else
|
||||
$1="$3/missing $2"
|
||||
AC_MSG_RESULT(missing)
|
||||
fi
|
||||
AC_SUBST($1)])
|
||||
|
||||
# Add --enable-maintainer-mode option to configure.
|
||||
# From Jim Meyering
|
||||
|
||||
# serial 1
|
||||
|
||||
AC_DEFUN(AM_MAINTAINER_MODE,
|
||||
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
||||
dnl maintainer-mode is disabled by default
|
||||
AC_ARG_ENABLE(maintainer-mode,
|
||||
[ --enable-maintainer-mode enable make rules and dependencies not useful
|
||||
(and sometimes confusing) to the casual installer],
|
||||
USE_MAINTAINER_MODE=$enableval,
|
||||
USE_MAINTAINER_MODE=no)
|
||||
AC_MSG_RESULT($USE_MAINTAINER_MODE)
|
||||
AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
|
||||
MAINT=$MAINTAINER_MODE_TRUE
|
||||
AC_SUBST(MAINT)dnl
|
||||
]
|
||||
)
|
||||
|
||||
# Define a conditional.
|
||||
|
||||
AC_DEFUN(AM_CONDITIONAL,
|
||||
[AC_SUBST($1_TRUE)
|
||||
AC_SUBST($1_FALSE)
|
||||
if $2; then
|
||||
$1_TRUE=
|
||||
$1_FALSE='#'
|
||||
else
|
||||
$1_TRUE='#'
|
||||
$1_FALSE=
|
||||
fi])
|
||||
|
@ -95,6 +95,7 @@ int GC_timeout_stop_func GC_PROTO((void))
|
||||
unsigned long time_diff;
|
||||
|
||||
if ((count++ & 3) != 0) return(0);
|
||||
#ifndef NO_CLOCK
|
||||
GET_TIME(current_time);
|
||||
time_diff = MS_TIME_DIFF(current_time,GC_start_time);
|
||||
if (time_diff >= TIME_LIMIT) {
|
||||
@ -104,6 +105,7 @@ int GC_timeout_stop_func GC_PROTO((void))
|
||||
# endif
|
||||
return(1);
|
||||
}
|
||||
#endif
|
||||
return(0);
|
||||
}
|
||||
|
||||
@ -234,7 +236,9 @@ void GC_maybe_gc()
|
||||
/* We try to mark with the world stopped. */
|
||||
/* If we run out of time, this turns into */
|
||||
/* incremental marking. */
|
||||
#ifndef NO_CLOCK
|
||||
GET_TIME(GC_start_time);
|
||||
#endif
|
||||
if (GC_stopped_mark(GC_timeout_stop_func)) {
|
||||
# ifdef SAVE_CALL_CHAIN
|
||||
GC_save_callers(GC_last_stack);
|
||||
|
@ -1,4 +1,3 @@
|
||||
# $Id: alpha_mach_dep.s,v 1.1 1999/04/07 14:56:06 tromey Exp $
|
||||
|
||||
# define call_push(x) \
|
||||
lda $16, 0(x); /* copy x to first argument register */ \
|
||||
|
@ -723,25 +723,32 @@
|
||||
# endif
|
||||
|
||||
# ifdef MIPS
|
||||
# ifndef ECOS
|
||||
# define MACH_TYPE "MIPS"
|
||||
# ifndef IRIX5
|
||||
# define DATASTART (ptr_t)0x10000000
|
||||
/* CYGNUS LOCAL: respect predefined DATASTART_IS_ETEXT. */
|
||||
# ifdef DATASTART_IS_ETEXT
|
||||
extern int _etext;
|
||||
# define DATASTART ((ptr_t)(&_etext))
|
||||
# else
|
||||
# ifndef IRIX5
|
||||
# define DATASTART (ptr_t)0x10000000
|
||||
/* Could probably be slightly higher since */
|
||||
/* startup code allocates lots of stuff. */
|
||||
# else
|
||||
extern int _fdata;
|
||||
# define DATASTART ((ptr_t)(&_fdata))
|
||||
# ifdef USE_MMAP
|
||||
# define HEAP_START (ptr_t)0x30000000
|
||||
# else
|
||||
# define HEAP_START DATASTART
|
||||
# endif
|
||||
extern int _fdata;
|
||||
# define DATASTART ((ptr_t)(&_fdata))
|
||||
# ifdef USE_MMAP
|
||||
# define HEAP_START (ptr_t)0x30000000
|
||||
# else
|
||||
# define HEAP_START DATASTART
|
||||
# endif
|
||||
/* Lowest plausible heap address. */
|
||||
/* In the MMAP case, we map there. */
|
||||
/* In either case it is used to identify */
|
||||
/* heap sections so they're not */
|
||||
/* considered as roots. */
|
||||
# endif /* IRIX5 */
|
||||
# endif /* IRIX5 */
|
||||
# endif /* DATASTART_IS_ETEXT */
|
||||
# define HEURISTIC2
|
||||
/* # define STACKBOTTOM ((ptr_t)0x7fff8000) sometimes also works. */
|
||||
# ifdef ULTRIX
|
||||
@ -767,6 +774,18 @@
|
||||
# endif
|
||||
# define DYNAMIC_LOADING
|
||||
# endif
|
||||
# endif /* ECOS */
|
||||
# ifdef ECOS
|
||||
extern char __ram_data_start;
|
||||
extern char __ram_data_end;
|
||||
# define MACH_TYPE "MIPS"
|
||||
# define DATASTART (ptr_t)(&__ram_data_start)
|
||||
# define DATAEND (ptr_t)(&__ram_data_end)
|
||||
|
||||
# define HEURISTIC2
|
||||
# define ALIGNMENT 4
|
||||
# define ALIGN_DOUBLE
|
||||
# endif /* ECOS */
|
||||
# endif
|
||||
|
||||
# ifdef RS6000
|
||||
@ -952,7 +971,8 @@
|
||||
# endif
|
||||
# if defined(PCR) || defined(SRC_M3) || \
|
||||
defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || \
|
||||
defined(IRIX_THREADS) || defined(LINUX_THREADS)
|
||||
defined(IRIX_THREADS) || defined(LINUX_THREADS) || \
|
||||
defined(QUICK_THREADS)
|
||||
# define THREADS
|
||||
# endif
|
||||
|
||||
|
2189
boehm-gc/configure
vendored
Executable file
2189
boehm-gc/configure
vendored
Executable file
File diff suppressed because it is too large
Load Diff
43
boehm-gc/configure.host
Normal file
43
boehm-gc/configure.host
Normal file
@ -0,0 +1,43 @@
|
||||
# configure.host
|
||||
|
||||
# This shell script handles all host based configuration for boehm_gc.
|
||||
# It sets various shell variables based on the the host and the
|
||||
# configuration options. You can modify this shell script without
|
||||
# needing to rerun autoconf.
|
||||
|
||||
# This shell script should be invoked as
|
||||
# . configure.host
|
||||
# If it encounters an error, it will exit with a message.
|
||||
|
||||
# It uses the following shell variables:
|
||||
# host The configuration host
|
||||
# host_cpu The configuration host CPU
|
||||
# target_optspace --enable-target-optspace ("yes", "no", "")
|
||||
|
||||
# It sets the following shell variables:
|
||||
# boehm_gc_cflags Special CFLAGS to use when building
|
||||
|
||||
boehm_gc_cflags=
|
||||
|
||||
case "${target_optspace}:${host}" in
|
||||
yes:*)
|
||||
boehm_gc_cflags="${boehm_gc_cflags} -Os"
|
||||
;;
|
||||
:m32r-* | :d10v-* | :d30v-*)
|
||||
boehm_gc_cflags="${boehm_gc_cflags} -Os"
|
||||
;;
|
||||
no:* | :*)
|
||||
# Nothing.
|
||||
;;
|
||||
esac
|
||||
|
||||
# Set any host dependent compiler flags.
|
||||
# THIS TABLE IS SORTED. KEEP IT THAT WAY.
|
||||
|
||||
case "${host}" in
|
||||
mips-tx39-*|mipstx39-unknown-*)
|
||||
boehm_gc_cflags="${boehm_gc_cflags} -G 0"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
216
boehm-gc/configure.in
Normal file
216
boehm-gc/configure.in
Normal file
@ -0,0 +1,216 @@
|
||||
dnl Process this file with autoconf to produce configure.
|
||||
|
||||
AC_INIT(gc_mark.h)
|
||||
|
||||
dnl Can't be done in BOEHM_CONFIGURE because that confuses automake.
|
||||
AC_CONFIG_AUX_DIR(..)
|
||||
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
BOEHM_CONFIGURE(.)
|
||||
|
||||
dnl We use these options to decide which functions to include.
|
||||
AC_ARG_WITH(target-subdir,
|
||||
[ --with-target-subdir=SUBDIR Configuring with a cross compiler])
|
||||
AC_ARG_WITH(cross-host,
|
||||
[ --with-cross-host=HOST Configuring with a cross compiler])
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
# automake wants to see AC_EXEEXT. But we don't need it. And having
|
||||
# it is actually a problem, because the compiler we're passed can't
|
||||
# necessarily do a full link. So we fool automake here.
|
||||
if test "x" = "y"; then
|
||||
AC_EXEEXT
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for threads package to use])
|
||||
AC_ARG_ENABLE(threads, [ --enable-threads=TYPE choose threading package],
|
||||
THREADS=$enableval,
|
||||
dnl FIXME: figure out native threads to use here.
|
||||
THREADS=no)
|
||||
|
||||
if test "$THREADS" = yes; then
|
||||
case "$host" in
|
||||
*-*-vxworks*)
|
||||
THREADS=vxworks
|
||||
;;
|
||||
*-*-linux*)
|
||||
# FIXME: this isn't correct in all cases.
|
||||
THREADS=posix
|
||||
;;
|
||||
*-*-win*)
|
||||
THREADS=win32
|
||||
;;
|
||||
*-*-irix*)
|
||||
THREADS=irix
|
||||
;;
|
||||
*-*-solaris*)
|
||||
# FIXME: for now, choose POSIX, because we implement that.
|
||||
# Later, choose solaris threads.
|
||||
THREADS=posix
|
||||
;;
|
||||
*)
|
||||
# For now.
|
||||
THREADS=none
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
INCLUDES=
|
||||
case "$THREADS" in
|
||||
no | none | single)
|
||||
THREADS=none
|
||||
;;
|
||||
posix | pthreads)
|
||||
THREADS=posix
|
||||
case "$host" in
|
||||
*-*-linux*)
|
||||
AC_DEFINE(LINUX_THREADS)
|
||||
AC_DEFINE(_REENTRANT)
|
||||
;;
|
||||
*-*-solaris*)
|
||||
AC_DEFINE(SOLARIS_THREADS)
|
||||
AC_DEFINE(_SOLARIS_PTHREADS)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
qt)
|
||||
AC_DEFINE(QUICK_THREADS)
|
||||
INCLUDES="-I${boehm_gc_basedir}/../qthreads"
|
||||
;;
|
||||
decosf1 | irix | mach | os2 | solaris | win32 | dce | vxworks)
|
||||
AC_MSG_ERROR(thread package $THREADS not yet supported)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR($THREADS is an unknown thread package)
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT($THREADS)
|
||||
|
||||
AC_ARG_ENABLE(java-gc,
|
||||
changequote(<<,>>)dnl
|
||||
<< --enable-java-gc=TYPE choose garbage collector [boehm]>>,
|
||||
changequote([,])
|
||||
GC=$enableval,
|
||||
GC=boehm)
|
||||
target_all=
|
||||
if test "$GC" = "boehm"; then
|
||||
target_all=libgcjgc.a
|
||||
fi
|
||||
AC_SUBST(target_all)
|
||||
|
||||
dnl If the target is an eCos system, use the appropriate eCos
|
||||
dnl I/O routines.
|
||||
dnl FIXME: this should not be a local option but a global target
|
||||
dnl system; at present there is no eCos target.
|
||||
TARGET_ECOS="no"
|
||||
AC_ARG_WITH(ecos,
|
||||
[ --with-ecos Enable runtime eCos target support.],
|
||||
TARGET_ECOS="$with_ecos"
|
||||
)
|
||||
|
||||
addobjs=
|
||||
CXXINCLUDES=
|
||||
case "$TARGET_ECOS" in
|
||||
no)
|
||||
;;
|
||||
*)
|
||||
AC_DEFINE(ECOS)
|
||||
CXXINCLUDES="-I${TARGET_ECOS}/include"
|
||||
addobjs="$addobjs ecos.o"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(CXX)
|
||||
|
||||
AC_SUBST(INCLUDES)
|
||||
AC_SUBST(CXXINCLUDES)
|
||||
|
||||
machdep=
|
||||
case "$host" in
|
||||
mipstx39-*-elf*)
|
||||
machdep="mips_ultrix_mach_dep.o"
|
||||
AC_DEFINE(STACKBASE, __stackbase)
|
||||
AC_DEFINE(DATASTART_IS_ETEXT)
|
||||
;;
|
||||
sparc-sun-solaris2.3*)
|
||||
AC_DEFINE(SUNOS53_SHARED_LIB)
|
||||
;;
|
||||
esac
|
||||
if test x"$machdep" = x; then
|
||||
machdep="mach_dep.o"
|
||||
fi
|
||||
addobjs="$addobjs $machdep"
|
||||
AC_SUBST(addobjs)
|
||||
|
||||
dnl As of 4.13a2, the collector will not properly work on Solaris when
|
||||
dnl built with gcc and -O. So we remove -O in the appropriate case.
|
||||
case "$host" in
|
||||
sparc-sun-solaris2*)
|
||||
if test "$GCC" = yes; then
|
||||
new_CFLAGS=
|
||||
for i in $CFLAGS; do
|
||||
case "$i" in
|
||||
-O*)
|
||||
;;
|
||||
*)
|
||||
new_CFLAGS="$new_CFLAGS $i"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
CFLAGS="$new_CFLAGS"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl We need to override the top-level CFLAGS. This is how we do it.
|
||||
MY_CFLAGS="$CFLAGS"
|
||||
AC_SUBST(MY_CFLAGS)
|
||||
|
||||
dnl Define a few things to retarget the library towards
|
||||
dnl embedded Java.
|
||||
AC_DEFINE(SILENT)
|
||||
AC_DEFINE(NO_SIGNALS)
|
||||
AC_DEFINE(NO_DEBUGGING)
|
||||
AC_DEFINE(JAVA_FINALIZATION)
|
||||
|
||||
dnl Create boehm-config.h so that libjava can find it.
|
||||
dnl It is required to use gc_priv.h, which is required to write
|
||||
dnl a new marking function. So config.h in this package is
|
||||
dnl poorly named.
|
||||
AC_LINK_FILES(config.h, boehm-config.h)
|
||||
|
||||
dnl This is something of a hack. When cross-compiling we turn off
|
||||
dnl some functionality. We also enable the "small" configuration.
|
||||
dnl These is only correct when targetting an embedded system. FIXME.
|
||||
if test -n "${with_cross_host}"; then
|
||||
AC_DEFINE(NO_SIGSET)
|
||||
AC_DEFINE(NO_CLOCK)
|
||||
AC_DEFINE(SMALL_CONFIG)
|
||||
fi
|
||||
|
||||
if test "${multilib}" = "yes"; then
|
||||
multilib_arg="--enable-multilib"
|
||||
else
|
||||
multilib_arg=
|
||||
fi
|
||||
|
||||
AC_OUTPUT(Makefile,
|
||||
[
|
||||
dnl Put all the -D options in a file. These are required before
|
||||
dnl boehm-config.h can be included. This is a huge hack brought
|
||||
dnl about by overall poor structuring of this entire library.
|
||||
echo "$DEFS" > boehm-cflags
|
||||
|
||||
if test -n "$CONFIG_FILES"; then
|
||||
ac_file=Makefile . ${boehm_gc_basedir}/../config-ml.in
|
||||
fi],
|
||||
srcdir=${srcdir}
|
||||
host=${host}
|
||||
target=${target}
|
||||
with_multisubdir=${with_multisubdir}
|
||||
ac_configure_args="${multilib_arg} ${ac_configure_args}"
|
||||
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
boehm_gc_basedir=${boehm_gc_basedir}
|
||||
CC="${CC}"
|
||||
DEFS="$DEFS"
|
||||
)
|
@ -80,6 +80,16 @@ ptr_t p;
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
/* Return start of object that might have debugging info. */
|
||||
ptr_t GC_debug_object_start(p)
|
||||
ptr_t p;
|
||||
{
|
||||
register word * result = (word *)((oh *)p + 1);
|
||||
if (! GC_has_debug_info(p))
|
||||
return(p);
|
||||
return((ptr_t)result);
|
||||
}
|
||||
|
||||
/* Store debugging info into p. Return displaced pointer. */
|
||||
/* Assumes we don't hold allocation lock. */
|
||||
ptr_t GC_store_debug_info(p, sz, string, integer)
|
||||
@ -231,6 +241,35 @@ void GC_start_debugging()
|
||||
return (GC_store_debug_info(result, (word)lb, s, (word)i));
|
||||
}
|
||||
|
||||
# ifdef __STDC__
|
||||
GC_PTR GC_debug_generic_malloc(size_t lb, int k, EXTRA_ARGS)
|
||||
# else
|
||||
GC_PTR GC_debug_malloc(lb, k, s, i)
|
||||
size_t lb;
|
||||
int k;
|
||||
char * s;
|
||||
int i;
|
||||
# ifdef GC_ADD_CALLER
|
||||
--> GC_ADD_CALLER not implemented for K&R C
|
||||
# endif
|
||||
# endif
|
||||
{
|
||||
GC_PTR result = GC_generic_malloc(lb + DEBUG_BYTES, k);
|
||||
|
||||
if (result == 0) {
|
||||
GC_err_printf1("GC_debug_malloc(%ld) returning NIL (",
|
||||
(unsigned long) lb);
|
||||
GC_err_puts(s);
|
||||
GC_err_printf1(":%ld)\n", (unsigned long)i);
|
||||
return(0);
|
||||
}
|
||||
if (!GC_debugging_started) {
|
||||
GC_start_debugging();
|
||||
}
|
||||
ADD_CALL_CHAIN(result, ra);
|
||||
return (GC_store_debug_info(result, (word)lb, s, (word)i));
|
||||
}
|
||||
|
||||
#ifdef STUBBORN_ALLOC
|
||||
# ifdef __STDC__
|
||||
GC_PTR GC_debug_malloc_stubborn(size_t lb, EXTRA_ARGS)
|
||||
@ -627,3 +666,28 @@ struct closure {
|
||||
GC_register_finalizer_ignore_self(base, GC_debug_invoke_finalizer,
|
||||
GC_make_closure(fn,cd), ofn, ocd);
|
||||
}
|
||||
|
||||
# ifdef __STDC__
|
||||
void GC_debug_register_finalizer_no_order
|
||||
(GC_PTR obj, GC_finalization_proc fn,
|
||||
GC_PTR cd, GC_finalization_proc *ofn,
|
||||
GC_PTR *ocd)
|
||||
# else
|
||||
void GC_debug_register_finalizer_no_order
|
||||
(obj, fn, cd, ofn, ocd)
|
||||
GC_PTR obj;
|
||||
GC_finalization_proc fn;
|
||||
GC_PTR cd;
|
||||
GC_finalization_proc *ofn;
|
||||
GC_PTR *ocd;
|
||||
# endif
|
||||
{
|
||||
ptr_t base = GC_base(obj);
|
||||
if (0 == base || (ptr_t)obj - base != sizeof(oh)) {
|
||||
GC_err_printf1(
|
||||
"GC_register_finalizer_no_order called with non-base-pointer 0x%lx\n",
|
||||
obj);
|
||||
}
|
||||
GC_register_finalizer_no_order(base, GC_debug_invoke_finalizer,
|
||||
GC_make_closure(fn,cd), ofn, ocd);
|
||||
}
|
||||
|
@ -161,7 +161,8 @@ static ptr_t GC_first_common()
|
||||
|
||||
# if defined(SUNOS4) || defined(SUNOS5DL)
|
||||
/* Add dynamic library data sections to the root set. */
|
||||
# if !defined(PCR) && !defined(SOLARIS_THREADS) && defined(THREADS)
|
||||
# if !defined(PCR) && !defined(SOLARIS_THREADS) \
|
||||
&& !defined(QUICK_THREADS) && defined(THREADS)
|
||||
# ifndef SRC_M3
|
||||
--> fix mutual exclusion with dlopen
|
||||
# endif /* We assume M3 programs don't call dlopen for now */
|
||||
|
@ -334,6 +334,8 @@ GC_API void GC_debug_end_stubborn_change GC_PROTO((GC_PTR));
|
||||
GC_debug_register_finalizer(p, f, d, of, od)
|
||||
# define GC_REGISTER_FINALIZER_IGNORE_SELF(p, f, d, of, od) \
|
||||
GC_debug_register_finalizer_ignore_self(p, f, d, of, od)
|
||||
# define GC_REGISTER_FINALIZER_NO_ORDER(p, f, d, of, od) \
|
||||
GC_debug_register_finalizer_no_order(p, f, d, of, od)
|
||||
# define GC_MALLOC_STUBBORN(sz) GC_debug_malloc_stubborn(sz, GC_EXTRAS);
|
||||
# define GC_CHANGE_STUBBORN(p) GC_debug_change_stubborn(p)
|
||||
# define GC_END_STUBBORN_CHANGE(p) GC_debug_end_stubborn_change(p)
|
||||
@ -350,6 +352,8 @@ GC_API void GC_debug_end_stubborn_change GC_PROTO((GC_PTR));
|
||||
GC_register_finalizer(p, f, d, of, od)
|
||||
# define GC_REGISTER_FINALIZER_IGNORE_SELF(p, f, d, of, od) \
|
||||
GC_register_finalizer_ignore_self(p, f, d, of, od)
|
||||
# define GC_REGISTER_FINALIZER_NO_ORDER(p, f, d, of, od) \
|
||||
GC_register_finalizer_no_order(p, f, d, of, od)
|
||||
# define GC_MALLOC_STUBBORN(sz) GC_malloc_stubborn(sz)
|
||||
# define GC_CHANGE_STUBBORN(p) GC_change_stubborn(p)
|
||||
# define GC_END_STUBBORN_CHANGE(p) GC_end_stubborn_change(p)
|
||||
@ -428,6 +432,15 @@ GC_API void GC_debug_register_finalizer_ignore_self
|
||||
GC_PROTO((GC_PTR obj, GC_finalization_proc fn, GC_PTR cd,
|
||||
GC_finalization_proc *ofn, GC_PTR *ocd));
|
||||
|
||||
/* Another version of the above. It ignores all cycles. */
|
||||
/* It should probably only be used by Java implementations. */
|
||||
GC_API void GC_register_finalizer_no_order
|
||||
GC_PROTO((GC_PTR obj, GC_finalization_proc fn, GC_PTR cd,
|
||||
GC_finalization_proc *ofn, GC_PTR *ocd));
|
||||
GC_API void GC_debug_register_finalizer_no_order
|
||||
GC_PROTO((GC_PTR obj, GC_finalization_proc fn, GC_PTR cd,
|
||||
GC_finalization_proc *ofn, GC_PTR *ocd));
|
||||
|
||||
/* The following routine may be used to break cycles between */
|
||||
/* finalizable objects, thus causing cyclic finalizable */
|
||||
/* objects to be finalized in the correct order. Standard */
|
||||
|
@ -434,7 +434,7 @@ void GC_print_callers (/* struct callinfo info[NFRAMES] */);
|
||||
# ifdef LINUX_THREADS
|
||||
# include <pthread.h>
|
||||
# ifdef __i386__
|
||||
inline static GC_test_and_set(volatile unsigned int *addr) {
|
||||
inline static int GC_test_and_set(volatile unsigned int *addr) {
|
||||
int oldval;
|
||||
/* Note: the "xchg" instruction does not need a "lock" prefix */
|
||||
__asm__ __volatile__("xchgl %0, %1"
|
||||
@ -520,6 +520,10 @@ void GC_print_callers (/* struct callinfo info[NFRAMES] */);
|
||||
# define LOCK() EnterCriticalSection(&GC_allocate_ml);
|
||||
# define UNLOCK() LeaveCriticalSection(&GC_allocate_ml);
|
||||
# endif
|
||||
# ifdef QUICK_THREADS
|
||||
# define LOCK()
|
||||
# define UNLOCK()
|
||||
# endif
|
||||
# ifndef SET_LOCK_HOLDER
|
||||
# define SET_LOCK_HOLDER()
|
||||
# define UNSET_LOCK_HOLDER()
|
||||
@ -1467,6 +1471,10 @@ void GC_print_obj(/* ptr_t p */);
|
||||
/* P points to somewhere inside an object with */
|
||||
/* debugging info. Print a human readable */
|
||||
/* description of the object to stderr. */
|
||||
ptr_t GC_debug_object_start(/* ptr_t p */);
|
||||
/* P points to the start of an object that may */
|
||||
/* have debug info at its head. Return the */
|
||||
/* start of the real data. */
|
||||
extern void (*GC_check_heap)();
|
||||
/* Check that all objects in the heap with */
|
||||
/* debugging info are intact. Print */
|
||||
|
@ -464,6 +464,9 @@ void GC_mark_from_mark_stack()
|
||||
case DS_PROC:
|
||||
GC_mark_stack_top_reg--;
|
||||
credit -= PROC_BYTES;
|
||||
#ifdef GC_DEBUG
|
||||
current_p = GC_debug_object_start(current_p);
|
||||
#endif
|
||||
GC_mark_stack_top_reg =
|
||||
(*PROC(descr))
|
||||
(current_p, GC_mark_stack_top_reg,
|
||||
|
@ -48,7 +48,11 @@
|
||||
# endif
|
||||
pthread_t GC_lock_holder = NO_THREAD;
|
||||
# else
|
||||
--> declare allocator lock here
|
||||
# if defined(QUICK_THREADS)
|
||||
/* Nothing. */
|
||||
# else
|
||||
--> declare allocator lock here
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
@ -56,6 +60,10 @@
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#ifdef ECOS
|
||||
#undef STACKBASE
|
||||
#endif
|
||||
|
||||
GC_FAR struct _GC_arrays GC_arrays /* = { 0 } */;
|
||||
|
||||
|
||||
@ -391,6 +399,10 @@ size_t GC_get_bytes_since_gc GC_PROTO(())
|
||||
|
||||
GC_bool GC_is_initialized = FALSE;
|
||||
|
||||
#if defined(SOLARIS_THREADS) || defined(IRIX_THREADS)
|
||||
extern void GC_thr_init();
|
||||
#endif
|
||||
|
||||
void GC_init()
|
||||
{
|
||||
DCL_LOCK_STATE;
|
||||
@ -435,7 +447,7 @@ void GC_init_inner()
|
||||
# if !defined(THREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) \
|
||||
|| defined(IRIX_THREADS) || defined(LINUX_THREADS)
|
||||
if (GC_stackbottom == 0) {
|
||||
GC_stackbottom = GC_get_stack_base();
|
||||
GC_stackbottom = GC_get_stack_base();
|
||||
}
|
||||
# endif
|
||||
if (sizeof (ptr_t) != sizeof(word)) {
|
||||
@ -637,7 +649,7 @@ int GC_tmp; /* Should really be local ... */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(MSWIN32) && !defined(OS2) && !defined(MACOS)
|
||||
#if !defined(MSWIN32) && !defined(OS2) && !defined(MACOS) && !defined(ECOS)
|
||||
int GC_write(fd, buf, len)
|
||||
int fd;
|
||||
char *buf;
|
||||
@ -660,6 +672,15 @@ size_t len;
|
||||
}
|
||||
#endif /* UN*X */
|
||||
|
||||
#if defined(ECOS)
|
||||
int GC_write(fd, buf, len)
|
||||
{
|
||||
_Jv_diag_write (buf, len);
|
||||
return len;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef MSWIN32
|
||||
# define WRITE(f, buf, len) (GC_set_files(), \
|
||||
GC_tmp = WriteFile((f), (buf), \
|
||||
|
@ -148,6 +148,39 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
# ifdef ECOS
|
||||
|
||||
# ifndef ECOS_GC_MEMORY_SIZE
|
||||
# define ECOS_GC_MEMORY_SIZE (448 * 1024)
|
||||
# endif /* ECOS_GC_MEMORY_SIZE */
|
||||
|
||||
// setjmp() function, as described in ANSI para 7.6.1.1
|
||||
#define setjmp( __env__ ) hal_setjmp( __env__ )
|
||||
|
||||
// FIXME: This is a simple way of allocating memory which is
|
||||
// compatible with ECOS early releases. Later releases use a more
|
||||
// sophisticated means of allocating memory than this simple static
|
||||
// allocator, but this method is at least bound to work.
|
||||
static char memory[ECOS_GC_MEMORY_SIZE];
|
||||
static char *brk = memory;
|
||||
|
||||
static void *tiny_sbrk(ptrdiff_t increment)
|
||||
{
|
||||
void *p = brk;
|
||||
|
||||
brk += increment;
|
||||
|
||||
if (brk > memory + sizeof memory)
|
||||
{
|
||||
brk -= increment;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return p;
|
||||
}
|
||||
#define sbrk tiny_sbrk
|
||||
# endif /* ECOS */
|
||||
|
||||
# ifdef OS2
|
||||
|
||||
# include <stddef.h>
|
||||
@ -252,7 +285,8 @@ void GC_enable_signals(void)
|
||||
# else
|
||||
|
||||
# if !defined(PCR) && !defined(AMIGA) && !defined(MSWIN32) \
|
||||
&& !defined(MACOS) && !defined(DJGPP) && !defined(DOS4GW)
|
||||
&& !defined(MACOS) && !defined(DJGPP) && !defined(DOS4GW) \
|
||||
&& !defined(NO_SIGSET)
|
||||
|
||||
# if defined(sigmask) && !defined(UTS4)
|
||||
/* Use the traditional BSD interface */
|
||||
@ -327,7 +361,7 @@ void GC_enable_signals()
|
||||
# endif /*!OS/2 */
|
||||
|
||||
/* Ivan Demakov: simplest way (to me) */
|
||||
#ifdef DOS4GW
|
||||
#if defined (DOS4GW) || defined (NO_SIGSET)
|
||||
void GC_disable_signals() { }
|
||||
void GC_enable_signals() { }
|
||||
#endif
|
||||
@ -478,6 +512,7 @@ ptr_t GC_get_stack_base()
|
||||
|
||||
void GC_setup_temporary_fault_handler()
|
||||
{
|
||||
# ifndef ECOS
|
||||
# if defined(SUNOS5SIGS) || defined(IRIX5)
|
||||
struct sigaction act;
|
||||
|
||||
@ -510,10 +545,12 @@ ptr_t GC_get_stack_base()
|
||||
old_bus_handler = signal(SIGBUS, GC_fault_handler);
|
||||
# endif
|
||||
# endif
|
||||
# endif /* ECOS */
|
||||
}
|
||||
|
||||
void GC_reset_fault_handler()
|
||||
{
|
||||
# ifndef ECOS
|
||||
# if defined(SUNOS5SIGS) || defined(IRIX5)
|
||||
(void) sigaction(SIGSEGV, &old_segv_act, 0);
|
||||
# ifdef _sigargs /* Irix 5.x, not 6.x */
|
||||
@ -525,6 +562,7 @@ ptr_t GC_get_stack_base()
|
||||
(void) signal(SIGBUS, old_bus_handler);
|
||||
# endif
|
||||
# endif
|
||||
# endif /* ECOS */
|
||||
}
|
||||
|
||||
/* Return the first nonaddressible location > p (up) or */
|
||||
@ -533,6 +571,7 @@ ptr_t GC_get_stack_base()
|
||||
ptr_t p;
|
||||
GC_bool up;
|
||||
{
|
||||
# ifndef ECOS
|
||||
static VOLATILE ptr_t result;
|
||||
/* Needs to be static, since otherwise it may not be */
|
||||
/* preserved across the longjmp. Can safely be */
|
||||
@ -558,10 +597,14 @@ ptr_t GC_get_stack_base()
|
||||
result += MIN_PAGE_SIZE;
|
||||
}
|
||||
return(result);
|
||||
# else /* ECOS */
|
||||
abort();
|
||||
# endif /* ECOS */
|
||||
}
|
||||
# endif
|
||||
|
||||
|
||||
# ifndef ECOS
|
||||
ptr_t GC_get_stack_base()
|
||||
{
|
||||
word dummy;
|
||||
@ -569,6 +612,10 @@ ptr_t GC_get_stack_base()
|
||||
|
||||
# define STACKBOTTOM_ALIGNMENT_M1 ((word)STACK_GRAN - 1)
|
||||
|
||||
# if defined(STACKBASE)
|
||||
extern ptr_t STACKBASE;
|
||||
return(STACKBASE);
|
||||
# else
|
||||
# ifdef STACKBOTTOM
|
||||
return(STACKBOTTOM);
|
||||
# else
|
||||
@ -604,7 +651,9 @@ ptr_t GC_get_stack_base()
|
||||
# endif /* HEURISTIC2 */
|
||||
return(result);
|
||||
# endif /* STACKBOTTOM */
|
||||
# endif /* STACKBASE */
|
||||
}
|
||||
# endif /* ECOS */
|
||||
|
||||
# endif /* ! AMIGA */
|
||||
# endif /* ! OS2 */
|
||||
@ -1225,7 +1274,8 @@ void GC_default_push_other_roots()
|
||||
# endif /* SRC_M3 */
|
||||
|
||||
# if defined(SOLARIS_THREADS) || defined(WIN32_THREADS) \
|
||||
|| defined(IRIX_THREADS) || defined LINUX_THREADS
|
||||
|| defined(IRIX_THREADS) || defined(LINUX_THREADS) \
|
||||
|| defined(QUICK_THREADS)
|
||||
|
||||
extern void GC_push_all_stacks();
|
||||
|
||||
|
55
boehm-gc/quick_threads.c
Normal file
55
boehm-gc/quick_threads.c
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Support code for cooperative coop/quick threads.
|
||||
* Copyright (c) 1998, 1999 Cygnus Solutions.
|
||||
*/
|
||||
|
||||
#include "boehm-config.h"
|
||||
|
||||
#ifdef QUICK_THREADS
|
||||
|
||||
#include "gc_priv.h"
|
||||
|
||||
#include "coop.h"
|
||||
|
||||
void GC_push_all_stacks (void)
|
||||
{
|
||||
coop_t *t;
|
||||
ptr_t lo, hi;
|
||||
|
||||
t = coop_first_thread ();
|
||||
|
||||
if (t == NULL)
|
||||
{
|
||||
/* Threads haven't started, so mark the real stack. */
|
||||
#ifdef STACK_GROWS_DOWN
|
||||
GC_push_all_stack( GC_approx_sp(), GC_stackbottom );
|
||||
#else
|
||||
GC_push_all_stack( GC_stackbottom, GC_approx_sp() );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( ; t != NULL; t = coop_next_thread (t))
|
||||
{
|
||||
if (t == coop_global_curr)
|
||||
lo = GC_approx_sp ();
|
||||
else
|
||||
{
|
||||
lo = t->top;
|
||||
/* LO can be NULL when the new thread has not yet been
|
||||
used. */
|
||||
if (! lo)
|
||||
continue;
|
||||
}
|
||||
hi = t->base;
|
||||
|
||||
#ifdef STACK_GROWS_DOWN
|
||||
GC_push_all_stack (lo, hi);
|
||||
#else
|
||||
GC_push_all_stack (hi, lo);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* QUICK_THREADS */
|
@ -16,7 +16,6 @@
|
||||
* Modified Peter C. for Solaris Posix Threads.
|
||||
*/
|
||||
/* Boehm, September 14, 1994 4:44 pm PDT */
|
||||
/* $Id: solaris_pthreads.c,v 1.1 1999/04/07 14:56:06 tromey Exp $ */
|
||||
|
||||
# if defined(_SOLARIS_PTHREADS)
|
||||
# include "gc_priv.h"
|
||||
@ -46,7 +45,7 @@ pthread_cond_t GC_prom_join_cv; /* Broadcast when any thread terminates */
|
||||
pthread_cond_t GC_create_cv; /* Signalled when a new undetached */
|
||||
/* thread starts. */
|
||||
|
||||
extern bool GC_multithreaded;
|
||||
extern GC_bool GC_multithreaded;
|
||||
|
||||
/* We use the allocation lock to protect thread-related data structures. */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user