From b229a38bdb5cc0ebadcd36d6f71380aa932efec3 Mon Sep 17 00:00:00 2001 From: Henning Heinold Date: Fri, 3 Jan 2014 21:42:17 +0100 Subject: cacao-initial: add cacao-initial recipe from oe-classic --- recipes-core/cacao/cacao-initial_0.98.bb | 42 ++++++++++++++++++++ recipes-core/cacao/files/cacao-0.98-initial.patch | 45 ++++++++++++++++++++++ .../cacao/files/disable_hw_exceptions.patch | 22 +++++++++++ 3 files changed, 109 insertions(+) create mode 100644 recipes-core/cacao/cacao-initial_0.98.bb create mode 100644 recipes-core/cacao/files/cacao-0.98-initial.patch create mode 100644 recipes-core/cacao/files/disable_hw_exceptions.patch (limited to 'recipes-core/cacao') diff --git a/recipes-core/cacao/cacao-initial_0.98.bb b/recipes-core/cacao/cacao-initial_0.98.bb new file mode 100644 index 0000000..b6bcd1c --- /dev/null +++ b/recipes-core/cacao/cacao-initial_0.98.bb @@ -0,0 +1,42 @@ +DESCRIPTION = "CacaoVM for use as OpenEmbedded's Java VM" +HOMEPAGE = "http://www.cacaojvm.org/" +LICENSE = "GPL-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" +SECTION = "interpreters" + +PROVIDES = "virtual/java-initial" + +inherit native autotools + +DEPENDS = "zlib-native libtool-native fastjar-native classpath-initial jikes-initial" + +SRC_URI = "\ + http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-${PV}/cacao-${PV}.tar.bz2; \ + file://cacao-0.98-initial.patch \ + file://disable_hw_exceptions.patch \ + " + +# libjvm disabled - it would conflict with cacao-native installations +EXTRA_OECONF = "\ + --enable-debug \ + --with-classpath-libdir=${libdir} \ + --with-classpath-includedir=${includedir}/classpath-initial \ + --with-classpath-classes=${datadir}/classpath-initial/glibj.zip \ + --with-vm-zip=${datadir}/cacao-initial/vm.zip \ + --program-suffix=-initial \ + --disable-libjvm \ + " + +# enforces the usage of jikes-initial +export JAVAC="jikes-initial" + +# enforces the usage of fastjar +export JAR="fastjar" + +do_configure_append() { + # Fix the executable name in the wrapper script. + sed -i -e "s|exec cacao|exec cacao-initial|" src/scripts/java.in +} + +SRC_URI[md5sum] = "8b8907c8b925761c9410bcadb9705346" +SRC_URI[sha256sum] = "cb9363add825cedf77764fc49a223aaf43f0a9f485b711ba8c92f16b13fff188" diff --git a/recipes-core/cacao/files/cacao-0.98-initial.patch b/recipes-core/cacao/files/cacao-0.98-initial.patch new file mode 100644 index 0000000..30b6d14 --- /dev/null +++ b/recipes-core/cacao/files/cacao-0.98-initial.patch @@ -0,0 +1,45 @@ +Index: cacao-0.98/configure.ac +=================================================================== +--- cacao-0.98.orig/configure.ac 2007-12-19 22:07:55.000000000 +0100 ++++ cacao-0.98/configure.ac 2007-12-19 22:08:02.000000000 +0100 +@@ -27,7 +27,7 @@ + dnl Process this file with autoconf to produce a configure script. + + +-AC_INIT(cacao, 0.98, cacao@cacaojvm.org) ++AC_INIT(cacao-initial, 0.98, cacao@cacaojvm.org) + AC_CONFIG_SRCDIR(src/cacao/cacao.c) + AC_CANONICAL_HOST + AC_PREREQ(2.59) +Index: cacao-0.98/src/vm/vm.c +=================================================================== +--- cacao-0.98.orig/src/vm/vm.c 2007-12-19 22:31:19.000000000 +0100 ++++ cacao-0.98/src/vm/vm.c 2007-12-19 22:32:36.000000000 +0100 +@@ -623,7 +623,7 @@ + #else + puts(" java.boot.class.path : "CLASSPATH_CLASSES""); + #endif +- puts(" gnu.classpath.boot.library.path: "CLASSPATH_LIBDIR"/classpath\n"); ++ puts(" gnu.classpath.boot.library.path: "CLASSPATH_LIBDIR"/classpath-initial\n"); + + puts("Runtime variables:\n"); + printf(" maximum heap size : %d\n", opt_heapmaxsize); +@@ -828,15 +828,15 @@ + + /* and finally set the path to GNU Classpath libraries */ + +- len = strlen(cacao_prefix) + strlen("/lib/classpath") + strlen("0"); ++ len = strlen(cacao_prefix) + strlen("/lib/classpath-initial") + strlen("0"); + + classpath_libdir = MNEW(char, len); + strcpy(classpath_libdir, cacao_prefix); +- strcat(classpath_libdir, "/lib/classpath"); ++ strcat(classpath_libdir, "/lib/classpath-initial"); + #else + cacao_prefix = CACAO_PREFIX; + cacao_libjvm = CACAO_LIBDIR"/libjvm"; +- classpath_libdir = CLASSPATH_LIBDIR"/classpath"; ++ classpath_libdir = CLASSPATH_LIBDIR"/classpath-initial"; + #endif + + /* set the bootclasspath */ diff --git a/recipes-core/cacao/files/disable_hw_exceptions.patch b/recipes-core/cacao/files/disable_hw_exceptions.patch new file mode 100644 index 0000000..bf2e998 --- /dev/null +++ b/recipes-core/cacao/files/disable_hw_exceptions.patch @@ -0,0 +1,22 @@ +Index: cacao-0.98/src/vm/exceptions.c +=================================================================== +--- cacao-0.98.orig/src/vm/exceptions.c 2007-06-05 09:41:07.000000000 +0200 ++++ cacao-0.98/src/vm/exceptions.c 2014-01-03 16:21:42.430783148 +0100 +@@ -89,17 +89,6 @@ + + bool exceptions_init(void) + { +- int pagesize; +- +- /* mmap a memory page at address 0x0, so our hardware-exceptions +- work. */ +- +- pagesize = getpagesize(); +- +- (void) memory_mmap_anon(NULL, pagesize, PROT_NONE, MAP_PRIVATE | MAP_FIXED); +- +- /* check if we get into trouble with our hardware-exceptions */ +- + if (OFFSET(java_bytearray, data) <= EXCEPTION_HARDWARE_PATCHER) + vm_abort("signal_init: array-data offset is less or equal the maximum hardware-exception displacement: %d <= %d", OFFSET(java_bytearray, data), EXCEPTION_HARDWARE_PATCHER); + -- cgit v1.2.3-54-g00ecf