svn commit: r376293 - in head/devel/libffi: . files

Sean Bruno sbruno at FreeBSD.org
Mon Jan 5 11:50:25 UTC 2015


Author: sbruno
Date: Mon Jan  5 11:50:22 2015
New Revision: 376293
URL: https://svnweb.freebsd.org/changeset/ports/376293
QAT: https://qat.redports.org/buildarchive/r376293/

Log:
  Update libffi to 3.2.1
  - Add LICENSE_FILE
  - Use OPTIONS helpers
  - Backport: Fix for testsuite using clang [1]
  - Backport: Fix build with Clang 3.5 on ARM [2]
  
  PR:		196408
  Submitted by:	koobs
  Approved by:	mentor (implicit)
  Relnotes:	yes

Added:
  head/devel/libffi/files/patch-b5ade2   (contents, props changed)
  head/devel/libffi/files/patch-src_arm_sysv.S   (contents, props changed)
Modified:
  head/devel/libffi/Makefile
  head/devel/libffi/distinfo
  head/devel/libffi/files/patch-configure
  head/devel/libffi/pkg-plist

Modified: head/devel/libffi/Makefile
==============================================================================
--- head/devel/libffi/Makefile	Mon Jan  5 11:19:16 2015	(r376292)
+++ head/devel/libffi/Makefile	Mon Jan  5 11:50:22 2015	(r376293)
@@ -2,8 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	libffi
-PORTVERSION=	3.0.13
-PORTREVISION=	3
+PORTVERSION=	3.2.1
 CATEGORIES=	devel
 MASTER_SITES=	SOURCEWARE
 MASTER_SITE_SUBDIR=	${PORTNAME}
@@ -12,6 +11,7 @@ MAINTAINER=	zeising at FreeBSD.org
 COMMENT=	Foreign Function Interface
 
 LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
 
 TEST_DEPENDS=	runtest:${PORTSDIR}/misc/dejagnu
 
@@ -20,18 +20,18 @@ USE_LDCONFIG=	yes
 GNU_CONFIGURE=	yes
 
 OPTIONS_DEFINE=	TESTS
-TESTS_DESC=	Include tools for test suite
 
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MTESTS}
-BUILD_DEPENDS:=	${TEST_DEPENDS}
-.endif
+TESTS_DESC=		Include tools for test suite
+TESTS_BUILD_DEPENDS=	${TEST_DEPENDS}
 
 INSTALL_TARGET=	install-strip
 INFO=		libffi
 PLIST_SUB=	PORTVERSION=${PORTVERSION}
 
+post-patch:
+	@${REINPLACE_CMD} -e 's| -Wno-psabi||g' \
+		${WRKSRC}/testsuite/lib/libffi.exp
+
 post-install:
 	@${LN} -sf ../lib/libffi-${PORTVERSION}/include/ffi.h \
 	    ${STAGEDIR}${PREFIX}/include/

Modified: head/devel/libffi/distinfo
==============================================================================
--- head/devel/libffi/distinfo	Mon Jan  5 11:19:16 2015	(r376292)
+++ head/devel/libffi/distinfo	Mon Jan  5 11:50:22 2015	(r376293)
@@ -1,2 +1,2 @@
-SHA256 (libffi-3.0.13.tar.gz) = 1dddde1400c3bcb7749d398071af88c3e4754058d2d4c0b3696c2f82dc5cf11c
-SIZE (libffi-3.0.13.tar.gz) = 845747
+SHA256 (libffi-3.2.1.tar.gz) = d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37
+SIZE (libffi-3.2.1.tar.gz) = 940837

Added: head/devel/libffi/files/patch-b5ade2
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libffi/files/patch-b5ade2	Mon Jan  5 11:50:22 2015	(r376293)
@@ -0,0 +1,112 @@
+# Clang doesn't like the -Wno-psabi argument that we want to pass to GCC.
+# Since clang is detected as GCC via __GNUC__, use ax_cv_c_compiler_vendor.
+# https://github.com/atgreen/libffi/commit/b5ade2fb5d9ba06519484677a5474e5dad48c2e3
+
+diff --git a/testsuite/lib/libffi.exp b/testsuite/lib/libffi.exp
+index 5051d31..0e92bb0 100644
+--- testsuite/lib/libffi.exp
++++ testsuite/lib/libffi.exp
+@@ -100,46 +100,39 @@ proc libffi-init { args } {
+     global libffi_link_flags
+     global tool_root_dir
+     global ld_library_path
+-
+-    global using_gcc
++    global compiler_vendor
+ 
+     set blddirffi [pwd]/.. 
+     verbose "libffi $blddirffi"
+ 
+-    # Are we building with GCC?
+-    set tmp [grep ../config.status "GCC='yes'"]
+-    if { [string match $tmp "GCC='yes'"] } {
+-
+-      set using_gcc "yes"
++    # Which compiler are we building with?
++    set tmp [grep ../config.log "^ax_cv_c_compiler_vendor.*$"]
++    regexp -- {^[^=]*=(.*)$} $tmp nil compiler_vendor
+ 
+-    set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a]
+-    if {$gccdir != ""} {
+-	set gccdir [file dirname $gccdir]
+-    }
+-    verbose "gccdir $gccdir"
+-
+-    set ld_library_path "."
+-    append ld_library_path ":${gccdir}"
+-
+-    set compiler "${gccdir}/xgcc"
+-    if { [is_remote host] == 0 && [which $compiler] != 0 } {
+-	foreach i "[exec $compiler --print-multi-lib]" {
+-	    set mldir ""
+-	    regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir
+-	    set mldir [string trimright $mldir "\;@"]
+-	    if { "$mldir" == "." } {
+-		continue
+-	    }
+-	    if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] >= 1 } {
+-		append ld_library_path ":${gccdir}/${mldir}"
++    if { [string match $compiler_vendor "gnu"] } {
++        set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a]
++        if {$gccdir != ""} {
++	    set gccdir [file dirname $gccdir]
++        }
++        verbose "gccdir $gccdir"
++
++        set ld_library_path "."
++        append ld_library_path ":${gccdir}"
++
++        set compiler "${gccdir}/xgcc"
++        if { [is_remote host] == 0 && [which $compiler] != 0 } {
++	    foreach i "[exec $compiler --print-multi-lib]" {
++	        set mldir ""
++	        regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir
++	        set mldir [string trimright $mldir "\;@"]
++	        if { "$mldir" == "." } {
++		    continue
++	        }
++	        if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] >= 1 } {
++		    append ld_library_path ":${gccdir}/${mldir}"
++	        }
+ 	    }
+-	}
+-    }
+- 
+-    } else {
+-
+-      set using_gcc "no"
+-
++        }
+     }
+ 
+     # add the library path for libffi.
+@@ -278,18 +271,25 @@ proc libffi-dg-runtest { testcases default-extra-flags } {
+ }
+ 
+ proc run-many-tests { testcases extra_flags } {
+-    global using_gcc
+-    if { [string match $using_gcc "yes"] } {
++    global compiler_vendor
++    switch $compiler_vendor {
++      "clang" {
++	set common "-W -Wall"
++	set optimizations { "-O0" "-O1" "-O2" "-O3" "-Os" }
++      }
++      "gnu" {
+         set common "-W -Wall -Wno-psabi"
+         set optimizations { "-O0" "-O2" "-O3" "-Os" "-O2 -fomit-frame-pointer" }
+-    } else {
++      }
++      default {
+         # Assume we are using the vendor compiler.
+         set common ""
+         set optimizations { "" }
++      }
+     }
+ 
+     set targetabis { "" }
+-    if [string match $using_gcc "yes"] {
++    if [string match $compiler_vendor "gnu"] {
+         if [istarget "i?86-*-*"] {
+             set targetabis {
+                 ""

Modified: head/devel/libffi/files/patch-configure
==============================================================================
--- head/devel/libffi/files/patch-configure	Mon Jan  5 11:19:16 2015	(r376292)
+++ head/devel/libffi/files/patch-configure	Mon Jan  5 11:50:22 2015	(r376293)
@@ -1,13 +1,11 @@
-diff --git ./configure.orig ./configure
-index 4b04db7..0d94fbd 100755
---- ./configure.orig
-+++ ./configure
-@@ -13428,7 +13428,7 @@ case "$host" in
+--- configure.orig	2015-01-01 10:56:10 UTC
++++ configure
+@@ -17221,7 +17221,7 @@ case "$host" in
    mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
  	TARGET=MIPS; TARGETDIR=mips
  	;;
--  mips*-*-linux* | mips*-*-openbsd*)
-+  mips*-*-linux* | mips*-*-openbsd* | mips*-*-freebsd*)
+-  mips*-*linux* | mips*-*-openbsd*)
++  mips*-*linux* | mips*-*-openbsd* | mips*-*-freebsd*)
  	# Support 128-bit long double for NewABI.
  	HAVE_LONG_DOUBLE='defined(__mips64)'
  	TARGET=MIPS; TARGETDIR=mips

Added: head/devel/libffi/files/patch-src_arm_sysv.S
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libffi/files/patch-src_arm_sysv.S	Mon Jan  5 11:50:22 2015	(r376293)
@@ -0,0 +1,15 @@
+# Description: 3.2.1 fails to build with clang 3.5.0 on arm
+# Issue ID: https://github.com/atgreen/libffi/issues/162
+# Submitted by: sbruno
+
+--- src/arm/sysv.S.orig	2015-01-01 10:47:51 UTC
++++ src/arm/sysv.S
+@@ -396,7 +396,7 @@ LSYM(Lbase_args):
+ 	beq	LSYM(Lepilogue_vfp)
+ 
+ 	cmp	r3, #FFI_TYPE_SINT64
+-	stmeqia	r2, {r0, r1}
++	stmiaeq	r2, {r0, r1}
+ 	beq	LSYM(Lepilogue_vfp)
+ 
+ 	cmp	r3, #FFI_TYPE_FLOAT

Modified: head/devel/libffi/pkg-plist
==============================================================================
--- head/devel/libffi/pkg-plist	Mon Jan  5 11:19:16 2015	(r376292)
+++ head/devel/libffi/pkg-plist	Mon Jan  5 11:50:22 2015	(r376293)
@@ -5,7 +5,7 @@ lib/libffi-%%PORTVERSION%%/include/ffita
 lib/libffi.a
 lib/libffi.so
 lib/libffi.so.6
-lib/libffi.so.6.0.1
+lib/libffi.so.6.0.4
 libdata/pkgconfig/libffi.pc
 man/man3/ffi.3.gz
 man/man3/ffi_call.3.gz


More information about the svn-ports-head mailing list