From 9af9e7faa255951a15773cd3024caf98f3bcb745 Mon Sep 17 00:00:00 2001 From: Andreas Tobler Date: Wed, 15 Jun 2005 23:25:54 +0200 Subject: [PATCH] os_dep.c: Add FreeBSD/PowerPC bits. 2005-06-15 Andreas Tobler * os_dep.c: Add FreeBSD/PowerPC bits. (GC_SysVGetDataStart): Likewise. * include/private/gcconfig.h: Likewise. From-SVN: r100997 --- boehm-gc/ChangeLog | 6 ++++++ boehm-gc/include/private/gcconfig.h | 20 ++++++++++++++++++++ boehm-gc/os_dep.c | 4 ++-- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog index a5e87281450..59bae15d6a2 100644 --- a/boehm-gc/ChangeLog +++ b/boehm-gc/ChangeLog @@ -1,3 +1,9 @@ +2005-06-15 Andreas Tobler + + * os_dep.c: Add FreeBSD/PowerPC bits. + (GC_SysVGetDataStart): Likewise. + * include/private/gcconfig.h: Likewise. + 2005-05-25 Andrew Haley * include/private/gcconfig.h (HBLKSIZE): Define to 4096 on diff --git a/boehm-gc/include/private/gcconfig.h b/boehm-gc/include/private/gcconfig.h index 05b3832c176..c5077e6076f 100644 --- a/boehm-gc/include/private/gcconfig.h +++ b/boehm-gc/include/private/gcconfig.h @@ -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" diff --git a/boehm-gc/os_dep.c b/boehm-gc/os_dep.c index c4775c1978b..aadd5b96251 100644 --- a/boehm-gc/os_dep.c +++ b/boehm-gc/os_dep.c @@ -80,7 +80,7 @@ # define NEED_FIND_LIMIT # endif -#if defined(FREEBSD) && defined(I386) +#if defined(FREEBSD) && (defined(I386) || defined(powerpc) || defined(__powerpc__)) # include # if !defined(PCR) # define NEED_FIND_LIMIT @@ -1387,7 +1387,7 @@ int * etext_addr; } # 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 */