summaryrefslogtreecommitdiff
path: root/boehm-gc
diff options
context:
space:
mode:
authorapbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4>2000-12-12 20:52:54 +0000
committerapbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4>2000-12-12 20:52:54 +0000
commit1c9e0d10e988f3b96719e45729edef18148b6198 (patch)
treecc4c12662e02c0a04b6809bbcdcc93fd6fdec164 /boehm-gc
parentfdf60b099f792b909be950365ad9d8f0596eab64 (diff)
downloadgcc-1c9e0d10e988f3b96719e45729edef18148b6198.tar.gz
2000-12-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
* Makefile.am (gctest_LDADD): Added EXTRA_TEST_LIBS. * configure.in (EXTRA_TEST_LIBS): Check for `dlopen' in -ldl and set accordingly. * Makefile.in: Rebuilt. * configure: Likewise. (http://sources.redhat.com/ml/java-patches/2000-q4/msg00237.html) git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38208 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc')
-rw-r--r--boehm-gc/ChangeLog8
-rw-r--r--boehm-gc/Makefile.am2
-rw-r--r--boehm-gc/Makefile.in67
-rwxr-xr-xboehm-gc/configure43
-rw-r--r--boehm-gc/configure.in3
5 files changed, 66 insertions, 57 deletions
diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog
index eaa1f28748c..758a4d97817 100644
--- a/boehm-gc/ChangeLog
+++ b/boehm-gc/ChangeLog
@@ -1,3 +1,11 @@
+2000-12-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
+
+ * Makefile.am (gctest_LDADD): Added EXTRA_TEST_LIBS.
+ * configure.in (EXTRA_TEST_LIBS): Check for `dlopen' in -ldl and
+ set accordingly.
+ * Makefile.in: Rebuilt.
+ * configure: Likewise.
+
2000-12-10 Geoffrey Keating <geoffk@redhat.com>
* gcconfig.h: Add new case for powerpc EABI.
diff --git a/boehm-gc/Makefile.am b/boehm-gc/Makefile.am
index 263cdb6d096..f2286c4b2e9 100644
--- a/boehm-gc/Makefile.am
+++ b/boehm-gc/Makefile.am
@@ -45,7 +45,7 @@ AM_CFLAGS = @BOEHM_GC_CFLAGS@
check_PROGRAMS = gctest
gctest_SOURCES = test.c
-gctest_LDADD = ./libgcjgc.la $(THREADLIB)
+gctest_LDADD = ./libgcjgc.la $(THREADLIB) $(EXTRA_TEST_LIBS)
TESTS = gctest
diff --git a/boehm-gc/Makefile.in b/boehm-gc/Makefile.in
index c5f30936c5b..e12d68d709e 100644
--- a/boehm-gc/Makefile.in
+++ b/boehm-gc/Makefile.in
@@ -73,6 +73,7 @@ CXXCPP = @CXXCPP@
CXXINCLUDES = @CXXINCLUDES@
DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
+EXTRA_TEST_LIBS = @EXTRA_TEST_LIBS@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
INCLUDES = @INCLUDES@
@@ -101,27 +102,19 @@ MULTIDIRS =
MULTISUBDIR =
MULTIDO = true
MULTICLEAN = true
-@USE_LIBDIR_TRUE@toolexeclibdir = @USE_LIBDIR_TRUE@$(libdir)$(MULTISUBDIR)
-@USE_LIBDIR_FALSE@toolexeclibdir = @USE_LIBDIR_FALSE@$(toolexecdir)/lib$(MULTISUBDIR)
-@USE_LIBDIR_FALSE@toolexecdir = @USE_LIBDIR_FALSE@$(exec_prefix)/$(target_alias)
+@USE_LIBDIR_TRUE@toolexeclibdir = $(libdir)$(MULTISUBDIR)
+@USE_LIBDIR_FALSE@toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
+@USE_LIBDIR_FALSE@toolexecdir = $(exec_prefix)/$(target_alias)
toolexeclib_LTLIBRARIES = $(target_all)
EXTRA_LTLIBRARIES = libgcjgc.la
-libgcjgc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c \
-gcconfig.h dbg_mlc.c dyn_load.c finalize.c gc.h gc_alloc.h gc_cpp.h \
-gc_hdrs.h gc_mark.h gc_priv.h gc_private.h gc_typed.h gcj_mlc.c headers.c \
-hpux_irix_threads.c linux_threads.c malloc.c mallocx.c mark.c mark_rts.c \
-misc.c new_hblk.c obj_map.c os_dep.c pcr_interface.c ptr_chck.c \
-real_malloc.c reclaim.c solaris_pthreads.c solaris_threads.c \
-solaris_threads.h stubborn.c typd_mlc.c version.h weakpointer.h
+libgcjgc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c gcconfig.h dbg_mlc.c dyn_load.c finalize.c gc.h gc_alloc.h gc_cpp.h gc_hdrs.h gc_mark.h gc_priv.h gc_private.h gc_typed.h gcj_mlc.c headers.c hpux_irix_threads.c linux_threads.c malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c solaris_pthreads.c solaris_threads.c solaris_threads.h stubborn.c typd_mlc.c version.h weakpointer.h
libgcjgc_la_LIBADD = @addobjs@
libgcjgc_la_DEPENDENCIES = @addobjs@
libgcjgc_la_LDFLAGS = -version-info 1:1:0 -rpath $(toolexeclibdir)
-EXTRA_libgcjgc_la_SOURCES = alpha_mach_dep.s mips_sgi_mach_dep.s \
-mips_ultrix_mach_dep.s rs6000_mach_dep.s sparc_mach_dep.s \
-sparc_sunos4_mach_dep.s mach_dep.c ecos.cc
+EXTRA_libgcjgc_la_SOURCES = alpha_mach_dep.s mips_sgi_mach_dep.s mips_ultrix_mach_dep.s rs6000_mach_dep.s sparc_mach_dep.s sparc_sunos4_mach_dep.s mach_dep.c ecos.cc
AM_CXXFLAGS = @BOEHM_GC_CFLAGS@
@@ -130,58 +123,20 @@ AM_CFLAGS = @BOEHM_GC_CFLAGS@
check_PROGRAMS = gctest
gctest_SOURCES = test.c
-gctest_LDADD = ./libgcjgc.la $(THREADLIB)
+gctest_LDADD = ./libgcjgc.la $(THREADLIB) $(EXTRA_TEST_LIBS)
TESTS = gctest
all_objs = @addobjs@ $(libgcjgc_la_OBJECTS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(MY_CFLAGS) $(BOEHM_GC_CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(MY_CFLAGS) $(BOEHM_GC_CFLAGS)
LINK = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LDFLAGS) -o $@
# Work around what appears to be a GNU make bug handling MAKEFLAGS
# values defined in terms of make variables, as is the case for CC and
# friends when we are called from the top level Makefile.
-AM_MAKEFLAGS = \
- "AR_FLAGS=$(AR_FLAGS)" \
- "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
- "CFLAGS=$(CFLAGS)" \
- "CXXFLAGS=$(CXXFLAGS)" \
- "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
- "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
- "INSTALL=$(INSTALL)" \
- "INSTALL_DATA=$(INSTALL_DATA)" \
- "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
- "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
- "LDFLAGS=$(LDFLAGS)" \
- "LIBCFLAGS=$(LIBCFLAGS)" \
- "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
- "MAKE=$(MAKE)" \
- "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
- "PICFLAG=$(PICFLAG)" \
- "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
- "SHELL=$(SHELL)" \
- "EXPECT=$(EXPECT)" \
- "RUNTEST=$(RUNTEST)" \
- "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
- "exec_prefix=$(exec_prefix)" \
- "infodir=$(infodir)" \
- "libdir=$(libdir)" \
- "prefix=$(prefix)" \
- "tooldir=$(tooldir)" \
- "AR=$(AR)" \
- "AS=$(AS)" \
- "CC=$(CC)" \
- "CXX=$(CXX)" \
- "LD=$(LD)" \
- "LIBCFLAGS=$(LIBCFLAGS)" \
- "NM=$(NM)" \
- "PICFLAG=$(PICFLAG)" \
- "RANLIB=$(RANLIB)" \
- "DESTDIR=$(DESTDIR)"
+AM_MAKEFLAGS = "AR_FLAGS=$(AR_FLAGS)" "CC_FOR_BUILD=$(CC_FOR_BUILD)" "CFLAGS=$(CFLAGS)" "CXXFLAGS=$(CXXFLAGS)" "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" "INSTALL=$(INSTALL)" "INSTALL_DATA=$(INSTALL_DATA)" "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" "LDFLAGS=$(LDFLAGS)" "LIBCFLAGS=$(LIBCFLAGS)" "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" "MAKE=$(MAKE)" "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" "PICFLAG=$(PICFLAG)" "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" "SHELL=$(SHELL)" "EXPECT=$(EXPECT)" "RUNTEST=$(RUNTEST)" "RUNTESTFLAGS=$(RUNTESTFLAGS)" "exec_prefix=$(exec_prefix)" "infodir=$(infodir)" "libdir=$(libdir)" "prefix=$(prefix)" "tooldir=$(tooldir)" "AR=$(AR)" "AS=$(AS)" "CC=$(CC)" "CXX=$(CXX)" "LD=$(LD)" "LIBCFLAGS=$(LIBCFLAGS)" "NM=$(NM)" "PICFLAG=$(PICFLAG)" "RANLIB=$(RANLIB)" "DESTDIR=$(DESTDIR)"
CONFIG_STATUS_DEPENDENCIES = $(boehm_gc_basedir)/configure.host
@@ -221,7 +176,7 @@ aclocal.m4 configure configure.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = tar
+TAR = gtar
GZIP_ENV = --best
SOURCES = $(libgcjgc_la_SOURCES) $(EXTRA_libgcjgc_la_SOURCES) $(gctest_SOURCES)
OBJECTS = $(libgcjgc_la_OBJECTS) $(gctest_OBJECTS)
@@ -402,7 +357,7 @@ distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
+ cp -pr $$/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
diff --git a/boehm-gc/configure b/boehm-gc/configure
index edf9a4b043c..cd68c6b51e3 100755
--- a/boehm-gc/configure
+++ b/boehm-gc/configure
@@ -2656,6 +2656,48 @@ esac
echo "$ac_t""$THREADS" 1>&6
+echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
+echo "configure:2661: checking for dlopen in -ldl" >&5
+ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-ldl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2669 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen();
+
+int main() {
+dlopen()
+; return 0; }
+EOF
+if { (eval echo configure:2680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ EXTRA_TEST_LIBS="$EXTRA_TEST_LIBS -ldl"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+
# Check whether --enable-java-gc or --disable-java-gc was given.
if test "${enable_java_gc+set}" = set; then
enableval="$enable_java_gc"
@@ -3001,6 +3043,7 @@ s%@STRIP@%$STRIP%g
s%@LIBTOOL@%$LIBTOOL%g
s%@CXXCPP@%$CXXCPP%g
s%@THREADLIB@%$THREADLIB%g
+s%@EXTRA_TEST_LIBS@%$EXTRA_TEST_LIBS%g
s%@target_all@%$target_all%g
s%@INCLUDES@%$INCLUDES%g
s%@CXXINCLUDES@%$CXXINCLUDES%g
diff --git a/boehm-gc/configure.in b/boehm-gc/configure.in
index 70764c47343..ea23b5123e5 100644
--- a/boehm-gc/configure.in
+++ b/boehm-gc/configure.in
@@ -98,6 +98,9 @@ esac
AC_MSG_RESULT($THREADS)
AC_SUBST(THREADLIB)
+AC_CHECK_LIB(dl, dlopen, EXTRA_TEST_LIBS="$EXTRA_TEST_LIBS -ldl")
+AC_SUBST(EXTRA_TEST_LIBS)
+
AC_ARG_ENABLE(java-gc,
changequote(<<,>>)dnl
<< --enable-java-gc=TYPE choose garbage collector [boehm]>>,