View | Details | Raw Unified | Return to bug 201183 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/ports/devel/boehm-gc/Makefile (-1 / +4 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	gc
4
PORTNAME=	gc
5
PORTVERSION=	7.4.2
5
PORTVERSION=	7.4.2
6
PORTREVISION=	3
6
PORTREVISION=	4
7
CATEGORIES=	devel
7
CATEGORIES=	devel
8
MASTER_SITES=	http://www.hboehm.info/gc/gc_source/
8
MASTER_SITES=	http://www.hboehm.info/gc/gc_source/
9
PKGNAMEPREFIX=	boehm-
9
PKGNAMEPREFIX=	boehm-
Lines 50-55 Link Here
50
OPTIONS_DEFINE+=PARALLEL_MARK
50
OPTIONS_DEFINE+=PARALLEL_MARK
51
PARALLEL_MARK_DESC=	Parallel-thread marking (faster for SMP)
51
PARALLEL_MARK_DESC=	Parallel-thread marking (faster for SMP)
52
. endif
52
. endif
53
. if ${ARCH} == "aarch64"
54
CONFIGURE_ARGS+=--enable-threads=posix --disable-redirect-malloc
55
. endif
53
.else
56
.else
54
CONFIGURE_ARGS+=--disable-threads --disable-redirect-malloc
57
CONFIGURE_ARGS+=--disable-threads --disable-redirect-malloc
55
OPTIONS_DEFINE+=DOCS
58
OPTIONS_DEFINE+=DOCS
(-)/usr/ports/devel/boehm-gc/files/patch-doc_gc.man (-6 / +6 lines)
Lines 1-6 Link Here
1
--- doc/gc.man.orig	2012-07-25 14:54:48.000000000 +0300
1
--- doc/gc.man.orig	2014-05-22 20:47:28 UTC
2
+++ doc/gc.man	2012-07-25 14:57:40.000000000 +0300
2
+++ doc/gc.man
3
@@ -11,7 +11,7 @@
3
@@ -11,7 +11,7 @@ void GC_free(void *ptr);
4
 void * GC_realloc(void *ptr, size_t size);
4
 void * GC_realloc(void *ptr, size_t size);
5
 .br
5
 .br
6
 .sp
6
 .sp
Lines 9-15 Link Here
9
 .LP
9
 .LP
10
 .SH DESCRIPTION
10
 .SH DESCRIPTION
11
 .I GC_malloc
11
 .I GC_malloc
12
@@ -88,6 +88,48 @@
12
@@ -88,6 +88,48 @@ This may temporarily write protect pages
13
 .LP
13
 .LP
14
 Other facilities not discussed here include limited facilities to support incremental collection on machines without appropriate VM support, provisions for providing more explicit object layout information to the garbage collector, more direct support for ``weak'' pointers, support for ``abortable'' garbage collections during idle time, etc.
14
 Other facilities not discussed here include limited facilities to support incremental collection on machines without appropriate VM support, provisions for providing more explicit object layout information to the garbage collector, more direct support for ``weak'' pointers, support for ``abortable'' garbage collections during idle time, etc.
15
 .LP
15
 .LP
Lines 20-28 Link Here
20
+and
20
+and
21
+.I gc_cpp.h
21
+.I gc_cpp.h
22
+will probably be found in
22
+will probably be found in
23
+.I %%PREFIX%%/include,
23
+.I /usr/local/include,
24
+and the library in
24
+and the library in
25
+.I %%PREFIX%%/lib.
25
+.I /usr/local/lib.
26
+.LP
26
+.LP
27
+This library has been compiled as drop-in replacements
27
+This library has been compiled as drop-in replacements
28
+for malloc and free (which is to say, all malloc
28
+for malloc and free (which is to say, all malloc
(-)/usr/ports/devel/boehm-gc/files/patch-include_gc__config__macros.h (+25 lines)
Line 0 Link Here
1
--- include/gc_config_macros.h.orig	2014-06-03 06:08:02 UTC
2
+++ include/gc_config_macros.h
3
@@ -242,13 +242,17 @@
4
 #ifndef GC_ATTR_ALLOC_SIZE
5
   /* 'alloc_size' attribute improves __builtin_object_size correctness. */
6
   /* Only single-argument form of 'alloc_size' attribute is used.       */
7
-# if defined(__GNUC__) && (__GNUC__ > 4 \
8
-        || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3 && !defined(__ICC)) \
9
-        || __clang_major__ > 3 \
10
-        || (__clang_major__ == 3 && __clang_minor__ >= 2))
11
+# ifdef __clang__
12
+#   if __has_attribute(__alloc_size__)
13
+#     define GC_ATTR_ALLOC_SIZE(argnum) __attribute__((__alloc_size__(argnum)))
14
+#   else
15
+#     define GC_ATTR_ALLOC_SIZE(argnum) /* empty */
16
+#   endif
17
+# elif __GNUC__ > 4 \
18
+       || (__GNUC__ == 4 && __GNUC_MINOR__ >=3 && !defined(__ICC))
19
 #   define GC_ATTR_ALLOC_SIZE(argnum) __attribute__((__alloc_size__(argnum)))
20
 # else
21
-#   define GC_ATTR_ALLOC_SIZE(argnum)
22
+#   define GC_ATTR_ALLOC_SIZE(argnum) /* empty */
23
 # endif
24
 #endif
25
 
(-)/usr/ports/devel/boehm-gc/files/patch-include_private_gc__priv.h (+13 lines)
Line 0 Link Here
1
--- include/private/gc_priv.h.orig	2014-06-03 06:08:02 UTC
2
+++ include/private/gc_priv.h
3
@@ -2461,7 +2461,9 @@ GC_INNER ptr_t GC_store_debug_info(ptr_t
4
 #endif
5
 
6
 #if defined(FREEBSD) && (defined(I386) || defined(X86_64) \
7
-                        || defined(powerpc) || defined(__powerpc__))
8
+                        || defined(powerpc) || defined(__powerpc__) \
9
+			|| defined(__aarch64__))
10
+
11
 # include <machine/trap.h>
12
 # if !defined(PCR)
13
 #   define NEED_FIND_LIMIT
(-)/usr/ports/devel/boehm-gc/files/patch-include_private_gcconfig.h (-3 / +44 lines)
Lines 1-5 Link Here
1
--- ./include/private/gcconfig.h.orig
1
--- include/private/gcconfig.h.orig	2014-06-03 06:08:02 UTC
2
+++ ./include/private/gcconfig.h
2
+++ include/private/gcconfig.h
3
@@ -97,7 +97,7 @@
4
 # endif
5
 # if defined(__aarch64__)
6
 #    define AARCH64
7
-#    if !defined(LINUX)
8
+#    if !defined(LINUX) && !defined(FREEBSD)
9
 #      define NOSYS
10
 #      define mach_type_known
11
 #    endif
3
@@ -169,7 +169,7 @@
12
@@ -169,7 +169,7 @@
4
 #      define EWS4800
13
 #      define EWS4800
5
 #    endif
14
 #    endif
Lines 9-15 Link Here
9
 #      if defined(ultrix) || defined(__ultrix)
18
 #      if defined(ultrix) || defined(__ultrix)
10
 #        define ULTRIX
19
 #        define ULTRIX
11
 #      else
20
 #      else
12
@@ -1647,6 +1647,26 @@
21
@@ -402,6 +402,10 @@
22
 #   define I386
23
 #   define mach_type_known
24
 # endif
25
+# if defined(FREEBSD) && defined(__aarch64__)
26
+#   define AARCH64
27
+#   define mach_type_known
28
+# endif
29
 # if defined(FREEBSD) && (defined(__amd64__) || defined(__x86_64__))
30
 #   define X86_64
31
 #   define mach_type_known
32
@@ -1647,6 +1651,26 @@
13
 #    define DATAEND ((ptr_t)(&_end))
33
 #    define DATAEND ((ptr_t)(&_end))
14
 #    define DYNAMIC_LOADING
34
 #    define DYNAMIC_LOADING
15
 #  endif
35
 #  endif
Lines 36-38 Link Here
36
 #  if defined(NONSTOP)
56
 #  if defined(NONSTOP)
37
 #    define CPP_WORDSZ 32
57
 #    define CPP_WORDSZ 32
38
 #    define OS_TYPE "NONSTOP"
58
 #    define OS_TYPE "NONSTOP"
59
@@ -1998,6 +2022,20 @@
60
       extern char _end[];
61
 #     define DATAEND ((ptr_t)(&_end))
62
 #   endif
63
+#   ifdef FREEBSD
64
+#     define OS_TYPE "FREEBSD"
65
+#     ifndef GC_FREEBSD_THREADS
66
+#       define MPROTECT_VDB
67
+#     endif
68
+#     define FREEBSD_STACKBOTTOM
69
+#     ifdef __ELF__
70
+#       define DYNAMIC_LOADING
71
+#     endif
72
+      extern char etext[];
73
+      ptr_t GC_FreeBSDGetDataStart(size_t, ptr_t);
74
+#     define DATASTART GC_FreeBSDGetDataStart(0x1000, (ptr_t)etext)
75
+#     define DATASTART_IS_FUNC
76
+#   endif
77
 #   ifdef NOSYS
78
       /* __data_start is usually defined in the target linker script.   */
79
       extern int __data_start[];
(-)/usr/ports/devel/boehm-gc/files/patch-os__dep.c (+12 lines)
Line 0 Link Here
1
--- os_dep.c.orig	2014-06-03 06:08:02 UTC
2
+++ os_dep.c
3
@@ -1869,7 +1869,8 @@ void GC_register_data_segments(void)
4
 # endif
5
 
6
 # if defined(FREEBSD) && !defined(PCR) && (defined(I386) || defined(X86_64) \
7
-                                || defined(powerpc) || defined(__powerpc__))
8
+                                || defined(powerpc) || defined(__powerpc__) \
9
+				|| defined(__aarch64__))
10
 
11
 /* Its unclear whether this should be identical to the above, or        */
12
 /* whether it should apply to non-X86 architectures.                    */

Return to bug 201183