Imported Boehm-Weiser GC 6.5

This commit is contained in:
jjgarcia 2005-06-27 08:09:07 +00:00
parent 5e6bdd6421
commit 031db375ce
34 changed files with 2367 additions and 4720 deletions

View file

@ -5,6 +5,9 @@ ECL 0.9g
- Fixed the broken port for MacOSX. It should work with any release >= 10.2
- Based on version 6.5 of Boehm-Weiser garbage collector, which fixes some
problems related to the OSX port.
* Foreign function interface (FFI):
- Added nickname UFFI for FFI package; functions ALLOCATE-FOREIGN-STRING,

View file

@ -36,7 +36,7 @@ CFLAGS= -O -I$(srcdir)/include -DATOMIC_UNCOLLECTABLE -DNO_SIGNALS -DNO_EXECUTE_
# -DGC_LINUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC
# To build the parallel collector in a static library on HP/UX,
# add to the above:
# -DGC_HPUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC -D_POSIX_C_SOURCE=199506L
# -DGC_HPUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC -D_POSIX_C_SOURCE=199506L -mt
# To build the thread-safe collector on Tru64, add to the above:
# -pthread -DGC_OSF1_THREADS
@ -70,10 +70,11 @@ HOSTCFLAGS=$(CFLAGS)
# Also requires -D_REENTRANT or -D_POSIX_C_SOURCE=199506L. See README.hp.
# -DGC_LINUX_THREADS enables support for Xavier Leroy's Linux threads.
# see README.linux. -D_REENTRANT may also be required.
# -DGC_OSF1_THREADS enables support for Tru64 pthreads. Untested.
# -DGC_FREEBSD_THREADS enables support for FreeBSD pthreads. Untested.
# -DGC_OSF1_THREADS enables support for Tru64 pthreads.
# -DGC_FREEBSD_THREADS enables support for FreeBSD pthreads.
# Appeared to run into some underlying thread problems.
# -DGC_DARWIN_THREADS enables support for Mac OS X pthreads. Untested.
# -DGC_DARWIN_THREADS enables support for Mac OS X pthreads.
# -DGC_AIX_THREADS enables support for IBM AIX threads.
# -DGC_DGUX386_THREADS enables support for DB/UX on I386 threads.
# See README.DGUX386.
# -DGC_WIN32_THREADS enables support for win32 threads. That makes sense
@ -233,8 +234,8 @@ HOSTCFLAGS=$(CFLAGS)
# -DTHREAD_LOCAL_ALLOC defines GC_local_malloc(), GC_local_malloc_atomic()
# and GC_local_gcj_malloc(). Needed for gc_gcj.h interface. These allocate
# in a way that usually does not involve acquisition of a global lock.
# Currently requires -DGC_LINUX_THREADS, but should be easy to port to
# other pthreads environments. Recommended for multiprocessors.
# Currently works only on platforms such as Linux which use pthread_support.c.
# Recommended for multiprocessors.
# -DUSE_COMPILER_TLS causes thread local allocation to use compiler-supported
# "__thread" thread-local variables. This is the default in HP/UX. It
# may help performance on recent Linux installations. (It failed for
@ -276,6 +277,10 @@ HOSTCFLAGS=$(CFLAGS)
# -DPOINTER_SHIFT=n causes the collector to left shift candidate pointers
# by the indicated amount before trying to interpret them. Applied
# after POINTER_MASK. EXPERIMENTAL. See also the preceding macro.
# -DDARWIN_DONT_PARSE_STACK Causes the Darwin port to discover thread
# stack bounds in the same way as other pthread ports, without trying to
# walk the frames onthe stack. This is recommended only as a fallback
# for applications that don't support proper stack unwinding.
#
CXXFLAGS= $(CFLAGS)
@ -283,9 +288,9 @@ AR= ar
RANLIB= ranlib
OBJS= alloc.o reclaim.o allchblk.o misc.o mach_dep.o os_dep.o mark_rts.o headers.o mark.o obj_map.o blacklst.o finalize.o new_hblk.o dbg_mlc.o malloc.o stubborn.o checksums.o solaris_threads.o aix_irix_threads.o pthread_support.o pthread_stop_world.o darwin_stop_world.o typd_mlc.o ptr_chck.o mallocx.o solaris_pthreads.o gcj_mlc.o specific.o gc_dlopen.o backgraph.o win32_threads.o
OBJS= alloc.o reclaim.o allchblk.o misc.o mach_dep.o os_dep.o mark_rts.o headers.o mark.o obj_map.o blacklst.o finalize.o new_hblk.o dbg_mlc.o malloc.o stubborn.o checksums.o solaris_threads.o pthread_support.o pthread_stop_world.o darwin_stop_world.o typd_mlc.o ptr_chck.o mallocx.o solaris_pthreads.o gcj_mlc.o specific.o gc_dlopen.o backgraph.o win32_threads.o
CSRCS= reclaim.c allchblk.c misc.c alloc.c mach_dep.c os_dep.c mark_rts.c headers.c mark.c obj_map.c pcr_interface.c blacklst.c finalize.c new_hblk.c real_malloc.c dyn_load.c dbg_mlc.c malloc.c stubborn.c checksums.c solaris_threads.c aix_irix_threads.c pthread_support.c pthread_stop_world.c darwin_stop_world.c typd_mlc.c ptr_chck.c mallocx.c solaris_pthreads.c gcj_mlc.c specific.c gc_dlopen.c backgraph.c win32_threads.c
CSRCS= reclaim.c allchblk.c misc.c alloc.c mach_dep.c os_dep.c mark_rts.c headers.c mark.c obj_map.c pcr_interface.c blacklst.c finalize.c new_hblk.c real_malloc.c dyn_load.c dbg_mlc.c malloc.c stubborn.c checksums.c solaris_threads.c pthread_support.c pthread_stop_world.c darwin_stop_world.c typd_mlc.c ptr_chck.c mallocx.c solaris_pthreads.c gcj_mlc.c specific.c gc_dlopen.c backgraph.c win32_threads.c
CORD_SRCS= cord/cordbscs.c cord/cordxtra.c cord/cordprnt.c cord/de.c cord/cordtest.c include/cord.h include/ec.h include/private/cord_pos.h cord/de_win.c cord/de_win.h cord/de_cmds.h cord/de_win.ICO cord/de_win.RC

View file

@ -45,7 +45,7 @@ asm_libgc_sources =
endif
libgc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c aix_irix_threads.c \
dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.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 specific.c stubborn.c typd_mlc.c \

View file

@ -36,7 +36,7 @@ CFLAGS= -O -I$(srcdir)/include -DATOMIC_UNCOLLECTABLE -DNO_SIGNALS -DNO_EXECUTE_
# -DGC_LINUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC
# To build the parallel collector in a static library on HP/UX,
# add to the above:
# -DGC_HPUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC -D_POSIX_C_SOURCE=199506L
# -DGC_HPUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC -D_POSIX_C_SOURCE=199506L -mt
# To build the thread-safe collector on Tru64, add to the above:
# -pthread -DGC_OSF1_THREADS
@ -70,10 +70,11 @@ HOSTCFLAGS=$(CFLAGS)
# Also requires -D_REENTRANT or -D_POSIX_C_SOURCE=199506L. See README.hp.
# -DGC_LINUX_THREADS enables support for Xavier Leroy's Linux threads.
# see README.linux. -D_REENTRANT may also be required.
# -DGC_OSF1_THREADS enables support for Tru64 pthreads. Untested.
# -DGC_FREEBSD_THREADS enables support for FreeBSD pthreads. Untested.
# -DGC_OSF1_THREADS enables support for Tru64 pthreads.
# -DGC_FREEBSD_THREADS enables support for FreeBSD pthreads.
# Appeared to run into some underlying thread problems.
# -DGC_DARWIN_THREADS enables support for Mac OS X pthreads. Untested.
# -DGC_DARWIN_THREADS enables support for Mac OS X pthreads.
# -DGC_AIX_THREADS enables support for IBM AIX threads.
# -DGC_DGUX386_THREADS enables support for DB/UX on I386 threads.
# See README.DGUX386.
# -DGC_WIN32_THREADS enables support for win32 threads. That makes sense
@ -233,8 +234,8 @@ HOSTCFLAGS=$(CFLAGS)
# -DTHREAD_LOCAL_ALLOC defines GC_local_malloc(), GC_local_malloc_atomic()
# and GC_local_gcj_malloc(). Needed for gc_gcj.h interface. These allocate
# in a way that usually does not involve acquisition of a global lock.
# Currently requires -DGC_LINUX_THREADS, but should be easy to port to
# other pthreads environments. Recommended for multiprocessors.
# Currently works only on platforms such as Linux which use pthread_support.c.
# Recommended for multiprocessors.
# -DUSE_COMPILER_TLS causes thread local allocation to use compiler-supported
# "__thread" thread-local variables. This is the default in HP/UX. It
# may help performance on recent Linux installations. (It failed for
@ -276,6 +277,10 @@ HOSTCFLAGS=$(CFLAGS)
# -DPOINTER_SHIFT=n causes the collector to left shift candidate pointers
# by the indicated amount before trying to interpret them. Applied
# after POINTER_MASK. EXPERIMENTAL. See also the preceding macro.
# -DDARWIN_DONT_PARSE_STACK Causes the Darwin port to discover thread
# stack bounds in the same way as other pthread ports, without trying to
# walk the frames onthe stack. This is recommended only as a fallback
# for applications that don't support proper stack unwinding.
#
CXXFLAGS= $(CFLAGS)
@ -283,9 +288,9 @@ AR= ar
RANLIB= ranlib
OBJS= alloc.o reclaim.o allchblk.o misc.o mach_dep.o os_dep.o mark_rts.o headers.o mark.o obj_map.o blacklst.o finalize.o new_hblk.o dbg_mlc.o malloc.o stubborn.o checksums.o solaris_threads.o aix_irix_threads.o pthread_support.o pthread_stop_world.o darwin_stop_world.o typd_mlc.o ptr_chck.o mallocx.o solaris_pthreads.o gcj_mlc.o specific.o gc_dlopen.o backgraph.o win32_threads.o
OBJS= alloc.o reclaim.o allchblk.o misc.o mach_dep.o os_dep.o mark_rts.o headers.o mark.o obj_map.o blacklst.o finalize.o new_hblk.o dbg_mlc.o malloc.o stubborn.o checksums.o solaris_threads.o pthread_support.o pthread_stop_world.o darwin_stop_world.o typd_mlc.o ptr_chck.o mallocx.o solaris_pthreads.o gcj_mlc.o specific.o gc_dlopen.o backgraph.o win32_threads.o
CSRCS= reclaim.c allchblk.c misc.c alloc.c mach_dep.c os_dep.c mark_rts.c headers.c mark.c obj_map.c pcr_interface.c blacklst.c finalize.c new_hblk.c real_malloc.c dyn_load.c dbg_mlc.c malloc.c stubborn.c checksums.c solaris_threads.c aix_irix_threads.c pthread_support.c pthread_stop_world.c darwin_stop_world.c typd_mlc.c ptr_chck.c mallocx.c solaris_pthreads.c gcj_mlc.c specific.c gc_dlopen.c backgraph.c win32_threads.c
CSRCS= reclaim.c allchblk.c misc.c alloc.c mach_dep.c os_dep.c mark_rts.c headers.c mark.c obj_map.c pcr_interface.c blacklst.c finalize.c new_hblk.c real_malloc.c dyn_load.c dbg_mlc.c malloc.c stubborn.c checksums.c solaris_threads.c pthread_support.c pthread_stop_world.c darwin_stop_world.c typd_mlc.c ptr_chck.c mallocx.c solaris_pthreads.c gcj_mlc.c specific.c gc_dlopen.c backgraph.c win32_threads.c
CORD_SRCS= cord/cordbscs.c cord/cordxtra.c cord/cordprnt.c cord/de.c cord/cordtest.c include/cord.h include/ec.h include/private/cord_pos.h cord/de_win.c cord/de_win.h cord/de_cmds.h cord/de_win.ICO cord/de_win.RC

File diff suppressed because it is too large Load diff

4570
src/gc/aclocal.m4 vendored

File diff suppressed because it is too large Load diff

View file

@ -285,8 +285,8 @@ int n;
GET_HDR(hhdr -> hb_prev, phdr);
phdr -> hb_next = hhdr -> hb_next;
}
FREE_ASSERT(GC_free_bytes[index] >= hhdr -> hb_sz);
INCR_FREE_BYTES(index, - (signed_word)(hhdr -> hb_sz));
FREE_ASSERT(GC_free_bytes[index] >= 0);
if (0 != hhdr -> hb_next) {
hdr * nhdr;
GC_ASSERT(!IS_FORWARDING_ADDR_OR_NIL(NHDR(hhdr)));

View file

@ -92,6 +92,16 @@ char * GC_copyright[] =
# include "version.h"
#if defined(SAVE_CALL_CHAIN) && \
!(defined(REDIRECT_MALLOC) && defined(GC_HAVE_BUILTIN_BACKTRACE))
# define SAVE_CALL_CHAIN_IN_GC
/* This is only safe if the call chain save mechanism won't end up */
/* calling GC_malloc. The GNU C library documentation suggests */
/* that backtrace doesn't use malloc, but at least the initial */
/* call in some versions does seem to invoke the dynamic linker, */
/* which uses malloc. */
#endif
/* some more variables */
extern signed_word GC_mem_found; /* Number of reclaimed longwords */
@ -222,6 +232,8 @@ void GC_clear_a_few_frames()
{
# define NWORDS 64
word frames[NWORDS];
/* Some compilers will warn that frames was set but never used. */
/* That's the whole idea ... */
register int i;
for (i = 0; i < NWORDS; i++) frames[i] = 0;
@ -294,7 +306,7 @@ void GC_maybe_gc()
# endif
if (GC_stopped_mark(GC_time_limit == GC_TIME_UNLIMITED?
GC_never_stop_func : GC_timeout_stop_func)) {
# ifdef SAVE_CALL_CHAIN
# ifdef SAVE_CALL_CHAIN_IN_GC
GC_save_callers(GC_last_stack);
# endif
GC_finish_collection();
@ -359,7 +371,7 @@ GC_stop_func stop_func;
}
GC_invalidate_mark_state(); /* Flush mark stack. */
GC_clear_marks();
# ifdef SAVE_CALL_CHAIN
# ifdef SAVE_CALL_CHAIN_IN_GC
GC_save_callers(GC_last_stack);
# endif
GC_is_full_gc = TRUE;
@ -414,7 +426,7 @@ int n;
for (i = GC_deficit; i < GC_RATE*n; i++) {
if (GC_mark_some((ptr_t)0)) {
/* Need to finish a collection */
# ifdef SAVE_CALL_CHAIN
# ifdef SAVE_CALL_CHAIN_IN_GC
GC_save_callers(GC_last_stack);
# endif
# ifdef PARALLEL_MARK

374
src/gc/configure vendored
View file

@ -1,7 +1,7 @@
#! /bin/sh
# From configure.in Revision: 1.2 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for gc 6.4.
# Generated by GNU Autoconf 2.59 for gc 6.5.
#
# Report bugs to <Hans.Boehm@hp.com>.
#
@ -429,8 +429,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='gc'
PACKAGE_TARNAME='gc'
PACKAGE_VERSION='6.4'
PACKAGE_STRING='gc 6.4'
PACKAGE_VERSION='6.5'
PACKAGE_STRING='gc 6.5'
PACKAGE_BUGREPORT='Hans.Boehm@hp.com'
ac_unique_file="gcj_mlc.c"
@ -471,7 +471,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE GC_VERSION CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE CCAS CCASFLAGS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT GC_CFLAGS THREADDLLIBS POWERPC_DARWIN_TRUE POWERPC_DARWIN_FALSE EXTRA_TEST_LIBS target_all CPLUSPLUS_TRUE CPLUSPLUS_FALSE INCLUDES CXXINCLUDES addobjs addincludes addlibs addtests LN_S ECHO CPP EGREP LIBTOOL MY_CFLAGS UNWINDLIBS USE_LIBDIR_TRUE USE_LIBDIR_FALSE LIBOBJS LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar GC_VERSION CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CCAS CCASFLAGS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT GC_CFLAGS THREADDLLIBS POWERPC_DARWIN_TRUE POWERPC_DARWIN_FALSE EXTRA_TEST_LIBS target_all CPLUSPLUS_TRUE CPLUSPLUS_FALSE INCLUDES CXXINCLUDES addobjs addincludes addlibs addtests LN_S ECHO CPP EGREP LIBTOOL MY_CFLAGS UNWINDLIBS USE_LIBDIR_TRUE USE_LIBDIR_FALSE LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@ -936,6 +936,14 @@ ac_env_CXXFLAGS_set=${CXXFLAGS+set}
ac_env_CXXFLAGS_value=$CXXFLAGS
ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
ac_cv_env_CXXFLAGS_value=$CXXFLAGS
ac_env_CCAS_set=${CCAS+set}
ac_env_CCAS_value=$CCAS
ac_cv_env_CCAS_set=${CCAS+set}
ac_cv_env_CCAS_value=$CCAS
ac_env_CCASFLAGS_set=${CCASFLAGS+set}
ac_env_CCASFLAGS_value=$CCASFLAGS
ac_cv_env_CCASFLAGS_set=${CCASFLAGS+set}
ac_cv_env_CCASFLAGS_value=$CCASFLAGS
ac_env_CPP_set=${CPP+set}
ac_env_CPP_value=$CPP
ac_cv_env_CPP_set=${CPP+set}
@ -948,7 +956,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures gc 6.4 to adapt to many kinds of systems.
\`configure' configures gc 6.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1015,17 +1023,17 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of gc 6.4:";;
short | recursive ) echo "Configuration of gc 6.5:";;
esac
cat <<\_ACEOF
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-dependency-tracking Speeds up one-time builds
--enable-dependency-tracking Do not reject slow dependency extractors
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer
--enable-threads=TYPE choose threading package
--enable-parallel-mark parallelize marking and free list construction
--enable-cplusplus install C++ support
@ -1056,6 +1064,8 @@ Some influential environment variables:
headers in a nonstandard directory <include dir>
CXX C++ compiler command
CXXFLAGS C++ compiler flags
CCAS assembler compiler command (defaults to CC)
CCASFLAGS assembler compiler flags (defaults to CFLAGS)
CPP C preprocessor
Use these variables to override the choices made by `configure' or to help
@ -1157,7 +1167,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
gc configure 6.4
gc configure 6.5
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@ -1171,7 +1181,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by gc $as_me 6.4, which was
It was created by gc $as_me 6.5, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@ -1661,7 +1671,7 @@ ${GC_ALPHA_VERSION:+alpha=}$GC_ALPHA_VERSION" >&5
echo "${ECHO_T}major=$GC_VERSION_MAJOR minor=$GC_VERSION_MINOR \
${GC_ALPHA_VERSION:+alpha=}$GC_ALPHA_VERSION" >&6
am__api_version="1.6"
am__api_version="1.9"
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
@ -1799,7 +1809,6 @@ _ACEOF
program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
rm conftest.sed
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
@ -1813,6 +1822,39 @@ else
echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
fi
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
# We used to keeping the `.' as first argument, in order to
# allow $(mkdir_p) to be used without argument. As in
# $(mkdir_p) $(somedir)
# where $(somedir) is conditionally defined. However this is wrong
# for two reasons:
# 1. if the package is installed by a user who cannot write `.'
# make install will fail,
# 2. the above comment should most certainly read
# $(mkdir_p) $(DESTDIR)$(somedir)
# so it does not work when $(somedir) is undefined and
# $(DESTDIR) is not.
# To support the latter case, we have to write
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
# so the `.' trick is pointless.
mkdir_p='mkdir -p --'
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
for d in ./-p ./--version;
do
test -d $d && rmdir $d
done
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
if test -f "$ac_aux_dir/mkinstalldirs"; then
mkdir_p='$(mkinstalldirs)'
else
mkdir_p='$(install_sh) -d'
fi
fi
for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@ -1882,7 +1924,16 @@ echo "${ECHO_T}no" >&6
SET_MAKE="MAKE=${MAKE-make}"
fi
# test to see if srcdir already configured
rm -rf .tst 2>/dev/null
mkdir .tst 2>/dev/null
if test -d .tst; then
am__leading_dot=.
else
am__leading_dot=_
fi
rmdir .tst 2>/dev/null
# test to see if srcdir already configured
if test "`cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
{ { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
@ -1890,9 +1941,19 @@ echo "$as_me: error: source directory already configured; run \"make distclean\"
{ (exit 1); exit 1; }; }
fi
# test whether we have cygpath
if test -z "$CYGPATH_W"; then
if (cygpath --version) >/dev/null 2>/dev/null; then
CYGPATH_W='cygpath -w'
else
CYGPATH_W=echo
fi
fi
# Define the identity of the package.
PACKAGE=gc
VERSION=6.4
PACKAGE='gc'
VERSION='6.5'
cat >>confdefs.h <<_ACEOF
@ -1920,9 +1981,6 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
AMTAR=${AMTAR-"${am_missing_run}tar"}
install_sh=${install_sh-"$am_aux_dir/install-sh"}
# Installed binaries are usually stripped using `strip' when the user
@ -2015,6 +2073,13 @@ INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
# Always define AMTAR for backward compatibility.
AMTAR=${AMTAR-"${am_missing_run}tar"}
am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
@ -2945,24 +3010,16 @@ ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
rm -f .deps 2>/dev/null
mkdir .deps 2>/dev/null
if test -d .deps; then
DEPDIR=.deps
else
# MS-DOS does not allow filenames that begin with a dot.
DEPDIR=_deps
fi
rmdir .deps 2>/dev/null
DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
am_make=${MAKE-make}
cat > confinc << 'END'
doit:
am__doit:
@echo done
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
@ -2977,7 +3034,7 @@ echo "include confinc" > confmf
# In particular we don't look at `^make:' because GNU make might
# be invoked under some other name (usually "gmake"), in which
# case it prints its new name instead of `make'.
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
am__include=include
am__quote=
_am_result=GNU
@ -3037,18 +3094,34 @@ else
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
# We will build objects and dependencies in a subdirectory because
# it helps to detect inapplicable dependency modes. For instance
# both Tru64's cc and ICC support -MD to output dependencies as a
# side effect of compilation, but ICC will put the dependencies in
# the current directory while Tru64 will put them in the object
# directory.
mkdir sub
am_cv_CC_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
fi
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
# we should not choose a depcomp mode which is confused by this.
#
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
echo '#include "conftest.h"' > conftest.c
echo 'int i;' > conftest.h
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
# Solaris 8's {/usr,}/bin/sh.
touch sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
@ -3066,13 +3139,25 @@ else
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=conftest.c object=conftest.o \
depfile=conftest.Po tmpdepfile=conftest.TPo \
$SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
grep conftest.h conftest.Po > /dev/null 2>&1 &&
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
am_cv_CC_dependencies_compiler_type=$depmode
break
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_CC_dependencies_compiler_type=$depmode
break
fi
fi
done
@ -3088,6 +3173,18 @@ echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
if
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
am__fastdepCC_TRUE=
am__fastdepCC_FALSE='#'
else
am__fastdepCC_TRUE='#'
am__fastdepCC_FALSE=
fi
ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@ -3457,18 +3554,34 @@ else
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
# We will build objects and dependencies in a subdirectory because
# it helps to detect inapplicable dependency modes. For instance
# both Tru64's cc and ICC support -MD to output dependencies as a
# side effect of compilation, but ICC will put the dependencies in
# the current directory while Tru64 will put them in the object
# directory.
mkdir sub
am_cv_CXX_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
fi
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
# we should not choose a depcomp mode which is confused by this.
#
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
echo '#include "conftest.h"' > conftest.c
echo 'int i;' > conftest.h
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
# Solaris 8's {/usr,}/bin/sh.
touch sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
@ -3486,13 +3599,25 @@ else
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=conftest.c object=conftest.o \
depfile=conftest.Po tmpdepfile=conftest.TPo \
$SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
grep conftest.h conftest.Po > /dev/null 2>&1 &&
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
am_cv_CXX_dependencies_compiler_type=$depmode
break
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_CXX_dependencies_compiler_type=$depmode
break
fi
fi
done
@ -3509,11 +3634,23 @@ CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
if
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
am__fastdepCXX_TRUE=
am__fastdepCXX_FALSE='#'
else
am__fastdepCXX_TRUE='#'
am__fastdepCXX_FALSE=
fi
# By default we simply use the C compiler to build assembly code.
: ${CCAS='$(CC)'}
# Set ASFLAGS if not already set.
: ${CCASFLAGS='$(CFLAGS)'}
test "${CCAS+set}" = set || CCAS=$CC
test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
if test -n "$ac_tool_prefix"; then
@ -4609,7 +4746,7 @@ irix5* | irix6*)
# This must be Linux ELF.
linux-gnu*)
case $host_cpu in
alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | s390* )
alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
lt_cv_deplibs_check_method=pass_all ;;
*)
# glibc up to 2.1.1 does not perform some relocations on ARM
@ -5845,7 +5982,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
case $host in
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 5848 "configure"' > conftest.$ac_ext
echo '#line 5985 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -6036,6 +6173,8 @@ fi
set dummy $CC
compiler="$2"
## FIXME: this should be a separate macro
##
echo "$as_me:$LINENO: checking for objdir" >&5
echo $ECHO_N "checking for objdir... $ECHO_C" >&6
rm -f .libs 2>/dev/null
@ -6049,8 +6188,12 @@ fi
rmdir .libs 2>/dev/null
echo "$as_me:$LINENO: result: $objdir" >&5
echo "${ECHO_T}$objdir" >&6
##
## END FIXME
## FIXME: this should be a separate macro
##
# Check whether --with-pic or --without-pic was given.
if test "${with_pic+set}" = set; then
@ -6300,6 +6443,8 @@ fi
echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic_works" >&5
echo "${ECHO_T}$lt_cv_prog_cc_pic_works" >&6
fi
##
## END FIXME
# Check for any special shared library compilation flags.
if test -n "$lt_cv_prog_cc_shlib"; then
@ -6313,6 +6458,8 @@ echo "$as_me: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env varia
fi
fi
## FIXME: this should be a separate macro
##
echo "$as_me:$LINENO: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
echo $ECHO_N "checking if $compiler static flag $lt_cv_prog_cc_static works... $ECHO_C" >&6
if test "${lt_cv_prog_cc_static_works+set}" = set; then
@ -6381,8 +6528,12 @@ wl="$lt_cv_prog_cc_wl"
link_static_flag="$lt_cv_prog_cc_static"
no_builtin_flag="$lt_cv_prog_cc_no_builtin"
can_build_shared="$lt_cv_prog_cc_can_build_shared"
##
## END FIXME
## FIXME: this should be a separate macro
##
# Check to see if options -o and -c are simultaneously supported by compiler
echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
@ -6404,7 +6555,7 @@ chmod -w .
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
compiler_c_o=no
if { (eval echo configure:6407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
if { (eval echo configure:6558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
if test -s out/conftest.err; then
@ -6505,7 +6656,11 @@ echo "${ECHO_T}$compiler_o_lo" >&6
else
compiler_o_lo=no
fi
##
## END FIXME
## FIXME: this should be a separate macro
##
# Check to see if we can do hard links to lock some files if needed
hard_links="nottested"
if test "$compiler_c_o" = no && test "$need_locks" != no; then
@ -6528,7 +6683,11 @@ echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be un
else
need_locks=no
fi
##
## END FIXME
## FIXME: this should be a separate macro
##
if test "$GCC" = yes; then
# Check to see if options -fno-rtti -fno-exceptions are supported by compiler
echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
@ -6597,7 +6756,11 @@ echo "${ECHO_T}$compiler_rtti_exceptions" >&6
no_builtin_flag=' -fno-builtin'
fi
fi
##
## END FIXME
## FIXME: this should be a separate macro
##
# See if the linker supports building shared libraries.
echo "$as_me:$LINENO: checking whether the linker ($LD) supports shared libraries" >&5
echo $ECHO_N "checking whether the linker ($LD) supports shared libraries... $ECHO_C" >&6
@ -7282,7 +7445,11 @@ fi
echo "$as_me:$LINENO: result: $ld_shlibs" >&5
echo "${ECHO_T}$ld_shlibs" >&6
test "$ld_shlibs" = no && can_build_shared=no
##
## END FIXME
## FIXME: this should be a separate macro
##
# Check hardcoding attributes.
echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
@ -7310,7 +7477,11 @@ else
fi
echo "$as_me:$LINENO: result: $hardcode_action" >&5
echo "${ECHO_T}$hardcode_action" >&6
##
## END FIXME
## FIXME: this should be a separate macro
##
striplib=
old_striplib=
echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
@ -7324,10 +7495,14 @@ else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
##
## END FIXME
reload_cmds='$LD$reload_flag -o $output$reload_objs'
test -z "$deplibs_check_method" && deplibs_check_method=unknown
## FIXME: this should be a separate macro
##
# PORTME Fill in your ld.so characteristics
echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
@ -7725,13 +7900,21 @@ esac
echo "$as_me:$LINENO: result: $dynamic_linker" >&5
echo "${ECHO_T}$dynamic_linker" >&6
test "$dynamic_linker" = no && can_build_shared=no
##
## END FIXME
## FIXME: this should be a separate macro
##
# Report the final consequences.
echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
echo "$as_me:$LINENO: result: $can_build_shared" >&5
echo "${ECHO_T}$can_build_shared" >&6
##
## END FIXME
## FIXME: this should be a separate macro
##
echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
test "$can_build_shared" = "no" && enable_shared=no
@ -7755,13 +7938,19 @@ aix4*)
esac
echo "$as_me:$LINENO: result: $enable_shared" >&5
echo "${ECHO_T}$enable_shared" >&6
##
## END FIXME
## FIXME: this should be a separate macro
##
echo "$as_me:$LINENO: checking whether to build static libraries" >&5
echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
# Make sure either enable_shared or enable_static is yes.
test "$enable_shared" = yes || enable_static=yes
echo "$as_me:$LINENO: result: $enable_static" >&5
echo "${ECHO_T}$enable_static" >&6
##
## END FIXME
if test "$hardcode_action" = relink; then
# Fast installation is not supported
@ -8293,7 +8482,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 8296 "configure"
#line 8485 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -8391,7 +8580,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 8394 "configure"
#line 8583 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -8495,6 +8684,8 @@ echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
fi
## FIXME: this should be a separate macro
##
if test "$enable_shared" = yes && test "$GCC" = yes; then
case $archive_cmds in
*'~'*)
@ -8551,7 +8742,11 @@ echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6
esac
fi
need_lc=${lt_cv_archive_cmds_need_lc-yes}
##
## END FIXME
## FIXME: this should be a separate macro
##
# The second clause should only fire when bootstrapping the
# libtool distribution, otherwise you forgot to ship ltmain.sh
# with your package, and you will get complaints that there are
@ -9101,6 +9296,8 @@ EOF
(rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
chmod +x "$ofile"
fi
##
## END FIXME
@ -9685,6 +9882,20 @@ echo "$as_me: error: conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@ -9984,7 +10195,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
This file was extended by gc $as_me 6.4, which was
This file was extended by gc $as_me 6.5, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -10042,7 +10253,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
gc config.status 6.4
gc config.status 6.5
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
@ -10262,6 +10473,7 @@ s,@target_os@,$target_os,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
s,@CYGPATH_W@,$CYGPATH_W,;t t
s,@PACKAGE@,$PACKAGE,;t t
s,@VERSION@,$VERSION,;t t
s,@ACLOCAL@,$ACLOCAL,;t t
@ -10269,13 +10481,17 @@ s,@AUTOCONF@,$AUTOCONF,;t t
s,@AUTOMAKE@,$AUTOMAKE,;t t
s,@AUTOHEADER@,$AUTOHEADER,;t t
s,@MAKEINFO@,$MAKEINFO,;t t
s,@AMTAR@,$AMTAR,;t t
s,@install_sh@,$install_sh,;t t
s,@STRIP@,$STRIP,;t t
s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
s,@mkdir_p@,$mkdir_p,;t t
s,@AWK@,$AWK,;t t
s,@SET_MAKE@,$SET_MAKE,;t t
s,@am__leading_dot@,$am__leading_dot,;t t
s,@AMTAR@,$AMTAR,;t t
s,@am__tar@,$am__tar,;t t
s,@am__untar@,$am__untar,;t t
s,@GC_VERSION@,$GC_VERSION,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
@ -10291,10 +10507,14 @@ s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
s,@CCDEPMODE@,$CCDEPMODE,;t t
s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
s,@CXX@,$CXX,;t t
s,@CXXFLAGS@,$CXXFLAGS,;t t
s,@ac_ct_CXX@,$ac_ct_CXX,;t t
s,@CXXDEPMODE@,$CXXDEPMODE,;t t
s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t
s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t
s,@CCAS@,$CCAS,;t t
s,@CCASFLAGS@,$CCASFLAGS,;t t
s,@AR@,$AR,;t t
@ -10707,27 +10927,21 @@ echo X"$mf" |
else
continue
fi
grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
# Extract the definition of DEP_FILES from the Makefile without
# running `make'.
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
# Extract the definition of DEPDIR, am__include, and am__quote
# from the Makefile without running `make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n -e '/^U = / s///p' < "$mf"`
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
# We invoke sed twice because it is the simplest approach to
# changing $(DEPDIR) to its actual value in the expansion.
for file in `sed -n -e '
/^DEP_FILES = .*\\\\$/ {
s/^DEP_FILES = //
:loop
s/\\\\$//
p
n
/\\\\$/ b loop
p
}
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
U=`sed -n 's/^U = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue

View file

@ -17,7 +17,7 @@ dnl Process this file with autoconf to produce configure.
# Initialization
# ==============
AC_INIT(gc,6.4,Hans.Boehm@hp.com)
AC_INIT(gc,6.5,Hans.Boehm@hp.com)
## version must conform to [0-9]+[.][0-9]+(alpha[0-9]+)?
AC_CONFIG_SRCDIR(gcj_mlc.c)
AC_CANONICAL_TARGET

View file

@ -12,23 +12,33 @@
Page 50: "If a leaf procedure's red zone usage would exceed 224 bytes, then
it must set up a stack frame just like routines that call other routines."
*/
#define PPC_RED_ZONE_SIZE 224
#ifdef POWERPC
# if CPP_WORDSZ == 32
# define PPC_RED_ZONE_SIZE 224
# elif CPP_WORDSZ == 64
# define PPC_RED_ZONE_SIZE 320
# endif
#endif
/* Not 64-bit clean. Wait until Apple defines their 64-bit ABI */
typedef struct StackFrame {
unsigned int savedSP;
unsigned int savedCR;
unsigned int savedLR;
unsigned int reserved[2];
unsigned int savedRTOC;
unsigned long savedSP;
unsigned long savedCR;
unsigned long savedLR;
unsigned long reserved[2];
unsigned long savedRTOC;
} StackFrame;
unsigned int FindTopOfStack(unsigned int stack_start) {
unsigned long FindTopOfStack(unsigned int stack_start) {
StackFrame *frame;
if (stack_start == 0) {
__asm__ volatile("lwz %0,0(r1)" : "=r" (frame));
# ifdef POWERPC
# if CPP_WORDSZ == 32
__asm__ volatile("lwz %0,0(r1)" : "=r" (frame));
# else
__asm__ volatile("ldz %0,0(r1)" : "=r" (frame));
# endif
# endif
} else {
frame = (StackFrame *)stack_start;
}
@ -37,7 +47,7 @@ unsigned int FindTopOfStack(unsigned int stack_start) {
/* GC_printf1("FindTopOfStack start at sp = %p\n", frame); */
# endif
do {
if (frame->savedSP == NULL) break;
if (frame->savedSP == 0) break;
/* if there are no more stack frames, stop */
frame = (StackFrame*)frame->savedSP;
@ -53,9 +63,88 @@ unsigned int FindTopOfStack(unsigned int stack_start) {
/* GC_printf1("FindTopOfStack finish at sp = %p\n", frame); */
# endif
return (unsigned int)frame;
return (unsigned long)frame;
}
#ifdef DARWIN_DONT_PARSE_STACK
void GC_push_all_stacks() {
int i;
kern_return_t r;
GC_thread p;
pthread_t me;
ptr_t lo, hi;
ppc_thread_state_t state;
mach_msg_type_number_t thread_state_count = MACHINE_THREAD_STATE_COUNT;
me = pthread_self();
if (!GC_thr_initialized) GC_thr_init();
for(i=0;i<THREAD_TABLE_SZ;i++) {
for(p=GC_threads[i];p!=0;p=p->next) {
if(p -> flags & FINISHED) continue;
if(pthread_equal(p->id,me)) {
lo = GC_approx_sp();
} else {
/* Get the thread state (registers, etc) */
r = thread_get_state(
p->stop_info.mach_thread,
MACHINE_THREAD_STATE,
(natural_t*)&state,
&thread_state_count);
if(r != KERN_SUCCESS) ABORT("thread_get_state failed");
lo = (void*)(state.r1 - PPC_RED_ZONE_SIZE);
GC_push_one(state.r0);
GC_push_one(state.r2);
GC_push_one(state.r3);
GC_push_one(state.r4);
GC_push_one(state.r5);
GC_push_one(state.r6);
GC_push_one(state.r7);
GC_push_one(state.r8);
GC_push_one(state.r9);
GC_push_one(state.r10);
GC_push_one(state.r11);
GC_push_one(state.r12);
GC_push_one(state.r13);
GC_push_one(state.r14);
GC_push_one(state.r15);
GC_push_one(state.r16);
GC_push_one(state.r17);
GC_push_one(state.r18);
GC_push_one(state.r19);
GC_push_one(state.r20);
GC_push_one(state.r21);
GC_push_one(state.r22);
GC_push_one(state.r23);
GC_push_one(state.r24);
GC_push_one(state.r25);
GC_push_one(state.r26);
GC_push_one(state.r27);
GC_push_one(state.r28);
GC_push_one(state.r29);
GC_push_one(state.r30);
GC_push_one(state.r31);
} /* p != me */
if(p->flags & MAIN_THREAD)
hi = GC_stackbottom;
else
hi = p->stack_end;
#if DEBUG_THREADS
GC_printf3("Darwin: Stack for thread 0x%lx = [%lx,%lx)\n",
(unsigned long) p -> id,
(unsigned long) lo,
(unsigned long) hi
);
#endif
GC_push_all_stack(lo,hi);
} /* for(p=GC_threads[i]...) */
} /* for(i=0;i<THREAD_TABLE_SZ...) */
}
#else /* !DARWIN_DONT_PARSE_STACK; Use FindTopOfStack() */
void GC_push_all_stacks() {
int i;
kern_return_t r;
@ -75,8 +164,12 @@ void GC_push_all_stacks() {
lo = GC_approx_sp();
hi = (ptr_t)FindTopOfStack(0);
} else {
# ifdef POWERPC
# if defined(POWERPC)
# if CPP_WORDSZ == 32
ppc_thread_state_t info;
# else
ppc_thread_state64_t info;
# endif
mach_msg_type_number_t outCount = THREAD_STATE_MAX;
r = thread_get_state(thread, MACHINE_THREAD_STATE,
(natural_t *)&info, &outCount);
@ -155,6 +248,7 @@ void GC_push_all_stacks() {
GC_push_all_stack(lo, hi);
} /* for(p=GC_threads[i]...) */
}
#endif /* !DARWIN_DONT_PARSE_STACK */
static mach_port_t GC_mach_handler_thread;
static int GC_use_mach_handler_thread = 0;

View file

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.6.3 from Makefile.am.
# Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 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.
@ -26,96 +26,172 @@
# modified is included with the above copyright notice.
#
# Modified by: Grzegorz Jakacki <jakacki at acm dot org>
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
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
build_triplet = @build@
host_triplet = @host@
EXEEXT = @EXEEXT@
OBJEXT = @OBJEXT@
PATH_SEPARATOR = @PATH_SEPARATOR@
target_triplet = @target@
subdir = doc
DIST_COMMON = README $(dist_pkgdata_DATA) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/libtool.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(pkgdatadir)"
dist_pkgdataDATA_INSTALL = $(INSTALL_DATA)
DATA = $(dist_pkgdata_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCAS = @CCAS@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPLUSPLUS_FALSE = @CPLUSPLUS_FALSE@
CPLUSPLUS_TRUE = @CPLUSPLUS_TRUE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXXINCLUDES = @CXXINCLUDES@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXTRA_TEST_LIBS = @EXTRA_TEST_LIBS@
GC_CFLAGS = @GC_CFLAGS@
GC_VERSION = @GC_VERSION@
INCLUDES = @INCLUDES@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MY_CFLAGS = @MY_CFLAGS@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
POWERPC_DARWIN_FALSE = @POWERPC_DARWIN_FALSE@
POWERPC_DARWIN_TRUE = @POWERPC_DARWIN_TRUE@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
THREADDLLIBS = @THREADDLLIBS@
UNWINDLIBS = @UNWINDLIBS@
USE_LIBDIR_FALSE = @USE_LIBDIR_FALSE@
USE_LIBDIR_TRUE = @USE_LIBDIR_TRUE@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
addincludes = @addincludes@
addlibs = @addlibs@
addobjs = @addobjs@
addtests = @addtests@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_all = @target_all@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
# installed documentation
#
@ -129,21 +205,38 @@ dist_pkgdata_DATA = barrett_diagram debugging.html gc.man \
tree.html leak.html gcinterface.html scale.html \
README.darwin simple_example.html
subdir = doc
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DATA = $(dist_pkgdata_DATA)
DIST_COMMON = README $(dist_pkgdata_DATA) Makefile.am Makefile.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu doc/Makefile
Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
@ -154,39 +247,43 @@ clean-libtool:
distclean-libtool:
-rm -f libtool
uninstall-info-am:
dist_pkgdataDATA_INSTALL = $(INSTALL_DATA)
install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
test -z "$(pkgdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgdatadir)"
@list='$(dist_pkgdata_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(dist_pkgdataDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \
$(dist_pkgdataDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \
f=$(am__strip_dir) \
echo " $(dist_pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \
$(dist_pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \
done
uninstall-dist_pkgdataDATA:
@$(NORMAL_UNINSTALL)
@list='$(dist_pkgdata_DATA)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(pkgdatadir)/$$f"; \
rm -f $(DESTDIR)$(pkgdatadir)/$$f; \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
done
tags: TAGS
TAGS:
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ctags: CTAGS
CTAGS:
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@list='$(DISTFILES)'; for file in $$list; do \
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
@ -204,10 +301,10 @@ distdir: $(DISTFILES)
check-am: all-am
check: check-am
all-am: Makefile $(DATA)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
for dir in "$(DESTDIR)$(pkgdatadir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@ -219,7 +316,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@ -227,7 +324,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@ -237,13 +334,15 @@ clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
@ -259,24 +358,33 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-dist_pkgdataDATA uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am info info-am install install-am install-data \
install-data-am install-dist_pkgdataDATA install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool uninstall uninstall-am \
uninstall-dist_pkgdataDATA uninstall-info-am
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dist_pkgdataDATA \
install-exec install-exec-am install-info install-info-am \
install-man install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am uninstall uninstall-am uninstall-dist_pkgdataDATA \
uninstall-info-am
# 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.

View file

@ -28,7 +28,7 @@ are GPL'ed, but with an exception that should cover all uses in the
collector. (If you are concerned about such things, I recommend you look
at the notice in config.guess or ltmain.sh.)
This is version 6.4 of a conservative garbage collector for C and C++.
This is version 6.5 of a conservative garbage collector for C and C++.
You might find a more recent version of this at

View file

@ -2151,8 +2151,6 @@ Since 6.3:
it seems to be incorrect if the preceding memory op is a load.
- Fixed print_block_list to print the correct kind number for
STUBBORN. (Thanks to Rutger Ovidus.)
- GC_allochblk_nth incremented GC_words_wasted by bytes rather than
words.
- Have configure.in generate an error if it is asked to support
pthreads, but doesn't know how to.
- Added Kazuhiro Inaoka's patch for Renesas M32R support.
@ -2169,6 +2167,59 @@ Since 6.3:
- Ignore GC_enable_incremental() requests when KEEP_BACK_PTRS is set.
The GC itself will dirty lots of pages in this cases, probably making
it counterproductive on all platforms. And the DARWIN port crashes.
Since GC6.4:
- Integrated Paolo Molaro's patch to deal with EINTR in sem_wait.
- Make GC_approx_sp() write to dummy location to ensure that stack
is grown here, when sp looks reasonable, rather than later, when
it might look like a bad memory reference. (Problem was never
observed that I know of. But on rereading the code it seemed
dubious.)
- Separate out GC_with_callee_saves_pushed and sometimes call
it from GC_suspend_handler in pthread_stop_world.c. Callee-save
register values sometimes failed to get traced under HP/UX on
PA-RISC. Linux/IA64 had the same problem, though non-stacked
callee-save registers seem to be so rarely used there that nobody
ever noticed.
- Integrated an ancient Darwin powerpc_darwin_machine_dep.s patch
from Andreas Tobler, which I had lost.
- Fix compare_and_exchange implementation for gcc/IA64 to deal with
pickier compiler versions.
- Fixed Itanium 32-bit ABI support (HP/UX). In particular, the
compare_and_exchange implementation didn't consider that possibility.
- Undefine GC_pthread_detach in win32_threads.c. (Thanks to
Tagliapietra Tommaso.)
- Fixed inclusion of frame.h for NETBSD in os_dep.c.
- Applied Dan Bonachea's patch to use mmap on AIX.
- Several fixes to resurrect the Irix port on recent OS versions.
- Change ALPHA to use LINUX_STACKBOTTOM.
- Change SPARC64/LINUX to also use LINUX_STACKBOTTOM. Deal with potential
bad values of __libc_stack_end on that platform. (Thanks to David Miller.)
- Relax gctest to allow larger heap if ALIGN_DOUBLE isn't set.
(Unnecessary in 7.0)
- Force a define of __STDC__=0 for the IBM compiler on AIX, so that
we get prototypes. (Unnecessary in 7.0)
- GC_INIT definition for AIX and CYGWIN referred to DATASTART and DATAEND
which are only defined in private include files.
- Integrated some small gcconfig.h patches from Dan Bonachea. Also
relaxed assertion about FreeBSD stack size in pthread_support.c.
- Integrated Andrew Begel's darwin_stop_world.c patch for 64-bit
support. This may need additional work.
- Avoided potentially infinite recursion in GC_save_callers if
the system backtrace calls malloc. The workaround currently requires
__thread support if this code is used with threads.
- Avoided another similar infinite recursion by conditionally
invoking GC_save_callers in alloc.c. (Thanks to Matthias Andree
for helping to track down both of these.)
- Removed all traces of aix_irix_threads.c. AIX and Irix now use
pthread_support.c and pthread_stop_world.c. The old code appeared
to be unreliable for AIX, and was not regularly maintained.
- On Irix, ignore segments with MA_FETCHOP or MA_NOTCACHED attributed;
they're not always safe to read.
- Fixed a previously vacuous assertion (diagnosed by the SGI compiler)
in GC_remove_from_fl.
- Fix stack_size assertion in GC_pthread_create.
- Fix assertion in GC_steal_mark_stack.
To do:
- The USE_MUNMAP code should really use a separate data structure

View file

@ -1,3 +1,16 @@
6.5 update:
I disabled incremental GC on Darwin in this version, since I couldn't
get gctest to pass when the GC was built as a dynamic library. Building
with -DMPROTECT_VDB (and threads) on the command line should get you
back to the old state. - HB
./configure --enable-cplusplus results in a "make check" failure, probably
because the ::delete override ends up in a separate dl, and Darwin dynamic
loader semantics appear to be such that this is not really visible to the
main program, unlike on ELF systems. Someone who understands dynamic
loading needs to lookat this. For now, gc_cpp.o needs to be linked
statically, if needed. - HB
Darwin/MacOSX Support - December 16, 2003
=========================================

View file

@ -631,7 +631,8 @@ void GC_register_dynamic_libraries()
}
for (i = 0; i < needed_sz; i++) {
flags = addr_map[i].pr_mflags;
if ((flags & (MA_BREAK | MA_STACK | MA_PHYS)) != 0) goto irrelevant;
if ((flags & (MA_BREAK | MA_STACK | MA_PHYS
| MA_FETCHOP | MA_NOTCACHED)) != 0) goto irrelevant;
if ((flags & (MA_READ | MA_WRITE)) != (MA_READ | MA_WRITE))
goto irrelevant;
/* The latter test is empirically useless in very old Irix */

View file

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.6.3 from Makefile.am.
# Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 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.
@ -26,96 +26,174 @@
# modified is included with the above copyright notice.
#
# Modified by: Grzegorz Jakacki <jakacki at acm dot org>
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
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
build_triplet = @build@
host_triplet = @host@
EXEEXT = @EXEEXT@
OBJEXT = @OBJEXT@
PATH_SEPARATOR = @PATH_SEPARATOR@
target_triplet = @target@
subdir = include
DIST_COMMON = $(dist_noinst_HEADERS) $(pkginclude_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/libtool.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(pkgincludedir)"
pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(dist_noinst_HEADERS) $(pkginclude_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCAS = @CCAS@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPLUSPLUS_FALSE = @CPLUSPLUS_FALSE@
CPLUSPLUS_TRUE = @CPLUSPLUS_TRUE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXXINCLUDES = @CXXINCLUDES@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXTRA_TEST_LIBS = @EXTRA_TEST_LIBS@
GC_CFLAGS = @GC_CFLAGS@
GC_VERSION = @GC_VERSION@
INCLUDES = @INCLUDES@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MY_CFLAGS = @MY_CFLAGS@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
POWERPC_DARWIN_FALSE = @POWERPC_DARWIN_FALSE@
POWERPC_DARWIN_TRUE = @POWERPC_DARWIN_TRUE@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
THREADDLLIBS = @THREADDLLIBS@
UNWINDLIBS = @UNWINDLIBS@
USE_LIBDIR_FALSE = @USE_LIBDIR_FALSE@
USE_LIBDIR_TRUE = @USE_LIBDIR_TRUE@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
addincludes = @addincludes@
addlibs = @addlibs@
addobjs = @addobjs@
addtests = @addtests@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_all = @target_all@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
# installed headers
#
@ -139,22 +217,38 @@ dist_noinst_HEADERS = private/gc_hdrs.h \
private/darwin_semaphore.h private/darwin_stop_world.h \
cord.h ec.h javaxfc.h
subdir = include
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES =
DIST_SOURCES =
HEADERS = $(dist_noinst_HEADERS) $(pkginclude_HEADERS)
DIST_COMMON = $(dist_noinst_HEADERS) $(pkginclude_HEADERS) Makefile.am \
Makefile.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu include/Makefile
Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
@ -165,30 +259,24 @@ clean-libtool:
distclean-libtool:
-rm -f libtool
uninstall-info-am:
pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER)
install-pkgincludeHEADERS: $(pkginclude_HEADERS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(pkgincludedir)
test -z "$(pkgincludedir)" || $(mkdir_p) "$(DESTDIR)$(pkgincludedir)"
@list='$(pkginclude_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(pkgincludeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(pkgincludedir)/$$f"; \
$(pkgincludeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(pkgincludedir)/$$f; \
f=$(am__strip_dir) \
echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \
$(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \
done
uninstall-pkgincludeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(pkginclude_HEADERS)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(pkgincludedir)/$$f"; \
rm -f $(DESTDIR)$(pkgincludedir)/$$f; \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \
rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \
done
ETAGS = etags
ETAGSFLAGS =
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
@ -197,6 +285,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@ -208,8 +297,24 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
@ -218,20 +323,22 @@ GTAGS:
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(mkinstalldirs) $(distdir)/private
@list='$(DISTFILES)'; for file in $$list; do \
$(mkdir_p) $(distdir)/private
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
@ -249,10 +356,10 @@ distdir: $(DISTFILES)
check-am: all-am
check: check-am
all-am: Makefile $(HEADERS)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(pkgincludedir)
for dir in "$(DESTDIR)$(pkgincludedir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@ -264,7 +371,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@ -272,7 +379,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@ -282,7 +389,7 @@ clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool \
distclean-tags
@ -290,6 +397,8 @@ dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
@ -305,25 +414,34 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am uninstall-pkgincludeHEADERS
.PHONY: GTAGS all all-am check check-am clean clean-generic \
clean-libtool distclean distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am info info-am install \
install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-pkgincludeHEADERS install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool tags uninstall uninstall-am \
uninstall-info-am uninstall-pkgincludeHEADERS
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool ctags distclean distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-pkgincludeHEADERS \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-info-am \
uninstall-pkgincludeHEADERS
# 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.

View file

@ -32,7 +32,7 @@
# include "gc_config_macros.h"
# if defined(__STDC__) || defined(__cplusplus)
# if defined(__STDC__) || defined(__cplusplus) || defined(_AIX)
# define GC_PROTO(args) args
typedef void * GC_PTR;
# define GC_CONST const
@ -848,7 +848,7 @@ GC_API GC_PTR GC_is_valid_displacement GC_PROTO((GC_PTR p));
/* Safer assignment of a pointer to a nonstack location. */
#ifdef GC_DEBUG
# ifdef __STDC__
# if defined(__STDC__) || defined(_AIX)
# define GC_PTR_STORE(p, q) \
(*(void **)GC_is_visible(p) = GC_is_valid_displacement(q))
# else
@ -943,12 +943,32 @@ extern void GC_thr_init(); /* Needed for Solaris/X86 */
# define GC_INIT() { extern end, etext; \
GC_noop(&end, &etext); }
#else
# if defined(__CYGWIN32__) && defined(GC_DLL) || defined (_AIX)
# if defined(__CYGWIN32__) || defined (_AIX)
/*
* Similarly gnu-win32 DLLs need explicit initialization from
* the main program, as does AIX.
*/
# define GC_INIT() { GC_add_roots(DATASTART, DATAEND); }
# ifdef __CYGWIN32__
extern int _data_start__[];
extern int _data_end__[];
extern int _bss_start__[];
extern int _bss_end__[];
# define GC_MAX(x,y) ((x) > (y) ? (x) : (y))
# define GC_MIN(x,y) ((x) < (y) ? (x) : (y))
# define GC_DATASTART ((GC_PTR) GC_MIN(_data_start__, _bss_start__))
# define GC_DATAEND ((GC_PTR) GC_MAX(_data_end__, _bss_end__))
# ifdef GC_DLL
# define GC_INIT() { GC_add_roots(GC_DATASTART, GC_DATAEND); }
# else
# define GC_INIT()
# endif
# endif
# if defined(_AIX)
extern int _data[], _end[];
# define GC_DATASTART ((GC_PTR)((ulong)_data))
# define GC_DATAEND ((GC_PTR)((ulong)_end))
# define GC_INIT() { GC_add_roots(GC_DATASTART, GC_DATAEND); }
# endif
# else
# if defined(__APPLE__) && defined(__MACH__) || defined(GC_WIN32_THREADS)
# define GC_INIT() { GC_init(); }

View file

@ -95,6 +95,10 @@
# define GC_DGUX386_THREADS
# define GC_PTHREADS
# endif
# if defined(_AIX)
# define GC_AIX_THREADS
# define GC_PTHREADS
# endif
#endif /* GC_THREADS */
#if defined(GC_THREADS) && !defined(GC_PTHREADS) && \

View file

@ -155,6 +155,25 @@
# define GC_TEST_AND_SET_DEFINED
# endif
# if defined(POWERPC)
# if CPP_WORDSZ == 64
inline static int GC_test_and_set(volatile unsigned int *addr) {
unsigned long oldval;
unsigned long temp = 1; /* locked value */
__asm__ __volatile__(
"1:\tldarx %0,0,%3\n" /* load and reserve */
"\tcmpdi %0, 0\n" /* if load is */
"\tbne 2f\n" /* non-zero, return already set */
"\tstdcx. %2,0,%1\n" /* else store conditional */
"\tbne- 1b\n" /* retry if lost reservation */
"\tsync\n" /* import barrier */
"2:\t\n" /* oldval is zero if we set */
: "=&r"(oldval), "=p"(addr)
: "r"(temp), "1"(addr)
: "cr0","memory");
return (int)oldval;
}
# else
inline static int GC_test_and_set(volatile unsigned int *addr) {
int oldval;
int temp = 1; /* locked value */
@ -172,12 +191,13 @@
: "cr0","memory");
return oldval;
}
# define GC_TEST_AND_SET_DEFINED
inline static void GC_clear(volatile unsigned int *addr) {
__asm__ __volatile__("lwsync" : : : "memory");
*(addr) = 0;
}
# define GC_CLEAR_DEFINED
# endif
# define GC_TEST_AND_SET_DEFINED
inline static void GC_clear(volatile unsigned int *addr) {
__asm__ __volatile__("lwsync" : : : "memory");
*(addr) = 0;
}
# define GC_CLEAR_DEFINED
# endif
# if defined(ALPHA)
inline static int GC_test_and_set(volatile unsigned int * addr)
@ -298,6 +318,8 @@
# define GC_test_and_set(addr) test_and_set((void *)addr,1)
# endif
# else
# include <sgidefs.h>
# include <mutex.h>
# define GC_test_and_set(addr) __test_and_set32((void *)addr,1)
# define GC_clear(addr) __lock_release(addr);
# define GC_CLEAR_DEFINED
@ -370,7 +392,7 @@
# endif
# if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
&& !defined(GC_IRIX_THREADS) && !defined(GC_WIN32_THREADS)
&& !defined(GC_WIN32_THREADS)
# define NO_THREAD (pthread_t)(-1)
# include <pthread.h>
# if defined(PARALLEL_MARK)
@ -417,6 +439,29 @@
# if defined(POWERPC)
# if !defined(GENERIC_COMPARE_AND_SWAP)
# if CPP_WORDSZ == 64
/* Returns TRUE if the comparison succeeded. */
inline static GC_bool GC_compare_and_exchange(volatile GC_word *addr,
GC_word old, GC_word new_val)
{
unsigned long result, dummy;
__asm__ __volatile__(
"1:\tldarx %0,0,%5\n"
"\tcmpd %0,%4\n"
"\tbne 2f\n"
"\tstdcx. %3,0,%2\n"
"\tbne- 1b\n"
"\tsync\n"
"\tli %1, 1\n"
"\tb 3f\n"
"2:\tli %1, 0\n"
"3:\t\n"
: "=&r" (dummy), "=r" (result), "=p" (addr)
: "r" (new_val), "r" (old), "2"(addr)
: "cr0","memory");
return (GC_bool) result;
}
# else
/* Returns TRUE if the comparison succeeded. */
inline static GC_bool GC_compare_and_exchange(volatile GC_word *addr,
GC_word old, GC_word new_val)
@ -438,6 +483,7 @@
: "cr0","memory");
return (GC_bool) result;
}
# endif
# endif /* !GENERIC_COMPARE_AND_SWAP */
inline static void GC_memory_barrier()
{
@ -451,9 +497,18 @@
GC_word old, GC_word new_val)
{
unsigned long oldval;
__asm__ __volatile__("mov ar.ccv=%4 ;; cmpxchg8.rel %0=%1,%2,ar.ccv"
: "=r"(oldval), "=m"(*addr)
: "r"(new_val), "1"(*addr), "r"(old) : "memory");
# if CPP_WORDSZ == 32
__asm__ __volatile__(
"addp4 %0=0,%1\n"
"mov ar.ccv=%3 ;; cmpxchg4.rel %0=[%0],%2,ar.ccv"
: "=&r"(oldval)
: "r"(addr), "r"(new_val), "r"(old) : "memory");
# else
__asm__ __volatile__(
"mov ar.ccv=%3 ;; cmpxchg8.rel %0=[%1],%2,ar.ccv"
: "=r"(oldval)
: "r"(addr), "r"(new_val), "r"(old) : "memory");
# endif
return (oldval == old);
}
# endif /* !GENERIC_COMPARE_AND_SWAP */
@ -617,33 +672,6 @@
extern pthread_t GC_mark_lock_holder;
# endif
# endif /* GC_PTHREADS with linux_threads.c implementation */
# if defined(GC_IRIX_THREADS)
# include <pthread.h>
/* This probably should never be included, but I can't test */
/* on Irix anymore. */
# include <mutex.h>
extern volatile unsigned int GC_allocate_lock;
/* This is not a mutex because mutexes that obey the (optional) */
/* POSIX scheduling rules are subject to convoys in high contention */
/* applications. This is basically a spin lock. */
extern pthread_t GC_lock_holder;
extern void GC_lock(void);
/* Allocation lock holder. Only set if acquired by client through */
/* GC_call_with_alloc_lock. */
# define SET_LOCK_HOLDER() GC_lock_holder = pthread_self()
# define NO_THREAD (pthread_t)(-1)
# define UNSET_LOCK_HOLDER() GC_lock_holder = NO_THREAD
# define I_HOLD_LOCK() (pthread_equal(GC_lock_holder, pthread_self()))
# define LOCK() { if (GC_test_and_set(&GC_allocate_lock)) GC_lock(); }
# define UNLOCK() GC_clear(&GC_allocate_lock);
extern VOLATILE GC_bool GC_collecting;
# define ENTER_GC() \
{ \
GC_collecting = 1; \
}
# define EXIT_GC() GC_collecting = 0;
# endif /* GC_IRIX_THREADS */
# if defined(GC_WIN32_THREADS)
# if defined(GC_PTHREADS)
# include <pthread.h>

View file

@ -55,7 +55,7 @@
# endif
/* And one for FreeBSD: */
# if defined(__FreeBSD__)
# if defined(__FreeBSD__) && !defined(FREEBSD)
# define FREEBSD
# endif
@ -205,14 +205,16 @@
# if defined(_PA_RISC1_0) || defined(_PA_RISC1_1) || defined(_PA_RISC2_0) \
|| defined(hppa) || defined(__hppa__)
# define HP_PA
# ifndef LINUX
# if !defined(LINUX) && !defined(HPUX)
# define HPUX
# endif
# define mach_type_known
# endif
# if defined(__ia64) && defined(_HPUX_SOURCE)
# define IA64
# define HPUX
# ifndef HPUX
# define HPUX
# endif
# define mach_type_known
# endif
# if defined(__BEOS__) && defined(_X86_)
@ -242,7 +244,8 @@
# endif
# define mach_type_known
# endif
# if defined(LINUX) && (defined(powerpc) || defined(__powerpc__) || defined(powerpc64) || defined(__powerpc64__))
# if defined(LINUX) && (defined(powerpc) || defined(__powerpc__) || \
defined(powerpc64) || defined(__powerpc64__))
# define POWERPC
# define mach_type_known
# endif
@ -290,16 +293,15 @@
# define MACOS
# define mach_type_known
# endif
# if defined(macosx) || \
defined(__APPLE__) && defined(__MACH__) && defined(__ppc__)
# define DARWIN
# if defined(macosx) || (defined(__APPLE__) && defined(__MACH__))
# define DARWIN
# if defined(__ppc__) || defined(__ppc64__)
# define POWERPC
# define mach_type_known
# endif
# if defined(__APPLE__) && defined(__MACH__) && defined(__i386__)
# define DARWIN
# elif defined(__i386__)
# define I386
--> Not really supported, but at least we recognize it.
# endif
# endif
# if defined(NeXT) && defined(mc68000)
# define M68K
@ -492,6 +494,9 @@
/* POWERPC ==> IBM/Apple PowerPC */
/* (MACOS(<=9),DARWIN(incl.MACOSX),*/
/* LINUX, NETBSD, NOSYS variants) */
/* Handles 32 and 64-bit variants. */
/* AIX should be handled here, but */
/* that's called an RS6000. */
/* CRIS ==> Axis Etrax */
/* M32R ==> Renesas M32R */
@ -499,12 +504,12 @@
/*
* For each architecture and OS, the following need to be defined:
*
* CPP_WORD_SZ is a simple integer constant representing the word size.
* CPP_WORDSZ is a simple integer constant representing the word size.
* in bits. We assume byte addressibility, where a byte has 8 bits.
* We also assume CPP_WORD_SZ is either 32 or 64.
* We also assume CPP_WORDSZ is either 32 or 64.
* (We care about the length of pointers, not hardware
* bus widths. Thus a 64 bit processor with a C compiler that uses
* 32 bit pointers should use CPP_WORD_SZ of 32, not 64. Default is 32.)
* 32 bit pointers should use CPP_WORDSZ of 32, not 64. Default is 32.)
*
* MACH_TYPE is a string representation of the machine type.
* OS_TYPE is analogous for the OS.
@ -621,7 +626,8 @@
*/
# if defined(__GNUC__) && ((__GNUC__ >= 3) || \
(__GNUC__ == 2 && __GNUC_MINOR__ >= 8)) \
&& !defined(__INTEL_COMPILER)
&& !defined(__INTEL_COMPILER) \
&& !defined(__PATHCC__)
# define HAVE_BUILTIN_UNWIND_INIT
# endif
@ -745,7 +751,7 @@
# endif
# endif
# ifdef POWERPC
# if defined(POWERPC)
# define MACH_TYPE "POWERPC"
# ifdef MACOS
# define ALIGNMENT 2 /* Still necessary? Could it be 4? */
@ -758,7 +764,7 @@
# define DATAEND /* not needed */
# endif
# ifdef LINUX
# if (defined (powerpc64) || defined(__powerpc64__))
# if defined(__powerpc64__)
# define ALIGNMENT 8
# define CPP_WORDSZ 64
# else
@ -774,7 +780,12 @@
# define DATAEND (_end)
# endif
# ifdef DARWIN
# define ALIGNMENT 4
# ifdef __ppc64__
# define ALIGNMENT 8
# define CPP_WORDSZ 64
# else
# define ALIGNMENT 4
# endif
# define OS_TYPE "DARWIN"
# define DYNAMIC_LOADING
/* XXX: see get_end(3), get_etext() and get_end() should not be used.
@ -788,7 +799,7 @@
/* This is potentially buggy. It needs more testing. See the comments in
os_dep.c. It relies on threads to track writes. */
# ifdef GC_DARWIN_THREADS
# define MPROTECT_VDB
/* # define MPROTECT_VDB -- diabled for now. May work for some apps. */
# endif
# include <unistd.h>
# define GETPAGESIZE() getpagesize()
@ -938,12 +949,10 @@
extern ptr_t GC_SysVGetDataStart();
# ifdef __arch64__
# define DATASTART GC_SysVGetDataStart(0x100000, _etext)
/* libc_stack_end is not set reliably for sparc64 */
# define STACKBOTTOM ((ptr_t) 0x80000000000ULL)
# else
# define DATASTART GC_SysVGetDataStart(0x10000, _etext)
# define LINUX_STACKBOTTOM
# endif
# define LINUX_STACKBOTTOM
# endif
# ifdef OPENBSD
# define OS_TYPE "OPENBSD"
@ -1162,26 +1171,8 @@
# endif
# ifdef CYGWIN32
# define OS_TYPE "CYGWIN32"
extern int _data_start__[];
extern int _data_end__[];
extern int _bss_start__[];
extern int _bss_end__[];
/* For binutils 2.9.1, we have */
/* DATASTART = _data_start__ */
/* DATAEND = _bss_end__ */
/* whereas for some earlier versions it was */
/* DATASTART = _bss_start__ */
/* DATAEND = _data_end__ */
/* To get it right for both, we take the */
/* minumum/maximum of the two. */
# ifndef MAX
# define MAX(x,y) ((x) > (y) ? (x) : (y))
# endif
# ifndef MIN
# define MIN(x,y) ((x) < (y) ? (x) : (y))
# endif
# define DATASTART ((ptr_t) MIN(_data_start__, _bss_start__))
# define DATAEND ((ptr_t) MAX(_data_end__, _bss_end__))
# define DATASTART ((ptr_t)GC_DATASTART) /* From gc.h */
# define DATAEND ((ptr_t)GC_DATAEND)
# undef STACK_GRAN
# define STACK_GRAN 0x10000
# define HEURISTIC1
@ -1425,6 +1416,8 @@
# define CPP_WORDSZ 32
# define STACKBOTTOM ((ptr_t)((ulong)&errno))
# endif
# define USE_MMAP
# define USE_MMAP_ANON
/* From AIX linker man page:
_text Specifies the first location of the program.
_etext Specifies the first location after the program.
@ -1581,7 +1574,7 @@
# endif
# ifdef LINUX
# define OS_TYPE "LINUX"
# define STACKBOTTOM ((ptr_t) 0x120000000)
# define LINUX_STACKBOTTOM
# ifdef __ELF__
# define SEARCH_FOR_DATA_START
# define DYNAMIC_LOADING
@ -2118,7 +2111,8 @@
# define THREADS
# endif
# if defined(HP_PA) || defined(M88K) || defined(POWERPC) && !defined(DARWIN) \
# if defined(HP_PA) || defined(M88K) \
|| defined(POWERPC) && !defined(DARWIN) \
|| defined(LINT) || defined(MSWINCE) || defined(ARM32) || defined(CRIS) \
|| (defined(I386) && defined(__LCC__))
/* Use setjmp based hack to mark from callee-save registers. */
@ -2276,4 +2270,10 @@
#endif /* GC_PRIVATE_H */
#if defined(_AIX) && !defined(__GNUC__) && !defined(__STDC__)
/* IBMs xlc compiler doesn't appear to follow the convention of */
/* defining __STDC__ to be zero in extended mode. */
# define __STDC__ 0
#endif
# endif /* GCCONFIG_H */

View file

@ -4,7 +4,7 @@
# include "private/gc_priv.h"
# if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
&& !defined(GC_IRIX_THREADS) && !defined(GC_WIN32_THREADS)
&& !defined(GC_WIN32_THREADS)
#if defined(GC_DARWIN_THREADS)
# include "private/darwin_stop_world.h"

View file

@ -400,64 +400,87 @@ void GC_push_regs()
}
#endif /* !USE_GENERIC_PUSH_REGS && !USE_ASM_PUSH_REGS */
void GC_with_callee_saves_pushed(fn, arg)
void (*fn)();
ptr_t arg;
{
word dummy;
# if defined(USE_GENERIC_PUSH_REGS)
# ifdef HAVE_BUILTIN_UNWIND_INIT
/* This was suggested by Richard Henderson as the way to */
/* force callee-save registers and register windows onto */
/* the stack. */
__builtin_unwind_init();
# else /* !HAVE_BUILTIN_UNWIND_INIT */
# if defined(RS6000) || defined(POWERPC)
/* FIXME: RS6000 means AIX. */
/* This should probably be used in all Posix/non-gcc */
/* settings. We defer that change to minimize risk. */
ucontext_t ctxt;
getcontext(&ctxt);
# else
/* Generic code */
/* The idea is due to Parag Patel at HP. */
/* We're not sure whether he would like */
/* to be he acknowledged for it or not. */
jmp_buf regs;
register word * i = (word *) regs;
register ptr_t lim = (ptr_t)(regs) + (sizeof regs);
/* Setjmp doesn't always clear all of the buffer. */
/* That tends to preserve garbage. Clear it. */
for (; (char *)i < lim; i++) {
*i = 0;
}
# if defined(MSWIN32) || defined(MSWINCE) \
|| defined(UTS4) || defined(LINUX) || defined(EWS4800)
(void) setjmp(regs);
# else
(void) _setjmp(regs);
/* We don't want to mess with signals. According to */
/* SUSV3, setjmp() may or may not save signal mask. */
/* _setjmp won't, but is less portable. */
# endif
# endif /* !AIX ... */
# endif /* !HAVE_BUILTIN_UNWIND_INIT */
# else
# if defined(PTHREADS) && !defined(MSWIN32) /* !USE_GENERIC_PUSH_REGS */
/* We may still need this to save thread contexts. */
ucontext_t ctxt;
getcontext(&ctxt);
# else /* Shouldn't be needed */
ABORT("Unexpected call to GC_with_callee_saves_pushed");
# endif
# endif
# if (defined(SPARC) && !defined(HAVE_BUILTIN_UNWIND_INIT)) \
|| defined(IA64)
/* On a register window machine, we need to save register */
/* contents on the stack for this to work. The setjmp */
/* is probably not needed on SPARC, since pointers are */
/* only stored in windowed or scratch registers. It is */
/* needed on IA64, since some non-windowed registers are */
/* preserved. */
{
GC_save_regs_ret_val = GC_save_regs_in_stack();
/* On IA64 gcc, could use __builtin_ia64_flushrs() and */
/* __builtin_ia64_flushrs(). The latter will be done */
/* implicitly by __builtin_unwind_init() for gcc3.0.1 */
/* and later. */
}
# endif
fn(arg);
/* Strongly discourage the compiler from treating the above */
/* as a tail-call, since that would pop the register */
/* contents before we get a chance to look at them. */
GC_noop1((word)(&dummy));
}
#if defined(USE_GENERIC_PUSH_REGS)
void GC_generic_push_regs(cold_gc_frame)
ptr_t cold_gc_frame;
{
{
word dummy;
# ifdef HAVE_BUILTIN_UNWIND_INIT
/* This was suggested by Richard Henderson as the way to */
/* force callee-save registers and register windows onto */
/* the stack. */
__builtin_unwind_init();
# else /* !HAVE_BUILTIN_UNWIND_INIT */
/* Generic code */
/* The idea is due to Parag Patel at HP. */
/* We're not sure whether he would like */
/* to be he acknowledged for it or not. */
jmp_buf regs;
register word * i = (word *) regs;
register ptr_t lim = (ptr_t)(regs) + (sizeof regs);
/* Setjmp doesn't always clear all of the buffer. */
/* That tends to preserve garbage. Clear it. */
for (; (char *)i < lim; i++) {
*i = 0;
}
# if defined(POWERPC) || defined(MSWIN32) || defined(MSWINCE) \
|| defined(UTS4) || defined(LINUX) || defined(EWS4800)
(void) setjmp(regs);
# else
(void) _setjmp(regs);
/* We don't want to mess with signals. According to */
/* SUSV3, setjmp() may or may not save signal mask. */
/* _setjmp won't, but is less portable. */
# endif
# endif /* !HAVE_BUILTIN_UNWIND_INIT */
# if (defined(SPARC) && !defined(HAVE_BUILTIN_UNWIND_INIT)) \
|| defined(IA64)
/* On a register window machine, we need to save register */
/* contents on the stack for this to work. The setjmp */
/* is probably not needed on SPARC, since pointers are */
/* only stored in windowed or scratch registers. It is */
/* needed on IA64, since some non-windowed registers are */
/* preserved. */
{
GC_save_regs_ret_val = GC_save_regs_in_stack();
/* On IA64 gcc, could use __builtin_ia64_flushrs() and */
/* __builtin_ia64_flushrs(). The latter will be done */
/* implicitly by __builtin_unwind_init() for gcc3.0.1 */
/* and later. */
}
# endif
GC_push_current_stack(cold_gc_frame);
/* Strongly discourage the compiler from treating the above */
/* as a tail-call, since that would pop the register */
/* contents before we get a chance to look at them. */
GC_noop1((word)(&dummy));
}
GC_with_callee_saves_pushed(GC_push_current_stack, cold_gc_frame);
}
#endif /* USE_GENERIC_PUSH_REGS */

View file

@ -172,7 +172,8 @@ int obj_kind;
# endif /* REDIRECT_REALLOC */
/* The same thing, except caller does not hold allocation lock. */
/* Allocate memory such that only pointers to near the */
/* beginning of the object are considered. */
/* We avoid holding allocation lock while we clear memory. */
ptr_t GC_generic_malloc_ignore_off_page(lb, k)
register size_t lb;

View file

@ -858,9 +858,9 @@ mse * GC_steal_mark_stack(mse * low, mse * high, mse * local,
++top;
top -> mse_descr = descr;
top -> mse_start = p -> mse_start;
GC_ASSERT( top -> mse_descr & GC_DS_TAGS != GC_DS_LENGTH ||
top -> mse_descr < GC_greatest_plausible_heap_addr
- GC_least_plausible_heap_addr);
GC_ASSERT( (top -> mse_descr & GC_DS_TAGS) != GC_DS_LENGTH ||
top -> mse_descr < (ptr_t)GC_greatest_plausible_heap_addr
- (ptr_t)GC_least_plausible_heap_addr);
/* If this is a big object, count it as */
/* size/256 + 1 objects. */
++i;

View file

@ -368,8 +368,11 @@ ptr_t p;
ptr_t GC_approx_sp()
{
word dummy;
VOLATILE word dummy;
dummy = 42; /* Force stack to grow if necessary. Otherwise the */
/* later accesses might cause the kernel to think we're */
/* doing something wrong. */
# ifdef _MSC_VER
# pragma warning(disable:4172)
# endif

View file

@ -698,7 +698,7 @@ ptr_t GC_get_stack_base()
# if defined(SUNOS5SIGS) || defined(IRIX5) || defined(OSF1) \
|| defined(HURD) || defined(NETBSD)
static struct sigaction old_segv_act;
# if defined(_sigargs) /* !Irix6.x */ || defined(HPUX) \
# if defined(IRIX5) || defined(HPUX) \
|| defined(HURD) || defined(NETBSD)
static struct sigaction old_bus_act;
# endif
@ -731,9 +731,11 @@ ptr_t GC_get_stack_base()
/* and setting a handler at the same time. */
(void) sigaction(SIGSEGV, 0, &old_segv_act);
(void) sigaction(SIGSEGV, &act, 0);
(void) sigaction(SIGBUS, 0, &old_bus_act);
(void) sigaction(SIGBUS, &act, 0);
# else
(void) sigaction(SIGSEGV, &act, &old_segv_act);
# if defined(IRIX5) && defined(_sigargs) /* Irix 5.x, not 6.x */ \
# if defined(IRIX5) \
|| defined(HPUX) || defined(HURD) || defined(NETBSD)
/* Under Irix 5.x or HP/UX, we may get SIGBUS. */
/* Pthreads doesn't exist under Irix 5.x, so we */
@ -772,7 +774,7 @@ ptr_t GC_get_stack_base()
# if defined(SUNOS5SIGS) || defined(IRIX5) \
|| defined(OSF1) || defined(HURD) || defined(NETBSD)
(void) sigaction(SIGSEGV, &old_segv_act, 0);
# if defined(IRIX5) && defined(_sigargs) /* Irix 5.x, not 6.x */ \
# if defined(IRIX5) \
|| defined(HPUX) || defined(HURD) || defined(NETBSD)
(void) sigaction(SIGBUS, &old_bus_act, 0);
# endif
@ -950,7 +952,16 @@ ptr_t GC_get_stack_base()
} /* Otherwise it's not safe to add 16 bytes and we fall */
/* back to using /proc. */
# else
# ifdef SPARC
/* Older versions of glibc for 64-bit Sparc do not set
* this variable correctly, it gets set to either zero
* or one.
*/
if (__libc_stack_end != (ptr_t) (unsigned long)0x1)
return __libc_stack_end;
# else
return __libc_stack_end;
# endif
# endif
}
# endif
@ -1505,7 +1516,7 @@ void GC_register_data_segments()
# endif
# ifdef RS6000
# if 0 && defined(RS6000) /* We now use mmap */
/* The compiler seems to generate speculative reads one past the end of */
/* an allocated object. Hence we need to make sure that the page */
/* following the last heap page is also mapped. */
@ -3723,7 +3734,7 @@ static kern_return_t GC_forward_exception(
exception_behavior_t behavior;
thread_state_flavor_t flavor;
thread_state_data_t thread_state;
thread_state_t thread_state;
mach_msg_type_number_t thread_state_count = THREAD_STATE_MAX;
for(i=0;i<GC_old_exc_ports.count;i++)
@ -3784,13 +3795,19 @@ catch_exception_raise(
char *addr;
struct hblk *h;
int i;
#ifdef POWERPC
thread_state_flavor_t flavor = PPC_EXCEPTION_STATE;
mach_msg_type_number_t exc_state_count = PPC_EXCEPTION_STATE_COUNT;
ppc_exception_state_t exc_state;
#else
# if defined(POWERPC)
# if CPP_WORDSZ == 32
thread_state_flavor_t flavor = PPC_EXCEPTION_STATE;
mach_msg_type_number_t exc_state_count = PPC_EXCEPTION_STATE_COUNT;
ppc_exception_state_t exc_state;
# else
thread_state_flavor_t flavor = PPC_EXCEPTION_STATE64;
mach_msg_type_number_t exc_state_count = PPC_EXCEPTION_STATE64_COUNT;
ppc_exception_state64_t exc_state;
# endif
# else
# error FIXME for non-ppc darwin
#endif
# endif
if(exception != EXC_BAD_ACCESS || code[0] != KERN_PROTECTION_FAILURE) {
@ -3950,10 +3967,10 @@ kern_return_t catch_exception_raise_state_identity(
# if defined (DRSNX)
# include <sys/sparc/frame.h>
# else
# if defined(OPENBSD) || defined(NETBSD)
# if defined(OPENBSD)
# include <frame.h>
# else
# if defined(FREEBSD)
# if defined(FREEBSD) || defined(NETBSD)
# include <machine/frame.h>
# else
# include <sys/frame.h>
@ -3986,6 +4003,16 @@ kern_return_t catch_exception_raise_state_identity(
#if NARGS == 0 && NFRAMES % 2 == 0 /* No padding */ \
&& defined(GC_HAVE_BUILTIN_BACKTRACE)
#ifdef REDIRECT_MALLOC
/* Deal with possible malloc calls in backtrace by omitting */
/* the infinitely recursing backtrace. */
# ifdef THREADS
__thread /* If your compiler doesn't understand this */
/* you could use something like pthread_getspecific. */
# endif
GC_in_save_callers = FALSE;
#endif
void GC_save_callers (info)
struct callinfo info[NFRAMES];
{
@ -3995,10 +4022,21 @@ struct callinfo info[NFRAMES];
/* We retrieve NFRAMES+1 pc values, but discard the first, since it */
/* points to our own frame. */
# ifdef REDIRECT_MALLOC
if (GC_in_save_callers) {
info[0].ci_pc = (word)(&GC_save_callers);
for (i = 1; i < NFRAMES; ++i) info[i].ci_pc = 0;
return;
}
GC_in_save_callers = TRUE;
# endif
GC_ASSERT(sizeof(struct callinfo) == sizeof(void *));
npcs = backtrace((void **)tmp_info, NFRAMES + IGNORE_FRAMES);
BCOPY(tmp_info+IGNORE_FRAMES, info, (npcs - IGNORE_FRAMES) * sizeof(void *));
for (i = npcs - IGNORE_FRAMES; i < NFRAMES; ++i) info[i].ci_pc = 0;
# ifdef REDIRECT_MALLOC
GC_in_save_callers = FALSE;
# endif
}
#else /* No builtin backtrace; do it ourselves */

View file

@ -64,7 +64,8 @@ _GC_push_regs:
; PIC stuff, generated by GCC
.data
.picsymbol_stub
.section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
.align 2
L_GC_push_one$stub:
.indirect_symbol _GC_push_one
mflr r0
@ -73,12 +74,12 @@ L0$_GC_push_one:
mflr r11
addis r11,r11,ha16(L_GC_push_one$lazy_ptr-L0$_GC_push_one)
mtlr r0
lwz r12,lo16(L_GC_push_one$lazy_ptr-L0$_GC_push_one)(r11)
lwzu r12,lo16(L_GC_push_one$lazy_ptr-L0$_GC_push_one)(r11)
mtctr r12
addi r11,r11,lo16(L_GC_push_one$lazy_ptr-L0$_GC_push_one)
bctr
.data
.lazy_symbol_pointer
L_GC_push_one$lazy_ptr:
.indirect_symbol _GC_push_one
.long dyld_stub_binding_helper

View file

@ -1,8 +1,7 @@
#include "private/pthread_support.h"
#if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
&& !defined(GC_IRIX_THREADS) && !defined(GC_WIN32_THREADS) \
&& !defined(GC_DARWIN_THREADS) && !defined(GC_AIX_THREADS)
&& !defined(GC_WIN32_THREADS) && !defined(GC_DARWIN_THREADS)
#include <signal.h>
#include <semaphore.h>
@ -101,8 +100,32 @@ word GC_stop_count; /* Incremented at the beginning of GC_stop_world. */
sem_t GC_suspend_ack_sem;
void GC_suspend_handler_inner(ptr_t sig_arg);
#if defined(IA64) || defined(HP_PA)
extern void GC_with_callee_saves_pushed();
void GC_suspend_handler(int sig)
{
int old_errno = errno;
GC_with_callee_saves_pushed(GC_suspend_handler_inner, (ptr_t)(word)sig);
errno = old_errno;
}
#else
/* We believe that in all other cases the full context is already */
/* in the signal handler frame. */
void GC_suspend_handler(int sig)
{
int old_errno = errno;
GC_suspend_handler_inner((ptr_t)(word)sig);
errno = old_errno;
}
#endif
void GC_suspend_handler_inner(ptr_t sig_arg)
{
int sig = (int)(word)sig_arg;
int dummy;
pthread_t my_thread = pthread_self();
GC_thread me;
@ -369,9 +392,11 @@ void GC_stop_world()
}
}
for (i = 0; i < n_live_threads; i++) {
if (0 != (code = sem_wait(&GC_suspend_ack_sem))) {
GC_err_printf1("Sem_wait returned %ld\n", (unsigned long)code);
ABORT("sem_wait for handler failed");
while (0 != (code = sem_wait(&GC_suspend_ack_sem))) {
if (errno != EINTR) {
GC_err_printf1("Sem_wait returned %ld\n", (unsigned long)code);
ABORT("sem_wait for handler failed");
}
}
}
# ifdef PARALLEL_MARK

View file

@ -50,8 +50,7 @@
# include "private/pthread_support.h"
# if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
&& !defined(GC_IRIX_THREADS) && !defined(GC_WIN32_THREADS) \
&& !defined(GC_AIX_THREADS)
&& !defined(GC_WIN32_THREADS)
# if defined(GC_HPUX_THREADS) && !defined(USE_PTHREAD_SPECIFIC) \
&& !defined(USE_COMPILER_TLS)
@ -68,7 +67,8 @@
# endif
# if (defined(GC_DGUX386_THREADS) || defined(GC_OSF1_THREADS) || \
defined(GC_DARWIN_THREADS)) && !defined(USE_PTHREAD_SPECIFIC)
defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)) \
&& !defined(USE_PTHREAD_SPECIFIC)
# define USE_PTHREAD_SPECIFIC
# endif
@ -873,11 +873,12 @@ void GC_thr_init()
# if defined(GC_HPUX_THREADS)
GC_nprocs = pthread_num_processors_np();
# endif
# if defined(GC_OSF1_THREADS)
# if defined(GC_OSF1_THREADS) || defined(GC_AIX_THREADS)
GC_nprocs = sysconf(_SC_NPROCESSORS_ONLN);
if (GC_nprocs <= 0) GC_nprocs = 1;
# endif
# if defined(GC_FREEBSD_THREADS)
# if defined(GC_FREEBSD_THREADS) || defined(GC_IRIX_THREADS)
/* FIXME: For Irix, that's a ridiculous assumption. */
GC_nprocs = 1;
# endif
# if defined(GC_DARWIN_THREADS)
@ -1228,7 +1229,13 @@ WRAP_FUNC(pthread_create)(pthread_t *new_thread,
} else {
pthread_attr_getstacksize(attr, &stack_size);
}
GC_ASSERT(stack_size >= (8*HBLKSIZE*sizeof(word)));
# ifdef PARALLEL_MARK
GC_ASSERT(stack_size >= (8*HBLKSIZE*sizeof(word)));
# else
/* FreeBSD-5.3/Alpha: default pthread stack is 64K, */
/* HBLKSIZE=8192, sizeof(word)=8 */
GC_ASSERT(stack_size >= 65536);
# endif
/* Our threads may need to do some work for the GC. */
/* Ridiculously small threads won't work, and they */
/* probably wouldn't work anyway. */

View file

@ -248,8 +248,8 @@ static void stop_all_lwps()
for (i = 0; i < max_lwps; i++)
last_ids[i] = 0;
for (;;) {
if (syscall(SYS_ioctl, GC_main_proc_fd, PIOCSTATUS, &status) < 0)
ABORT("Main PIOCSTATUS failed");
if (syscall(SYS_ioctl, GC_main_proc_fd, PIOCSTATUS, &status) < 0)
ABORT("Main PIOCSTATUS failed");
if (status.pr_nlwp < 1)
ABORT("Invalid number of lwps returned by PIOCSTATUS");
if (status.pr_nlwp >= max_lwps) {
@ -262,7 +262,7 @@ static void stop_all_lwps()
for (i = 0; i < max_lwps; i++)
last_ids[i] = 0;
continue;
}
}
if (syscall(SYS_ioctl, GC_main_proc_fd, PIOCLWPIDS, GC_current_ids) < 0)
ABORT("PIOCLWPIDS failed");
changed = FALSE;

View file

@ -1367,6 +1367,10 @@ void check_heap_stats()
max_heap_sz = 11000000;
}
# endif
# ifndef ALIGN_DOUBLE
/* We end up needing more small object pages. */
max_heap_sz += 2000000;
# endif
# ifdef GC_DEBUG
max_heap_sz *= 2;
# ifdef SAVE_CALL_CHAIN

View file

@ -2,7 +2,7 @@
/* Eventually this one may become unnecessary. For now we need */
/* it to keep the old-style build process working. */
#define GC_TMP_VERSION_MAJOR 6
#define GC_TMP_VERSION_MINOR 4
#define GC_TMP_VERSION_MINOR 5
#define GC_TMP_ALPHA_VERSION GC_NOT_ALPHA
#ifndef GC_NOT_ALPHA

View file

@ -11,6 +11,7 @@
# undef pthread_create
# undef pthread_sigmask
# undef pthread_join
# undef pthread_detach
# undef dlopen
# define DEBUG_CYGWIN_THREADS 0
@ -185,7 +186,7 @@ static void GC_delete_thread(DWORD thread_id) {
/* Must still be in_use, since nobody else can store our thread_id. */
i++) {}
if (i > my_max) {
WARN("Removing nonexisiting thread %ld\n", (GC_word)thread_id);
WARN("Removing nonexistent thread %ld\n", (GC_word)thread_id);
} else {
GC_delete_gc_thread(thread_table+i);
}