View | Details | Raw Unified | Return to bug 263764
Collapse All | Expand All

(-)b/devel/libffi/Makefile (-9 / +2 lines)
Lines 1-16 Link Here
1
# Created by: Horance Chou <horance@freedom.ie.cycu.edu.tw>
1
# Created by: Horance Chou <horance@freedom.ie.cycu.edu.tw>
2
2
3
PORTNAME=	libffi
3
PORTNAME=	libffi
4
PORTVERSION=	3.3
4
PORTVERSION=	3.4.2
5
PORTREVISION=	1
6
CATEGORIES=	devel
5
CATEGORIES=	devel
7
MASTER_SITES=	SOURCEWARE/${PORTNAME}
6
MASTER_SITES=	https://github.com/${PORTNAME}/${PORTNAME}/releases/download/v${PORTVERSION}/
8
9
PATCH_SITES=	https://github.com/${PORTNAME}/${PORTNAME}/commit/
10
PATCHFILES+=	01a75ed76ea7e57f1b7a5c183e2b1e890e6aa0fd.diff:-p1
11
# This patch is for configure.ac.
12
# A local patch against configure has been created in files/patch-configure.
13
#PATCHFILES+=	8c50837f0b58ba5b2bcb1b424a2a4bfa01559fb2.diff:-p1
14
7
15
MAINTAINER=	kbowling@FreeBSD.org
8
MAINTAINER=	kbowling@FreeBSD.org
16
COMMENT=	Foreign Function Interface
9
COMMENT=	Foreign Function Interface
(-)b/devel/libffi/distinfo (-5 / +3 lines)
Lines 1-5 Link Here
1
TIMESTAMP = 1651590393
1
TIMESTAMP = 1651605317
2
SHA256 (libffi-3.3.tar.gz) = 72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056
2
SHA256 (libffi-3.4.2.tar.gz) = 540fb721619a6aba3bdeef7d940d8e9e0e6d2c193595bc243241b77ff9e93620
3
SIZE (libffi-3.3.tar.gz) = 1305466
3
SIZE (libffi-3.4.2.tar.gz) = 1351355
4
SHA256 (01a75ed76ea7e57f1b7a5c183e2b1e890e6aa0fd.diff) = 79935f5836624a9b38d0d40541a9d7510f4ecff14f6a7881f483b158cf13d335
5
SIZE (01a75ed76ea7e57f1b7a5c183e2b1e890e6aa0fd.diff) = 414
(-)a/devel/libffi/files/patch-Makefile.in (-16 lines)
Removed Link Here
1
This patch is based on the following upstream patch
2
From 0027b072627aa9d3ada71c4374561966064ecd5a Mon Sep 17 00:00:00 2001
3
From: "M. Herdiansyah"
4
Date: Thu, 11 Jun 2020 19:40:24 +0700
5
Subject: [PATCH] Makefile: increase compatibility with bmake (#551)
6
--- Makefile.in.orig	2020-07-04 16:53:39 UTC
7
+++ Makefile.in
8
@@ -2012,7 +2012,7 @@ uninstall-am: uninstall-pkgconfigDATA uninstall-toolex
9
 @LIBFFI_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBFFI_BUILD_VERSIONED_SHLIB_TRUE@	 > $@ || (rm -f $@ ; exit 1)
10
 
11
 libffi.map: $(top_srcdir)/libffi.map.in
12
-	$(COMPILE) -D$(TARGET) -E -x assembler-with-cpp -o $@ $<
13
+	$(COMPILE) -D$(TARGET) -E -x assembler-with-cpp -o $@ $(top_srcdir)/libffi.map.in
14
 
15
 dist-hook:
16
 	d=`(cd $(distdir); pwd)`; (cd doc; make pdf; cp *.pdf $$d/doc)
(-)a/devel/libffi/files/patch-configure (-23 lines)
Removed Link Here
1
--- configure.orig	2020-08-20 10:54:03 UTC
2
+++ configure
3
@@ -18545,17 +18545,11 @@ if ${libffi_cv_ro_eh_frame+:} false; then :
4
   $as_echo_n "(cached) " >&6
5
 else
6
 
7
-  	libffi_cv_ro_eh_frame=no
8
+  	libffi_cv_ro_eh_frame=yes
9
   	echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c
10
   	if $CC $CFLAGS -c -fpic -fexceptions -o conftest.o conftest.c > /dev/null 2>&1; then
11
-	    objdump -h conftest.o > conftest.dump 2>&1
12
-	    libffi_eh_frame_line=`grep -n eh_frame conftest.dump | cut -d: -f 1`
13
-	    if test "x$libffi_eh_frame_line" != "x"; then
14
-	        libffi_test_line=`expr $libffi_eh_frame_line + 1`p
15
-	        sed -n $libffi_test_line conftest.dump > conftest.line
16
-	        if grep READONLY conftest.line > /dev/null; then
17
-	            libffi_cv_ro_eh_frame=yes
18
-	        fi
19
+	    if readelf -WS conftest.o | grep -q -n 'eh_frame .* WA'; then
20
+	        libffi_cv_ro_eh_frame=no
21
 	    fi
22
   	fi
23
   	rm -f conftest.*
(-)a/devel/libffi/files/patch-configure.host (-24 lines)
Removed Link Here
1
--- configure.host.orig	2019-11-22 17:55:36.000000000 -0600
2
+++ configure.host	2020-08-28 12:48:23.259024000 -0500
3
@@ -167,7 +167,7 @@ case "${host}" in
4
   mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
5
 	TARGET=MIPS; TARGETDIR=mips
6
 	;;
7
-  mips*-*linux* | mips*-*-openbsd*)
8
+  mips*-*linux* | mips*-*-openbsd* | mips*-*-freebsd*)
9
 	# Support 128-bit long double for NewABI.
10
 	HAVE_LONG_DOUBLE='defined(__mips64)'
11
 	TARGET=MIPS; TARGETDIR=mips
12
@@ -203,7 +203,11 @@ case "${host}" in
13
 	TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
14
 	HAVE_LONG_DOUBLE_VARIANT=1
15
 	;;
16
-  powerpc64-*-freebsd*)
17
+  powerpcspe-*-freebsd*)
18
+	TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
19
+	CFLAGS="$CFLAGS -D__NO_FPRS__"
20
+	;;
21
+  powerpc64-*-freebsd* | powerpc64le-*-freebsd*)
22
 	TARGET=POWERPC; TARGETDIR=powerpc
23
 	;;
24
   powerpc*-*-rtems*)
(-)a/devel/libffi/files/patch-src__arm__ffi.c (-36 lines)
Removed Link Here
1
# Description: Fix abort() on ARM related to __clear_cache(). This is an issue
2
# for anything !apple that is using the libcompiler_rt provided by clang on ARM
3
# PR: ports/149167 ports/184517
4
# Patch by: cognet@ (to be upstreamed @ LLVM)
5
6
--- src/arm/ffi.c.orig	2019-10-31 14:49:54 UTC
7
+++ src/arm/ffi.c
8
@@ -55,6 +55,11 @@ extern unsigned int ffi_arm_trampoline[3] FFI_HIDDEN;
9
 #endif
10
 #endif
11
 
12
+#if defined(__FreeBSD__) && defined(__arm__)
13
+#include <sys/types.h>
14
+#include <machine/sysarch.h>
15
+#endif
16
+
17
 /* Forward declares. */
18
 static int vfp_type_p (const ffi_type *);
19
 static void layout_vfp_args (ffi_cif *);
20
@@ -568,6 +573,16 @@ void ffi_go_closure_SYSV (void) FFI_HIDDEN;
21
 void ffi_go_closure_VFP (void) FFI_HIDDEN;
22
 
23
 /* the cif must already be prep'ed */
24
+
25
+#if defined(__FreeBSD__) && defined(__arm__)
26
+#define __clear_cache(start, end) do { \
27
+		struct arm_sync_icache_args ua; 		\
28
+								\
29
+		ua.addr = (uintptr_t)(start);			\
30
+		ua.len = (char *)(end) - (char *)start;		\
31
+		sysarch(ARM_SYNC_ICACHE, &ua);			\
32
+	} while (0);
33
+#endif
34
 
35
 ffi_status
36
 ffi_prep_closure_loc (ffi_closure * closure,
(-)a/devel/libffi/files/patch-src__mips__ffi.c (-29 lines)
Removed Link Here
1
diff --git ./src/mips/ffi.c.orig ./src/mips/ffi.c
2
index 03121e3..8b7881f 100644
3
--- ./src/mips/ffi.c.orig
4
+++ ./src/mips/ffi.c
5
@@ -38,7 +38,9 @@
6
 #endif
7
 
8
 #ifndef USE__BUILTIN___CLEAR_CACHE
9
-#  if defined(__OpenBSD__)
10
+#  if defined(__FreeBSD__)
11
+#    include <machine/sysarch.h>
12
+#  elif defined(__OpenBSD__)
13
 #    include <mips64/sysarch.h>
14
 #  else
15
 #    include <sys/cachectl.h>
16
@@ -729,11 +731,13 @@ ffi_prep_closure_loc (ffi_closure *closure,
17
   closure->fun = fun;
18
   closure->user_data = user_data;
19
 
20
+#if !defined(__FreeBSD__)
21
 #ifdef USE__BUILTIN___CLEAR_CACHE
22
   __builtin___clear_cache(clear_location, clear_location + FFI_TRAMPOLINE_SIZE);
23
 #else
24
   cacheflush (clear_location, FFI_TRAMPOLINE_SIZE, ICACHE);
25
 #endif
26
+#endif /* ! __FreeBSD__ */
27
   return FFI_OK;
28
 }
29
 
(-)a/devel/libffi/files/patch-src__mips__ffitarget.h (-13 lines)
Removed Link Here
1
diff --git ./src/mips/ffitarget.h.orig ./src/mips/ffitarget.h
2
index 717d659..5a0c2b1 100644
3
--- ./src/mips/ffitarget.h.orig
4
+++ ./src/mips/ffitarget.h
5
@@ -41,7 +41,7 @@
6
 #define _MIPS_SIM_ABI32		1
7
 #define _MIPS_SIM_NABI32	2
8
 #define _MIPS_SIM_ABI64		3
9
-#elif !defined(__OpenBSD__)
10
+#elif !defined(__OpenBSD__) && !defined(__FreeBSD__)
11
 # include <sgidefs.h>
12
 #endif
13
 
(-)b/devel/libffi/pkg-plist (-2 / +2 lines)
Lines 2-9 include/ffi.h Link Here
2
include/ffitarget.h
2
include/ffitarget.h
3
lib/libffi.a
3
lib/libffi.a
4
lib/libffi.so
4
lib/libffi.so
5
lib/libffi.so.7
5
lib/libffi.so.8
6
lib/libffi.so.7.1.0
6
lib/libffi.so.8.1.0
7
libdata/pkgconfig/libffi.pc
7
libdata/pkgconfig/libffi.pc
8
man/man3/ffi.3.gz
8
man/man3/ffi.3.gz
9
man/man3/ffi_call.3.gz
9
man/man3/ffi_call.3.gz

Return to bug 263764