diff options
author | brd <brd@FreeBSD.org> | 2015-07-09 04:57:16 +0800 |
---|---|---|
committer | brd <brd@FreeBSD.org> | 2015-07-09 04:57:16 +0800 |
commit | cb95742ed88627a8bc18f080da298ccfb8771119 (patch) | |
tree | 4af13ef9aaefa81450a2520746986b177095e8fb /devel | |
parent | dbfd0053fd5182f11cbb79dcbf01eba4c9754d81 (diff) | |
download | freebsd-ports-gnome-cb95742ed88627a8bc18f080da298ccfb8771119.tar.gz freebsd-ports-gnome-cb95742ed88627a8bc18f080da298ccfb8771119.tar.zst freebsd-ports-gnome-cb95742ed88627a8bc18f080da298ccfb8771119.zip |
Patch devel/boehm-gc to build on AArch64.
PR: 201183
Submitted by: Carlos Jacobo Puga Medina <cpm@fbsd.es>, andrew, sbruno
Approved by: bdrewery (mentor)
Diffstat (limited to 'devel')
-rw-r--r-- | devel/boehm-gc/Makefile | 2 | ||||
-rw-r--r-- | devel/boehm-gc/files/patch-include_gc__config__macros.h | 25 | ||||
-rw-r--r-- | devel/boehm-gc/files/patch-include_private_gc__priv.h | 13 | ||||
-rw-r--r-- | devel/boehm-gc/files/patch-include_private_gcconfig.h | 47 | ||||
-rw-r--r-- | devel/boehm-gc/files/patch-os__dep.c | 21 |
5 files changed, 104 insertions, 4 deletions
diff --git a/devel/boehm-gc/Makefile b/devel/boehm-gc/Makefile index ce3cae9f2fff..564493b1865f 100644 --- a/devel/boehm-gc/Makefile +++ b/devel/boehm-gc/Makefile @@ -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- diff --git a/devel/boehm-gc/files/patch-include_gc__config__macros.h b/devel/boehm-gc/files/patch-include_gc__config__macros.h new file mode 100644 index 000000000000..3da99e85457d --- /dev/null +++ b/devel/boehm-gc/files/patch-include_gc__config__macros.h @@ -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 --git a/devel/boehm-gc/files/patch-include_private_gc__priv.h b/devel/boehm-gc/files/patch-include_private_gc__priv.h new file mode 100644 index 000000000000..8ea19fe0965a --- /dev/null +++ b/devel/boehm-gc/files/patch-include_private_gc__priv.h @@ -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 <machine/trap.h> + # if !defined(PCR) + # define NEED_FIND_LIMIT diff --git a/devel/boehm-gc/files/patch-include_private_gcconfig.h b/devel/boehm-gc/files/patch-include_private_gcconfig.h index 7e53dba71c05..97ef44f4787d 100644 --- a/devel/boehm-gc/files/patch-include_private_gcconfig.h +++ b/devel/boehm-gc/files/patch-include_private_gcconfig.h @@ -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 --git a/devel/boehm-gc/files/patch-os__dep.c b/devel/boehm-gc/files/patch-os__dep.c new file mode 100644 index 000000000000..ab83e2ace583 --- /dev/null +++ b/devel/boehm-gc/files/patch-os__dep.c @@ -0,0 +1,21 @@ +--- 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. */ +@@ -3094,6 +3095,8 @@ GC_API GC_push_other_roots_proc GC_CALL + # include <machine/trap.h> + # define CODE_OK (si -> si_code == EXC_DSI \ + || si -> si_code == SEGV_ACCERR) ++# elif defined(AARCH64) ++# define CODE_OK (si -> si_code == SEGV_ACCERR) + # else + # define CODE_OK (si -> si_code == BUS_PAGE_FAULT \ + || si -> si_code == SEGV_ACCERR) |