This is the mail archive of the
java-patches@sources.redhat.com
mailing list for the Java project.
[PATCH] Linking with proper libs when testing the boehm-gc.
- To: java-patches at sources dot redhat dot com
- Subject: [PATCH] Linking with proper libs when testing the boehm-gc.
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: Tue, 12 Dec 2000 12:36:38 -0800
- Cc: neil at daikokuya dot demon dot co dot uk
- Reply-to: apbianco at cygnus dot com
In response to this problem report:
http://gcc.gnu.org/ml/gcc-bugs/2000-12/msg00244.html
I'm checking this patch in. It's agreed not to be the ultimate
solution but will surely help.
./A
2000-12-11 Alexandre Petit-Bianco <apbianco@kazmo.drew.net>
* Makefile.am (gctest_LDADD): Added EXTRA_TEST_LIBS.
* configure.in (EXTRA_TEST_LIBS): Check for `dlopen' in -ldl and
set accordingly.
Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/egcs/boehm-gc/Makefile.am,v
retrieving revision 1.16
diff -u -p -r1.16 Makefile.am
--- Makefile.am 2000/09/30 09:54:21 1.16
+++ Makefile.am 2000/12/12 20:33:12
@@ -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
Index: configure.in
===================================================================
RCS file: /cvs/gcc/egcs/boehm-gc/configure.in,v
retrieving revision 1.19
diff -u -p -r1.19 configure.in
--- configure.in 2000/09/30 09:54:21 1.19
+++ configure.in 2000/12/12 20:33:12
@@ -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]>>,