summaryrefslogtreecommitdiff
path: root/include/private/gcconfig.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/private/gcconfig.h')
-rw-r--r--include/private/gcconfig.h62
1 files changed, 50 insertions, 12 deletions
diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h
index b1a9dc3..c9017d3 100644
--- a/include/private/gcconfig.h
+++ b/include/private/gcconfig.h
@@ -43,6 +43,11 @@
# define OPENBSD
# define mach_type_known
# endif
+# if defined(__OpenBSD__) && defined(__sparc__)
+# define SPARC
+# define OPENBSD
+# define mach_type_known
+# endif
# if defined(__NetBSD__) && defined(m68k)
# define M68K
# define NETBSD
@@ -100,7 +105,8 @@
# endif
# define mach_type_known
# endif
-# if defined(sparc) && defined(unix) && !defined(sun) && !defined(linux)
+# if defined(sparc) && defined(unix) && !defined(sun) && !defined(linux) \
+ && !defined(__OpenBSD__)
# define SPARC
# define DRSNX
# define mach_type_known
@@ -129,7 +135,7 @@
# define HP_PA
# define mach_type_known
# endif
-# if defined(LINUX) && defined(i386)
+# if defined(LINUX) && (defined(i386) || defined(__i386__))
# define I386
# define mach_type_known
# endif
@@ -141,9 +147,8 @@
# define M68K
# define mach_type_known
# endif
-# if defined(linux) && defined(sparc)
+# if defined(LINUX) && defined(sparc)
# define SPARC
-# define LINUX
# define mach_type_known
# endif
# if defined(__alpha) || defined(__alpha__)
@@ -153,9 +158,11 @@
# endif
# define mach_type_known
# endif
-# if defined(_AMIGA)
-# define M68K
+# if defined(_AMIGA) && !defined(AMIGA)
# define AMIGA
+# endif
+# ifdef AMIGA
+# define M68K
# define mach_type_known
# endif
# if defined(THINK_C) || defined(__MWERKS__) && !defined(__powerc)
@@ -168,6 +175,11 @@
# define MACOS
# define mach_type_known
# endif
+# if defined(macosx)
+# define MACOSX
+# define POWERPC
+# define mach_type_known
+# endif
# if defined(NeXT) && defined(mc68000)
# define M68K
# define NEXT
@@ -486,8 +498,8 @@
# ifdef POWERPC
# define MACH_TYPE "POWERPC"
-# define ALIGNMENT 2
# ifdef MACOS
+# define ALIGNMENT 2 /* Still necessary? Could it be 4? */
# ifndef __LOWMEM__
# include <LowMem.h>
# endif
@@ -497,14 +509,24 @@
# define DATAEND /* not needed */
# endif
# ifdef LINUX
+# define ALIGNMENT 4 /* Guess. Can someone verify? */
+ /* This was 2, but that didn't sound right. */
# define OS_TYPE "LINUX"
# define HEURISTIC1
# undef STACK_GRAN
# define STACK_GRAN 0x10000000
+ /* Stack usually starts at 0x80000000 */
# define DATASTART GC_data_start
extern int _end;
# define DATAEND (&_end)
# endif
+# ifdef MACOSX
+# define ALIGNMENT 4
+# define OS_TYPE "MACOSX"
+# define DATASTART ((ptr_t) get_etext())
+# define STACKBOTTOM ((ptr_t) 0xc0000000)
+# define DATAEND /* not needed */
+# endif
# endif
# ifdef VAX
@@ -603,6 +625,11 @@
# define SVR4
# define STACKBOTTOM ((ptr_t) 0xf0000000)
# endif
+# ifdef OPENBSD
+# define OS_TYPE "OPENBSD"
+# define STACKBOTTOM ((ptr_t) 0xf8000000)
+# define DATASTART ((ptr_t)(&etext))
+# endif
# endif
# ifdef I386
@@ -657,10 +684,13 @@
# endif
# ifdef LINUX
# define OS_TYPE "LINUX"
-# define STACKBOTTOM ((ptr_t)0xc0000000)
- /* Appears to be 0xe0000000 for at least one 2.1.91 kernel. */
- /* Probably needs to be more flexible, but I don't yet */
- /* fully understand how flexible. */
+# define HEURISTIC1
+# undef STACK_GRAN
+# define STACK_GRAN 0x10000000
+ /* STACKBOTTOM is usually 0xc0000000, but this changes with */
+ /* different kernel configurations. In particular, systems */
+ /* with 2GB physical memory will usually move the user */
+ /* address space limit, and hence initial SP to 0x80000000. */
# if !defined(LINUX_THREADS) || !defined(REDIRECT_MALLOC)
# define MPROTECT_VDB
# else
@@ -909,9 +939,13 @@
# define CPP_WORDSZ 64
# define STACKBOTTOM ((ptr_t) 0x120000000)
# ifdef __ELF__
+# if 0
+ /* __data_start apparently disappeared in some recent releases. */
extern int __data_start;
# define DATASTART &__data_start
-# define DYNAMIC_LOADING
+# endif
+# define DATASTART GC_data_start
+# define DYNAMIC_LOADING
# else
# define DATASTART ((ptr_t) 0x140000000)
# endif
@@ -1021,6 +1055,10 @@
# undef MPROTECT_VDB
# endif
+# ifdef USE_MUNMAP
+# undef MPROTECT_VDB /* Can't deal with address space holes. */
+# endif
+
# if !defined(PCR_VDB) && !defined(PROC_VDB) && !defined(MPROTECT_VDB)
# define DEFAULT_VDB
# endif