Hello, Enrico

2) in order to proceed, let's "align" our development environment in terms

of source code modifications. In fact, to build jchevm, just like you, I had
to add some declarations in some header files, and modify the pread()
call into a read(). My proposal is the following:
let's install the new versions of Cygwin, Classpath, and jchevm,
build them from scratch, produce a written document with all the steps
and modifications, and post it this mailing list.
Afterwards, we will be able to write and debug some test cases.

what do you think?


I think that I already did this since started.. Just recorded all (or I hope all) I did
Below is copy of my records....


Install Cygwin ( http://developer.classpath.org/mediation/ClasspathOnCygwin )
   + gcc-core
   + gcc-g++
   + gcc-java
   + make
   + zip
   + GTK
   + pkgconfig
   + autocofig
   + automake
   + libtool
(not sure that I recorded all optional packages I installed)


Download  jikes  from
http://prdownloads.sourceforge.net/jikes/jikes-1.22.tar.bz2?download

Apply this patch
http://sourceforge.net/tracker/index.php?func=detail&aid=1202863&group_id=128803&atid=712760


build jikes ( cygwin version )
-----------------
$ tar -xjf jikes-1.22.tar.bz2
$ cd jikes-1.22
$ ./configure
$ make && make install



Build Classpth-0.20
-----------------
$ ./configure --with-jikes --enable-gtk-peer --enable-jni
$ make
$install


Build JCHEVM
-----------------
$ ./configure --with-classpath=/usr/local/classpath
Add cache clean to  autogen.sh  before each call automake or autoconfig
--
rm -rf autom4te*.cache
echo "running automake"
....
rm -rf autom4te*.cache
echo "running autoconf"
---


libjc/definitions.h    ADD
--------------------
#if defined (__CYGWIN__)
#define PTHREAD_STACK_MIN 1024
#endif


libjc/properties.c    ADD
--------------------
#if defined(__CYGWIN__)
   if (_jc_set_property(env,
       "user.timezone", _tzname[0]) != JNI_OK)
       return JNI_ERR;
#else

   if (_jc_set_property(env,
       "user.timezone", localtime(&now)->tm_zone) != JNI_OK)
       return JNI_ERR;
#endif


libjc/os_functions.c  ADD
--------------------
/************************************************************************
*                CYGWIN                    *
************************************************************************/

#elif defined(__CYGWIN__)

#include <unistd.h>

int
_jc_num_cpus(_jc_env *env)
{

      return (int)sysconf(_SC_NPROCESSORS_ONLN);
}



in libjc/zip.c   replace
---------------------------------
pread(3) with  lseek,read


libjc/arch/arch_definitions.h
-----------------------------------
Remove:
#define _JC_LIBRARY_FMT        "lib%s.so"

Add:
#define _JC_LIBRARY_FMT        "lib%s.dll.a"



libjc/arch/i386/i386_libjc.h    ( not sure for this is correct! )
-------------------
#elif defined(__CYGWIN__)
extern inline const void *
_jc_jmpbuf_sp(const sigjmp_buf buf)
{
   return (const void *)buf[7];
}




libjc\native\java_lang_VMThread.c  ADD
--------------------------------------------
/* Cygwin pthread_create() with supplied attributes is completely broken! */
#ifdef __CYGWIN__
#define _JC_NO_THREAD_ATTRIBUTES    1
#endif



libjc\jc_invoke.c
---------------------------------------------
in "static const struct poptOption jc_popt_options[] = {" remove POPT_AUTOHELP

in libjc\arch\arch_definitions.h
redefine dll name format for cygwin
--------------------------------
#if defined(__CYGWIN__)
 #define _JC_LIBRARY_FMT        "cyg%s-0.dll"
#elif
 #define _JC_LIBRARY_FMT        "lib%s.dll.a"
#endif






Reply via email to