summaryrefslogtreecommitdiff
path: root/lang/mono2/patches/patch-da
blob: dd1aab27b7b960cac9cf1665126e494bd0fb78fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
$NetBSD: patch-da,v 1.2 2013/09/12 20:13:41 jperkin Exp $

* Support DragonFlyBSD
* Support 64-bit SunOS
* Use mmap on NetBSD

--- libgc/include/private/gcconfig.h.orig	2012-01-30 18:01:22.000000000 +0000
+++ libgc/include/private/gcconfig.h
@@ -163,6 +163,11 @@
 #    define SUNOS5
 #    define mach_type_known
 # endif
+# if defined(sun) && defined(__amd64)
+#    define X86_64
+#    define SUNOS5
+#    define mach_type_known
+# endif
 # if (defined(__OS2__) || defined(__EMX__)) && defined(__32BIT__)
 #    define I386
 #    define OS2
@@ -361,6 +366,9 @@
 #   define OPENBSD
 #   define mach_type_known
 # endif
+# if defined(__DragonFly__)
+# define FREEBSD
+# endif
 # if defined(FREEBSD) && (defined(i386) || defined(__i386__))
 #   define I386
 #   define mach_type_known
@@ -700,6 +708,10 @@
 #   endif
 #   ifdef NETBSD
 #	define OS_TYPE "NETBSD"
+#       ifndef USE_MMAP
+#         define USE_MMAP
+#       endif
+#       define USE_MMAP_ANON
 #	define HEURISTIC2
 #	ifdef __ELF__
 #	  define DATASTART GC_data_start
@@ -891,6 +903,10 @@
 #   ifdef NETBSD
 #     define ALIGNMENT 4
 #     define OS_TYPE "NETBSD"
+#     ifndef USE_MMAP
+#       define USE_MMAP
+#     endif
+#     define USE_MMAP_ANON
 #     define HEURISTIC2
       extern char etext[];
 #     define DATASTART GC_data_start
@@ -1062,6 +1078,10 @@
 #   endif
 #   ifdef NETBSD
 #     define OS_TYPE "NETBSD"
+#     ifndef USE_MMAP
+#       define USE_MMAP
+#     endif
+#     define USE_MMAP_ANON
 #     define HEURISTIC2
 #     ifdef __ELF__
 #	define DATASTART GC_data_start
@@ -1374,6 +1394,10 @@
 #   endif
 #   ifdef NETBSD
 #	define OS_TYPE "NETBSD"
+#       ifndef USE_MMAP
+#           define USE_MMAP
+#       endif
+#       define USE_MMAP_ANON
 #	ifdef __ELF__
 #	    define DYNAMIC_LOADING
 #	endif
@@ -1534,6 +1558,10 @@
 #   if defined(NETBSD)
 #     define ALIGNMENT 4
 #     define OS_TYPE "NETBSD"
+#     ifndef USE_MMAP
+#         define USE_MMAP
+#     endif
+#     define USE_MMAP_ANON
 #     define HEURISTIC2
 #     define USE_GENERIC_PUSH_REGS
 #     ifdef __ELF__
@@ -1660,6 +1688,10 @@
 #   endif
 #   ifdef NETBSD
 #	define OS_TYPE "NETBSD"
+#       ifndef USE_MMAP
+#           define USE_MMAP
+#       endif
+#       define USE_MMAP_ANON
 #	define HEURISTIC2
 #	define DATASTART GC_data_start
 #	define ELFCLASS32 32
@@ -1923,6 +1955,10 @@
 #   define ALIGNMENT 4
 #   ifdef NETBSD
 #       define OS_TYPE "NETBSD"
+#       ifndef USE_MMAP
+#           define USE_MMAP
+#       endif
+#       define USE_MMAP_ANON
 #       define HEURISTIC2
 #	ifdef __ELF__
 #          define DATASTART GC_data_start
@@ -2020,6 +2056,10 @@
 #   endif
 #   ifdef NETBSD
 #      define OS_TYPE "NETBSD"
+#      ifndef USE_MMAP
+#          define USE_MMAP
+#      endif
+#      define USE_MMAP_ANON
 #      define HEURISTIC2
 #      define DATASTART GC_data_start
 #       define USE_GENERIC_PUSH_REGS
@@ -2131,6 +2171,10 @@
 #   endif
 #   ifdef NETBSD
 #	define OS_TYPE "NETBSD"
+#       ifndef USE_MMAP
+#         define USE_MMAP
+#       endif
+#       define USE_MMAP_ANON
 #	ifdef __ELF__
 #	    define DYNAMIC_LOADING
 #	endif
@@ -2138,6 +2182,29 @@
 	extern char etext[];
 #	define SEARCH_FOR_DATA_START
 #   endif
+#   ifdef SUNOS5
+#	define OS_TYPE "SUNOS5"
+#	define ELF_CLASS ELFCLASS64
+	extern int _etext[], _end[];
+	extern ptr_t GC_SysVGetDataStart();
+#	define DATASTART GC_SysVGetDataStart(0x1000, _etext)
+#	define DATAEND (_end)
+#	include <sys/vmparam.h>
+#	ifdef USERLIMIT
+#	    define STACKBOTTOM USRSTACK
+#	else
+#	    define HEURISTIC2
+#	endif
+#	define DYNAMIC_LOADING
+#	if !defined(USE_MMAP) && defined(REDIRECT_MALLOC)
+#	    define USE_MMAP
+#	endif
+#	ifdef USE_MMAP
+#	    define HEAP_START (ptr_t)0x40000000
+#	else
+#	    define HEAP_START DATAEND
+#	endif
+#   endif
 #   ifdef OPENBSD
 #       define OS_TYPE "OPENBSD"
 #       define ELF_CLASS ELFCLASS64