jamvm-native: Add automatic restart workaround to native package as well.
authorRobert Schuster <robertschuster@fsfe.org>
Wed, 14 Jul 2010 06:50:25 +0000 (08:50 +0200)
committerRobert Schuster <robertschuster@fsfe.org>
Fri, 16 Jul 2010 12:07:49 +0000 (14:07 +0200)
recipes/jamvm/files/java [new file with mode: 0644]
recipes/jamvm/jamvm-native.inc
recipes/jamvm/jamvm-native_1.5.3.bb

diff --git a/recipes/jamvm/files/java b/recipes/jamvm/files/java
new file mode 100644 (file)
index 0000000..0cc72cb
--- /dev/null
@@ -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
+
index 97c17c4..c1c1dad 100644 (file)
@@ -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.
index 10036ef..0c40b1b 100644 (file)
@@ -2,7 +2,7 @@
 
 require jamvm-native.inc
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI += "file://jamvm-1.5.3-jni_h-noinst.patch"