Here is the patch tested and attached

The Changes:
Allow Kaffe to be builded on uClibc just defining:
CFGLAGS="-DUCLIBC"
before ./configure
enclosing the use of __libc_stack_end, into a preproccessor block.

Best Regards for the whole work on Kaffe.
-- 
-------
Gustavo Guillermo Perez
Compunauta uLinux
www.userver.tk
diff -Nuar kaffe/config/i386/linux/md.c kaffe-uc/config/i386/linux/md.c
--- kaffe/config/i386/linux/md.c	2004-08-30 13:43:44.000000000 +0000
+++ kaffe-uc/config/i386/linux/md.c	2004-09-07 23:34:05.000000000 +0000
@@ -27,7 +27,9 @@
 	mallopt(M_MMAP_MAX, 0);
 #endif
 }
-
+/* DEFINNING UCLIBC DISALLOW THE USE OF THIS FUNCTION
+   PRIVATIVE FOR UCLIBC*/
+#ifndef UCLIBC
 #if defined(__GLIBC__)
 extern void * __libc_stack_end;
 
@@ -38,3 +40,4 @@
   return (void *)(((uintp)__libc_stack_end + sz - 1) & (-sz));
 }
 #endif
+#endif
\ No newline at end of file
diff -Nuar kaffe/config/i386/linux/md.h kaffe-uc/config/i386/linux/md.h
--- kaffe/config/i386/linux/md.h	2004-07-30 22:37:54.000000000 +0000
+++ kaffe-uc/config/i386/linux/md.h	2004-09-07 23:45:11.000000000 +0000
@@ -79,10 +79,13 @@
 
 #include "kaffe-unix-stack.h"
 
+/* DISABLING THIS FUNCTION FOR UCLIBC COMPAT */
+#ifndef UCLIBC
 #if defined(__GLIBC__)
 #define KAFFEMD_STACKEND
 extern void *mdGetStackEnd(void);
 #endif
+#endif
 
 #if defined(TRANSLATOR)
 #include "jit-md.h"
diff -Nuar kaffe/kaffe/kaffevm/boehm-gc/boehm/mach_dep.c kaffe-uc/kaffe/kaffevm/boehm-gc/boehm/mach_dep.c
--- kaffe/kaffe/kaffevm/boehm-gc/boehm/mach_dep.c	2004-08-02 10:44:57.000000000 +0000
+++ kaffe-uc/kaffe/kaffevm/boehm-gc/boehm/mach_dep.c	2004-09-08 00:13:12.000000000 +0000
@@ -380,6 +380,7 @@
 #        endif /* !__GNUC__ */
 #       endif /* M68K/SYSV */
 
+#ifndef UCLIBC
 #     if defined(PJ)
 	{
 	    register int * sp asm ("optop");
@@ -390,6 +391,7 @@
 	    /* Isn't this redundant with the code to push the stack? */
         }
 #     endif
+#endif
 
       /* other machines... */
 #       if !defined(HAVE_PUSH_REGS)
diff -Nuar kaffe/kaffe/kaffevm/boehm-gc/boehm/os_dep.c kaffe-uc/kaffe/kaffevm/boehm-gc/boehm/os_dep.c
--- kaffe/kaffe/kaffevm/boehm-gc/boehm/os_dep.c	2004-08-02 10:44:57.000000000 +0000
+++ kaffe-uc/kaffe/kaffevm/boehm-gc/boehm/os_dep.c	2004-09-07 23:58:06.000000000 +0000
@@ -859,8 +859,11 @@
 # define STAT_SKIP 27   /* Number of fields preceding startstack	*/
 			/* field in /proc/self/stat			*/
 
+/* ALLOW BUILDING ON UCLIBC */
+#indef UCLIBC
 # pragma weak __libc_stack_end
   extern ptr_t __libc_stack_end;
+#endif
 
 # ifdef IA64
     /* Try to read the backing store base from /proc/self/maps.	*/
@@ -930,7 +933,8 @@
     char c;
     word result = 0;
     size_t i, buf_offset = 0;
-
+/* Easy Way privative for UCLIBC */
+#indef UCLIBC
     /* First try the easy way.  This should work for glibc 2.2	*/
     /* This fails in a prelinked ("prelink" command) executable */
     /* since the correct value of __libc_stack_end never	*/
@@ -948,6 +952,7 @@
 	  return __libc_stack_end;
 #	endif
       }
+#endif
     f = open("/proc/self/stat", O_RDONLY);
     if (f < 0 || STAT_READ(f, stat_buf, STAT_BUF_SIZE) < 2 * STAT_SKIP) {
 	ABORT("Couldn't read /proc/self/stat");
diff -Nuar kaffe/libraries/javalib/javax/swing/JDesktopPane.java kaffe-uc/libraries/javalib/javax/swing/JDesktopPane.java
--- kaffe/libraries/javalib/javax/swing/JDesktopPane.java	2004-08-17 17:55:05.000000000 +0000
+++ kaffe-uc/libraries/javalib/javax/swing/JDesktopPane.java	2004-09-07 23:01:13.000000000 +0000
@@ -84,7 +84,7 @@
   /**
    * AccessibleJDesktopPane
    */
-  protected class AccessibleJDesktopPane extends AccessibleJComponent
+  protected class AccessibleJDesktopPane extends JComponent.AccessibleJComponent
   {
     /** DOCUMENT ME! */
     private static final long serialVersionUID = 6079388927946077570L;
_______________________________________________
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to