Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Oct 2014 15:31:00 +0000 (UTC)
From:      Sean Bruno <sbruno@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r371681 - in head/devel/libffi: . files
Message-ID:  <201410291531.s9TFV0Y0097147@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sbruno
Date: Wed Oct 29 15:31:00 2014
New Revision: 371681
URL: https://svnweb.freebsd.org/changeset/ports/371681
QAT: https://qat.redports.org/buildarchive/r371681/

Log:
  Add support for mips/mips64 targets.
  
  Unblocks 7k ports building for these targets.
  
  PR:		191909
  Submitted by:	sson
  Reviewed by:	bapt (mentor)

Added:
  head/devel/libffi/files/patch-configure   (contents, props changed)
  head/devel/libffi/files/patch-src__mips__ffi.c   (contents, props changed)
  head/devel/libffi/files/patch-src__mips__ffitarget.h   (contents, props changed)
Modified:
  head/devel/libffi/Makefile

Modified: head/devel/libffi/Makefile
==============================================================================
--- head/devel/libffi/Makefile	Wed Oct 29 15:30:55 2014	(r371680)
+++ head/devel/libffi/Makefile	Wed Oct 29 15:31:00 2014	(r371681)
@@ -3,7 +3,7 @@
 
 PORTNAME=	libffi
 PORTVERSION=	3.0.13
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	devel
 MASTER_SITES=	SOURCEWARE
 MASTER_SITE_SUBDIR=	${PORTNAME}

Added: head/devel/libffi/files/patch-configure
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libffi/files/patch-configure	Wed Oct 29 15:31:00 2014	(r371681)
@@ -0,0 +1,13 @@
+diff --git ./configure.orig ./configure
+index 4b04db7..0d94fbd 100755
+--- ./configure.orig
++++ ./configure
+@@ -13428,7 +13428,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*)
+ 	# Support 128-bit long double for NewABI.
+ 	HAVE_LONG_DOUBLE='defined(__mips64)'
+ 	TARGET=MIPS; TARGETDIR=mips

Added: head/devel/libffi/files/patch-src__mips__ffi.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libffi/files/patch-src__mips__ffi.c	Wed Oct 29 15:31:00 2014	(r371681)
@@ -0,0 +1,29 @@
+diff --git ./src/mips/ffi.c.orig ./src/mips/ffi.c
+index 03121e3..8b7881f 100644
+--- ./src/mips/ffi.c.orig
++++ ./src/mips/ffi.c
+@@ -38,7 +38,9 @@
+ #endif
+ 
+ #ifndef USE__BUILTIN___CLEAR_CACHE
+-#  if defined(__OpenBSD__)
++#  if defined(__FreeBSD__)
++#    include <machine/sysarch.h>
++#  elif defined(__OpenBSD__)
+ #    include <mips64/sysarch.h>
+ #  else
+ #    include <sys/cachectl.h>
+@@ -729,11 +731,13 @@ ffi_prep_closure_loc (ffi_closure *closure,
+   closure->fun = fun;
+   closure->user_data = user_data;
+ 
++#if !defined(__FreeBSD__)
+ #ifdef USE__BUILTIN___CLEAR_CACHE
+   __builtin___clear_cache(clear_location, clear_location + FFI_TRAMPOLINE_SIZE);
+ #else
+   cacheflush (clear_location, FFI_TRAMPOLINE_SIZE, ICACHE);
+ #endif
++#endif /* ! __FreeBSD__ */
+   return FFI_OK;
+ }
+ 

Added: head/devel/libffi/files/patch-src__mips__ffitarget.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libffi/files/patch-src__mips__ffitarget.h	Wed Oct 29 15:31:00 2014	(r371681)
@@ -0,0 +1,13 @@
+diff --git ./src/mips/ffitarget.h.orig ./src/mips/ffitarget.h
+index 717d659..5a0c2b1 100644
+--- ./src/mips/ffitarget.h.orig
++++ ./src/mips/ffitarget.h
+@@ -41,7 +41,7 @@
+ #define _MIPS_SIM_ABI32		1
+ #define _MIPS_SIM_NABI32	2
+ #define _MIPS_SIM_ABI64		3
+-#elif !defined(__OpenBSD__)
++#elif !defined(__OpenBSD__) && !defined(__FreeBSD__)
+ # include <sgidefs.h>
+ #endif
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410291531.s9TFV0Y0097147>