Re: [kaffe] kaffe on oskit patches

2003-02-13 Thread Dalibor Topic

--- Dalibor Topic [EMAIL PROTECTED] wrote:
 hi Tim,
 
 --- Timothy Stack [EMAIL PROTECTED] wrote:

  contains a small 
  (untested!) patch for using zip to make the jar
  file, which is needed when 
  cross-compiling since the kaffe executable won't
  work.  The second patch 
  is based on what is done in the JanosVM so it
  should work, or atleast 
  come real close.
 
 Looks good to me. I'll give it some testing and add
 a
 HAVE_JAR conditional, as well, before I check it in.

I've tested it and checked it in as it was. My
HAVE_JAR part didn't work as expected, so I've left it
out.

Checking for 'jar' resulted in gcj's jar getting
picked up, and that one doesn't support adding files
to an archive yet (gcc 3.2).

If someone is on a platform where you don't have zip
but you have a fully working jar tool, I'd like to
know about it ;) On the other hand, we should probably
leave the responsibilty to figure out the proper calls
to automake, once it can build jar archives. The
automake developers are working on it, AFAIK.

cheers,
dalibor topic

__
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe



[kaffe] kaffe on oskit patches

2003-02-12 Thread Timothy Stack

hi,

I've attached some patches that fix the kaffe on oskit build.  The first 
file contains the necessary bits.  The second file contains a small 
(untested!) patch for using zip to make the jar file, which is needed when 
cross-compiling since the kaffe executable won't work.  The second patch 
is based on what is done in the JanosVM so it should work, or atleast 
come real close.

2003-02-12 Timothy S Stack [EMAIL PROTECTED]

* config/i386/oskit/mkimage.sh:
Fix the paths used to build the kernel image.
(e.g. libexec/Kaffe - jre/bin/kaffe-bin)

* kaffe/kaffevm/systems/oskit-pthreads/jthread.h:
Add jthread_relaxstack() function.

* configure.in:
Add AM_CONDITIONAL(HAVE_ZIP, ...) so make files can
use a regular zip if its available.

* libraries/javalib/Makefile.am:
Use detected zip executable to build the JAR file,
needed to work in a cross-compile environment.


thanks,

tim

Index: configure.in
===
RCS file: /cvs/kaffe/kaffe/configure.in,v
retrieving revision 1.182
diff -u -r1.182 configure.in
--- configure.in11 Feb 2003 21:58:42 -  1.182
+++ configure.in12 Feb 2003 18:39:54 -
@@ -509,6 +509,8 @@
 AC_PROG_MAKE_SET
 AC_CHECK_PROG(ZIP, zip, zip)
 
+AM_CONDITIONAL(HAVE_ZIP, test x$ZIP != x)
+
 dnl If symlink is overridden then don't bother with the test.
 if test x$LN_S = x ; then
AC_PROG_LN_S
Index: libraries/javalib/Makefile.am
===
RCS file: /cvs/kaffe/kaffe/libraries/javalib/Makefile.am,v
retrieving revision 1.94
diff -u -r1.94 Makefile.am
--- libraries/javalib/Makefile.am   11 Feb 2003 21:58:54 -  1.94
+++ libraries/javalib/Makefile.am   12 Feb 2003 18:40:19 -
@@ -2272,6 +2272,14 @@
 .PHONY: bootstrap
 bootstrap: $(srcdir)/Klasses.jar.bootstrap
 
+if HAVE_ZIP
+JAR_CMD1 = (cd $(srcdir)  $(ZIP) -r rt.tmp.jar META-INF) ; mv $(srcdir)/rt.tmp.jar 
+rt.jar
+JAR_CMD2 = (cd $(LIBDIR)  $(ZIP) -DX -r ../rt.jar $(SRCDIRS))
+else
+JAR_CMD1 = $(JAR) -cvf rt.jar -C $(LIBDIR) $(SRCDIRS)
+JAR_CMD2 = $(JAR) -uvf rt.jar -C $(srcdir) META-INF/
+endif
+
 .PHONY: jar-classes
 jar-classes rt.jar: $(LIBDIR)/stamp
cp $(srcdir)/kaffe/lang/unicode.idx $(srcdir)/kaffe/lang/unicode.tbl 
$(LIBDIR)/kaffe/lang
@@ -2279,8 +2287,8 @@
for i in $(serialized_converters) ; do cp $(srcdir)/$$i $(LIBDIR)/$$i ; done
for i in $(gnu_regexp_message_bundles) ; do cp $(srcdir)/$$i $(LIBDIR)/$$i ; 
done
rm -f rt.jar
-   $(JAR) -cvf rt.jar -C $(LIBDIR) $(SRCDIRS)
-   $(JAR) -uvf rt.jar -C $(srcdir) META-INF/
+   $(JAR_CMD1)
+   $(JAR_CMD2)
 
 .PHONY: build-classes Klasses
 build-classes Klasses: rt.jar

Index: config/i386/oskit/mkimage.sh
===
RCS file: /cvs/kaffe/kaffe/config/i386/oskit/mkimage.sh,v
retrieving revision 1.4
diff -u -r1.4 mkimage.sh
--- config/i386/oskit/mkimage.sh6 Mar 2000 18:20:32 -   1.4
+++ config/i386/oskit/mkimage.sh12 Feb 2003 18:40:33 -
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (c) 1998, 1999 The University of Utah. All rights reserved.
+# Copyright (c) 1998, 1999, 2003 The University of Utah. All rights reserved.
 #
 # See the file license.terms for information on usage and redistribution
 # of this file.
@@ -134,7 +134,7 @@
 CPF=$CLASSPATHFILE:/etc/kaffe_classpath
 
 # The Kaffe kernel
-KAFFE=$KAFFEDIR/libexec/Kaffe
+KAFFE=$KAFFEDIR/jre/bin/kaffe-bin
 
 if test ! -x $KAFFE; then
 echo ERROR: $KAFFE is not an executable.
@@ -142,7 +142,7 @@
 fi
 
 # The directory with the minimum necessary class files.
-CLASSDIR=$KAFFEDIR/share/kaffe
+CLASSDIR=$KAFFEDIR/jre/lib
 
 # The final list of directories
 DIRS=$CLASSDIR $DIRS
@@ -192,7 +192,7 @@
done
done
 
-   for FILE in $KAFFEDIR/lib/kaffe/*.la
+   for FILE in $KAFFEDIR/jre/lib/i386/*.la
do
echo $FILE:/lib/$(basename $FILE)
done
Index: kaffe/kaffevm/systems/oskit-pthreads/jthread.h
===
RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/systems/oskit-pthreads/jthread.h,v
retrieving revision 1.8
diff -u -r1.8 jthread.h
--- kaffe/kaffevm/systems/oskit-pthreads/jthread.h  10 Dec 1999 07:49:04 - 
 1.8
+++ kaffe/kaffevm/systems/oskit-pthreads/jthread.h  12 Feb 2003 18:40:42 -
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 1999, 2000 The University of Utah. All rights reserved.
+ * Copyright (c) 1998, 1999, 2000, 2003 The University of Utah. All rights reserved.
  *
  * See the file license.terms for information on usage and redistribution
  * of this file.
@@ -50,6 +50,8 @@
unsigned char   flags;/* Thread flags */
 } *jthread_t;
 
+#define JTHREAD_FLAG_RELAXED 0x80
+
 /*
  * Map the cookie and jthread to 

Re: [kaffe] kaffe on oskit patches

2003-02-12 Thread Dalibor Topic
hi Tim,

--- Timothy Stack [EMAIL PROTECTED] wrote:

 I've attached some patches that fix the kaffe on
 oskit build.  The first 
 file contains the necessary bits.  The second file

O,K., I've checked in the OSKit specifc patch.

 contains a small 
 (untested!) patch for using zip to make the jar
 file, which is needed when 
 cross-compiling since the kaffe executable won't
 work.  The second patch 
 is based on what is done in the JanosVM so it
 should work, or atleast 
 come real close.

Looks good to me. I'll give it some testing and add a
HAVE_JAR conditional, as well, before I check it in.

cheers,
dalibor topic

__
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe