You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by jf...@apache.org on 2005/12/06 17:48:53 UTC
svn commit: r354472 - in
/jakarta/commons/proper/daemon/trunk/src/native/unix: native/arguments.c
native/java.c native/jsvc-unix.c native/location.c support/apjava.m4
support/apsupport.m4
Author: jfclere
Date: Tue Dec 6 08:48:47 2005
New Revision: 354472
URL: http://svn.apache.org/viewcvs?rev=354472&view=rev
Log:
Add support for kaffe.
Modified:
jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c
jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c
jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c
jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4
jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4
Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c?rev=354472&r1=354471&r2=354472&view=diff
==============================================================================
--- jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c (original)
+++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/arguments.c Tue Dec 6 08:48:47 2005
@@ -165,6 +165,16 @@
} else if (strstr(argv[x],"-verbose")==argv[x]) {
args->opts[args->onum++]=strdup(argv[x]);
+#ifdef HAVE_KAFFEVM
+ } else if (strstr(argv[x],"-vmdebug")==argv[x]) {
+ args->opts[args->onum++]=strdup(argv[x]);
+ temp=optional(argc,argv,x++);
+ if (temp==NULL) {
+ log_error("vmdebug option requires a debug flag.");
+ return(NULL);
+ }
+ args->opts[args->onum++]=strdup(temp);
+#endif
} else if (strcmp(argv[x],"-D")==0) {
log_error("Parameter -D must be followed by <name>=<value>");
return(NULL);
Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c?rev=354472&r1=354471&r2=354472&view=diff
==============================================================================
--- jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c (original)
+++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c Tue Dec 6 08:48:47 2005
@@ -114,7 +114,7 @@
}
/* Load the JVM library */
-#ifdef OSD_POSIX
+#if defined(OSD_POSIX) || defined(HAVE_KAFFEVM)
#else
libh=dso_link(libf);
if (libh==NULL) {
@@ -151,7 +151,8 @@
}
log_debug("Shell library %s loaded",appf);
#endif /* ifdef OS_DARWIN */
-#ifdef OSD_POSIX
+#if defined(OSD_POSIX) || defined(HAVE_KAFFEVM)
+ /* BS2000 and kaffe does not allow to call JNI_CreateJavaVM indirectly */
#else
symb=dso_symbol(libh,"JNI_CreateJavaVM");
if (symb==NULL) {
@@ -179,7 +180,13 @@
#else
arg.version=JNI_VERSION_1_2;
#endif
-#ifdef OSD_POSIX_JFC
+#if defined(OSD_POSIX) || defined(HAVE_KAFFEVM)
+
+#if defined(HAVE_KAFFEVM)
+ memset(&arg, 0, sizeof(arg));
+ arg.version = JNI_VERSION_1_4;
+#endif
+
if (JNI_GetDefaultJavaVMInitArgs(&arg)<0) {
log_error("Cannot init default JVM default args");
return(false);
@@ -217,7 +224,7 @@
}
/* And finally create the Java VM */
-#ifdef OSD_POSIX
+#if defined(OSD_POSIX) || defined(HAVE_KAFFEVM)
ret=JNI_CreateJavaVM(&jvm, &env, &arg);
#else
ret=(*symb)(&jvm, &env, &arg);
Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=354472&r1=354471&r2=354472&view=diff
==============================================================================
--- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original)
+++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Tue Dec 6 08:48:47 2005
@@ -533,7 +533,7 @@
log_debug("Waiting for a signal to be delivered");
create_tmp_file(args);
while (!stopping) {
-#ifdef OSD_POSIX
+#if defined(OSD_POSIX) || defined(HAVE_KAFFEVM)
java_sleep(60);
/* pause(); */
#else
Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c?rev=354472&r1=354471&r2=354472&view=diff
==============================================================================
--- jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c (original)
+++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c Tue Dec 6 08:48:47 2005
@@ -72,6 +72,9 @@
#if defined(HAVE_SABLEVM)
"$JAVA_HOME/lib/libsablevm.so", /* sableVM */
#endif
+#if defined(HAVE_KAFFEVM)
+ "$JAVA_HOME/jre/lib/" CPU "/libkaffevm.so", /* kaffe */
+#endif
"$JAVA_HOME/jre/lib/" CPU "/classic/libjvm.so", /* Sun JDK 1.2 */
"$JAVA_HOME/jre/lib/" CPU "/client/libjvm.so", /* Sun JDK 1.3 */
"$JAVA_HOME/jre/lib/" CPU "/libjvm.so", /* Sun JDK */
Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4?rev=354472&r1=354471&r2=354472&view=diff
==============================================================================
--- jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 (original)
+++ jakarta/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 Tue Dec 6 08:48:47 2005
@@ -114,6 +114,7 @@
then
AC_MSG_RESULT([Using kaffe: $KAFFEVM])
CFLAGS="$CFLAGS -DHAVE_KAFFEVM"
+ LDFLAGS="$LDFLAGS -Wl,-rpath $JAVA_HOME/jre/lib/$HOST_CPU -L $JAVA_HOME/jre/lib/$HOST_CPU -lkaffevm"
fi
fi
])
Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4?rev=354472&r1=354471&r2=354472&view=diff
==============================================================================
--- jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 (original)
+++ jakarta/commons/proper/daemon/trunk/src/native/unix/support/apsupport.m4 Tue Dec 6 08:48:47 2005
@@ -69,35 +69,39 @@
esac
case $host_cpu in
powerpc)
- CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\"" ;;
+ CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\""
+ HOST_CPU=$host_cpu;;
sparc*)
- CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\"" ;;
+ CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\""
+ HOST_CPU=$host_cpu;;
i?86)
- CFLAGS="$CFLAGS -DCPU=\\\"i386\\\"" ;;
+ CFLAGS="$CFLAGS -DCPU=\\\"i386\\\""
+ HOST_CPU=i386;;
x86_64)
- CFLAGS="$CFLAGS -DCPU=\\\"amd64\\\"" ;;
+ CFLAGS="$CFLAGS -DCPU=\\\"amd64\\\""
+ HOST_CPU=amd64;;
bs2000)
CFLAGS="$CFLAGS -DCPU=\\\"osd\\\" -DCHARSET_EBCDIC -DOSD_POSIX"
supported_os="osd"
LDFLAGS="-Kno_link_stdlibs -B llm4 -l BLSLIB"
LDCMD="/opt/C/bin/cc"
- ;;
+ HOST_CPU=osd;;
mips)
CFLAGS="$CFLAGS -DCPU=\\\"mips\\\""
supported_os="mips"
- ;;
+ HOST_CPU=mips;;
alpha*)
CFLAGS="$CFLAGS -DCPU=\\\"alpha\\\""
supported_os="alpha"
- ;;
+ HOST_CPU=alpha;;
hppa2.0w)
CFLAGS="$CFLAGS -DCPU=\\\"PA_RISC2.0W\\\""
supported_os="hp-ux"
- ;;
+ HOST_CPU=PA_RISC2.0W;;
hppa2.0)
CFLAGS="$CFLAGS -DCPU=\\\"PA_RISC2.0\\\""
supported_os="hp-ux"
- ;;
+ HOST_CPU=PA_RISC2.0;;
*)
AC_MSG_RESULT([failed])
AC_MSG_ERROR([Unsupported CPU architecture "$host_cpu"]);;
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org