This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Bootstrap failure caused by jvmti additions
- From: Mark Wielaard <mark at klomp dot org>
- To: Volker Reichelt <reichelt at igpm dot rwth-aachen dot de>
- Cc: Tom Tromey <tromey at redhat dot com>, java-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Sat, 05 Aug 2006 01:46:16 +0200
- Subject: Re: Bootstrap failure caused by jvmti additions
- References: <tkrat.548ac82b445a3919@igpm.rwth-aachen.de>
Hi,
On Fri, 2006-08-04 at 10:57 +0200, Volker Reichelt wrote:
> your patch http://gcc.gnu.org/ml/java-patches/2006-q3/msg00264.html
> broke bootstrap (at least on x86_64-unknown-linux-gnu):
>
> ranlib .libs/libgij.a
> creating libgij.la
> ./.libs/libgcj.so: undefined reference to `JvNumMethods(java::lang::Class*)'
> ./.libs/libgcj.so: undefined reference to `JvGetFirstMethod(java::lang::Class*)'
> collect2: ld returned 1 exit status
> make[5]: *** [jv-convert] Error 1
No idea if it is correct, but I am using the attached to get things to
compile again.
Cheers,
Mark
Index: jvmti.cc
===================================================================
--- jvmti.cc (revision 115934)
+++ jvmti.cc (working copy)
@@ -29,6 +29,8 @@
#include <java/util/HashMap.h>
#include <java/net/URL.h>
+#include <gcj/method.h>
+
extern struct JNINativeInterface _Jv_JNIFunctions;
struct _Jv_rawMonitorID
@@ -553,13 +555,10 @@
if (klass->isArray())
{
jclass comp = klass->getComponentType();
- jint base
- = (jint) _Jv_GetArrayElementFromElementType(NULL,
- klass->getComponentType());
// FIXME: correct for primitive types?
jint compSize = comp->size();
__JArray *array = (__JArray *) object;
- *result = base + array->length * compSize;
+ *result = klass->size() + array->length * compSize;
}
else
{