[oe-commits] Robert Schuster : jamvm-native: Removed restart workaround, use libffi instead of custom assembly code.

git version control git at git.openembedded.org
Fri Jul 16 12:06:42 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 505ca9b45dc38d866001399e31e400e0001bf466
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=505ca9b45dc38d866001399e31e400e0001bf466

Author: Robert Schuster <robertschuster at fsfe.org>
Date:   Fri Jul 16 14:05:48 2010 +0200

jamvm-native: Removed restart workaround, use libffi instead of custom assembly code.

---

 recipes/jamvm/files/java            |   15 ---------------
 recipes/jamvm/jamvm-native.inc      |   12 +++++++-----
 recipes/jamvm/jamvm-native_1.5.3.bb |    2 +-
 3 files changed, 8 insertions(+), 21 deletions(-)

diff --git a/recipes/jamvm/files/java b/recipes/jamvm/files/java
deleted file mode 100644
index 0cc72cb..0000000
--- a/recipes/jamvm/files/java
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-#
-# Wrapper which (almost) silently restarts the VM in case of segfaults.
-
-redo_from_start=1;
-while [ $redo_from_start -eq 1 ]; do
-    echo "Running JamVM-native: ${@}"
-    redo_from_start=0;
-    jamvm ${1+"$@"}
-    if [ $? -eq 139 ]; then
-        echo "JamVM-native crashed - silently trying again"
-        redo_from_start=1;
-    fi
-done
-
diff --git a/recipes/jamvm/jamvm-native.inc b/recipes/jamvm/jamvm-native.inc
index c1c1dad..853c38d 100644
--- a/recipes/jamvm/jamvm-native.inc
+++ b/recipes/jamvm/jamvm-native.inc
@@ -1,10 +1,14 @@
 require jamvm.inc 
 
-DEPENDS = "zlib-native classpath-native ecj-initial"
+DEPENDS = "zlib-native classpath-native ecj-initial libffi-native"
 RDEPENDS_${PN} = ""
 
 PROVIDES = "virtual/java-native"
 
+# Use libffi instead of handcoded JNI calling code. This code seems to have issues which only randomly
+# trigger a segfault.
+EXTRA_OECONF += "--enable-ffi"
+
 RPROVIDES_jamvm = ""
 
 # This uses 32 bit arm, so force the instruction set to arm, not thumb
@@ -13,9 +17,7 @@ ARM_INSTRUCTION_SET = "arm"
 # Needed for big compilation targets like OpenJDK
 CFLAGS += "-DDEFAULT_MAX_HEAP=2048*MB"
 
-EXTRA_OECONF += "--with-program-suffix=-bin"
-
-SRC_URI += "file://java"
+#SRC_URI += "file://java"
 
 inherit native
 
@@ -23,7 +25,7 @@ S = "${WORKDIR}/jamvm-${PV}"
 
 do_install_append() {
 	install -d ${D}${bindir}
-	install -m 0755 ${WORKDIR}/java ${D}${bindir}/
+	ln -s ${bindir}/jamvm ${D}${bindir}/java
 }
 
 # Enforce usage of ecj-initial.
diff --git a/recipes/jamvm/jamvm-native_1.5.3.bb b/recipes/jamvm/jamvm-native_1.5.3.bb
index 0c40b1b..72a1b2a 100644
--- a/recipes/jamvm/jamvm-native_1.5.3.bb
+++ b/recipes/jamvm/jamvm-native_1.5.3.bb
@@ -2,7 +2,7 @@
 
 require jamvm-native.inc
 
-PR = "r2"
+PR = "r3"
 
 SRC_URI += "file://jamvm-1.5.3-jni_h-noinst.patch"
 





More information about the Openembedded-commits mailing list