Linking with DOM
Per Bothner
per@bothner.com
Sat Apr 16 17:31:00 GMT 2005
Tom Tromey wrote:
> Per> (I am willing to switch to the new ABI if that is recommded.)
>
> Yeah, you'll probably want to.
>
> In order to support java.endorsed.dirs, we have to compile the DOM and
> other XML code BC. It doesn't really make sense for C++ ABI code to
> refer to BC ABI code.
So I tried remaking Kawa:
$ make GCJFLAGS='-g -findirect-dispatch'
I get:
../../libtool --mode=compile gcj -g -findirect-dispatch \
-I../.. -I./../.. -c \
Access.java Attribute.java AttrContainer.java ObjectType.java
ArrayType.java ClassType.java ConstantPool.java CpoolClass.java
CpoolEntry.java CpoolValue1.java CpoolValue2.java CpoolNameAndType.java
CpoolRef.java CpoolString.java CpoolUtf8.java Filter.java Location.java
Field.java Label.java IfState.java TryState.java SwitchState.java
Method.java CodeAttr.java ConstantValueAttr.java LineNumbersAttr.java
LocalVarsAttr.java InnerClassesAttr.java MiscAttr.java PrimType.java
Scope.java SourceDebugExtAttr.java SourceFileAttr.java Type.java
Variable.java VarEnumerator.java ZipArchive.java ZipLoader.java
ArrayClassLoader.java ClassFileInput.java ClassTypeWriter.java
ExceptionsAttr.java dump.java -o ../../bin/gnu-bytecode.lo
libtool: compile: gcj -g -findirect-dispatch -I../.. -I./../.. -c
Access.java Attribute.java AttrContainer.java ObjectType.java
ArrayType.java ClassType.java ConstantPool.java CpoolClass.java
CpoolEntry.java CpoolValue1.java CpoolValue2.java CpoolNameAndType.java
CpoolRef.java CpoolString.java CpoolUtf8.java Filter.java Location.java
Field.java Label.java IfState.java TryState.java SwitchState.java
Method.java CodeAttr.java ConstantValueAttr.java LineNumbersAttr.java
LocalVarsAttr.java InnerClassesAttr.java MiscAttr.java PrimType.java
Scope.java SourceDebugExtAttr.java SourceFileAttr.java Type.java
Variable.java VarEnumerator.java ZipArchive.java ZipLoader.java
ArrayClassLoader.java ClassFileInput.java ClassTypeWriter.java
ExceptionsAttr.java dump.java -fPIC -o ../../bin/.libs/gnu-bytecode.o
Type.java: In class 'gnu.bytecode.Type':
Type.java: In method '<clinit>()':
Type.java:393: error: final field 'byte_type' may not have been initialized
Type.java:395: error: final field 'short_type' may not have been initialized
Type.java:397: error: final field 'int_type' may not have been initialized
Type.java:399: error: final field 'long_type' may not have been initialized
Type.java:401: error: final field 'float_type' may not have been initialized
Type.java:403: error: final field 'double_type' may not have been
initialized
Type.java:405: error: final field 'boolean_type' may not have been
initialized
Type.java:407: error: final field 'char_type' may not have been initialized
Type.java:409: error: final field 'void_type' may not have been initialized
Type.java:426: error: final field 'neverReturnsType' may not have been
initialized
Type.java:430: error: final field 'nullType' may not have been initialized
Type.java:434: error: final field 'tostring_type' may not have been
initialized
Type.java:437: error: final field 'pointer_type' may not have been
initialized
Type.java:439: error: final field 'boolean_ctype' may not have been
initialized
Type.java:441: error: final field 'throwable_type' may not have been
initialized
Type.java:443: error: final field 'typeArray0' may not have been initialized
Type.java:444: error: final field 'toString_method' may not have been
initialized
Type.java:446: error: final field 'number_type' may not have been
initialized
Type.java:448: error: final field 'intValue_method' may not have been
initialized
Type.java:451: error: final field 'longValue_method' may not have been
initialized
Type.java:454: error: final field 'floatValue_method' may not have been
initialized
Type.java:457: error: final field 'doubleValue_method' may not have been
initialized
Type.java:460: error: final field 'booleanValue_method' may not have
been initialized
Type.java:463: error: final field 'java_lang_Class_type' may not have
been initialized
ClassType.java: In class 'gnu.bytecode.ClassType':
ClassType.java: In method '<clinit>()':
ClassType.java:50: error: final field 'noClasses' may not have been
initialized
Access.java: In class 'gnu.bytecode.Access':
Access.java: In method 'gnu.bytecode.Access.toString(int,char)':
Access.java:49: error: Incompatible type for declaration. Explicit cast
needed to convert 'int' to 'short'.
short mask
^
Access.java: In method '<clinit>()':
Access.java:30: error: final field 'CLASS_MODIFIERS' may not have been
initialized
Access.java:32: error: final field 'FIELD_MODIFIERS' may not have been
initialized
Access.java:35: error: final field 'METHOD_MODIFIERS' may not have been
initialized
1 error
make[1]: *** [../../bin/gnu-bytecode.lo] Error 1
make[1]: Leaving directory `/tmp/unmodified/gnu/bytecode'
make: *** [all-recursive] Error 1
Building without -findirect-dispatch works fine, with no warnings,
and creates a working Kawa.
Anything else I need besides -findirect-dispatch?
--
--Per Bothner
per@bothner.com http://per.bothner.com/
More information about the Java
mailing list