libtoolized GC library. See ChangeLog for details.

Also a couple bug fixes:
	* dyn_load.c (GC_FirstDLOpenedLinkMap): Declare _DYNAMIC as
	`weak'.
	* misc.c (GC_init_inner): If QUICK_THREADS defined, compute
	GC_stackbottom.

From-SVN: r26650
This commit is contained in:
Tom Tromey 1999-04-26 14:15:05 +00:00 committed by Tom Tromey
parent 01656b25ec
commit 66deb2be59
8 changed files with 1098 additions and 139 deletions

View File

@ -1,5 +1,36 @@
1999-04-26 Tom Tromey <tromey@cygnus.com>
* dyn_load.c (GC_FirstDLOpenedLinkMap): Declare _DYNAMIC as
`weak'.
1999-04-23 Tom Tromey <tromey@cygnus.com>
* Makefile.in, configure: Rebuilt.
* Makefile.am (EXTRA_LIBRARIES): Mention libgcjgc.la.
(libgcjgc_la_SOURCES): Renamed.
(libgcjgc_la_LIBADD): Likewise.
(libgcjgc_la_DEPENDENCIES): Likewise.
(EXTRA_libgcjgc_la_SOURCES): Likewise.
(gctest_LDADD): Use libgcjgc.la.
(all_objs): Mention libgcj_la_OBJECTS.
(EXTRA_LTLIBRARIES): Renamed.
(toollib_LTLIBRARIES): Likewise.
(libgcjgc_la_LDFLAGS): New macro
(toolexecdir): Renamed.
(toolexeclibdir): Likewise.
(toolexeclib_LTLIBRARIES): Likewise.
(LTCOMPILE): Renamed; added libtool invocation.
(LINK): Added libtool invocation.
(.s.o): use LTCOMPILE.
* configure.in: Call AM_PROG_LIBTOOL.
(target_all): Set to libgcjgc.la.
Mention `.lo' forms of object files.
1999-04-21 Tom Tromey <tromey@cygnus.com>
* misc.c (GC_init_inner): If QUICK_THREADS defined, compute
GC_stackbottom.
* os_dep.c: glibc 2.1 requires asm/sigcontext.h, not
sigcontext.h. From Matthias Klose <doko@itso.de>.

View File

@ -14,13 +14,12 @@ MULTISUBDIR =
MULTIDO = true
MULTICLEAN = true
tooldir = $(exec_prefix)/$(target_alias)
toollibdir = $(tooldir)/lib$(MULTISUBDIR)
toolexecdir = $(exec_prefix)/$(target_alias)
toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
## FIXME: when native, use libtool to provide shared libraries.
toollib_LIBRARIES = $(target_all)
EXTRA_LIBRARIES = libgcjgc.a
libgcjgc_a_SOURCES = allchblk.c alloc.c blacklst.c checksums.c \
toolexeclib_LTLIBRARIES = $(target_all)
EXTRA_LTLIBRARIES = libgcjgc.la
libgcjgc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c \
config.h dbg_mlc.c dyn_load.c finalize.c gc.h gc_alloc.h gc_cpp.h \
gc_hdrs.h gc_mark.h gc_priv.h gc_private.h gc_typed.h headers.c \
irix_threads.c linux_threads.c malloc.c mallocx.c mark.c mark_rts.c \
@ -28,10 +27,11 @@ misc.c new_hblk.c obj_map.c os_dep.c pcr_interface.c ptr_chck.c \
quick_threads.c real_malloc.c reclaim.c solaris_pthreads.c \
solaris_threads.c solaris_threads.h stubborn.c typd_mlc.c version.h \
weakpointer.h
libgcjgc_a_LIBADD = @addobjs@
libgcjgc_a_DEPENDENCIES = @addobjs@
libgcjgc_la_LIBADD = @addobjs@
libgcjgc_la_DEPENDENCIES = @addobjs@
libgcjgc_la_LDFLAGS = -release $(VERSION) -rpath $(toolexeclibdir)
EXTRA_libgcjgc_a_SOURCES = alpha_mach_dep.s mips_sgi_mach_dep.s \
EXTRA_libgcjgc_la_SOURCES = alpha_mach_dep.s mips_sgi_mach_dep.s \
mips_ultrix_mach_dep.s rs6000_mach_dep.s sparc_mach_dep.s \
sparc_sunos4_mach_dep.s mach_dep.c ecos.cc
@ -40,22 +40,23 @@ AM_CFLAGS = @BOEHM_GC_CFLAGS@
check_PROGRAMS = gctest
gctest_SOURCES = test.c
gctest_LDADD = ./libgcjgc.a
gctest_LDADD = ./libgcjgc.la
## FIXME: relies on internal code generated by automake.
all_objs = @addobjs@ $(libgcjgc_a_OBJECTS)
all_objs = @addobjs@ $(libgcjgc_la_OBJECTS)
$(all_objs) : config.h gc_priv.h gc_hdrs.h gc.h gc_mark.h
## FIXME: we shouldn't have to do this, but automake forces us to.
.s.o:
$(CC) -x assembler-with-cpp $(DEFS) $(INCLUDES) $(CPPFLAGS) $(BOEHM_GC_CFLAGS) \
$(MY_CFLAGS) -c $<
$(LTCOMPILE) -x assembler-with-cpp -c $<
## We have our own definition of COMPILE because we want to use our
## We have our own definition of LTCOMPILE because we want to use our
## CFLAGS, not those passed in from the top level make.
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(MY_CFLAGS) $(BOEHM_GC_CFLAGS)
LINK = $(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LDFLAGS) -o $@
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(MY_CFLAGS) $(BOEHM_GC_CFLAGS)
LINK = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LDFLAGS) -o $@
AM_CFLAGS = @BOEHM_GC_CFLAGS@

View File

@ -71,11 +71,16 @@ CPP = @CPP@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXINCLUDES = @CXXINCLUDES@
DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
INCLUDES = @INCLUDES@
LD = @LD@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MY_CFLAGS = @MY_CFLAGS@
NM = @NM@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
@ -93,12 +98,12 @@ MULTISUBDIR =
MULTIDO = true
MULTICLEAN = true
tooldir = $(exec_prefix)/$(target_alias)
toollibdir = $(tooldir)/lib$(MULTISUBDIR)
toolexecdir = $(exec_prefix)/$(target_alias)
toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
toollib_LIBRARIES = $(target_all)
EXTRA_LIBRARIES = libgcjgc.a
libgcjgc_a_SOURCES = allchblk.c alloc.c blacklst.c checksums.c \
toolexeclib_LTLIBRARIES = $(target_all)
EXTRA_LTLIBRARIES = libgcjgc.la
libgcjgc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c \
config.h dbg_mlc.c dyn_load.c finalize.c gc.h gc_alloc.h gc_cpp.h \
gc_hdrs.h gc_mark.h gc_priv.h gc_private.h gc_typed.h headers.c \
irix_threads.c linux_threads.c malloc.c mallocx.c mark.c mark_rts.c \
@ -107,10 +112,11 @@ quick_threads.c real_malloc.c reclaim.c solaris_pthreads.c \
solaris_threads.c solaris_threads.h stubborn.c typd_mlc.c version.h \
weakpointer.h
libgcjgc_a_LIBADD = @addobjs@
libgcjgc_a_DEPENDENCIES = @addobjs@
libgcjgc_la_LIBADD = @addobjs@
libgcjgc_la_DEPENDENCIES = @addobjs@
libgcjgc_la_LDFLAGS = -release $(VERSION) -rpath $(toolexeclibdir)
EXTRA_libgcjgc_a_SOURCES = alpha_mach_dep.s mips_sgi_mach_dep.s \
EXTRA_libgcjgc_la_SOURCES = alpha_mach_dep.s mips_sgi_mach_dep.s \
mips_ultrix_mach_dep.s rs6000_mach_dep.s sparc_mach_dep.s \
sparc_sunos4_mach_dep.s mach_dep.c ecos.cc
@ -121,12 +127,15 @@ AM_CFLAGS = @BOEHM_GC_CFLAGS@
check_PROGRAMS = gctest
gctest_SOURCES = test.c
gctest_LDADD = ./libgcjgc.a
gctest_LDADD = ./libgcjgc.la
all_objs = @addobjs@ $(libgcjgc_a_OBJECTS)
all_objs = @addobjs@ $(libgcjgc_la_OBJECTS)
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(MY_CFLAGS) $(BOEHM_GC_CFLAGS)
LINK = $(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LDFLAGS) -o $@
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(MY_CFLAGS) $(BOEHM_GC_CFLAGS)
LINK = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LDFLAGS) -o $@
# Work around what appears to be a GNU make bug handling MAKEFLAGS
# values defined in terms of make variables, as is the case for CC and
@ -176,28 +185,30 @@ MAKEOVERRIDES =
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_CLEAN_FILES =
LIBRARIES = $(toollib_LIBRARIES)
LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
DEFS = @DEFS@ -I. -I$(srcdir)
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
libgcjgc_a_OBJECTS = allchblk.o alloc.o blacklst.o checksums.o \
dbg_mlc.o dyn_load.o finalize.o headers.o irix_threads.o \
linux_threads.o malloc.o mallocx.o mark.o mark_rts.o misc.o new_hblk.o \
obj_map.o os_dep.o pcr_interface.o ptr_chck.o quick_threads.o \
real_malloc.o reclaim.o solaris_pthreads.o solaris_threads.o stubborn.o \
typd_mlc.o
libgcjgc_la_OBJECTS = allchblk.lo alloc.lo blacklst.lo checksums.lo \
dbg_mlc.lo dyn_load.lo finalize.lo headers.lo irix_threads.lo \
linux_threads.lo malloc.lo mallocx.lo mark.lo mark_rts.lo misc.lo \
new_hblk.lo obj_map.lo os_dep.lo pcr_interface.lo ptr_chck.lo \
quick_threads.lo real_malloc.lo reclaim.lo solaris_pthreads.lo \
solaris_threads.lo stubborn.lo typd_mlc.lo
check_PROGRAMS = gctest$(EXEEXT)
gctest_OBJECTS = test.o
gctest_DEPENDENCIES = ./libgcjgc.a
gctest_DEPENDENCIES = ./libgcjgc.la
gctest_LDFLAGS =
CXXFLAGS = @CXXFLAGS@
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
DIST_COMMON = README ChangeLog Makefile.am Makefile.in acinclude.m4 \
aclocal.m4 configure configure.in
@ -207,12 +218,12 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
SOURCES = $(libgcjgc_a_SOURCES) $(EXTRA_libgcjgc_a_SOURCES) $(gctest_SOURCES)
OBJECTS = $(libgcjgc_a_OBJECTS) $(gctest_OBJECTS)
SOURCES = $(libgcjgc_la_SOURCES) $(EXTRA_libgcjgc_la_SOURCES) $(gctest_SOURCES)
OBJECTS = $(libgcjgc_la_OBJECTS) $(gctest_OBJECTS)
all: all-redirect
.SUFFIXES:
.SUFFIXES: .S .c .cc .o .s
.SUFFIXES: .S .c .cc .lo .o .s
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
@ -228,36 +239,29 @@ config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
mostlyclean-toollibLIBRARIES:
mostlyclean-toolexeclibLTLIBRARIES:
clean-toollibLIBRARIES:
-test -z "$(toollib_LIBRARIES)" || rm -f $(toollib_LIBRARIES)
clean-toolexeclibLTLIBRARIES:
-test -z "$(toolexeclib_LTLIBRARIES)" || rm -f $(toolexeclib_LTLIBRARIES)
distclean-toollibLIBRARIES:
distclean-toolexeclibLTLIBRARIES:
maintainer-clean-toollibLIBRARIES:
maintainer-clean-toolexeclibLTLIBRARIES:
install-toollibLIBRARIES: $(toollib_LIBRARIES)
install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(toollibdir)
@list='$(toollib_LIBRARIES)'; for p in $$list; do \
$(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)
@list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(toollibdir)/$$p"; \
$(INSTALL_DATA) $$p $(DESTDIR)$(toollibdir)/$$p; \
else :; fi; \
done
@$(POST_INSTALL)
@list='$(toollib_LIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
echo " $(RANLIB) $(DESTDIR)$(toollibdir)/$$p"; \
$(RANLIB) $(DESTDIR)$(toollibdir)/$$p; \
echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(toolexeclibdir)/$$p"; \
$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(toolexeclibdir)/$$p; \
else :; fi; \
done
uninstall-toollibLIBRARIES:
uninstall-toolexeclibLTLIBRARIES:
@$(NORMAL_UNINSTALL)
list='$(toollib_LIBRARIES)'; for p in $$list; do \
rm -f $(DESTDIR)$(toollibdir)/$$p; \
list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(toolexeclibdir)/$$p; \
done
.c.o:
@ -276,10 +280,27 @@ distclean-compile:
maintainer-clean-compile:
libgcjgc.a: $(libgcjgc_a_OBJECTS) $(libgcjgc_a_DEPENDENCIES)
-rm -f libgcjgc.a
$(AR) cru libgcjgc.a $(libgcjgc_a_OBJECTS) $(libgcjgc_a_LIBADD)
$(RANLIB) libgcjgc.a
.c.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
.s.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
.S.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
maintainer-clean-libtool:
libgcjgc.la: $(libgcjgc_la_OBJECTS) $(libgcjgc_la_DEPENDENCIES)
$(LINK) $(libgcjgc_la_LDFLAGS) $(libgcjgc_la_OBJECTS) $(libgcjgc_la_LIBADD) $(LIBS)
mostlyclean-checkPROGRAMS:
@ -295,6 +316,8 @@ gctest$(EXEEXT): $(gctest_OBJECTS) $(gctest_DEPENDENCIES)
$(LINK) $(gctest_LDFLAGS) $(gctest_OBJECTS) $(gctest_LDADD) $(LIBS)
.cc.o:
$(CXXCOMPILE) -c $<
.cc.lo:
$(LTCXXCOMPILE) -c $<
tags: TAGS
@ -383,23 +406,23 @@ installcheck-am:
installcheck: installcheck-am
install-info-am:
install-info: install-info-am
install-exec-am:
install-exec-am: install-toolexeclibLTLIBRARIES
install-exec: install-exec-am
install-data-am: install-toollibLIBRARIES
install-data-am:
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-toollibLIBRARIES
uninstall-am: uninstall-toolexeclibLTLIBRARIES
uninstall: uninstall-am
all-am: Makefile $(LIBRARIES)
all-am: Makefile $(LTLIBRARIES)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(toollibdir)
$(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)
mostlyclean-generic:
@ -411,39 +434,44 @@ distclean-generic:
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-toollibLIBRARIES mostlyclean-compile \
mostlyclean-checkPROGRAMS mostlyclean-tags \
mostlyclean-generic
mostlyclean-am: mostlyclean-toolexeclibLTLIBRARIES mostlyclean-compile \
mostlyclean-libtool mostlyclean-checkPROGRAMS \
mostlyclean-tags mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-toollibLIBRARIES clean-compile clean-checkPROGRAMS \
clean-tags clean-generic mostlyclean-am
clean-am: clean-toolexeclibLTLIBRARIES clean-compile clean-libtool \
clean-checkPROGRAMS clean-tags clean-generic \
mostlyclean-am
clean: clean-am
distclean-am: distclean-toollibLIBRARIES distclean-compile \
distclean-checkPROGRAMS distclean-tags \
distclean-generic clean-am
distclean-am: distclean-toolexeclibLTLIBRARIES distclean-compile \
distclean-libtool distclean-checkPROGRAMS \
distclean-tags distclean-generic clean-am
-rm -f libtool
distclean: distclean-am
-rm -f config.status
maintainer-clean-am: maintainer-clean-toollibLIBRARIES \
maintainer-clean-compile maintainer-clean-checkPROGRAMS \
maintainer-clean-tags maintainer-clean-generic \
distclean-am
maintainer-clean-am: maintainer-clean-toolexeclibLTLIBRARIES \
maintainer-clean-compile maintainer-clean-libtool \
maintainer-clean-checkPROGRAMS maintainer-clean-tags \
maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
-rm -f config.status
.PHONY: mostlyclean-toollibLIBRARIES distclean-toollibLIBRARIES \
clean-toollibLIBRARIES maintainer-clean-toollibLIBRARIES \
uninstall-toollibLIBRARIES install-toollibLIBRARIES mostlyclean-compile \
distclean-compile clean-compile maintainer-clean-compile \
mostlyclean-checkPROGRAMS distclean-checkPROGRAMS clean-checkPROGRAMS \
.PHONY: mostlyclean-toolexeclibLTLIBRARIES \
distclean-toolexeclibLTLIBRARIES clean-toolexeclibLTLIBRARIES \
maintainer-clean-toolexeclibLTLIBRARIES \
uninstall-toolexeclibLTLIBRARIES install-toolexeclibLTLIBRARIES \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile mostlyclean-libtool distclean-libtool \
clean-libtool maintainer-clean-libtool mostlyclean-checkPROGRAMS \
distclean-checkPROGRAMS clean-checkPROGRAMS \
maintainer-clean-checkPROGRAMS tags mostlyclean-tags distclean-tags \
clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
check-am installcheck-am installcheck install-info-am install-info \
@ -455,8 +483,7 @@ maintainer-clean-generic clean mostlyclean distclean maintainer-clean
$(all_objs) : config.h gc_priv.h gc_hdrs.h gc.h gc_mark.h
.s.o:
$(CC) -x assembler-with-cpp $(DEFS) $(INCLUDES) $(CPPFLAGS) $(BOEHM_GC_CFLAGS) \
$(MY_CFLAGS) -c $<
$(LTCOMPILE) -x assembler-with-cpp -c $<
# Multilib support.
.PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \

251
boehm-gc/aclocal.m4 vendored
View File

@ -289,3 +289,254 @@ else
$1_FALSE=
fi])
# serial 25 AM_PROG_LIBTOOL
AC_DEFUN(AM_PROG_LIBTOOL,
[AC_REQUIRE([AM_ENABLE_SHARED])dnl
AC_REQUIRE([AM_ENABLE_STATIC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AM_PROG_LD])dnl
AC_REQUIRE([AM_PROG_NM])dnl
AC_REQUIRE([AC_PROG_LN_S])dnl
dnl
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
AC_SUBST(LIBTOOL)dnl
# Check for any special flags to pass to ltconfig.
libtool_flags=
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
test "$silent" = yes && libtool_flags="$libtool_flags --silent"
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case "$host" in
*-*-irix6*)
# Find out which ABI we are using.
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
LD="${LD-ld} -32"
;;
*N32*)
LD="${LD-ld} -n32"
;;
*64-bit*)
LD="${LD-ld} -64"
;;
esac
fi
rm -rf conftest*
;;
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
CFLAGS="$CFLAGS -belf"
;;
*-*-cygwin32*)
AM_SYS_LIBTOOL_CYGWIN32
;;
esac
# Actually configure libtool. ac_aux_dir is where install-sh is found.
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
DLLTOOL="$DLLTOOL" AS="$AS" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|| AC_MSG_ERROR([libtool configure failed])
# Redirect the config.log output again, so that the ltconfig log is not
# clobbered by the next message.
exec 5>>./config.log
])
# AM_ENABLE_SHARED - implement the --enable-shared flag
# Usage: AM_ENABLE_SHARED[(DEFAULT)]
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
# `yes'.
AC_DEFUN(AM_ENABLE_SHARED,
[define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(shared,
changequote(<<, >>)dnl
<< --enable-shared[=PKGS] build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT],
changequote([, ])dnl
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
for pkg in $enableval; do
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
IFS="$ac_save_ifs"
;;
esac],
enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
])
# AM_DISABLE_SHARED - set the default shared flag to --disable-shared
AC_DEFUN(AM_DISABLE_SHARED,
[AM_ENABLE_SHARED(no)])
# AM_DISABLE_STATIC - set the default static flag to --disable-static
AC_DEFUN(AM_DISABLE_STATIC,
[AM_ENABLE_STATIC(no)])
# AM_ENABLE_STATIC - implement the --enable-static flag
# Usage: AM_ENABLE_STATIC[(DEFAULT)]
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
# `yes'.
AC_DEFUN(AM_ENABLE_STATIC,
[define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(static,
changequote(<<, >>)dnl
<< --enable-static[=PKGS] build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT],
changequote([, ])dnl
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
for pkg in $enableval; do
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
IFS="$ac_save_ifs"
;;
esac],
enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
])
# AM_PROG_LD - find the path to the GNU or non-GNU linker
AC_DEFUN(AM_PROG_LD,
[AC_ARG_WITH(gnu-ld,
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
AC_REQUIRE([AC_PROG_CC])
ac_prog=ld
if test "$ac_cv_prog_gcc" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
AC_MSG_CHECKING([for ld used by GCC])
ac_prog=`($CC -print-prog-name=ld) 2>&5`
case "$ac_prog" in
# Accept absolute paths.
changequote(,)dnl
/* | [A-Za-z]:\\*)
changequote([,])dnl
test -z "$LD" && LD="$ac_prog"
;;
"")
# If it fails, then pretend we aren't using GCC.
ac_prog=ld
;;
*)
# If it is relative, then search for the first ld in PATH.
with_gnu_ld=unknown
;;
esac
elif test "$with_gnu_ld" = yes; then
AC_MSG_CHECKING([for GNU ld])
else
AC_MSG_CHECKING([for non-GNU ld])
fi
AC_CACHE_VAL(ac_cv_path_LD,
[if test -z "$LD"; then
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog"; then
ac_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
test "$with_gnu_ld" != no && break
else
test "$with_gnu_ld" != yes && break
fi
fi
done
IFS="$ac_save_ifs"
else
ac_cv_path_LD="$LD" # Let the user override the test with a path.
fi])
LD="$ac_cv_path_LD"
if test -n "$LD"; then
AC_MSG_RESULT($LD)
else
AC_MSG_RESULT(no)
fi
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
AC_SUBST(LD)
AM_PROG_LD_GNU
])
AC_DEFUN(AM_PROG_LD_GNU,
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
ac_cv_prog_gnu_ld=yes
else
ac_cv_prog_gnu_ld=no
fi])
])
# AM_PROG_NM - find the path to a BSD-compatible name lister
AC_DEFUN(AM_PROG_NM,
[AC_MSG_CHECKING([for BSD-compatible nm])
AC_CACHE_VAL(ac_cv_path_NM,
[if test -n "$NM"; then
# Let the user override the test.
ac_cv_path_NM="$NM"
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/nm; then
# Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
ac_cv_path_NM="$ac_dir/nm -B"
elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
ac_cv_path_NM="$ac_dir/nm -p"
else
ac_cv_path_NM="$ac_dir/nm"
fi
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
fi])
NM="$ac_cv_path_NM"
AC_MSG_RESULT([$NM])
AC_SUBST(NM)
])
# AM_SYS_LIBTOOL_CYGWIN32 - find tools needed on cygwin32
AC_DEFUN(AM_SYS_LIBTOOL_CYGWIN32,
[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(AS, as, false)
])

731
boehm-gc/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -9,6 +9,8 @@ AC_CANONICAL_SYSTEM
BOEHM_CONFIGURE(.)
AM_PROG_LIBTOOL
dnl We use these options to decide which functions to include.
AC_ARG_WITH(target-subdir,
[ --with-target-subdir=SUBDIR Configuring with a cross compiler])
@ -95,7 +97,7 @@ changequote([,])
GC=boehm)
target_all=
if test "$GC" = "boehm"; then
target_all=libgcjgc.a
target_all=libgcjgc.la
fi
AC_SUBST(target_all)
@ -117,7 +119,7 @@ case "$TARGET_ECOS" in
*)
AC_DEFINE(ECOS)
CXXINCLUDES="-I${TARGET_ECOS}/include"
addobjs="$addobjs ecos.o"
addobjs="$addobjs ecos.lo"
;;
esac
AC_SUBST(CXX)
@ -128,10 +130,10 @@ AC_SUBST(CXXINCLUDES)
machdep=
case "$host" in
alpha-*-*)
machdep="alpha_mach_dep.o"
machdep="alpha_mach_dep.lo"
;;
mipstx39-*-elf*)
machdep="mips_ultrix_mach_dep.o"
machdep="mips_ultrix_mach_dep.lo"
AC_DEFINE(STACKBASE, __stackbase)
AC_DEFINE(DATASTART_IS_ETEXT)
;;
@ -140,7 +142,7 @@ case "$host" in
;;
esac
if test x"$machdep" = x; then
machdep="mach_dep.o"
machdep="mach_dep.lo"
fi
addobjs="$addobjs $machdep"
AC_SUBST(addobjs)

View File

@ -284,6 +284,11 @@ void GC_register_dynamic_libraries()
static struct link_map *
GC_FirstDLOpenedLinkMap()
{
#ifdef __GNUC__
/* On some Linux systems, `_DYNAMIC' will not be defined when a
static link is done. */
# pragma weak _DYNAMIC
#endif
extern ElfW(Dyn) _DYNAMIC[];
ElfW(Dyn) *dp;
struct r_debug *r;

View File

@ -445,7 +445,8 @@ void GC_init_inner()
GC_thr_init();
# endif
# if !defined(THREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) \
|| defined(IRIX_THREADS) || defined(LINUX_THREADS)
|| defined(IRIX_THREADS) || defined(LINUX_THREADS) \
|| defined (QUICK_THREADS)
if (GC_stackbottom == 0) {
GC_stackbottom = GC_get_stack_base();
}