This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] add FreeBSD/PowerPC bits to boehm-gc


Hello,

this little patch adds support for FreeBSD/PowerPC on boehm-gc.
Tested on FreeBSD CURRENT (aka, 6.0). The test passes. Libffi and libjava on the way to be done. Libffi has some issues with the fact that FreeBSD implements the final SYSV4 standard, while linux ppc implements a draft. Need to do that. But I had first to provide gdb support :)
Ok, for gcc-cvs head?


Andreas

2005-06-12 Andreas Tobler <a.tobler@schweiz.ch>

	* os_dep.c: Add FreeBSD/PowerPC bits.
	(GC_SysVGetDataStart): Likewise.
	* include/private/gcconfig.h: Likewise.

Index: os_dep.c
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/os_dep.c,v
retrieving revision 1.32
diff -u -r1.32 os_dep.c
--- os_dep.c	19 Apr 2005 16:01:35 -0000	1.32
+++ os_dep.c	12 Jun 2005 20:19:53 -0000
@@ -80,7 +80,7 @@
 #   define NEED_FIND_LIMIT
 # endif
 
-#if defined(FREEBSD) && defined(I386)
+#if defined(FREEBSD) && (defined(I386) || defined(powerpc) || defined(__powerpc__))
 #  include <machine/trap.h>
 #  if !defined(PCR)
 #    define NEED_FIND_LIMIT
@@ -1387,7 +1387,7 @@
 }
 # endif
 
-# if defined(FREEBSD) && defined(I386) && !defined(PCR)
+# if defined(FREEBSD) && (defined(I386) || defined(powerpc) || defined(__powerpc__)) && !defined(PCR)
 /* Its unclear whether this should be identical to the above, or 	*/
 /* whether it should apply to non-X86 architectures.			*/
 /* For now we don't assume that there is always an empty page after	*/
Index: include/private/gcconfig.h
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/include/private/gcconfig.h,v
retrieving revision 1.44
diff -u -r1.44 gcconfig.h
--- include/private/gcconfig.h	25 May 2005 13:10:00 -0000	1.44
+++ include/private/gcconfig.h	12 Jun 2005 20:19:56 -0000
@@ -239,6 +239,10 @@
 #    define POWERPC
 #    define mach_type_known
 # endif
+# if defined(FREEBSD) && (defined(powerpc) || defined(__powerpc__))
+#    define POWERPC
+#    define mach_type_known
+# endif
 # if defined(LINUX) && defined(__mc68000__)
 #    define M68K
 #    define mach_type_known
@@ -798,6 +802,22 @@
          should be looked into some more */
 #     define NO_PTHREAD_TRYLOCK
 #   endif
+#   ifdef FREEBSD
+#       define ALIGNMENT 4
+#       define OS_TYPE "FREEBSD"
+#       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
+#       endif
+        extern char etext[];
+        extern char * GC_FreeBSDGetDataStart();
+#       define DATASTART GC_FreeBSDGetDataStart(0x1000, &etext)
+#   endif
 #   ifdef NETBSD
 #     define ALIGNMENT 4
 #     define OS_TYPE "NETBSD"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]