aboutsummaryrefslogtreecommitdiff
path: root/boehm-gc/include
diff options
context:
space:
mode:
authorPetr Salinger <Petr.Salinger@seznam.cz>2006-09-18 20:45:08 +0200
committerTom Tromey <tromey@gcc.gnu.org>2006-09-18 18:45:08 +0000
commiteb496303d7c7e6f2acb8ab90c22453947988f06b (patch)
tree666cdb5c8b90249ec72621c86394c11ef6b41897 /boehm-gc/include
parent94ba45dfe265e2fde473c6bb02484e5608af61ea (diff)
downloadgcc-eb496303d7c7e6f2acb8ab90c22453947988f06b.zip
gcc-eb496303d7c7e6f2acb8ab90c22453947988f06b.tar.gz
gcc-eb496303d7c7e6f2acb8ab90c22453947988f06b.tar.bz2
configure.ac: add support for GNU/kFreeBSD, accepted by upstream for gc 6.8.
2006-06-07 Petr Salinger <Petr.Salinger@seznam.cz> * configure.ac: add support for GNU/kFreeBSD, accepted by upstream for gc 6.8. * dyn_load.c: Likewise. * include/gc.h: Likewise. * private/gcconfig.h: Likewise. * configure: Regenerate. * include/gc_config.h.in: Regenerate. From-SVN: r117033
Diffstat (limited to 'boehm-gc/include')
-rw-r--r--boehm-gc/include/gc.h2
-rw-r--r--boehm-gc/include/gc_config.h.in3
-rw-r--r--boehm-gc/include/private/gcconfig.h41
3 files changed, 39 insertions, 7 deletions
diff --git a/boehm-gc/include/gc.h b/boehm-gc/include/gc.h
index 5ba1f4b..52ee805 100644
--- a/boehm-gc/include/gc.h
+++ b/boehm-gc/include/gc.h
@@ -499,7 +499,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb));
# define GC_RETURN_ADDR (GC_word)__return_address
#endif
-#ifdef __linux__
+#if defined(__linux__) || defined(__GLIBC__)
# include <features.h>
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
&& !defined(__ia64__)
diff --git a/boehm-gc/include/gc_config.h.in b/boehm-gc/include/gc_config.h.in
index 5055b50..41028c1 100644
--- a/boehm-gc/include/gc_config.h.in
+++ b/boehm-gc/include/gc_config.h.in
@@ -166,6 +166,9 @@
/* define GC_local_malloc() & GC_local_malloc_atomic() */
#undef THREAD_LOCAL_ALLOC
+/* use tls for boehm */
+#undef USE_COMPILER_TLS
+
/* use MMAP instead of sbrk to get new memory */
#undef USE_MMAP
diff --git a/boehm-gc/include/private/gcconfig.h b/boehm-gc/include/private/gcconfig.h
index c028e5d..d7d96b1 100644
--- a/boehm-gc/include/private/gcconfig.h
+++ b/boehm-gc/include/private/gcconfig.h
@@ -55,7 +55,7 @@
# endif
/* And one for FreeBSD: */
-# if defined(__FreeBSD__) && !defined(FREEBSD)
+# if ( defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ) && !defined(FREEBSD)
# define FREEBSD
# endif
@@ -1241,8 +1241,15 @@
# ifndef GC_FREEBSD_THREADS
# define MPROTECT_VDB
# endif
-# define SIG_SUSPEND SIGUSR1
-# define SIG_THR_RESTART SIGUSR2
+# ifdef __GLIBC__
+# define SIG_SUSPEND (32+6)
+# define SIG_THR_RESTART (32+5)
+ extern int _end[];
+# define DATAEND (_end)
+# else
+# define SIG_SUSPEND SIGUSR1
+# define SIG_THR_RESTART SIGUSR2
+# endif
# define FREEBSD_STACKBOTTOM
# ifdef __ELF__
# define DYNAMIC_LOADING
@@ -1952,6 +1959,28 @@
# 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
+# ifdef __GLIBC__
+# define SIG_SUSPEND (32+6)
+# define SIG_THR_RESTART (32+5)
+ extern int _end[];
+# define DATAEND (_end)
+# else
+# define SIG_SUSPEND SIGUSR1
+# define SIG_THR_RESTART SIGUSR2
+# endif
+# 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__
@@ -2023,7 +2052,7 @@
# define SUNOS5SIGS
# endif
-# if defined(FREEBSD) && (__FreeBSD__ >= 4)
+# if defined(FREEBSD) && ((__FreeBSD__ >= 4) || (__FreeBSD_kernel__ >= 4))
# define SUNOS5SIGS
# endif
@@ -2086,7 +2115,7 @@
# define CACHE_LINE_SIZE 32 /* Wild guess */
# endif
-# ifdef LINUX
+# if defined(LINUX) || defined(__GLIBC__)
# define REGISTER_LIBRARIES_EARLY
/* We sometimes use dl_iterate_phdr, which may acquire an internal */
/* lock. This isn't safe after the world has stopped. So we must */
@@ -2167,7 +2196,7 @@
#if defined(SPARC)
# define CAN_SAVE_CALL_ARGS
#endif
-#if (defined(I386) || defined(X86_64)) && defined(LINUX)
+#if (defined(I386) || defined(X86_64)) && (defined(LINUX) || defined(__GLIBC__))
/* SAVE_CALL_CHAIN is supported if the code is compiled to save */
/* frame pointers by default, i.e. no -fomit-frame-pointer flag. */
# define CAN_SAVE_CALL_ARGS