aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/jamvm
diff options
context:
space:
mode:
authorRobert Schuster <robertschuster@fsfe.org>2010-07-14 08:50:25 +0200
committerRobert Schuster <robertschuster@fsfe.org>2010-07-16 14:07:49 +0200
commita573f4c1b5a5bdd8def89a33128ff7c4d544f30c (patch)
tree18a952887b7788466c1598ba4d1b803e96d043e8 /recipes/jamvm
parente2cd1d0756f2d228a64d280afe1b064c27a8aa96 (diff)
downloadopenembedded-a573f4c1b5a5bdd8def89a33128ff7c4d544f30c.tar.gz
jamvm-native: Add automatic restart workaround to native package as well.
Diffstat (limited to 'recipes/jamvm')
-rw-r--r--recipes/jamvm/files/java15
-rw-r--r--recipes/jamvm/jamvm-native.inc7
-rw-r--r--recipes/jamvm/jamvm-native_1.5.3.bb2
3 files changed, 22 insertions, 2 deletions
diff --git a/recipes/jamvm/files/java b/recipes/jamvm/files/java
new file mode 100644
index 0000000000..0cc72cbed8
--- /dev/null
+++ b/recipes/jamvm/files/java
@@ -0,0 +1,15 @@
+#!/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 97c17c4464..c1c1dada90 100644
--- a/recipes/jamvm/jamvm-native.inc
+++ b/recipes/jamvm/jamvm-native.inc
@@ -13,12 +13,17 @@ 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"
+
inherit native
S = "${WORKDIR}/jamvm-${PV}"
do_install_append() {
- ln -sf jamvm ${STAGING_BINDIR}/java
+ install -d ${D}${bindir}
+ install -m 0755 ${WORKDIR}/java ${D}${bindir}/
}
# 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 10036efd1f..0c40b1bf70 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 = "r1"
+PR = "r2"
SRC_URI += "file://jamvm-1.5.3-jni_h-noinst.patch"