From owner-svn-ports-all@FreeBSD.ORG Sat Dec 21 05:22:06 2013 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87D03C48; Sat, 21 Dec 2013 05:22:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 73AA018DF; Sat, 21 Dec 2013 05:22:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBL5M6aL051773; Sat, 21 Dec 2013 05:22:06 GMT (envelope-from koobs@svn.freebsd.org) Received: (from koobs@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBL5M58k051766; Sat, 21 Dec 2013 05:22:05 GMT (envelope-from koobs@svn.freebsd.org) Message-Id: <201312210522.rBL5M58k051766@svn.freebsd.org> From: Kubilay Kocak Date: Sat, 21 Dec 2013 05:22:05 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r337118 - in head/devel/libffi: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Dec 2013 05:22:06 -0000 Author: koobs Date: Sat Dec 21 05:22:05 2013 New Revision: 337118 URL: http://svnweb.freebsd.org/changeset/ports/337118 Log: devel/libffi: Fix abort() on ARM related to __clear_cache() The current FreeBSD/ARM __clear_cache() implementation does nothing #if __i386__ || __x86_64__ #else abort(); cognet@ advises this is an issue for anything !Apple that is using the libcompiler_rt provided by Clang on ARM, and requires upstreaming. Additionally, two Python ports (python26 and python31) use devel/libffi for unrelated reasons, so this addresses the related PR for those ports too [2]. - Enable STAGE support - Remove MAN* entries and update pkg-plist accordingly - Add LICENSE - Sort USE/USES section - Use install-strip as the INSTALL_TARGET PR: ports/149167 PR: ports/184517 [2] Approved by: maintainer timeout (2 weeks) Added: head/devel/libffi/files/ head/devel/libffi/files/patch-src__arm__ffi.c (contents, props changed) Modified: head/devel/libffi/Makefile (contents, props changed) head/devel/libffi/pkg-plist (contents, props changed) Modified: head/devel/libffi/Makefile ============================================================================== --- head/devel/libffi/Makefile Sat Dec 21 04:39:52 2013 (r337117) +++ head/devel/libffi/Makefile Sat Dec 21 05:22:05 2013 (r337118) @@ -3,6 +3,7 @@ PORTNAME= libffi PORTVERSION= 3.0.13 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= SOURCEWARE MASTER_SITE_SUBDIR= ${PORTNAME} @@ -10,32 +11,32 @@ MASTER_SITE_SUBDIR= ${PORTNAME} MAINTAINER= zeising@FreeBSD.org COMMENT= Foreign Function Interface +LICENSE= MIT + TEST_DEPENDS= runtest:${PORTSDIR}/misc/dejagnu +USES= pathfix pkgconfig +USE_LDCONFIG= yes +GNU_CONFIGURE= yes + OPTIONS_DEFINE= TESTS TESTS_DESC= Include tools for test suite -NO_STAGE= yes .include .if ${PORT_OPTIONS:MTESTS} BUILD_DEPENDS:= ${TEST_DEPENDS} .endif -GNU_CONFIGURE= yes -USE_LDCONFIG= yes -USES= pathfix pkgconfig -PLIST_SUB= PORTVERSION=${PORTVERSION} - +INSTALL_TARGET= install-strip INFO= libffi - -MAN3= ffi.3 ffi_call.3 ffi_prep_cif.3 ffi_prep_cif_var.3 +PLIST_SUB= PORTVERSION=${PORTVERSION} post-install: @${LN} -sf ../lib/libffi-${PORTVERSION}/include/ffi.h \ - ${PREFIX}/include/ + ${STAGEDIR}${PREFIX}/include/ @${LN} -sf ../lib/libffi-${PORTVERSION}/include/ffitarget.h \ - ${PREFIX}/include/ + ${STAGEDIR}${PREFIX}/include/ regression-test: build @cd ${WRKSRC} && ${MAKE} check Added: head/devel/libffi/files/patch-src__arm__ffi.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/libffi/files/patch-src__arm__ffi.c Sat Dec 21 05:22:05 2013 (r337118) @@ -0,0 +1,36 @@ +# Description: Fix abort() on ARM related to __clear_cache(). This is an issue +# for anything !apple that is using the libcompiler_rt provided by clang on ARM +# PR: ports/149167 ports/184517 +# Patch by: cognet@ (to be upstreamed @ LLVM) + +--- ./src/arm/ffi.c.orig 2013-03-16 22:19:39.000000000 +1100 ++++ ./src/arm/ffi.c 2013-12-03 19:30:58.440924300 +1100 +@@ -33,6 +33,11 @@ + + #include + ++#if defined(__FreeBSD__) && defined(__arm__) ++#include ++#include ++#endif ++ + /* Forward declares. */ + static int vfp_type_p (ffi_type *); + static void layout_vfp_args (ffi_cif *); +@@ -582,6 +587,16 @@ + + #else + ++#if defined(__FreeBSD__) && defined(__arm__) ++#define __clear_cache(start, end) do { \ ++ struct arm_sync_icache_args ua; \ ++ \ ++ ua.addr = (uintptr_t)(start); \ ++ ua.len = (char *)(end) - (char *)start; \ ++ sysarch(ARM_SYNC_ICACHE, &ua); \ ++ } while (0); ++#endif ++ + #define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX) \ + ({ unsigned char *__tramp = (unsigned char*)(TRAMP); \ + unsigned int __fun = (unsigned int)(FUN); \ Modified: head/devel/libffi/pkg-plist ============================================================================== --- head/devel/libffi/pkg-plist Sat Dec 21 04:39:52 2013 (r337117) +++ head/devel/libffi/pkg-plist Sat Dec 21 05:22:05 2013 (r337118) @@ -7,5 +7,9 @@ lib/libffi.la lib/libffi.so lib/libffi.so.6 libdata/pkgconfig/libffi.pc +man/man3/ffi.3.gz +man/man3/ffi_call.3.gz +man/man3/ffi_prep_cif.3.gz +man/man3/ffi_prep_cif_var.3.gz @dirrm lib/libffi-%%PORTVERSION%%/include @dirrm lib/libffi-%%PORTVERSION%%