Hi all,

I could succeessfully compile Kaffe with GCC 4.1.1 and it seems to run
correctly on Linux/x86. The platform is the development version toward
Fedora Core 6.

See the patch attached to this message. The patch is for around CVS
HEAD as of June 27.

With the patch, we can also build and run Kaffe on Cygwin. Note that
GTK+ in the current Cygwin is not new enough to support GTK peers of
Kaffe. The configure script requires the --disable-gtk-peer option.

On Cygwin, Kaffe can be compiled but it is not very stable. Small
programs run but medium-scale ones will not. Additionally, Jikes has
to be patched. Jikes 1.22 tweaks inode values returned by Cygwin but
the tweak is harmful today.

With GCC 4.1.1 on Linux/x86, the most serious problem was the return
value of __builtin_frame_address(0). The intrinsic function of GCC
4.1.1 returns %ebp - 12, not the very value of %ebp. This behaviour
seems to be specific to the argument 0. The argument 1 is also proper
for Kaffe and works fine.

The patch is not well sorted out and it contains over 10 tweaks and
printf lines for debugging. I hope someone digests the patch and
incorporates the changes into Kaffe.

Cheers,

  Kazuyuki Shudo        [EMAIL PROTECTED]               http://www.shudo.net/
--- ./m4/libtool.m4.orig        2005-12-19 12:54:22.000000000 +0900
+++ ./m4/libtool.m4     2006-07-02 20:43:43.000000000 +0900
@@ -1312,7 +1312,7 @@
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
     postinstall_cmds='base_file=`basename \${file}`~
       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo 
\$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
+      dldir=$destdir/~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname~
       chmod a+x \$dldir/$dlname'
--- ./libraries/clib/native/gnu_classpath_VMStackWalker.c.orig  2005-05-31 
06:16:04.000000000 +0900
+++ ./libraries/clib/native/gnu_classpath_VMStackWalker.c       2006-07-02 
20:43:43.000000000 +0900
@@ -74,11 +74,26 @@
        /* skip VMStackWalker; since we're only called from java code,
         * we cannot reach the end of the stack here.
         */
+#if 1
        while ( (info[ret].meth == NULL) ||
                (strcmp(CLASS_CNAME(info[ret].meth->class), 
"gnu/classpath/VMStackWalker") == 0))
        {
                ret++;
        }
+#else
+       while (1) {
+               if (info[ret].meth == ENDOFSTACK) {
+                       return NULL;
+               }
+
+               if ((info[ret].meth != NULL) &&
+                       (!strcmp(CLASS_CNAME(info[ret].meth->class), 
"gnu/classpath/VMStackWalker") == 0)) {
+                       break;
+               }
+
+               ret++;
+       }
+#endif
 
        /* since the VMStackWalker methods are not called from native code,
         * we can assume that info[ret] is the frame of a java method.
--- ./libraries/javalib/external/classpath/native/Makefile.am.orig      
2006-05-23 00:22:29.000000000 +0900
+++ ./libraries/javalib/external/classpath/native/Makefile.am   2006-07-02 
20:43:43.000000000 +0900
@@ -12,6 +12,6 @@
   PLUGINDIR = plugin
 endif
 
-SUBDIRS = fdlibm $(JNIDIR) $(JAWTDIR) $(PLUGINDIR) target
-DIST_SUBDIRS = fdlibm jni jawt plugin target
+SUBDIRS = fdlibm $(JNIDIR) $(JAWTDIR) target
+DIST_SUBDIRS = fdlibm jni jawt target
 
--- ./libraries/javalib/external/classpath/native/Makefile.in.orig      
2006-06-05 08:52:10.000000000 +0900
+++ ./libraries/javalib/external/classpath/native/Makefile.in   2006-07-02 
20:43:43.000000000 +0900
@@ -284,8 +284,8 @@
 @[EMAIL PROTECTED] = jni
 @[EMAIL PROTECTED] = jawt
 @[EMAIL PROTECTED] = plugin
-SUBDIRS = fdlibm $(JNIDIR) $(JAWTDIR) $(PLUGINDIR) target
-DIST_SUBDIRS = fdlibm jni jawt plugin target
+SUBDIRS = fdlibm $(JNIDIR) $(JAWTDIR) target
+DIST_SUBDIRS = fdlibm jni jawt target
 all: all-recursive
 
 .SUFFIXES:
--- ./libraries/javalib/external/classpath/java/io/PrintStream.java.orig        
2006-04-03 09:51:03.000000000 +0900
+++ ./libraries/javalib/external/classpath/java/io/PrintStream.java     
2006-07-02 20:43:43.000000000 +0900
@@ -117,12 +117,17 @@
     try {
        this.encoding = SystemProperties.getProperty("file.encoding");
     } catch (SecurityException e){
-       this.encoding = "ISO8859_1";
+       this.encoding = "ISO_8859_1";
     } catch (IllegalArgumentException e){
-       this.encoding = "ISO8859_1";
+       this.encoding = "ISO_8859_1";
     } catch (NullPointerException e){
-       this.encoding = "ISO8859_1";
+       this.encoding = "ISO_8859_1";
     }
+
+    if (this.encoding == null) {
+       this.encoding = "ISO_8859_1";
+    }
+
     this.auto_flush = auto_flush;
   }
 
--- 
./libraries/javalib/external/classpath/gnu/classpath/SystemProperties.java.orig 
    2006-04-18 22:32:58.000000000 +0900
+++ ./libraries/javalib/external/classpath/gnu/classpath/SystemProperties.java  
2006-07-02 20:43:43.000000000 +0900
@@ -66,6 +66,9 @@
 
   static
   {
+    // temporally set
+    properties = defaultProperties;
+
     VMSystemProperties.preInit(defaultProperties);
 
     defaultProperties.put("gnu.classpath.home", Configuration.CLASSPATH_HOME);
@@ -104,7 +107,7 @@
 
     // 8859_1 is a safe default encoding to use when not explicitly set
     if (defaultProperties.get("file.encoding") == null)
-      defaultProperties.put("file.encoding", "8859_1");
+      defaultProperties.put("file.encoding", "ISO_8859_1");
 
     // XXX FIXME - Temp hack for old systems that set the wrong property
     if (defaultProperties.get("java.io.tmpdir") == null)
--- ./libraries/javalib/vmspecific/gnu/classpath/VMSystemProperties.java.orig   
2006-05-23 00:22:53.000000000 +0900
+++ ./libraries/javalib/vmspecific/gnu/classpath/VMSystemProperties.java        
2006-07-02 20:43:43.000000000 +0900
@@ -230,7 +230,7 @@
      * a good idea to process the properties specified on the command
      * line here.
      */
-    static native void postInit(Properties properties);
+  static void postInit(Properties properties) {}
 
 
   static native String getLocale();
--- ./config/i386/jit.h.orig    2006-03-24 05:00:19.000000000 +0900
+++ ./config/i386/jit.h 2006-07-02 20:43:43.000000000 +0900
@@ -41,7 +41,7 @@
 
 /* Get the first exception frame from a subroutine call */
 #define        FIRSTFRAME(f, o)                                                
\
-       ((f) = *(exceptionFrame*)__builtin_frame_address(0))
+       ((f) = *(exceptionFrame*)__builtin_frame_address(1))
 
 /**/
 /* Method dispatch.  */
--- ./config/i386/cygwin32/jit-md.h.orig        2006-07-03 13:08:32.000000000 
+0900
+++ ./config/i386/cygwin32/jit-md.h     2006-07-03 13:10:16.000000000 +0900
@@ -25,10 +25,10 @@
  * No signal handler support yet!!
  */
 #define        EXCEPTIONPROTO                                                  
\
-       int sig
+       int sig, siginfo_t *ctx, void *uc0
 
 #define        EXCEPTIONFRAME(f, c)                                            
\
        (f).retbp = 0;                                                  \
-       (f).retpc = 0
+       (f).retpc = c->si_addr + 1
 
 #endif
--- ./config/i386/cygwin32/md.h.orig    2006-07-03 13:08:29.000000000 +0900
+++ ./config/i386/cygwin32/md.h 2006-07-03 13:09:26.000000000 +0900
@@ -31,8 +31,8 @@
 #undef SP_OFFSET
 #define        SP_OFFSET       7
 
-#define SIGNAL_ARGS(sig, sc) int sig
-#define SIGNAL_CONTEXT_POINTER(scp) int scp
+#define SIGNAL_ARGS(sig, sc) int sig, siginfo_t *sc, void *uc0
+#define SIGNAL_CONTEXT_POINTER(scp) siginfo_t **scp
 #define GET_SIGNAL_CONTEXT_POINTER(sc) (NULL)
 #define SIGNAL_PC(scp) (0)
 
--- ./config/i386/trampolines.S.orig    2005-09-14 20:53:16.000000000 +0900
+++ ./config/i386/trampolines.S 2006-07-02 20:43:43.000000000 +0900
@@ -39,7 +39,7 @@
         popl   %eax
        push    %ebp
        mov     %esp,%ebp
-#if defined(PIC)
+#if defined(PIC) && !defined(__CYGWIN__)
        pushl   %ebx
        call    .L2
      .L2:
--- ./kaffe/kaffevm/stackTrace.c.orig   2006-02-12 23:31:57.000000000 +0900
+++ ./kaffe/kaffevm/stackTrace.c        2006-07-03 14:39:03.000000000 +0900
@@ -56,19 +56,86 @@
        struct _stackTrace trace;
        stackTraceInfo* info;
        struct _exceptionFrame orig;
+#ifdef __CYGWIN__
+       uintp excpc;
+       struct _jmethodID *excmeth = NULL;
+#endif
+
+#if 0
+cnt = 0x1234;
+printf("%d (0x%x) at %x\n", cnt, cnt, &cnt);
+{
+  unsigned int *p;
+  int i;
+
+  p = __builtin_frame_address(0);
+  for (i = 0; i <= 1; i++) {
+    printf("%p: %08x\n", p+i, p[i]);
+  }
+  p = __builtin_frame_address(1);
+  for (i = 0; i <= 1; i++) {
+    printf("%p: %08x\n", p+i, p[i]);
+  }
+  p = __builtin_frame_address(2);
+  for (i = 0; i <= 1; i++) {
+    printf("%p: %08x\n", p+i, p[i]);
+  }
+  p = __builtin_frame_address(3);
+  for (i = 0; i <= 1; i++) {
+    printf("%p: %08x\n", p+i, p[i]);
+  }
+}
+
+printf("__builtin_frame_address(0): %x\n", __builtin_frame_address(0));
+printf("__builtin_frame_address(1): %x\n", __builtin_frame_address(1));
+printf("__builtin_frame_address(2): %x\n", __builtin_frame_address(2));
+#endif
 
        (void) orig;                    /* avoid compiler warning in intrp */
        DBG(STACKTRACE,
            dprintf("STACKTRACEINIT(trace, %p, %p, orig);\n", base, base); );
+#if 0
+printf("STACKTRACEINIT: base %p\n", base);
+#endif
        STACKTRACEINIT(trace, base, base, orig);
        cnt = 0;
+#if 0
+printf("  frame: %p\n", STACKTRACEFRAME(trace));
+printf("  fp:    %p\n", STACKTRACEFP(trace));
+printf("  on_current_stack: %s\n", (KTHREAD(on_current_stack)((void 
*)STACKTRACEFP(trace)) ? "true" : "false"));
+#endif
        while(STACKTRACEFRAME(trace) && KTHREAD(on_current_stack) ((void 
*)STACKTRACEFP(trace))) {
                cnt++;
                STACKTRACESTEP(trace);
        }
+#if 0
+printf("cnt: %d\n", cnt);
+#endif
+
+#ifdef __CYGWIN__
+       if (base != NULL) {
+               excpc = base->retpc;
+               excmeth = stacktraceFindMethod((uintp)NULL, excpc);
+#if 0
+               printf("  excpc: 0x%x\n", excpc);
+               printf("  method: %p", excmeth);
+               if (excmeth != NULL) {
+                       printf(" %s#%s", excmeth->class->name->data,
+                               excmeth->name->data);
+               }
+               printf("\n");
+#endif
+       }
+#endif
 
        /* Build an array of stackTraceInfo */
-       info = gc_malloc(sizeof(stackTraceInfo) * (cnt+1), KGC_ALLOC_NOWALK);
+       {
+               int c = cnt + 1;
+#ifdef __CYGWIN__
+               if (excmeth != NULL) c++;
+#endif
+               info = gc_malloc(sizeof(stackTraceInfo) * c, KGC_ALLOC_NOWALK);
+       }
        if (!info) {
            dprintf("buildStackTrace(%p): can't allocate stackTraceInfo\n",
                    base);
@@ -81,10 +148,48 @@
            dprintf("STACKTRACEINIT(trace, &orig, %p, orig);\n", base); );
        STACKTRACEINIT(trace, &orig, base, orig);
 
+#ifdef __CYGWIN__
+       int insertTried = 0;
+#endif
        while (STACKTRACEFRAME(trace) && KTHREAD(on_current_stack) ((void 
*)STACKTRACEFP(trace))) {
                info[cnt].pc = STACKTRACEPC(trace);
                info[cnt].fp = STACKTRACEFP(trace);
+#if 0
+printf("%d: %p %p: ", cnt, info[cnt].fp, info[cnt].pc);
+#endif
                info[cnt].meth = stacktraceFindMethod (info[cnt].fp, 
info[cnt].pc);
+#if 0
+if (info[cnt].meth != NULL)
+printf("%s#%s\n", info[cnt].meth->class->name->data, 
info[cnt].meth->name->data);
+else
+printf("null#null\n");
+#endif
+
+#ifdef __CYGWIN__
+               if (!insertTried
+                   && info[cnt].meth != NULL
+                   && excmeth != NULL
+                   && excmeth != info[cnt].meth) {
+#if 0
+printf("  insert %s#%s\n", excmeth->class->name->data, excmeth->name->data);
+#endif
+                       /* insert */
+                       info[cnt + 1] = info[cnt];
+
+                       info[cnt].pc = excpc;
+#if 0
+printf("    fp: %p -> ", info[cnt].fp);
+#endif
+                       info[cnt].fp = info[cnt - 1].fp;
+#if 0
+printf("%p\n", info[cnt].fp);
+#endif
+                        info[cnt].meth = excmeth;
+
+                        cnt++;
+               }
+#endif
+
                cnt++;
                STACKTRACESTEP(trace);
        }
@@ -307,7 +412,11 @@
            }
 
            nextCause = unhand(o)->cause;
-           if (nextCause != o)
+#if 0
+printf("printStackTrace(): o: %p, nextCause: %p\n", o, nextCause);
+fflush(stdout);
+#endif
+           if (nextCause != NULL && nextCause != o)
              {
                const char *className = CLASS_CNAME(OBJECT_CLASS((struct 
Hjava_lang_Object*)nextCause));
                buf = checkPtr(KMALLOC(strlen(className) + 64));
@@ -334,7 +443,7 @@
                  } else {
                    throwError(&einfo);
                  }
-               }
+                }
                cptr = (jchar*)OBJARRAY_DATA(str);
                for (j = len;  --j >= 0; ) {
                  cptr[j] = (unsigned char)buf[j];
@@ -350,8 +459,8 @@
                  }
 
                KFREE(buf);
-             }
-         } while (nextCause != o);
+              }
+         } while (nextCause != NULL && nextCause != o);
        if (p != NULL || !nullOK) {
          do_execute_java_method(NULL, p, "flush", "()V", NULL, 0);
        }
--- ./kaffe/kaffevm/jit/stackTrace-impl.h.orig  2006-07-03 13:12:32.000000000 
+0900
+++ ./kaffe/kaffevm/jit/stackTrace-impl.h       2006-07-03 13:51:51.000000000 
+0900
@@ -8,6 +8,14 @@
         struct _exceptionFrame* frame;
 } stackTrace;
 
+#ifdef __CYGWIN__
+#define STACKTRACEINIT(S, I, O, R)         \
+        {                                  \
+                FIRSTFRAME((S).nframe, O); \
+                (S).frame = &((S).nframe); \
+                (R) = *(S).frame;          \
+        }
+#else
 #define STACKTRACEINIT(S, I, O, R)                      \
         {                                               \
                 if ((I) == NULL) {                      \
@@ -18,6 +26,7 @@
                 }                                       \
                 (R) = *(S).frame;                       \
         }
+#endif
 
 #ifdef STACK_NEXT_FRAME
 #define STACKTRACESTEP(S)       (STACK_NEXT_FRAME((S).frame))
--- ./kaffe/kaffevm/baseClasses.c.orig  2006-04-22 10:53:40.000000000 +0900
+++ ./kaffe/kaffevm/baseClasses.c       2006-07-02 20:43:43.000000000 +0900
@@ -292,12 +292,12 @@
        /* Setup exceptions */
        initExceptions();
 
-       /* Init stuff for the java security model */
-       initialiseSecurity();
-
        /* Init thread support */
        initThreads();
 
+       /* Init stuff for the java security model */
+       initialiseSecurity();
+
        /* Now enable collector */
        KGC_enable(main_collector);
 }
--- ./kaffe/kaffevm/systems/unix-pthreads/signal.c.orig 2006-04-16 
16:20:16.000000000 +0900
+++ ./kaffe/kaffevm/systems/unix-pthreads/signal.c      2006-07-03 
13:12:16.000000000 +0900
@@ -457,7 +457,12 @@
        
        if (JTHREAD_SETJMP(outOfLoop) == 0)
        {
+#ifdef __CYGWIN__
+         /* getpagesize() of Cygwin 1.5.19-4 returns 0x10000, not 0x1000 */
+         uintp pageSize = 0x1000;
+#else
          uintp pageSize = getpagesize();
+#endif
 
          guessPointer = (char *)((uintp)(&jtid) & ~(pageSize-1));
          
@@ -471,6 +476,11 @@
            kaffeNoopFunc(*guessPointer);
          }
        }
+       else {
+#if defined(STACK_GROWS_UP)
+         guessPointer += pageSize;
+#endif
+       }
 
        /* Here we have detected one the boundary of the stack.
         * If stack grows up then it is the upper boundary. In the other
--- ./kaffe/kaffevm/systems/unix-pthreads/thread-impl.c.orig    2006-05-25 
00:58:25.000000000 +0900
+++ ./kaffe/kaffevm/systems/unix-pthreads/thread-impl.c 2006-07-02 
20:43:43.000000000 +0900
@@ -451,7 +451,7 @@
 
   if (SIGRTMAX - SIGRTMIN < 7)
     {
-#if defined(OLD_LINUXTHREADS)
+#if defined(OLD_LINUXTHREADS) && !defined(__CYGWIN__)
       sigSuspend = SIGURG;
       sigResume  = SIGTSTP;
       sigDump    = SIGXCPU;
@@ -474,8 +474,7 @@
 
 #endif
 
-      if (SIGRTMIN < 0)
-       sigInterrupt = SIGCONT;
+      sigInterrupt = SIGCONT;
     }
   else
     {
--- ./kaffe/kaffevm/findInJar.c.orig    2006-04-18 19:06:38.000000000 +0900
+++ ./kaffe/kaffevm/findInJar.c 2006-07-02 20:43:43.000000000 +0900
@@ -809,6 +809,11 @@
       const char* referenceName = "rt.jar";
       char *exeFilename = br_find_exe(NULL);
 
+#if 0
+printf("discoveredClassHome, ExeFilename: %s, %s\n",
+(discoveredClassHome == NULL ? "NULL" : discoveredClassHome),
+(exeFilename == NULL ? "NULL" : exeFilename));
+#endif
       strcpy(discoveredClassHome, exeFilename);
 
       while ((p = strrchr(discoveredClassHome, file_separator[0]))) {
--- ./kaffe/kaffevm/exception.c.orig    2006-07-03 13:26:13.000000000 +0900
+++ ./kaffe/kaffevm/exception.c 2006-07-03 13:26:52.000000000 +0900
@@ -94,7 +94,9 @@
 {
        assert(eh != NULL);
        assert(eh->meth == VMEXCEPTHANDLER_KAFFEJNI_HANDLER);
+#ifndef __CYGWIN__
        assert(fp != (JNIFrameAddress)0);
+#endif
 
        return (eh->frame.jni.fp == fp);
 }
--- ./kaffe/scripts/kaffe.in.orig       2005-12-06 05:54:03.000000000 +0900
+++ ./kaffe/scripts/kaffe.in    2006-07-02 20:43:43.000000000 +0900
@@ -84,7 +84,7 @@
 export KAFFELIBRARYPATH
 LD_LIBRARY_PATH="$KAFFE_LIBDIR"${LD_LIBRARY_PATH+"$PATHSEP$LD_LIBRARY_PATH"}
 export LD_LIBRARY_PATH
-PATH="$PATH:$KAFFE_LIBDIR" # MS-Windows DLLs must be in the PATH
+PATH="$PATH:$KAFFE_LIBDIR:$KAFFE_NATIVE_LIBRARY_DIR" # MS-Windows DLLs must be 
in the PATH
 export PATH
 
 # Slurp in system and user specific scripts
--- ./configure.orig    2006-06-06 00:21:22.000000000 +0900
+++ ./configure 2006-07-02 20:43:43.000000000 +0900
@@ -10014,7 +10014,7 @@
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
     postinstall_cmds='base_file=`basename \${file}`~
       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo 
\$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
+      dldir=$destdir/~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname~
       chmod a+x \$dldir/$dlname'
@@ -13974,7 +13974,7 @@
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
     postinstall_cmds='base_file=`basename \${file}`~
       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo 
\$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
+      dldir=$destdir/~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname~
       chmod a+x \$dldir/$dlname'
--- ./test/internal/Makefile.am.orig    2006-04-24 06:23:34.000000000 +0900
+++ ./test/internal/Makefile.am 2006-07-02 20:43:43.000000000 +0900
@@ -133,8 +133,9 @@
 MethodOptimizations.class: $(srcdir)/MethodOptimizations.java
        $(JAVA_COMPILER) -g -classpath $(CPATH) -d . 
$(srcdir)/MethodOptimizations.java
 
-NativeMethodCall.class java/lang/System.class java/lang/VMSystem.class: 
$(srcdir)/NativeMethodCall.java   $(srcdir)/java/lang/VMSystem.java 
$(srcdir)/java/lang/System.java
-       $(JAVA_COMPILER) -g -classpath $(CPATH) -d . 
$(srcdir)/java/lang/VMSystem.java $(srcdir)/java/lang/System.java 
$(srcdir)/NativeMethodCall.java
+NativeMethodCall.class: $(srcdir)/NativeMethodCall.java
+       $(JAVA_COMPILER) -g -classpath $(CPATH) -d . 
$(srcdir)/NativeMethodCall.java
+       rm -f java/lang/*.class
 
 Exceptions.class: $(srcdir)/Exceptions.java
        $(JAVA_COMPILER) -g -classpath $(CPATH) -d . $(srcdir)/Exceptions.java
@@ -142,7 +143,7 @@
 VirtualMethod.class: $(srcdir)/VirtualMethod.java
        $(JAVA_COMPILER) -g -classpath $(CPATH) -d . 
$(srcdir)/VirtualMethod.java
 
-jit_stub.o: java/lang/System.class java/lang/VMSystem.class $(JAVA_CLASSES)
+jit_stub.o: $(JAVA_CLASSES)
 
 TESTS = $(check_PROGRAMS)
 
--- ./test/internal/Makefile.in.orig    2006-06-05 02:15:22.000000000 +0900
+++ ./test/internal/Makefile.in 2006-07-02 20:43:43.000000000 +0900
@@ -850,8 +850,9 @@
 MethodOptimizations.class: $(srcdir)/MethodOptimizations.java
        $(JAVA_COMPILER) -g -classpath $(CPATH) -d . 
$(srcdir)/MethodOptimizations.java
 
-NativeMethodCall.class java/lang/System.class java/lang/VMSystem.class: 
$(srcdir)/NativeMethodCall.java   $(srcdir)/java/lang/VMSystem.java 
$(srcdir)/java/lang/System.java
-       $(JAVA_COMPILER) -g -classpath $(CPATH) -d . 
$(srcdir)/java/lang/VMSystem.java $(srcdir)/java/lang/System.java 
$(srcdir)/NativeMethodCall.java
+NativeMethodCall.class: $(srcdir)/NativeMethodCall.java
+       $(JAVA_COMPILER) -g -classpath $(CPATH) -d . 
$(srcdir)/NativeMethodCall.java
+       rm -f java/lang/*.class
 
 Exceptions.class: $(srcdir)/Exceptions.java
        $(JAVA_COMPILER) -g -classpath $(CPATH) -d . $(srcdir)/Exceptions.java
@@ -859,7 +860,7 @@
 VirtualMethod.class: $(srcdir)/VirtualMethod.java
        $(JAVA_COMPILER) -g -classpath $(CPATH) -d . 
$(srcdir)/VirtualMethod.java
 
-jit_stub.o: java/lang/System.class java/lang/VMSystem.class $(JAVA_CLASSES)
+jit_stub.o: $(JAVA_CLASSES)
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
--- ./test/internal/jit_stub.c.orig     2006-04-22 10:53:43.000000000 +0900
+++ ./test/internal/jit_stub.c  2006-07-02 20:43:43.000000000 +0900
@@ -94,76 +94,14 @@
        }
        vmargs.classpath = cp;
 
-       /* Machine specific initialisation first */
-#if defined(INIT_MD)
-       INIT_MD();
-#endif
-
        Kaffe_JavaVMArgs = vmargs;
        threadStackSize = Kaffe_JavaVMArgs.nativeStackSize;
-       
-       /* Register allocation types with gc subsystem */
-       main_collector = initCollector();
-       KGC_init(main_collector);
-
-       /* Initialise the (native) threading system */
-       initNativeThreads(threadStackSize);
-
-       /* Initialise the string and utf8 systems */
-       stringInit();
-       utf8ConstInit();
 
-#if defined(KAFFE_XDEBUGGING)
-       machine_debug_file = createDebugFile(machine_debug_filename);
-#endif
-       
-       /* Setup CLASSPATH */
-       initClasspath();
-
-       /* Init native support */
-       initNative();
-       
-       /* Create the initialise and finalize names and signatures. */
-       init_name = utf8ConstFromString("<clinit>");
-       final_name = utf8ConstFromString("finalize");
-       void_signature = utf8ConstFromString("()V");
-       constructor_name = utf8ConstFromString("<init>");
-       Code_name = utf8ConstFromString("Code");
-       LineNumberTable_name = utf8ConstFromString("LineNumberTable");
-       LocalVariableTable_name = utf8ConstFromString("LocalVariableTable");
-       ConstantValue_name = utf8ConstFromString("ConstantValue");
-       Exceptions_name = utf8ConstFromString("Exceptions");
-       SourceFile_name = utf8ConstFromString("SourceFile");
-       InnerClasses_name = utf8ConstFromString("InnerClasses");
-       Synthetic_name = utf8ConstFromString("Synthetic");
-       Signature_name = utf8ConstFromString("Signature");
-       EnclosingMethod_name = utf8ConstFromString("EnclosingMethod");
-
-       if (!(init_name && final_name && void_signature &&
-             constructor_name && Code_name && LineNumberTable_name &&
-             LocalVariableTable_name && ConstantValue_name &&
-             Exceptions_name && SourceFile_name && InnerClasses_name &&
-             Synthetic_name && Signature_name)) {
-               dprintf("not enough memory to run kaffe\n");
-               KAFFEVM_ABORT();
-       }
+       initialiseKaffe();
 
        {
-               Hjava_lang_Thread mainThread;
                parsedString testName;
                char *tests;
-               int stackSize;
-               
-               initTypes();
-               loadStaticClass(&ObjectClass, "java/lang/Object");
-               loadStaticClass(&StringClass, "java/lang/String");
-               loadStaticClass(&SystemClass, "java/lang/System");
-               loadStaticClass(&javaLangFloatClass, "java/lang/Float");
-               loadStaticClass(&javaLangDoubleClass, "java/lang/Double");
-               loadStaticClass(&javaLangThrowable, "java/lang/Throwable");
-               loadStaticClass(&javaLangNullPointerException, 
"java/lang/NullPointerException");
-               loadStaticClass(&javaLangArrayIndexOutOfBoundsException, 
"java/lang/ArrayIndexOutOfBoundsException");
-               memset(&mainThread, 0, sizeof(mainThread));
 
                if( (tests = getenv(TEST_CLASSES)) )
                {
--- ./libltdl/ltmain.sh.orig    2005-12-19 12:54:20.000000000 +0900
+++ ./libltdl/ltmain.sh 2006-07-02 20:43:43.000000000 +0900
@@ -5658,7 +5658,8 @@
          # place dlname in correct position for cygwin
          tdlname=$dlname
          case $host,$output,$installed,$module,$dlname in
-           *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) 
tdlname=../bin/$dlname ;;
+           *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+#          *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) 
tdlname=../bin/$dlname ;;
          esac
          $echo > $output "\
 # $outputname - a libtool library file
--- ./doc/jikes.1.orig  2004-03-02 18:02:11.000000000 +0900
+++ ./doc/jikes.1       2006-06-29 12:06:24.000000000 +0900
@@ -185,7 +185,7 @@
 compatibility to older virtual machines, and some source constructs
 will be compiled to less efficient workarounds in order to avoid known
 virtual machine bugs or deficiencies.  However, a lower target may
-occaisionally produce incorrect semantic behavior.  Furthermore, some
+occasionally produce incorrect semantic behavior.  Furthermore, some
 language features require virtual machine support, where there are no
 known workarounds in earlier releases: the assert statement requires
 1.4 (unless you also use \fB\-noassert\fP), and the planned addition
--- ./src/platform.cpp.orig     2006-06-29 16:51:28.000000000 +0900
+++ ./src/platform.cpp  2006-06-29 16:51:56.000000000 +0900
@@ -201,6 +201,7 @@
 int SystemStat(const char* name, struct stat* stat_struct)
 {
     int result = ::stat(name, stat_struct);
+#if 0
 #ifdef HAVE_SYS_CYGWIN_H
     //
     // Up through cygwin 1.3.10, the hash function which determines inodes
@@ -210,6 +211,7 @@
     if (result == 0)
         stat_struct -> st_ino += name[strlen(name) - 1];
 #endif // HAVE_SYS_CYGWIN_H
+#endif
     return result;
 }
 
--- ./src/decl.cpp.orig 2004-09-27 07:40:41.000000000 +0900
+++ ./src/decl.cpp      2006-06-29 12:06:24.000000000 +0900
@@ -1,4 +1,4 @@
-// $Id: decl.cpp,v 1.144 2004/09/26 22:40:41 elliott-oss Exp $
+// $Id: decl.cpp,v 1.145 2004/10/09 18:04:50 elliott-oss Exp $
 //
 // This software is subject to the terms of the IBM Jikes Compiler
 // License Agreement available at the following URL:
@@ -2596,7 +2596,9 @@
     //
     if (control.option.deprecation &&
         hidden_method -> IsDeprecated() &&
-        ! method -> containing_type -> file_symbol -> IsClassOnly())
+        ! method -> containing_type -> file_symbol -> IsClassOnly() &&
+        ! method -> IsDeprecated() &&
+        ! InDeprecatedContext())
     {
         ReportSemError(SemanticError::DEPRECATED_METHOD_OVERRIDE,
                        left_tok, right_tok, method -> Header(),
--- ./src/error.cpp.orig        2004-09-27 07:40:41.000000000 +0900
+++ ./src/error.cpp     2006-06-29 12:06:24.000000000 +0900
@@ -1,4 +1,4 @@
-// $Id: error.cpp,v 1.159 2004/09/26 22:40:41 elliott-oss Exp $
+// $Id: error.cpp,v 1.160 2004/10/10 02:59:40 elliott-oss Exp $
 //
 // This software is subject to the terms of the IBM Jikes Compiler
 // License Agreement available at the following URL:
@@ -513,6 +513,7 @@
     warning[DEPRECATED_FIELD] = WEAK_WARNING;
     warning[DEPRECATED_METHOD] = WEAK_WARNING;
     warning[DEPRECATED_CONSTRUCTOR] = WEAK_WARNING;
+    warning[DEPRECATED_METHOD_OVERRIDE] = WEAK_WARNING;
 
     warning[UNNECESSARY_TYPE_IMPORT] = WEAK_WARNING;
     warning[MULTIPLE_PUBLIC_TYPES] = WEAK_WARNING;
--- ./src/symbol.h.orig 2006-06-29 12:10:55.000000000 +0900
+++ ./src/symbol.h      2006-06-29 14:28:56.000000000 +0900
@@ -1106,7 +1106,7 @@
     //
     bool IsInner() const
     {
-        assert((! IsLocal() && ! Anonymous()) ||
+        assert((! IsLocal()) ||
                (IsNested() && ! ACC_STATIC()));
         return IsNested() && ! ACC_STATIC();
     }
_______________________________________________
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to