Patches for building a static Kaffe (esp. in Linux)

David Young dyoung at mork.uni.uiuc.edu
Thu Aug 13 17:46:44 PDT 1998


	I've built a static version of Kaffe for the purpose of profiling it.
(It doesn't look like profiling works quite right on a dynamically linked
Kaffe.) I'm using Linux 2.0.34 from the RedHat distribution.

	Here are some problems I encountered and their solutions:

	In kaffe/kaffe/Makefile, the LIBS variable needs to have -ljpeg
added to it. Also, libmanagement.a and libawt.a are in clib/management/
and clib/awt/, respectively, not clib/math/. Apparently one has to
make more lasting changes in some other file, though. Changes to
kaffe/kaffe/Makefile evaporate whenever one makes distclean.

	There are some compilation warnings that Transvirtual might or might
not be aware of. They don't appear to be the least bit serious but a
project that compiles without warnings inspires confidence in timid
users like me. =)

./systems/unix-jthreads/internal.c:436: warning: initialization from
incompatible pointer type

exception.c: In function `dispatchException':
exception.c:237: warning: `noreturn' function does return

	Lastly, the file clib/native/external_wrappers.h seems to be out of
date. This is how I changed it so that I could compile a statically-linked
Kaffe:

--- external_wrappers.h	Tue Jul 14 00:34:27 1998
+++ /home/dyoung/kaffe-1.0.b1/libraries/clib/native/external_wrappers.h	Thu Aug 13 18:19:25 1998
@@ -24,7 +24,7 @@
 KAFFE_NATIVE(java_lang_Class_newInstance)
 KAFFE_NATIVE(java_lang_Class_getSuperclass)
 KAFFE_NATIVE(java_lang_Class_getInterfaces)
-KAFFE_NATIVE(java_lang_Class_getClassLoader)
+KAFFE_NATIVE(java_lang_Class_getClassLoader0)
 KAFFE_NATIVE(java_lang_Class_isInterface)
 KAFFE_NATIVE(java_lang_Class_isPrimitive)
 KAFFE_NATIVE(java_lang_Class_isArray)
@@ -45,8 +45,7 @@
 KAFFE_NATIVE(java_lang_ClassLoader_defineClass0)
 KAFFE_NATIVE(java_lang_ClassLoader_resolveClass0)
 KAFFE_NATIVE(java_lang_ClassLoader_findSystemClass0)
-KAFFE_NATIVE(java_lang_ClassLoader_getSystemResourceAsStream0)
-KAFFE_NATIVE(java_lang_ClassLoader_getSystemResourceAsName0)
+KAFFE_NATIVE(java_lang_ClassLoader_getSystemResourceAsBytes0)
 KAFFE_NATIVE(java_lang_Compiler_initialize)
 KAFFE_NATIVE(java_lang_Compiler_compileClass)
 KAFFE_NATIVE(java_lang_Compiler_compileClasses)
@@ -55,7 +54,6 @@
 KAFFE_NATIVE(java_lang_Compiler_disable)
 KAFFE_NATIVE(java_lang_reflect_Constructor_getModifiers)
 KAFFE_NATIVE(Java_java_lang_reflect_Constructor_newInstance)
-KAFFE_NATIVE(java_text_DateFormat_format0)
 KAFFE_NATIVE(java_lang_Double_toString)
 KAFFE_NATIVE(java_lang_Double_valueOf0)
 KAFFE_NATIVE(java_lang_Double_valueOf)
@@ -134,7 +132,7 @@
 KAFFE_NATIVE(java_lang_Object_notifyAll)
 KAFFE_NATIVE(java_lang_Object_notify)
 KAFFE_NATIVE(java_lang_Object_clone)
-KAFFE_NATIVE(java_lang_Object_wait)
+KAFFE_NATIVE(java_lang_Object_wait0)
 KAFFE_NATIVE(java_io_ObjectInputStream_loadClass0)
 KAFFE_NATIVE(java_io_ObjectInputStream_inputClassFields)
 KAFFE_NATIVE(java_io_ObjectInputStream_allocateNewObject)
@@ -188,7 +186,7 @@
 KAFFE_NATIVE(java_lang_System_identityHashCode)
 KAFFE_NATIVE(java_lang_Thread_currentThread)
 KAFFE_NATIVE(java_lang_Thread_yield)
-KAFFE_NATIVE(java_lang_Thread_sleep)
+KAFFE_NATIVE(java_lang_Thread_sleep0)
 KAFFE_NATIVE(java_lang_Thread_start)
 KAFFE_NATIVE(java_lang_Thread_isAlive)
 KAFFE_NATIVE(java_lang_Thread_countStackFrames)
@@ -201,10 +199,11 @@
 KAFFE_NATIVE(java_lang_Thread_finalize0)
 KAFFE_NATIVE(java_lang_Throwable_fillInStackTrace)
 KAFFE_NATIVE(java_lang_Throwable_printStackTrace0)
-KAFFE_NATIVE(java_lang_UNIXProcess_forkAndExec)
-KAFFE_NATIVE(java_lang_UNIXProcess_destroy)
-KAFFE_NATIVE(java_lang_UNIXProcess_run)
-KAFFE_NATIVE(java_lang_UNIXProcess_notifyReaders)
+KAFFE_NATIVE(kaffe_lang_UNIXProcess_forkAndExec)
+KAFFE_NATIVE(kaffe_lang_UNIXProcess_destroy)
+KAFFE_NATIVE(kaffe_lang_UNIXProcess_run)
+KAFFE_NATIVE(kaffe_lang_UNIXProcess_notifyReaders)
+KAFFE_NATIVE(Java_kaffe_io_CharToByteDefault_convert)
 #if defined(DEBUG)
 /*
  * Tests to make sure our sysdepCallMethod macros work, should help

-- 
David Young * dcy2 cornell edu


More information about the kaffe mailing list