diff -urN /usr/ports/devel/boehm-gc.old/Makefile /usr/ports/devel/boehm-gc/Makefile --- /usr/ports/devel/boehm-gc.old/Makefile 2015-05-09 03:06:56.000000000 +0200 +++ /usr/ports/devel/boehm-gc/Makefile 2015-07-07 00:49:59.461798000 +0200 @@ -3,7 +3,7 @@ PORTNAME= gc PORTVERSION= 7.4.2 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= devel MASTER_SITES= http://www.hboehm.info/gc/gc_source/ PKGNAMEPREFIX= boehm- @@ -50,6 +50,9 @@ OPTIONS_DEFINE+=PARALLEL_MARK PARALLEL_MARK_DESC= Parallel-thread marking (faster for SMP) . endif +. if ${ARCH} == "aarch64" +CONFIGURE_ARGS+=--enable-threads=posix --disable-redirect-malloc +. endif .else CONFIGURE_ARGS+=--disable-threads --disable-redirect-malloc OPTIONS_DEFINE+=DOCS diff -urN /usr/ports/devel/boehm-gc.old/files/patch-doc_gc.man /usr/ports/devel/boehm-gc/files/patch-doc_gc.man --- /usr/ports/devel/boehm-gc.old/files/patch-doc_gc.man 2014-07-28 18:28:02.000000000 +0200 +++ /usr/ports/devel/boehm-gc/files/patch-doc_gc.man 2015-07-07 00:47:12.926906000 +0200 @@ -1,6 +1,6 @@ ---- doc/gc.man.orig 2012-07-25 14:54:48.000000000 +0300 -+++ doc/gc.man 2012-07-25 14:57:40.000000000 +0300 -@@ -11,7 +11,7 @@ +--- doc/gc.man.orig 2014-05-22 20:47:28 UTC ++++ doc/gc.man +@@ -11,7 +11,7 @@ void GC_free(void *ptr); void * GC_realloc(void *ptr, size_t size); .br .sp @@ -9,7 +9,7 @@ .LP .SH DESCRIPTION .I GC_malloc -@@ -88,6 +88,48 @@ +@@ -88,6 +88,48 @@ This may temporarily write protect pages .LP 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. .LP @@ -20,9 +20,9 @@ +and +.I gc_cpp.h +will probably be found in -+.I %%PREFIX%%/include, ++.I /usr/local/include, +and the library in -+.I %%PREFIX%%/lib. ++.I /usr/local/lib. +.LP +This library has been compiled as drop-in replacements +for malloc and free (which is to say, all malloc diff -urN /usr/ports/devel/boehm-gc.old/files/patch-include_gc__config__macros.h /usr/ports/devel/boehm-gc/files/patch-include_gc__config__macros.h --- /usr/ports/devel/boehm-gc.old/files/patch-include_gc__config__macros.h 1970-01-01 01:00:00.000000000 +0100 +++ /usr/ports/devel/boehm-gc/files/patch-include_gc__config__macros.h 2015-07-07 00:47:12.998856000 +0200 @@ -0,0 +1,25 @@ +--- include/gc_config_macros.h.orig 2014-06-03 06:08:02 UTC ++++ include/gc_config_macros.h +@@ -242,13 +242,17 @@ + #ifndef GC_ATTR_ALLOC_SIZE + /* 'alloc_size' attribute improves __builtin_object_size correctness. */ + /* Only single-argument form of 'alloc_size' attribute is used. */ +-# if defined(__GNUC__) && (__GNUC__ > 4 \ +- || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3 && !defined(__ICC)) \ +- || __clang_major__ > 3 \ +- || (__clang_major__ == 3 && __clang_minor__ >= 2)) ++# ifdef __clang__ ++# if __has_attribute(__alloc_size__) ++# define GC_ATTR_ALLOC_SIZE(argnum) __attribute__((__alloc_size__(argnum))) ++# else ++# define GC_ATTR_ALLOC_SIZE(argnum) /* empty */ ++# endif ++# elif __GNUC__ > 4 \ ++ || (__GNUC__ == 4 && __GNUC_MINOR__ >=3 && !defined(__ICC)) + # define GC_ATTR_ALLOC_SIZE(argnum) __attribute__((__alloc_size__(argnum))) + # else +-# define GC_ATTR_ALLOC_SIZE(argnum) ++# define GC_ATTR_ALLOC_SIZE(argnum) /* empty */ + # endif + #endif + diff -urN /usr/ports/devel/boehm-gc.old/files/patch-include_private_gc__priv.h /usr/ports/devel/boehm-gc/files/patch-include_private_gc__priv.h --- /usr/ports/devel/boehm-gc.old/files/patch-include_private_gc__priv.h 1970-01-01 01:00:00.000000000 +0100 +++ /usr/ports/devel/boehm-gc/files/patch-include_private_gc__priv.h 2015-07-07 00:47:13.050903000 +0200 @@ -0,0 +1,13 @@ +--- include/private/gc_priv.h.orig 2014-06-03 06:08:02 UTC ++++ include/private/gc_priv.h +@@ -2461,7 +2461,9 @@ GC_INNER ptr_t GC_store_debug_info(ptr_t + #endif + + #if defined(FREEBSD) && (defined(I386) || defined(X86_64) \ +- || defined(powerpc) || defined(__powerpc__)) ++ || defined(powerpc) || defined(__powerpc__) \ ++ || defined(__aarch64__)) ++ + # include + # if !defined(PCR) + # define NEED_FIND_LIMIT diff -urN /usr/ports/devel/boehm-gc.old/files/patch-include_private_gcconfig.h /usr/ports/devel/boehm-gc/files/patch-include_private_gcconfig.h --- /usr/ports/devel/boehm-gc.old/files/patch-include_private_gcconfig.h 2014-12-08 19:27:07.000000000 +0100 +++ /usr/ports/devel/boehm-gc/files/patch-include_private_gcconfig.h 2015-07-07 00:47:13.138456000 +0200 @@ -1,5 +1,14 @@ ---- ./include/private/gcconfig.h.orig -+++ ./include/private/gcconfig.h +--- include/private/gcconfig.h.orig 2014-06-03 06:08:02 UTC ++++ include/private/gcconfig.h +@@ -97,7 +97,7 @@ + # endif + # if defined(__aarch64__) + # define AARCH64 +-# if !defined(LINUX) ++# if !defined(LINUX) && !defined(FREEBSD) + # define NOSYS + # define mach_type_known + # endif @@ -169,7 +169,7 @@ # define EWS4800 # endif @@ -9,7 +18,18 @@ # if defined(ultrix) || defined(__ultrix) # define ULTRIX # else -@@ -1647,6 +1647,26 @@ +@@ -402,6 +402,10 @@ + # define I386 + # define mach_type_known + # endif ++# if defined(FREEBSD) && defined(__aarch64__) ++# define AARCH64 ++# define mach_type_known ++# endif + # if defined(FREEBSD) && (defined(__amd64__) || defined(__x86_64__)) + # define X86_64 + # define mach_type_known +@@ -1647,6 +1651,26 @@ # define DATAEND ((ptr_t)(&_end)) # define DYNAMIC_LOADING # endif @@ -36,3 +56,24 @@ # if defined(NONSTOP) # define CPP_WORDSZ 32 # define OS_TYPE "NONSTOP" +@@ -1998,6 +2022,20 @@ + extern char _end[]; + # define DATAEND ((ptr_t)(&_end)) + # endif ++# ifdef FREEBSD ++# define OS_TYPE "FREEBSD" ++# ifndef GC_FREEBSD_THREADS ++# define MPROTECT_VDB ++# endif ++# define FREEBSD_STACKBOTTOM ++# ifdef __ELF__ ++# define DYNAMIC_LOADING ++# endif ++ extern char etext[]; ++ ptr_t GC_FreeBSDGetDataStart(size_t, ptr_t); ++# define DATASTART GC_FreeBSDGetDataStart(0x1000, (ptr_t)etext) ++# define DATASTART_IS_FUNC ++# endif + # ifdef NOSYS + /* __data_start is usually defined in the target linker script. */ + extern int __data_start[]; diff -urN /usr/ports/devel/boehm-gc.old/files/patch-os__dep.c /usr/ports/devel/boehm-gc/files/patch-os__dep.c --- /usr/ports/devel/boehm-gc.old/files/patch-os__dep.c 1970-01-01 01:00:00.000000000 +0100 +++ /usr/ports/devel/boehm-gc/files/patch-os__dep.c 2015-07-07 00:47:13.202939000 +0200 @@ -0,0 +1,12 @@ +--- os_dep.c.orig 2014-06-03 06:08:02 UTC ++++ os_dep.c +@@ -1869,7 +1869,8 @@ void GC_register_data_segments(void) + # endif + + # if defined(FREEBSD) && !defined(PCR) && (defined(I386) || defined(X86_64) \ +- || defined(powerpc) || defined(__powerpc__)) ++ || defined(powerpc) || defined(__powerpc__) \ ++ || defined(__aarch64__)) + + /* Its unclear whether this should be identical to the above, or */ + /* whether it should apply to non-X86 architectures. */