diff options
-rw-r--r-- | libgc/ChangeLog | 6 | ||||
-rw-r--r-- | libgc/include/private/gcconfig.h | 20 | ||||
-rw-r--r-- | libgc/os_dep.c | 2 |
3 files changed, 27 insertions, 1 deletions
diff --git a/libgc/ChangeLog b/libgc/ChangeLog index d9a9a5d98ec..0b800d82200 100644 --- a/libgc/ChangeLog +++ b/libgc/ChangeLog @@ -1,3 +1,9 @@ +2006-12-22 Robert Jordan <robertj@gmx.net> + + * include/private/gcconfig.h, os_dep.c: + Add FreeBSD/amd64 support. Based on a FreeBSD Port Collection patch. + r=Paolo. + 2006-11-19 Allan Hsu <allan@counterpop.net> * libgc/darwin_stop_world.c, libgc/include/private/gc_priv.h, diff --git a/libgc/include/private/gcconfig.h b/libgc/include/private/gcconfig.h index d278603a338..cf2a825cc3c 100644 --- a/libgc/include/private/gcconfig.h +++ b/libgc/include/private/gcconfig.h @@ -347,6 +347,10 @@ # define I386 # define mach_type_known # endif +# if defined(FREEBSD) && defined(__x86_64__) +# define X86_64 +# define mach_type_known +# endif # if defined(__NetBSD__) && (defined(i386) || defined(__i386__)) # define I386 # define mach_type_known @@ -1989,6 +1993,22 @@ # define PREFETCH_FOR_WRITE(x) __builtin_prefetch((x), 1) # endif # endif +# ifdef FREEBSD +# define OS_TYPE "FREEBSD" +# ifndef GC_FREEBSD_THREADS +# define MPROTECT_VDB +# endif +# define SIG_SUSPEND SIGTSTP +# define SIG_THR_RESTART SIGCONT +# define NEED_FIND_LIMIT +# 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 OS_TYPE "NETBSD" # ifdef __ELF__ diff --git a/libgc/os_dep.c b/libgc/os_dep.c index f64caeffa2f..39cb513f68f 100644 --- a/libgc/os_dep.c +++ b/libgc/os_dep.c @@ -1396,7 +1396,7 @@ int * etext_addr; } # endif -# if defined(FREEBSD) && (defined(I386) || defined(powerpc) || defined(__powerpc__)) && !defined(PCR) +# if defined(FREEBSD) && (defined(I386) || defined(powerpc) || defined(__powerpc__) || defined(__x86_64__)) && !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 */ |