This is the mail archive of the
java-patches@sources.redhat.com
mailing list for the Java project.
PATCH: libgcj -vs- libstdc++-v3
- To: java-patches at sourceware dot cygnus dot com
- Subject: PATCH: libgcj -vs- libstdc++-v3
- From: Bryce McKinlay <bryce at albatross dot co dot nz>
- Date: Fri, 13 Oct 2000 14:28:53 +1300
- CC: Olivier Louchart-Fletcher <olivier dot louchart at netregistry dot au dot com>
With this patch I have built a working libgcj against a new compiler
configured with "--enable-libstdcxx-v3"
libgcj won't work with compilers configured with the "old" libstdc++ any
more, unless we link libgcj against libstdc++, because the
"old" libstdc++ doesn't have a separate libsupc++ at all.
A better fix to the explicit -lsupc++ would be to change the gcj front
end to always implicitly -lsupc++ when linking? Is there any potential
disadvantage to doing that?
regards
[ bryce ]
2000-10-13 Bryce McKinlay <bryce@albatross.co.nz>
* exception.cc: Don't #include "exception".
(_Jv_eh_alloc): Call abort (), not terminate (), if malloc fails.
* Makefile.am (libgcj_la_LDFLAGS): Link in libsupc++.
Index: Makefile.am
===================================================================
RCS file: /cvs/java/libgcj/libjava/Makefile.am,v
retrieving revision 1.91
diff -u -r1.91 Makefile.am
--- Makefile.am 2000/10/05 23:57:16 1.91
+++ Makefile.am 2000/10/13 01:11:56
@@ -124,7 +124,7 @@
$(c_files) $(GCOBJS) $(THREADOBJS) $(LIBLTDL)
libgcj_la_LIBADD = $(javao_files) $(nat_files) $(c_files) $(GCOBJS) \
$(THREADOBJS) $(libffi_files) $(LIBLTDL)
-libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) \
+libgcj_la_LDFLAGS = -lsupc++ -rpath $(toolexeclibdir) \
## The mysterious backslash is consumed by make.
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
libgcj_la_LINK = $(LIBLINK)
Index: exception.cc
===================================================================
RCS file: /cvs/java/libgcj/libjava/exception.cc,v
retrieving revision 1.9
diff -u -r1.9 exception.cc
--- exception.cc 2000/03/15 22:03:19 1.9
+++ exception.cc 2000/10/13 01:11:57
@@ -10,7 +10,6 @@
#include <config.h>
-#include "exception"
#include <stddef.h>
#include <stdlib.h>
@@ -101,7 +100,7 @@
apparently can sometimes free() this value itself. */
java_eh_info *p = (java_eh_info *) malloc (sizeof (java_eh_info));
if (p == 0)
- terminate ();
+ abort ();
p->value = 0;
java_eh_info ** info_ptr = __get_eh_info ();