Index: head/devel/boehm-gc/Makefile =================================================================== --- head/devel/boehm-gc/Makefile (revision 391599) +++ head/devel/boehm-gc/Makefile (revision 391600) @@ -1,111 +1,111 @@ # Created by: Mike McGaughey # $FreeBSD$ PORTNAME= gc PORTVERSION= 7.4.2 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= devel MASTER_SITES= http://www.hboehm.info/gc/gc_source/ PKGNAMEPREFIX= boehm- .ifdef GC_VARIANT PKGNAMESUFFIX= -${GC_VARIANT} .endif MAINTAINER= cpm@fbsd.es COMMENT= Garbage collection and memory leak detection for C and C++ LICENSE= BDWGC LICENSE_NAME= Boehm-Demers-Weiser Garbage Collector License LICENSE_TEXT= License can be found at http://www.hboehm.info/gc/license.txt LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept BUILD_DEPENDS= ${LOCALBASE}/lib/libatomic_ops.a:${PORTSDIR}/devel/libatomic_ops GNU_CONFIGURE= yes USES= cpe libtool pathfix pkgconfig CPE_VENDOR= boehm-demers-weiser CPE_PRODUCT= garbage_collector USE_LDCONFIG= yes INSTALL_TARGET= install-strip CONFIGURE_ARGS= --enable-cplusplus --disable-static MAKE_JOBS_UNSAFE= yes WRKSRC= ${WRKDIR}/${DISTNAME:C/[a-z]$//} OPTIONS_DEFINE= DEBUG .ifdef GC_VARIANT INSTLIBS= cord gc gccpp PLIST= ${NONEXISTENT} PLIST_FILES= ${INSTLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so,} \ ${INSTLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so.1,} \ ${INSTLIBS:S,^,lib/lib,:S,$,-${GC_VARIANT}.so.1.0.3,} \ libdata/pkgconfig/bdw-gc-${GC_VARIANT}.pc RUN_DEPENDS+= ${LOCALBASE}/include/gc/gc.h:${PORTSDIR}/devel/boehm-gc . if ${GC_VARIANT} == "redirect" CONFIGURE_ARGS+=--disable-threads --enable-redirect-malloc . endif . if ${GC_VARIANT} == "threaded" CONFIGURE_ARGS+=--enable-threads=posix --disable-redirect-malloc OPTIONS_DEFINE+=PARALLEL_MARK PARALLEL_MARK_DESC= Parallel-thread marking (faster for SMP) . endif .else CONFIGURE_ARGS+=--disable-threads --disable-redirect-malloc OPTIONS_DEFINE+=DOCS PORTDOCS= * .endif NOT_FOR_ARCHS= ia64 # no rule to get .lo from .S in subdirectory pre-build: ${LN} -sf ${WRKSRC}/src/sparc_mach_dep.S ${WRKSRC} .include .if ${PORT_OPTIONS:MDEBUG} CONFIGURE_ARGS+=--enable-gc-debug PKGNAMESUFFIX:= ${PKGNAMESUFFIX}+fulldebug .endif .if defined(GC_VARIANT) && ${GC_VARIANT} == "threaded" . if ${PORT_OPTIONS:MPARALLEL_MARK} CONFIGURE_ARGS+=--enable-parallel-mark . endif .endif .ifdef GC_VARIANT post-patch: @${REINPLACE_CMD} -e \ 's,libgc\.la,libgc-${GC_VARIANT}.la,g ; \ s,libgccpp\.la,libgccpp-${GC_VARIANT}.la,g ; \ s,libcord\.la,libcord-${GC_VARIANT}.la,g' ${WRKSRC}/Makefile.in @${REINPLACE_CMD} -e \ 's,-lgc,-lgc-${GC_VARIANT},' ${WRKSRC}/bdw-gc.pc.in post-install: ${RM} -r ${STAGEDIR}${PREFIX}/include ${RM} -r ${STAGEDIR}${PREFIX}/share ${MV} ${STAGEDIR}${PREFIX}/libdata/pkgconfig/bdw-gc.pc \ ${STAGEDIR}${PREFIX}/libdata/pkgconfig/bdw-gc-${GC_VARIANT}.pc .else # ! GC_VARIANT post-patch: @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/doc/gc.man @${REINPLACE_CMD} \ -e "s|(datadir)/@PACKAGE@|(datadir)/doc/@PACKAGE@|" \ ${WRKSRC}/Makefile.in post-install: ${INSTALL_MAN} ${WRKSRC}/doc/gc.man ${STAGEDIR}${MAN3PREFIX}/man/man3/gc.3 @${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}) .endif regression-test: build (cd ${WRKSRC} && ${MAKE_CMD} check) .include Index: head/devel/boehm-gc/files/patch-include_gc__config__macros.h =================================================================== --- head/devel/boehm-gc/files/patch-include_gc__config__macros.h (nonexistent) +++ head/devel/boehm-gc/files/patch-include_gc__config__macros.h (revision 391600) @@ -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 + Property changes on: head/devel/boehm-gc/files/patch-include_gc__config__macros.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/boehm-gc/files/patch-include_private_gc__priv.h =================================================================== --- head/devel/boehm-gc/files/patch-include_private_gc__priv.h (nonexistent) +++ head/devel/boehm-gc/files/patch-include_private_gc__priv.h (revision 391600) @@ -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 Property changes on: head/devel/boehm-gc/files/patch-include_private_gc__priv.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/boehm-gc/files/patch-include_private_gcconfig.h =================================================================== --- head/devel/boehm-gc/files/patch-include_private_gcconfig.h (revision 391599) +++ head/devel/boehm-gc/files/patch-include_private_gcconfig.h (revision 391600) @@ -1,38 +1,79 @@ ---- ./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 # if !defined(LINUX) && !defined(EWS4800) && !defined(NETBSD) \ - && !defined(OPENBSD) + && !defined(OPENBSD) && !defined(FREEBSD) # 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 +# ifdef FREEBSD +# define OS_TYPE "FREEBSD" +# define ALIGNMENT 4 +# define SIG_SUSPEND SIGUSR1 +# define SIG_THR_RESTART SIGUSR2 +# define FREEBSD_STACKBOTTOM +# ifdef __ELF__ +# define DYNAMIC_LOADING +# endif + extern char etext[]; + extern char edata[]; + extern char end[]; +# define NEED_FIND_LIMIT +# define DATASTART ((ptr_t)(&etext)) + ptr_t GC_find_limit(ptr_t, GC_bool); +# define DATAEND (GC_find_limit (DATASTART, TRUE)) +# define DATAEND_IS_FUNC +# define DATASTART2 ((ptr_t)(&edata)) +# define DATAEND2 ((ptr_t)(&end)) +# endif # 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[]; Index: head/devel/boehm-gc/files/patch-os__dep.c =================================================================== --- head/devel/boehm-gc/files/patch-os__dep.c (nonexistent) +++ head/devel/boehm-gc/files/patch-os__dep.c (revision 391600) @@ -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 + # 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) Property changes on: head/devel/boehm-gc/files/patch-os__dep.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property