Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Unity-Technologies/bdwgc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'include/private/gcconfig.h')
-rw-r--r--include/private/gcconfig.h74
1 files changed, 53 insertions, 21 deletions
diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h
index 35d47fdf..290055bf 100644
--- a/include/private/gcconfig.h
+++ b/include/private/gcconfig.h
@@ -39,7 +39,9 @@
/* First a unified test for Linux: */
# if defined(linux) || defined(__linux__)
+# ifndef LINUX
# define LINUX
+# endif
# endif
/* And one for NetBSD: */
@@ -226,7 +228,7 @@
# define ARM32
# define mach_type_known
# endif
-# if defined(LINUX) && (defined(powerpc) || defined(__powerpc__))
+# if defined(LINUX) && (defined(powerpc) || defined(__powerpc__) || defined(powerpc64) || defined(__powerpc64__))
# define POWERPC
# define mach_type_known
# endif
@@ -272,12 +274,12 @@
# endif
# if defined(macosx) || \
defined(__APPLE__) && defined(__MACH__) && defined(__ppc__)
-# define MACOSX
+# define DARWIN
# define POWERPC
# define mach_type_known
# endif
# if defined(__APPLE__) && defined(__MACH__) && defined(__i386__)
-# define MACOSX
+# define DARWIN
# define I386
--> Not really supported, but at least we recognize it.
# endif
@@ -456,6 +458,9 @@
/* SH ==> Hitachi SuperH */
/* (LINUX & MSWINCE) */
/* X86_64 ==> AMD x86-64 */
+ /* POWERPC ==> IBM/Apple PowerPC */
+ /* (MACOS(<=9),DARWIN(incl.MACOSX),*/
+ /* LINUX, NETBSD, NOSYS variants) */
/*
@@ -702,8 +707,13 @@
# define DATAEND /* not needed */
# endif
# ifdef LINUX
-# define ALIGNMENT 4 /* Guess. Can someone verify? */
+# if (defined (powerpc64) || defined(__powerpc64__))
+# define ALIGNMENT 8
+# define CPP_WORDSZ 64
+# else
+# define ALIGNMENT 4 /* Guess. Can someone verify? */
/* This was 2, but that didn't sound right. */
+# endif
# define OS_TYPE "LINUX"
/* HEURISTIC1 has been reliably reported to fail for a 32-bit */
/* executable on a 64 bit kernel. */
@@ -713,24 +723,21 @@
extern int _end[];
# define DATAEND (_end)
# endif
-# ifdef MACOSX
- /* There are reasons to suspect this may not be reliable. */
+# ifdef DARWIN
# define ALIGNMENT 4
-# define OS_TYPE "MACOSX"
-# ifdef GC_MACOSX_THREADS
-# define SIG_SUSPEND SIGXCPU
-# define SIG_THR_RESTART SIGXFSZ
-# endif
+# define OS_TYPE "DARWIN"
# define DYNAMIC_LOADING
- /* XXX: see get_end(3), get_etext() and get_end() should not be used */
+ /* XXX: see get_end(3), get_etext() and get_end() should not be used.
+ These aren't used when dyld support is enabled (it is by default) */
# define DATASTART ((ptr_t) get_etext())
-# define STACKBOTTOM ((ptr_t) 0xc0000000)
# define DATAEND ((ptr_t) get_end())
+# define STACKBOTTOM ((ptr_t) 0xc0000000)
# define USE_MMAP
# define USE_MMAP_ANON
-/* # define MPROTECT_VDB -- There is some evidence that this breaks
- * on some minor versions of MACOSX, i.e. 10.2.3. In theory,
- * it should be OK */
+# define USE_ASM_PUSH_REGS
+ /* This is potentially buggy. It needs more testing. See the comments in
+ os_dep.c */
+# define MPROTECT_VDB
# include <unistd.h>
# define GETPAGESIZE() getpagesize()
# if defined(USE_PPC_PREFETCH) && defined(__GNUC__)
@@ -740,6 +747,9 @@
# define PREFETCH_FOR_WRITE(x) \
__asm__ __volatile__ ("dcbtst 0,%0" : : "r" ((const void *) (x)))
# endif
+ /* There seems to be some issues with trylock hanging on darwin. This
+ should be looked into some more */
+# define NO_PTHREAD_TRYLOCK
# endif
# ifdef NETBSD
# define ALIGNMENT 4
@@ -1086,8 +1096,12 @@
/* DATAEND = _data_end__ */
/* To get it right for both, we take the */
/* minumum/maximum of the two. */
+# ifndef MAX
# define MAX(x,y) ((x) > (y) ? (x) : (y))
+# endif
+# ifndef MIN
# define MIN(x,y) ((x) < (y) ? (x) : (y))
+# endif
# define DATASTART ((ptr_t) MIN(_data_start__, _bss_start__))
# define DATAEND ((ptr_t) MAX(_data_end__, _bss_end__))
# undef STACK_GRAN
@@ -1280,7 +1294,8 @@
/* heap sections so they're not */
/* considered as roots. */
# define OS_TYPE "IRIX5"
-# define MPROTECT_VDB
+/*# define MPROTECT_VDB DOB: this should work, but there is evidence */
+/* of recent breakage. */
# ifdef _MIPS_SZPTR
# define CPP_WORDSZ _MIPS_SZPTR
# define ALIGNMENT (_MIPS_SZPTR/8)
@@ -1319,15 +1334,28 @@
# ifdef RS6000
# define MACH_TYPE "RS6000"
+# ifdef ALIGNMENT
+# undef ALIGNMENT
+# endif
+# ifdef IA64
+# undef IA64 /* DOB: some AIX installs stupidly define IA64 in /usr/include/sys/systemcfg.h */
+# endif
# ifdef __64BIT__
# define ALIGNMENT 8
# define CPP_WORDSZ 64
-# define STACKBOTTOM 0x1000000000000000
+# define STACKBOTTOM ((ptr_t)0x1000000000000000)
# else
# define ALIGNMENT 4
# define CPP_WORDSZ 32
# define STACKBOTTOM ((ptr_t)((ulong)&errno))
# endif
+ /* From AIX linker man page:
+ _text Specifies the first location of the program.
+ _etext Specifies the first location after the program.
+ _data Specifies the first location of the data.
+ _edata Specifies the first location after the initialized data
+ _end or end Specifies the first location after all data.
+ */
extern int _data[], _end[];
# define DATASTART ((ptr_t)((ulong)_data))
# define DATAEND ((ptr_t)((ulong)_end))
@@ -1821,8 +1849,9 @@
# endif
# if defined(SVR4) || defined(LINUX) || defined(IRIX) || defined(HPUX) \
- || defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) || defined(DGUX) \
- || defined(BSD) || defined(AIX) || defined(MACOSX) || defined(OSF1)
+ || defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) \
+ || defined(DGUX) || defined(BSD) \
+ || defined(_AIX) || defined(DARWIN) || defined(OSF1)
# define UNIX_LIKE /* Basic Unix-like system calls work. */
# endif
@@ -1915,6 +1944,9 @@
# if defined(GC_HPUX_THREADS) && !defined(HPUX)
--> inconsistent configuration
# endif
+# if defined(GC_AIX_THREADS) && !defined(_AIX)
+ --> inconsistent configuration
+# endif
# if defined(GC_WIN32_THREADS) && !defined(MSWIN32) && !defined(CYGWIN32)
--> inconsistent configuration
# endif
@@ -1925,7 +1957,7 @@
# define THREADS
# endif
-# if defined(HP_PA) || defined(M88K) || defined(POWERPC) && !defined(MACOSX) \
+# if defined(HP_PA) || defined(M88K) || defined(POWERPC) && !defined(DARWIN) \
|| defined(LINT) || defined(MSWINCE) || defined(ARM32) \
|| (defined(I386) && defined(__LCC__))
/* Use setjmp based hack to mark from callee-save registers. */