summaryrefslogtreecommitdiff
path: root/java/cacao/files
diff options
context:
space:
mode:
Diffstat (limited to 'java/cacao/files')
-rw-r--r--java/cacao/files/patch-boehm-gc-configure10
-rw-r--r--java/cacao/files/patch-boehm-gc-dbg_ml.c56
-rw-r--r--java/cacao/files/patch-boehm-gc-dyn_load.c15
-rw-r--r--java/cacao/files/patch-boehm-gc-include-private-gcconfig.h74
-rw-r--r--java/cacao/files/patch-boehm-gc-os_dep.c29
-rw-r--r--java/cacao/files/patch-configure30
-rw-r--r--java/cacao/files/patch-src-native-jni.h16
7 files changed, 157 insertions, 73 deletions
diff --git a/java/cacao/files/patch-boehm-gc-configure b/java/cacao/files/patch-boehm-gc-configure
deleted file mode 100644
index b7b7a162b5ff..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=$PTHREAD_LIBS
- ;;
- *-*-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
index 216ff347a3e2..6af1b9490cbe 100644
--- a/java/cacao/files/patch-boehm-gc-dbg_ml.c
+++ b/java/cacao/files/patch-boehm-gc-dbg_ml.c
@@ -1,6 +1,6 @@
---- 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 @@
+--- src/boehm-gc/dbg_mlc.c.orig Tue May 13 16:59:49 2003
++++ src/mm/boehm-gc/dbg_mlc.c Wed May 12 20:13:19 2004
+@@ -414,6 +414,23 @@
GC_register_displacement((word)sizeof(oh) + offset);
}
@@ -13,43 +13,46 @@
+{
+ 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;
++ *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)
+ # ifdef __STDC__
+ GC_PTR GC_debug_malloc(size_t lb, GC_EXTRA_PARAMS)
+ # else
+@@ -428,6 +445,13 @@
{
- void * result = GC_malloc(lb + DEBUG_BYTES);
-
+ GC_PTR 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";
++ 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;
-
+ GC_err_printf1("GC_debug_malloc(%ld) returning NIL (",
+ (unsigned long) lb);
+@@ -789,6 +813,13 @@
+ register size_t old_sz;
+ register hdr * hhdr;
+
+#ifdef GC_ADD_CALLER
+ if (s == NULL) {
-+ GC_caller_func_offset(ra, &s, &i);
-+ if (s == NULL)
-+ s = "unknown";
++ 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 @@
+ GC_err_printf1(
+@@ -1094,7 +1125,11 @@
}
#ifdef GC_ADD_CALLER
@@ -62,14 +65,17 @@
#else
# define RA
#endif
-
- GC_API void * GC_CALL GC_debug_malloc_replacement(size_t lb)
+@@ -1102,12 +1137,12 @@
+ GC_PTR GC_debug_malloc_replacement(lb)
+ 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)
+ GC_PTR GC_debug_realloc_replacement(p, lb)
+ GC_PTR 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-dyn_load.c b/java/cacao/files/patch-boehm-gc-dyn_load.c
new file mode 100644
index 000000000000..f9d834e8f59e
--- /dev/null
+++ b/java/cacao/files/patch-boehm-gc-dyn_load.c
@@ -0,0 +1,15 @@
+--- src/boehm-gc/dyn_load.c.orig Thu May 6 08:03:06 2004
++++ src/mm/boehm-gc/dyn_load.c Sun Oct 31 01:53:01 2004
+@@ -97,6 +97,12 @@
+ # else
+ # define ElfW(type) Elf64_##type
+ # endif
++# elif defined(__FreeBSD__)
++# if __ELF_WORD_SIZE == 32
++# define ElfW(type) Elf32_##type
++# else
++# define ElfW(type) Elf64_##type
++# endif
+ # else
+ # if !defined(ELF_CLASS) || ELF_CLASS == ELFCLASS32
+ # define ElfW(type) Elf32_##type
diff --git a/java/cacao/files/patch-boehm-gc-include-private-gcconfig.h b/java/cacao/files/patch-boehm-gc-include-private-gcconfig.h
index 5f7dc735c541..5c70445450c8 100644
--- a/java/cacao/files/patch-boehm-gc-include-private-gcconfig.h
+++ b/java/cacao/files/patch-boehm-gc-include-private-gcconfig.h
@@ -1,21 +1,31 @@
---- 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-09-19 13:39:49.000000000 -0400
-@@ -69,8 +69,9 @@
+--- src/boehm-gc/include/private/gcconfig.h.rorig Sat Oct 15 16:40:25 2005
++++ src/mm/boehm-gc/include/private/gcconfig.h Sat Oct 15 16:42:43 2005
+@@ -62,7 +62,7 @@
/* 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__)
+-# if !defined(LINUX) && !defined(NETBSD)
++# if !defined(LINUX) && !defined(NETBSD) && !defined(FREEBSD)
# define NOSYS
# define mach_type_known
# endif
-@@ -366,6 +367,10 @@
- # define SPARC
+@@ -334,10 +334,22 @@
+ # define X86_64
# define mach_type_known
# endif
++# if defined(__FreeBSD__) && defined(__amd64__)
++# define X86_64
++# define mach_type_known
++# endif
+ # if defined(FREEBSD) && defined(__sparc__)
+ # define SPARC
+ # define mach_type_known
+-#endif
++# endif
++# if defined(FREEBSD) && defined(__powerpc__)
++# define POWERPC
++# define mach_type_known
++# endif
+# if defined(FREEBSD) && defined(__arm__)
+# define ARM32
+# define mach_type_known
@@ -23,8 +33,8 @@
# if defined(bsdi) && (defined(i386) || defined(__i386__))
# define I386
# define BSDI
-@@ -1898,6 +1903,16 @@
- # define DATAEND ((ptr_t)(&_end))
+@@ -845,6 +857,16 @@
+ # define DATASTART GC_data_start
# define DYNAMIC_LOADING
# endif
+# ifdef FREEBSD
@@ -38,5 +48,41 @@
+# define SEARCH_FOR_DATA_START
+# endif
# ifdef NOSYS
- /* __data_start is usually defined in the target linker script. */
- extern int __data_start[];
+ # define ALIGNMENT 4
+ # define OS_TYPE "NOSYS"
+@@ -1807,6 +1829,17 @@
+ # endif
+ # define USE_GENERIC_PUSH_REGS
+ # 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 LINUX
+ # define OS_TYPE "LINUX"
+ # define LINUX_STACKBOTTOM
+@@ -1957,6 +1990,17 @@
+ # ifdef __ELF__
+ # define DYNAMIC_LOADING
+ # endif
++# define HEURISTIC2
++ extern char etext[];
++# define SEARCH_FOR_DATA_START
++# endif
++# ifdef FREEBSD
++# define OS_TYPE "FREEBSD"
++# define SIG_SUSPEND SIGUSR1
++# define SIG_THR_RESTART SIGUSR2
++# ifdef __ELF__
++# define DYNAMIC_LOADING
++# endif
+ # define HEURISTIC2
+ extern char etext[];
+ # define SEARCH_FOR_DATA_START
diff --git a/java/cacao/files/patch-boehm-gc-os_dep.c b/java/cacao/files/patch-boehm-gc-os_dep.c
new file mode 100644
index 000000000000..657ac9500dd5
--- /dev/null
+++ b/java/cacao/files/patch-boehm-gc-os_dep.c
@@ -0,0 +1,29 @@
+--- src/boehm-gc/os_dep.c.orig Thu May 19 20:48:49 2005
++++ src/mm/boehm-gc/os_dep.c Fri Jun 17 21:28:07 2005
+@@ -699,7 +699,7 @@
+ || defined(HURD) || defined(NETBSD)
+ static struct sigaction old_segv_act;
+ # if defined(IRIX5) || defined(HPUX) \
+- || defined(HURD) || defined(NETBSD)
++ || defined(HURD) || defined(NETBSD) || defined(FREEBSD)
+ static struct sigaction old_bus_act;
+ # endif
+ # else
+@@ -714,7 +714,7 @@
+ # endif
+ {
+ # if defined(SUNOS5SIGS) || defined(IRIX5) \
+- || defined(OSF1) || defined(HURD) || defined(NETBSD)
++ || defined(OSF1) || defined(HURD) || defined(NETBSD) || defined(FREEBSD)
+ struct sigaction act;
+
+ act.sa_handler = h;
+@@ -736,7 +736,7 @@
+ # else
+ (void) sigaction(SIGSEGV, &act, &old_segv_act);
+ # if defined(IRIX5) \
+- || defined(HPUX) || defined(HURD) || defined(NETBSD)
++ || defined(HPUX) || defined(HURD) || defined(NETBSD) || defined(FREEBSD)
+ /* Under Irix 5.x or HP/UX, we may get SIGBUS. */
+ /* Pthreads doesn't exist under Irix 5.x, so we */
+ /* don't have to worry in the threads case. */
diff --git a/java/cacao/files/patch-configure b/java/cacao/files/patch-configure
index 266529eeb03c..813d8e010b3c 100644
--- a/java/cacao/files/patch-configure
+++ b/java/cacao/files/patch-configure
@@ -1,29 +1,11 @@
---- 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"
+--- configure.orig Sun Feb 4 14:38:16 2007
++++ configure Sun Feb 4 15:30:30 2007
+@@ -2662,7 +2661,7 @@
+ ARCH_CFLAGS="-mcpu=v9 -m64 -D__SPARC_64__"
;;
-x86_64 )
+x86_64 | amd64 )
ARCH_DIR="x86_64"
- ARCH_FLAGS="-m64 -D__X86_64__"
- JAVA_ARCH="amd64"
-@@ -9731,7 +9731,7 @@
- $as_echo_n "(cached) " >&6
- else
- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lpthread $LIBS"
-+LIBS="$PTHREAD_LIBS $LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-
-@@ -9760,7 +9760,7 @@
- #define HAVE_LIBPTHREAD 1
- _ACEOF
-
-- LIBS="-lpthread $LIBS"
-+ LIBS="$PTHREAD_LIBS $LIBS"
-
- fi
-
+ ARCH_CFLAGS="-D__X86_64__"
+ ;;
diff --git a/java/cacao/files/patch-src-native-jni.h b/java/cacao/files/patch-src-native-jni.h
new file mode 100644
index 000000000000..048fa5709b0c
--- /dev/null
+++ b/java/cacao/files/patch-src-native-jni.h
@@ -0,0 +1,16 @@
+--- src/native/jni.h.orig 2007-04-02 13:23:24.000000000 +0200
++++ src/native/jni.h 2009-01-15 20:32:31.000000000 +0100
+@@ -45,10 +45,12 @@
+
+ #include CLASSPATH_JNI_H
+
+-
+ #ifndef _JNI_H
+ #define _JNI_H
+
++#define JNINativeInterface JNINativeInterface_
++#define JNIInvokeInterface JNIInvokeInterface_
++
+ /* forward typedefs ***********************************************************/
+
+ typedef struct localref_table localref_table;