summaryrefslogtreecommitdiff
path: root/java/cacao/files
diff options
context:
space:
mode:
Diffstat (limited to 'java/cacao/files')
-rw-r--r--java/cacao/files/gcj.patch20
-rw-r--r--java/cacao/files/patch-boehm-gc__configure10
-rw-r--r--java/cacao/files/patch-boehm-gc__dbg_ml.c76
-rw-r--r--java/cacao/files/patch-boehm-gc__include__gc.h10
-rw-r--r--java/cacao/files/patch-boehm-gc__include__private__gcconfig.h89
-rw-r--r--java/cacao/files/patch-configure11
-rw-r--r--java/cacao/files/patch-src__cacao__cacao.cpp14
-rw-r--r--java/cacao/files/patch-src__threads__posix__thread-posix.cpp11
-rw-r--r--java/cacao/files/patch-src__threads__thread.cpp11
-rw-r--r--java/cacao/files/patch-src__vm__jit__i386__freebsd__md-os.cpp334
-rw-r--r--java/cacao/files/patch-src__vm__jit__x86_64__freebsd__md-os.cpp216
-rw-r--r--java/cacao/files/patch-src__vm__properties.cpp50
12 files changed, 0 insertions, 852 deletions
diff --git a/java/cacao/files/gcj.patch b/java/cacao/files/gcj.patch
deleted file mode 100644
index caedccf7f2f4..000000000000
--- a/java/cacao/files/gcj.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/classes/Makefile.in.orig 2012-09-03 12:10:18.000000000 -0400
-+++ src/classes/Makefile.in 2012-10-05 15:41:54.000000000 -0400
-@@ -531,7 +531,7 @@
-
- @ENABLE_ZLIB_TRUE@vm.zip: $(VM_JAVA_FILES)
- @ENABLE_ZLIB_TRUE@ $(mkdir_p) classes
--@ENABLE_ZLIB_TRUE@ $(JAVAC) -bootclasspath $(BOOTCLASSPATH) -source 1.5 -target 1.5 -d classes $(VM_JAVA_FILES)
-+@ENABLE_ZLIB_TRUE@ $(JAVAC) $(JAVACFLAGS) --bootclasspath=$(BOOTCLASSPATH) -fsource=1.5 -ftarget=1.5 -d classes $(VM_JAVA_FILES)
- @ENABLE_ZLIB_TRUE@ @if test "$(JAR)" = "zip" -o "$(JAR)" = "zip.exe"; then \
- @ENABLE_ZLIB_TRUE@ cd classes && $(JAR) -r -D $(VM_ZIP) .; \
- @ENABLE_ZLIB_TRUE@ else \
-@@ -539,7 +539,7 @@
- @ENABLE_ZLIB_TRUE@ fi
- @ENABLE_ZLIB_FALSE@nozip: $(VM_JAVA_FILES)
- @ENABLE_ZLIB_FALSE@ $(mkdir_p) classes
--@ENABLE_ZLIB_FALSE@ $(JAVAC) -bootclasspath $(BOOTCLASSPATH) -source 1.5 -target 1.5 -d classes $(VM_JAVA_FILES)
-+@ENABLE_ZLIB_FALSE@ $(JAVAC) $(JAVACFLAGS) --bootclasspath=$(BOOTCLASSPATH) -fsource=1.5 -ftarget=1.5 -d classes $(VM_JAVA_FILES)
-
- @ENABLE_ZLIB_FALSE@install-data-local: nozip
- @ENABLE_ZLIB_FALSE@ $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
diff --git a/java/cacao/files/patch-boehm-gc__configure b/java/cacao/files/patch-boehm-gc__configure
deleted file mode 100644
index fa6ac04df761..000000000000
--- a/java/cacao/files/patch-boehm-gc__configure
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/mm/boehm-gc/configure.orig 2012-09-03 12:10:04.000000000 -0400
-+++ src/mm/boehm-gc/configure 2012-09-19 14:42:52.000000000 -0400
-@@ -5063,6 +5063,7 @@
- $as_echo "#define GC_FREEBSD_THREADS 1" >>confdefs.h
-
- INCLUDES="$INCLUDES -pthread"
-+ THREADDLLIBS=-lpthread
- ;;
- *-*-kfreebsd*-gnu)
- $as_echo "#define GC_FREEBSD_THREADS 1" >>confdefs.h
diff --git a/java/cacao/files/patch-boehm-gc__dbg_ml.c b/java/cacao/files/patch-boehm-gc__dbg_ml.c
deleted file mode 100644
index 216ff347a3e2..000000000000
--- a/java/cacao/files/patch-boehm-gc__dbg_ml.c
+++ /dev/null
@@ -1,76 +0,0 @@
---- src/mm/boehm-gc/dbg_mlc.c.orig 2012-09-03 12:10:00.000000000 -0400
-+++ src/mm/boehm-gc/dbg_mlc.c 2012-09-19 13:02:15.000000000 -0400
-@@ -466,10 +466,34 @@
- GC_register_displacement((word)sizeof(oh) + offset);
- }
-
-+#if defined(__FreeBSD__)
-+#include <dlfcn.h>
-+static void GC_caller_func_offset(ad, symp, offp)
-+const GC_word ad;
-+const char **symp;
-+int *offp;
-+{
-+ Dl_info caller;
-+ if (dladdr((const void *)ad, &caller) && caller.dli_sname != NULL) {
-+ *symp = caller.dli_sname;
-+ *offp = (const char *)ad - (const char *)caller.dli_saddr;
-+ }
-+}
-+#else
-+#define GC_caller_func(ad, symp, offp)
-+#endif
-+
- GC_API void * GC_CALL GC_debug_malloc(size_t lb, GC_EXTRA_PARAMS)
- {
- void * result = GC_malloc(lb + DEBUG_BYTES);
-
-+#ifdef GC_ADD_CALLER
-+ if (s == NULL) {
-+ GC_caller_func_offset(ra, &s, &i);
-+ if (s == NULL)
-+ s = "unknown";
-+ }
-+#endif
- if (result == 0) {
- GC_err_printf("GC_debug_malloc(%lu) returning NIL (",
- (unsigned long) lb);
-@@ -792,6 +816,13 @@
- size_t old_sz;
- hdr * hhdr;
-
-+#ifdef GC_ADD_CALLER
-+ if (s == NULL) {
-+ GC_caller_func_offset(ra, &s, &i);
-+ if (s == NULL)
-+ s = "unknown";
-+ }
-+#endif
- if (p == 0) return(GC_debug_malloc(lb, OPT_RA s, i));
- base = GC_base(p);
- if (base == 0) {
-@@ -1098,17 +1129,21 @@
- }
-
- #ifdef GC_ADD_CALLER
--# define RA GC_RETURN_ADDR,
-+# ifdef GC_RETURN_ADDR_PARENT
-+# define RA GC_RETURN_ADDR_PARENT,
-+# else
-+# define RA GC_RETURN_ADDR,
-+# endif
- #else
- # define RA
- #endif
-
- GC_API void * GC_CALL GC_debug_malloc_replacement(size_t lb)
- {
-- return GC_debug_malloc(lb, RA "unknown", 0);
-+ return GC_debug_malloc(lb, RA NULL, 0);
- }
-
- GC_API void * GC_CALL GC_debug_realloc_replacement(void *p, size_t lb)
- {
-- return GC_debug_realloc(p, lb, RA "unknown", 0);
-+ return GC_debug_realloc(p, lb, RA NULL, 0);
- }
diff --git a/java/cacao/files/patch-boehm-gc__include__gc.h b/java/cacao/files/patch-boehm-gc__include__gc.h
deleted file mode 100644
index 0e1cc9c18294..000000000000
--- a/java/cacao/files/patch-boehm-gc__include__gc.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/boehm-gc/include/gc.h.orig Wed Jun 4 17:07:33 2003
-+++ src/mm/boehm-gc/include/gc.h Wed May 12 20:03:22 2004
-@@ -487,6 +487,7 @@
- /* gcc knows how to retrieve return address, but we don't know */
- /* how to generate call stacks. */
- # define GC_RETURN_ADDR (GC_word)__builtin_return_address(0)
-+# define GC_RETURN_ADDR_PARENT (GC_word)__builtin_return_address(1)
- # else
- /* Just pass 0 for gcc compatibility. */
- # define GC_RETURN_ADDR 0
diff --git a/java/cacao/files/patch-boehm-gc__include__private__gcconfig.h b/java/cacao/files/patch-boehm-gc__include__private__gcconfig.h
deleted file mode 100644
index 49eee7724f36..000000000000
--- a/java/cacao/files/patch-boehm-gc__include__private__gcconfig.h
+++ /dev/null
@@ -1,89 +0,0 @@
---- src/mm/boehm-gc/include/private/gcconfig.h.orig 2012-09-03 12:10:00.000000000 -0400
-+++ src/mm/boehm-gc/include/private/gcconfig.h 2012-10-05 13:21:12.000000000 -0400
-@@ -69,8 +69,9 @@
- /* Determine the machine type: */
- # if defined(__arm__) || defined(__thumb__)
- # define ARM32
--# if !defined(LINUX) && !defined(NETBSD) && !defined(OPENBSD) \
-- && !defined(DARWIN) && !defined(_WIN32) && !defined(__CEGCC__)
-+# if !defined(LINUX) && !defined(FREEBSD) && !defined(NETBSD) \
-+ && !defined(OPENBSD) && !defined(DARWIN) && !defined(_WIN32) \
-+ && !defined(__CEGCC__)
- # define NOSYS
- # define mach_type_known
- # endif
-@@ -366,6 +367,10 @@
- # define SPARC
- # define mach_type_known
- # endif
-+# if defined(FREEBSD) && defined(__arm__)
-+# define ARM32
-+# define mach_type_known
-+# endif
- # if defined(bsdi) && (defined(i386) || defined(__i386__))
- # define I386
- # define BSDI
-@@ -843,8 +848,6 @@
- # ifndef GC_FREEBSD_THREADS
- # define MPROTECT_VDB
- # endif
--# define SIG_SUSPEND SIGUSR1
--# define SIG_THR_RESTART SIGUSR2
- # define FREEBSD_STACKBOTTOM
- # ifdef __ELF__
- # define DYNAMIC_LOADING
-@@ -1032,8 +1035,6 @@
- # endif
- # ifdef FREEBSD
- # define OS_TYPE "FREEBSD"
--# define SIG_SUSPEND SIGUSR1
--# define SIG_THR_RESTART SIGUSR2
- # define FREEBSD_STACKBOTTOM
- # ifdef __ELF__
- # define DYNAMIC_LOADING
-@@ -1284,9 +1285,6 @@
- # define SIG_THR_RESTART (32+5)
- extern int _end[];
- # define DATAEND (ptr_t)(_end)
--# else
--# define SIG_SUSPEND SIGUSR1
--# define SIG_THR_RESTART SIGUSR2
- # endif
- # define FREEBSD_STACKBOTTOM
- # ifdef __ELF__
-@@ -1608,8 +1606,6 @@
- # ifdef FREEBSD
- # define OS_TYPE "FREEBSD"
- /* MPROTECT_VDB is not yet supported at all on FreeBSD/alpha. */
--# define SIG_SUSPEND SIGUSR1
--# define SIG_THR_RESTART SIGUSR2
- # define FREEBSD_STACKBOTTOM
- # ifdef __ELF__
- # define DYNAMIC_LOADING
-@@ -1898,6 +1894,16 @@
- # define DATAEND ((ptr_t)(&_end))
- # define DYNAMIC_LOADING
- # endif
-+# ifdef FREEBSD
-+# define ALIGNMENT 4
-+# define OS_TYPE "FREEBSD"
-+# ifdef __ELF__
-+# define DYNAMIC_LOADING
-+# endif
-+# define HEURISTIC2
-+ extern char etext[];
-+# define SEARCH_FOR_DATA_START
-+# endif
- # ifdef NOSYS
- /* __data_start is usually defined in the target linker script. */
- extern int __data_start[];
-@@ -2066,9 +2072,6 @@
- # define SIG_THR_RESTART (32+5)
- extern int _end[];
- # define DATAEND (ptr_t)(_end)
--# else
--# define SIG_SUSPEND SIGUSR1
--# define SIG_THR_RESTART SIGUSR2
- # endif
- # define FREEBSD_STACKBOTTOM
- # ifdef __ELF__
diff --git a/java/cacao/files/patch-configure b/java/cacao/files/patch-configure
deleted file mode 100644
index 3f19ca642014..000000000000
--- a/java/cacao/files/patch-configure
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure.orig 2012-09-03 12:10:16.000000000 -0400
-+++ configure 2012-09-19 19:08:48.000000000 -0400
-@@ -3626,7 +3626,7 @@
- JAVA_ARCH="sparc"
- ;;
-
--x86_64 )
-+x86_64 | amd64 )
- ARCH_DIR="x86_64"
- ARCH_FLAGS="-m64 -D__X86_64__"
- JAVA_ARCH="amd64"
diff --git a/java/cacao/files/patch-src__cacao__cacao.cpp b/java/cacao/files/patch-src__cacao__cacao.cpp
deleted file mode 100644
index 99980c72f0e1..000000000000
--- a/java/cacao/files/patch-src__cacao__cacao.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
---- src/cacao/cacao.cpp.orig 2012-09-03 12:10:00.000000000 -0400
-+++ src/cacao/cacao.cpp 2012-10-04 14:34:51.000000000 -0400
-@@ -90,7 +90,11 @@
-
- path = (char*) os::malloc(sizeof(char) * 4096);
-
-+# if defined(__FreeBSD__)
-+ if (readlink("/proc/curproc/file", path, 4095) == -1) {
-+# else
- if (readlink("/proc/self/exe", path, 4095) == -1) {
-+# endif
- fprintf(stderr, "main: readlink failed: %s\n", strerror(errno));
- os::abort();
- }
diff --git a/java/cacao/files/patch-src__threads__posix__thread-posix.cpp b/java/cacao/files/patch-src__threads__posix__thread-posix.cpp
deleted file mode 100644
index 7fb8258e83cb..000000000000
--- a/java/cacao/files/patch-src__threads__posix__thread-posix.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/threads/posix/thread-posix.cpp.orig 2012-09-03 12:10:00.000000000 -0400
-+++ src/threads/posix/thread-posix.cpp 2012-10-04 16:42:49.000000000 -0400
-@@ -94,6 +94,8 @@
-
- #if defined(__LINUX__)
- # define GC_LINUX_THREADS
-+#elif defined(__FREEBSD__)
-+# define GC_FREEBSD_THREADS
- #elif defined(__IRIX__)
- # define GC_IRIX_THREADS
- #elif defined(__DARWIN__)
diff --git a/java/cacao/files/patch-src__threads__thread.cpp b/java/cacao/files/patch-src__threads__thread.cpp
deleted file mode 100644
index 8c3129188a93..000000000000
--- a/java/cacao/files/patch-src__threads__thread.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/threads/thread.cpp.orig 2013-06-28 09:22:26.000000000 -0400
-+++ src/threads/thread.cpp 2013-07-08 15:41:56.000000000 -0400
-@@ -51,6 +51,8 @@
- #if defined(ENABLE_GC_BOEHM)
- # if defined(__LINUX__)
- # define GC_LINUX_THREADS
-+# elif defined(__FREEBSD__)
-+# define GC_FREEBSD_THREADS
- # elif defined(__IRIX__)
- # define GC_IRIX_THREADS
- # elif defined(__DARWIN__)
diff --git a/java/cacao/files/patch-src__vm__jit__i386__freebsd__md-os.cpp b/java/cacao/files/patch-src__vm__jit__i386__freebsd__md-os.cpp
deleted file mode 100644
index 27513e080a7e..000000000000
--- a/java/cacao/files/patch-src__vm__jit__i386__freebsd__md-os.cpp
+++ /dev/null
@@ -1,334 +0,0 @@
---- src/vm/jit/i386/freebsd/md-os.cpp.orig 2013-06-28 09:22:26.000000000 -0400
-+++ src/vm/jit/i386/freebsd/md-os.cpp 2013-07-08 16:02:06.000000000 -0400
-@@ -2,6 +2,7 @@
-
- Copyright (C) 1996-2013
- CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
-+ Copyright (C) 2009 Theobroma Systems Ltd.
-
- This file is part of CACAO.
-
-@@ -35,218 +36,55 @@
-
- #include "threads/thread.hpp"
-
--#include "vm/jit/builtin.hpp"
- #include "vm/signallocal.hpp"
-
--#include "vm/jit/asmpart.hpp"
- #include "vm/jit/executionstate.hpp"
--#include "vm/jit/stacktrace.hpp"
- #include "vm/jit/trap.hpp"
-
-
--/* md_signal_handler_sigsegv ***************************************************
--
-- Signal handler for hardware exceptions.
--
--*******************************************************************************/
--
-+/**
-+ * Signal handler for hardware exceptions.
-+ */
- void md_signal_handler_sigsegv(int sig, siginfo_t *siginfo, void *_p)
- {
-- ucontext_t *_uc;
-- mcontext_t *_mc;
-- u1 *pv;
-- u1 *sp;
-- u1 *ra;
-- u1 *xpc;
-- u1 opc;
-- u1 mod;
-- u1 rm;
-- s4 d;
-- s4 disp;
-- ptrint val;
-- s4 type;
-- void *p;
-+ ucontext_t* _uc = (ucontext_t *) _p;
-+ mcontext_t* _mc = &_uc->uc_mcontext;
-
-- _uc = (ucontext_t *) _p;
-- _mc = &_uc->uc_mcontext;
-+ void* xpc = (void*) _mc->mc_eip;
-
-- pv = NULL; /* is resolved during stackframeinfo creation */
-- sp = (u1 *) _mc->mc_esp;
-- xpc = (u1 *) _mc->mc_eip;
-- ra = xpc; /* return address is equal to XPC */
--
-- /* get exception-throwing instruction */
--
-- opc = M_ALD_MEM_GET_OPC(xpc);
-- mod = M_ALD_MEM_GET_MOD(xpc);
-- rm = M_ALD_MEM_GET_RM(xpc);
--
-- /* for values see emit_mov_mem_reg and emit_mem */
--
-- if ((opc == 0x8b) && (mod == 0) && (rm == 5)) {
-- /* this was a hardware-exception */
--
-- d = M_ALD_MEM_GET_REG(xpc);
-- disp = M_ALD_MEM_GET_DISP(xpc);
--
-- /* we use the exception type as load displacement */
--
-- type = disp;
--
-- switch (d) {
-- case EAX:
-- val = _mc->mc_eax;
-- break;
-- case ECX:
-- val = _mc->mc_ecx;
-- break;
-- case EDX:
-- val = _mc->mc_edx;
-- break;
-- case EBX:
-- val = _mc->mc_ebx;
-- break;
-- case ESP:
-- val = _mc->mc_esp;
-- break;
-- case EBP:
-- val = _mc->mc_ebp;
-- break;
-- case ESI:
-- val = _mc->mc_esi;
-- break;
-- case EDI:
-- val = _mc->mc_edi;
-- break;
-- default:
-- vm_abort("md_signal_handler_sigsegv: Unkown register %d", d);
-- }
--
-- if (type == TRAP_COMPILER) {
-- /* The PV from the compiler stub is equal to the XPC. */
--
-- pv = xpc;
--
-- /* We use a framesize of zero here because the call pushed
-- the return addres onto the stack. */
--
-- ra = md_stacktrace_get_returnaddress(sp, 0);
--
-- /* Skip the RA on the stack. */
--
-- sp = sp + 1 * SIZEOF_VOID_P;
--
-- /* The XPC is the RA minus 2, because the RA points to the
-- instruction after the call. */
--
-- xpc = ra - 2;
-- }
-- }
-- else {
-- /* this was a normal NPE */
--
-- type = TRAP_NullPointerException;
-- val = 0;
-- }
--
-- /* Handle the trap. */
--
-- p = trap_handle(type, val, pv, sp, ra, xpc, _p);
--
-- /* Set registers. */
--
-- if (type == TRAP_COMPILER) {
-- if (p == NULL) {
-- _mc->mc_esp = (uintptr_t) sp; // Remove RA from stack.
-- }
-- }
-+ // Handle the trap.
-+ trap_handle(TRAP_SIGSEGV, xpc, _p);
- }
-
-
--/* md_signal_handler_sigfpe ****************************************************
--
-- ArithmeticException signal handler for hardware divide by zero
-- check.
--
--*******************************************************************************/
--
-+/**
-+ * Signal handler for hardware divide by zero (ArithmeticException)
-+ * check.
-+ */
- void md_signal_handler_sigfpe(int sig, siginfo_t *siginfo, void *_p)
- {
-- ucontext_t *_uc;
-- mcontext_t *_mc;
-- u1 *pv;
-- u1 *sp;
-- u1 *ra;
-- u1 *xpc;
-- s4 type;
-- ptrint val;
--
-- _uc = (ucontext_t *) _p;
-- _mc = &_uc->uc_mcontext;
--
-- pv = NULL; /* is resolved during stackframeinfo creation */
-- sp = (u1 *) _mc->mc_esp;
-- xpc = (u1 *) _mc->mc_eip;
-- ra = xpc; /* return address is equal to xpc */
--
-- /* This is an ArithmeticException. */
--
-- type = TRAP_ArithmeticException;
-- val = 0;
-+ ucontext_t* _uc = (ucontext_t *) _p;
-+ mcontext_t* _mc = &_uc->uc_mcontext;
-
-- /* Handle the trap. */
-+ void* xpc = (void*) _mc->mc_eip;
-
-- trap_handle(type, val, pv, sp, ra, xpc, _p);
-+ // Handle the trap.
-+ trap_handle(TRAP_SIGFPE, xpc, _p);
- }
-
-
--/* md_signal_handler_sigill ****************************************************
--
-- Signal handler for hardware patcher traps (ud2).
--
--*******************************************************************************/
--
-+/**
-+ * Signal handler for hardware patcher traps (ud2).
-+ */
- void md_signal_handler_sigill(int sig, siginfo_t *siginfo, void *_p)
- {
-- ucontext_t *_uc;
-- mcontext_t *_mc;
-- u1 *pv;
-- u1 *sp;
-- u1 *ra;
-- u1 *xpc;
-- s4 type;
-- ptrint val;
--
-- _uc = (ucontext_t *) _p;
-- _mc = &_uc->uc_mcontext;
--
-- pv = NULL; /* is resolved during stackframeinfo creation */
-- sp = (u1 *) _mc->mc_esp;
-- xpc = (u1 *) _mc->mc_eip;
-- ra = xpc; /* return address is equal to xpc */
--
-- // Check if the trap instruction is valid.
-- // TODO Move this into patcher_handler.
-- if (patcher_is_valid_trap_instruction_at(xpc) == false) {
-- // Check if the PC has been patched during our way to this
-- // signal handler (see PR85).
-- if (patcher_is_patched_at(xpc) == true)
-- return;
--
-- // We have a problem...
-- log_println("md_signal_handler_sigill: Unknown illegal instruction at 0x%lx", xpc);
--#if defined(ENABLE_DISASSEMBLER)
-- (void) disassinstr(xpc);
--#endif
-- vm_abort("Aborting...");
-- }
--
-- type = TRAP_PATCHER;
-- val = 0;
-+ ucontext_t* _uc = (ucontext_t *) _p;
-+ mcontext_t* _mc = &_uc->uc_mcontext;
-
-- /* Handle the trap. */
-+ void* xpc = (void*) _mc->mc_eip;
-
-- trap_handle(type, val, pv, sp, ra, xpc, _p);
-+ // Handle the trap.
-+ trap_handle(TRAP_SIGILL, xpc, _p);
- }
-
-
-@@ -282,17 +120,21 @@
-
- *******************************************************************************/
-
--void md_executionstate_read(executionstate_t* es, void* context)
-+void md_executionstate_read(executionstate_t *es, void *context)
- {
-- ucontext_t* _uc = (ucontext_t*) context;
-- mcontext_t* _mc = &_uc->uc_mcontext;
-+ ucontext_t *_uc;
-+ mcontext_t *_mc;
-+ s4 i;
-
-- // Read special registers.
-+ _uc = (ucontext_t *) context;
-+ _mc = &_uc->uc_mcontext;
-+
-+ /* read special registers */
- es->pc = (u1 *) _mc->mc_eip;
- es->sp = (u1 *) _mc->mc_esp;
- es->pv = NULL; /* pv must be looked up via AVL tree */
-
-- // Read integer registers.
-+ /* read integer registers */
- es->intregs[EAX] = _mc->mc_eax;
- es->intregs[ECX] = _mc->mc_ecx;
- es->intregs[EDX] = _mc->mc_edx;
-@@ -302,8 +144,8 @@
- es->intregs[ESI] = _mc->mc_esi;
- es->intregs[EDI] = _mc->mc_edi;
-
-- // Read float registers.
-- for (int i = 0; i < FLT_REG_CNT; i++)
-+ /* read float registers */
-+ for (i = 0; i < FLT_REG_CNT; i++)
- es->fltregs[i] = 0xdeadbeefdeadbeefULL;
- }
-
-@@ -314,12 +156,15 @@
-
- *******************************************************************************/
-
--void md_executionstate_write(executionstate_t* es, void* context)
-+void md_executionstate_write(executionstate_t *es, void *context)
- {
-- ucontext_t* _uc = (ucontext_t*) context;
-- mcontext_t* _mc = &_uc->uc_mcontext;
-+ ucontext_t *_uc;
-+ mcontext_t *_mc;
-+
-+ _uc = (ucontext_t *) context;
-+ _mc = &_uc->uc_mcontext;
-
-- // Write integer registers.
-+ /* write integer registers */
- _mc->mc_eax = es->intregs[EAX];
- _mc->mc_ecx = es->intregs[ECX];
- _mc->mc_edx = es->intregs[EDX];
-@@ -329,9 +174,9 @@
- _mc->mc_esi = es->intregs[ESI];
- _mc->mc_edi = es->intregs[EDI];
-
-- // Write special registers.
-- _mc->mc_eip = (uintptr_t) es->pc;
-- _mc->mc_esp = (uintptr_t) es->sp;
-+ /* write special registers */
-+ _mc->mc_eip = (ptrint) es->pc;
-+ _mc->mc_esp = (ptrint) es->sp;
- }
-
-
-@@ -341,7 +186,7 @@
- * Emacs will automagically detect them.
- * ---------------------------------------------------------------------
- * Local variables:
-- * mode: c
-+ * mode: c++
- * indent-tabs-mode: t
- * c-basic-offset: 4
- * tab-width: 4
diff --git a/java/cacao/files/patch-src__vm__jit__x86_64__freebsd__md-os.cpp b/java/cacao/files/patch-src__vm__jit__x86_64__freebsd__md-os.cpp
deleted file mode 100644
index 0e178889bab1..000000000000
--- a/java/cacao/files/patch-src__vm__jit__x86_64__freebsd__md-os.cpp
+++ /dev/null
@@ -1,216 +0,0 @@
---- src/vm/jit/x86_64/freebsd/md-os.cpp.orig 2013-06-28 09:22:27.000000000 -0400
-+++ src/vm/jit/x86_64/freebsd/md-os.cpp 2013-07-08 16:05:56.000000000 -0400
-@@ -2,7 +2,6 @@
-
- Copyright (C) 1996-2013
- CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
-- Copyright (C) 2009 Theobroma Systems Ltd.
-
- This file is part of CACAO.
-
-@@ -28,79 +27,65 @@
-
- #include <cassert>
- #include <cstdlib>
-+#include <stdint.h>
- #include <ucontext.h>
-
--#include "threads/thread.hpp"
--
--#include "vm/signallocal.hpp"
-+#include "vm/types.hpp"
-
--#include "vm/jit/asmpart.hpp"
--#include "vm/jit/stacktrace.hpp"
-+#include "vm/jit/x86_64/codegen.hpp"
-+#include "vm/jit/x86_64/md.hpp"
-
-+#include "threads/thread.hpp"
-
--/* md_signal_handler_sigsegv ***************************************************
-+#include "vm/signallocal.hpp"
-
-- NullPointerException signal handler for hardware null pointer
-- check.
-+#include "vm/jit/executionstate.hpp"
-+#include "vm/jit/trap.hpp"
-
--*******************************************************************************/
-
-+/**
-+ * Signal handler for hardware exception.
-+ */
- void md_signal_handler_sigsegv(int sig, siginfo_t *siginfo, void *_p)
- {
-- ucontext_t *_uc;
-- mcontext_t *_mc;
-- u1 *sp;
-- u1 *ra;
-- u1 *xpc;
-+ ucontext_t* _uc = (ucontext_t *) _p;
-+ mcontext_t* _mc = &_uc->uc_mcontext;
-
-- _uc = (ucontext_t *) _p;
-- _mc = &_uc->uc_mcontext;
-+ void* xpc = (void*) _mc->mc_rip;
-
-- sp = (u1 *) _mc->mc_rsp;
-- xpc = (u1 *) _mc->mc_rip;
-- ra = xpc; /* return address is equal to xpc */
-+ // Handle the trap.
-+ trap_handle(TRAP_SIGSEGV, xpc, _p);
-+}
-
--#if 0
-- /* check for StackOverflowException */
-
-- threads_check_stackoverflow(sp);
--#endif
-+/**
-+ * ArithmeticException signal handler for hardware divide by zero
-+ * check.
-+ */
-+void md_signal_handler_sigfpe(int sig, siginfo_t *siginfo, void *_p)
-+{
-+ ucontext_t* _uc = (ucontext_t *) _p;
-+ mcontext_t* _mc = &_uc->uc_mcontext;
-
-- _mc->mc_rax =
-- (ptrint) stacktrace_hardware_nullpointerexception(NULL, sp, ra, xpc);
-+ void* xpc = (void*) _mc->mc_rip;
-
-- _mc->mc_r10 = (ptrint) xpc; /* REG_ITMP2_XPC */
-- _mc->mc_rip = (ptrint) asm_handle_exception;
-+ // Handle the trap.
-+ trap_handle(TRAP_SIGFPE, xpc, _p);
- }
-
-
--/* md_signal_handler_sigfpe ****************************************************
--
-- ArithmeticException signal handler for hardware divide by zero
-- check.
--
--*******************************************************************************/
--
--void md_signal_handler_sigfpe(int sig, siginfo_t *siginfo, void *_p)
-+/**
-+ * Signal handler for patchers.
-+ */
-+void md_signal_handler_sigill(int sig, siginfo_t *siginfo, void *_p)
- {
-- ucontext_t *_uc;
-- mcontext_t *_mc;
-- u1 *sp;
-- u1 *ra;
-- u1 *xpc;
--
-- _uc = (ucontext_t *) _p;
-- _mc = &_uc->uc_mcontext;
--
-- sp = (u1 *) _mc->mc_rsp;
-- xpc = (u1 *) _mc->mc_rip;
-- ra = xpc; /* return address is equal to xpc */
-+ ucontext_t* _uc = (ucontext_t *) _p;
-+ mcontext_t* _mc = &_uc->uc_mcontext;
-
-- _mc->mc_rax =
-- (ptrint) stacktrace_hardware_arithmeticexception(NULL, sp, ra, xpc);
-+ void* xpc = (void*) _mc->mc_rip;
-
-- _mc->mc_r10 = (ptrint) xpc; /* REG_ITMP2_XPC */
-- _mc->mc_rip = (ptrint) asm_handle_exception;
-+ // Handle the trap.
-+ trap_handle(TRAP_SIGILL, xpc, _p);
- }
-
-
-@@ -130,6 +115,88 @@
- #endif
-
-
-+/* md_executionstate_read ******************************************************
-+
-+ Read the given context into an executionstate.
-+
-+*******************************************************************************/
-+
-+void md_executionstate_read(executionstate_t *es, void *context)
-+{
-+ ucontext_t *_uc;
-+ mcontext_t *_mc;
-+ s4 i;
-+
-+ _uc = (ucontext_t *) context;
-+ _mc = &_uc->uc_mcontext;
-+
-+ /* read special registers */
-+ es->pc = (u1 *) _mc->mc_rip;
-+ es->sp = (u1 *) _mc->mc_rsp;
-+ es->pv = NULL;
-+
-+ /* read integer registers */
-+ es->intregs[RAX] = _mc->mc_rax;
-+ es->intregs[RCX] = _mc->mc_rcx;
-+ es->intregs[RDX] = _mc->mc_rdx;
-+ es->intregs[RBX] = _mc->mc_rbx;
-+ es->intregs[RSP] = _mc->mc_rsp;
-+ es->intregs[RBP] = _mc->mc_rbp;
-+ es->intregs[RSI] = _mc->mc_rsi;
-+ es->intregs[RDI] = _mc->mc_rdi;
-+ es->intregs[R8] = _mc->mc_r8;
-+ es->intregs[R9] = _mc->mc_r9;
-+ es->intregs[R10] = _mc->mc_r10;
-+ es->intregs[R11] = _mc->mc_r11;
-+ es->intregs[R12] = _mc->mc_r12;
-+ es->intregs[R13] = _mc->mc_r13;
-+ es->intregs[R14] = _mc->mc_r14;
-+ es->intregs[R15] = _mc->mc_r15;
-+
-+ /* read float registers */
-+ for (i = 0; i < FLT_REG_CNT; i++)
-+ es->fltregs[i] = 0xdeadbeefdeadbeefL;
-+}
-+
-+
-+/* md_executionstate_write *****************************************************
-+
-+ Write the given executionstate back to the context.
-+
-+*******************************************************************************/
-+
-+void md_executionstate_write(executionstate_t *es, void *context)
-+{
-+ ucontext_t *_uc;
-+ mcontext_t *_mc;
-+
-+ _uc = (ucontext_t *) context;
-+ _mc = &_uc->uc_mcontext;
-+
-+ /* write integer registers */
-+ _mc->mc_rax = es->intregs[RAX];
-+ _mc->mc_rcx = es->intregs[RCX];
-+ _mc->mc_rdx = es->intregs[RDX];
-+ _mc->mc_rbx = es->intregs[RBX];
-+ _mc->mc_rsp = es->intregs[RSP];
-+ _mc->mc_rbp = es->intregs[RBP];
-+ _mc->mc_rsi = es->intregs[RSI];
-+ _mc->mc_rdi = es->intregs[RDI];
-+ _mc->mc_r8 = es->intregs[R8];
-+ _mc->mc_r9 = es->intregs[R9];
-+ _mc->mc_r10 = es->intregs[R10];
-+ _mc->mc_r11 = es->intregs[R11];
-+ _mc->mc_r12 = es->intregs[R12];
-+ _mc->mc_r13 = es->intregs[R13];
-+ _mc->mc_r14 = es->intregs[R14];
-+ _mc->mc_r15 = es->intregs[R15];
-+
-+ /* write special registers */
-+ _mc->mc_rip = (ptrint) es->pc;
-+ _mc->mc_rsp = (ptrint) es->sp;
-+}
-+
-+
- /*
- * These are local overrides for various environment variables in Emacs.
- * Please do not remove this and leave it at the end of the file, where
diff --git a/java/cacao/files/patch-src__vm__properties.cpp b/java/cacao/files/patch-src__vm__properties.cpp
deleted file mode 100644
index 0421d2403a79..000000000000
--- a/java/cacao/files/patch-src__vm__properties.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
---- src/vm/properties.cpp.orig 2013-06-28 09:22:27.000000000 -0400
-+++ src/vm/properties.cpp 2015-01-14 19:18:40.000000000 -0500
-@@ -76,7 +76,11 @@
-
- p = MNEW(char, 4096);
-
-+#if defined(__FreeBSD__)
-+ if (os::readlink("/proc/curproc/file", p, 4095) == -1)
-+#else
- if (os::readlink("/proc/self/exe", p, 4095) == -1)
-+#endif
- os::abort_errno("readlink failed");
-
- /* We have a path like:
-@@ -561,7 +565,7 @@
- void Properties::put(const char* key, const char* value)
- {
- // Try to find the key.
-- std::map<const char*, const char*>::iterator it = _properties.find(key);
-+ std::map<const char*, const char*, ltstr>::iterator it = _properties.find(key);
-
- // The key is already in the map.
- if (it != _properties.end()) {
-@@ -590,7 +594,7 @@
- const char* Properties::get(const char* key)
- {
- // Try to find the key.
-- std::map<const char*, const char*>::iterator it = _properties.find(key);
-+ std::map<const char*, const char*, ltstr>::iterator it = _properties.find(key);
-
- // The key is not in the map.
- if (it == _properties.end())
-@@ -624,7 +628,7 @@
- return;
-
- // Iterator over all properties.
-- for (std::map<const char*, const char*>::iterator it = _properties.begin(); it != _properties.end(); it++) {
-+ for (std::map<const char*, const char*, ltstr>::iterator it = _properties.begin(); it != _properties.end(); it++) {
- // Put into the Java system properties.
- java_handle_t* key = JavaString::from_utf8(it->first);
- java_handle_t* value = JavaString::from_utf8(it->second);
-@@ -641,7 +645,7 @@
- #if !defined(NDEBUG)
- void Properties::dump()
- {
-- for (std::map<const char*, const char*>::iterator it = _properties.begin(); it != _properties.end(); it++) {
-+ for (std::map<const char*, const char*, ltstr>::iterator it = _properties.begin(); it != _properties.end(); it++) {
- log_println("[Properties::dump: key=%s, value=%s]", it->first, it->second);
- }
- }