diff --git a/devel/libffi/Makefile b/devel/libffi/Makefile index 938f1f7d5ff..0ee904a8ff9 100644 --- a/devel/libffi/Makefile +++ b/devel/libffi/Makefile @@ -1,8 +1,8 @@ COMMENT= Foreign Function Interface -DISTNAME= libffi-3.3 -REVISION= 1 -SHARED_LIBS += ffi 1.2 # .6.4 +V= 3.4.2 +DISTNAME= libffi-$V +SHARED_LIBS += ffi 2.0 # 9.0 CATEGORIES= devel MAINTAINER= Jasper Lievisse Adriaanse @@ -17,8 +17,7 @@ PERMIT_PACKAGE= Yes WANTLIB += c++abi .endif -MASTER_SITES= https://sourceware.org/pub/libffi/ \ - ftp://sourceware.org/pub/libffi/ +MASTER_SITES= https://github.com/libffi/libffi/releases/download/v$V/ DEBUG_PACKAGES = ${BUILD_PACKAGES} diff --git a/devel/libffi/distinfo b/devel/libffi/distinfo index 99265f53d5e..acac7bf9c45 100644 --- a/devel/libffi/distinfo +++ b/devel/libffi/distinfo @@ -1,2 +1,2 @@ -SHA256 (libffi-3.3.tar.gz) = cvunkicD3fp6Ao1ROsFahcjVTI1n9V+lpIAohdxlIFY= -SIZE (libffi-3.3.tar.gz) = 1305466 +SHA256 (libffi-3.4.2.tar.gz) = VA+3IWGaaro73u99lA2Ong5tLBk1lbwkMkG3f/npNiA= +SIZE (libffi-3.4.2.tar.gz) = 1351355 diff --git a/devel/libffi/patches/patch-configure b/devel/libffi/patches/patch-configure index 05197bf8240..75738d04774 100644 --- a/devel/libffi/patches/patch-configure +++ b/devel/libffi/patches/patch-configure @@ -3,7 +3,7 @@ Index: configure --- configure.orig +++ configure -@@ -18475,6 +18475,12 @@ $as_echo "#define SYMBOL_UNDERSCORE 1" >>confdefs.h +@@ -18650,6 +18650,12 @@ $as_echo "#define SYMBOL_UNDERSCORE 1" >>confdefs.h fi diff --git a/devel/libffi/patches/patch-configure_host b/devel/libffi/patches/patch-configure_host index 86eeb1d91a9..22a0110529e 100644 --- a/devel/libffi/patches/patch-configure_host +++ b/devel/libffi/patches/patch-configure_host @@ -1,12 +1,12 @@ Index: configure.host --- configure.host.orig +++ configure.host -@@ -203,7 +203,7 @@ case "${host}" in +@@ -216,7 +216,7 @@ case "${host}" in TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc - HAVE_LONG_DOUBLE_VARIANT=1 + CFLAGS="$CFLAGS -D__NO_FPRS__" ;; -- powerpc64-*-freebsd*) -+ powerpc64-*-freebsd* | powerpc64-*-openbsd*) +- powerpc64-*-freebsd* | powerpc64le-*-freebsd*) ++ powerpc64-*-freebsd* | powerpc64le-*-freebsd* | powerpc64-*-openbsd*) TARGET=POWERPC; TARGETDIR=powerpc ;; powerpc*-*-rtems*) diff --git a/devel/libffi/patches/patch-src_arm_ffi_c b/devel/libffi/patches/patch-src_arm_ffi_c index dcf04854441..bb269283670 100644 --- a/devel/libffi/patches/patch-src_arm_ffi_c +++ b/devel/libffi/patches/patch-src_arm_ffi_c @@ -3,8 +3,8 @@ https://svnweb.freebsd.org/ports/head/devel/libffi/files/patch-src__arm__ffi.c?r Index: src/arm/ffi.c --- src/arm/ffi.c.orig +++ src/arm/ffi.c -@@ -55,6 +55,11 @@ extern unsigned int ffi_arm_trampoline[3] FFI_HIDDEN; - #endif +@@ -64,6 +64,11 @@ extern unsigned char ffi_arm_trampoline[12] FFI_HIDDEN + #include #endif +#ifdef __arm__ @@ -15,7 +15,7 @@ Index: src/arm/ffi.c /* Forward declares. */ static int vfp_type_p (const ffi_type *); static void layout_vfp_args (ffi_cif *); -@@ -591,6 +596,16 @@ ffi_prep_closure_loc (ffi_closure * closure, +@@ -621,6 +626,16 @@ ffi_prep_closure_loc (ffi_closure * closure, config[0] = closure; config[1] = closure_func; #else @@ -30,5 +30,5 @@ Index: src/arm/ffi.c + } while (0); +#endif - #ifndef _M_ARM - memcpy(closure->tramp, ffi_arm_trampoline, 8); + #if defined(FFI_EXEC_STATIC_TRAMP) + if (ffi_tramp_is_present(closure)) diff --git a/devel/libffi/patches/patch-src_closures_c b/devel/libffi/patches/patch-src_closures_c index f6f581c0a33..486e4d74746 100644 --- a/devel/libffi/patches/patch-src_closures_c +++ b/devel/libffi/patches/patch-src_closures_c @@ -1,15 +1,15 @@ Index: src/closures.c --- src/closures.c.orig +++ src/closures.c -@@ -837,6 +837,7 @@ dlmmap (void *start, size_t length, int prot, - && flags == (MAP_PRIVATE | MAP_ANONYMOUS) - && fd == -1 && offset == 0); +@@ -878,6 +878,7 @@ dlmmap (void *start, size_t length, int prot, + return ptr; + } +#if 0 if (execfd == -1 && is_emutramp_enabled ()) { ptr = mmap (start, length, prot & ~PROT_EXEC, flags, fd, offset); -@@ -855,6 +856,7 @@ dlmmap (void *start, size_t length, int prot, +@@ -896,6 +897,7 @@ dlmmap (void *start, size_t length, int prot, with ((prot & ~PROT_WRITE) | PROT_EXEC) and mremap with MREMAP_DUP and prot at this point. */ } diff --git a/devel/libffi/patches/patch-src_mips_n32_S b/devel/libffi/patches/patch-src_mips_n32_S deleted file mode 100644 index e256c964170..00000000000 --- a/devel/libffi/patches/patch-src_mips_n32_S +++ /dev/null @@ -1,19 +0,0 @@ -Use EH_FRAME_FLAGS to get section flags that clang's integrated assembler -expects. This fixes the following build error on mips64: - -../src/mips/n32.S:585:9: error: changed section flags for .eh_frame, expected: 0x2 - .section .eh_frame,"aw",@progbits - ^ - -Index: src/mips/n32.S ---- src/mips/n32.S.orig -+++ src/mips/n32.S -@@ -582,7 +582,7 @@ cls_epilogue: - .end ffi_closure_N32 - - #ifdef __GNUC__ -- .section .eh_frame,"aw",@progbits -+ .section .eh_frame,EH_FRAME_FLAGS,@progbits - .Lframe1: - .4byte .LECIE1-.LSCIE1 # length - .LSCIE1: diff --git a/devel/libffi/patches/patch-src_powerpc_ffi_powerpc_h b/devel/libffi/patches/patch-src_powerpc_ffi_powerpc_h deleted file mode 100644 index 1fd9717e559..00000000000 --- a/devel/libffi/patches/patch-src_powerpc_ffi_powerpc_h +++ /dev/null @@ -1,18 +0,0 @@ -Fix for: -../src/powerpc/ffi_powerpc.h:105: error: expected declaration -specifiers or '...' before 'float128' -From: -https://github.com/libffi/libffi/pull/532/commits/2138adb2a5b6a0bc2fe3518e0645eacc89b6f392 - -Index: src/powerpc/ffi_powerpc.h ---- src/powerpc/ffi_powerpc.h.orig -+++ src/powerpc/ffi_powerpc.h -@@ -62,7 +62,7 @@ typedef _Float128 float128; - #elif defined(__FLOAT128__) - typedef __float128 float128; - #else --typedef __int128 float128; -+typedef char float128[16] __attribute__((aligned(16))); - #endif - - void FFI_HIDDEN ffi_closure_SYSV (void); diff --git a/devel/libffi/patches/patch-src_powerpc_sysv_S b/devel/libffi/patches/patch-src_powerpc_sysv_S deleted file mode 100644 index 0a49dbb0920..00000000000 --- a/devel/libffi/patches/patch-src_powerpc_sysv_S +++ /dev/null @@ -1,46 +0,0 @@ -From 4d6d2866ae43e55325e8ee96561221804602cd7a Mon Sep 17 00:00:00 2001 -From: Samuel Holland -Date: Fri, 21 Feb 2020 21:06:15 -0600 -Subject: [PATCH] Update powerpc sysv assembly for ffi_powerpc.h changes (#541) - -Some of the flag bits were moved when adding powerpc64 vector support. - -Fixes #536 - -Index: src/powerpc/sysv.S ---- src/powerpc/sysv.S.orig -+++ src/powerpc/sysv.S -@@ -104,17 +104,16 @@ ENTRY(ffi_call_SYSV) - bctrl - - /* Now, deal with the return value. */ -- mtcrf 0x01,%r31 /* cr7 */ -+ mtcrf 0x03,%r31 /* cr6-cr7 */ - bt- 31,L(small_struct_return_value) - bt- 30,L(done_return_value) - #ifndef __NO_FPRS__ - bt- 29,L(fp_return_value) - #endif - stw %r3,0(%r30) -- bf+ 28,L(done_return_value) -+ bf+ 27,L(done_return_value) - stw %r4,4(%r30) -- mtcrf 0x02,%r31 /* cr6 */ -- bf 27,L(done_return_value) -+ bf 26,L(done_return_value) - stw %r5,8(%r30) - stw %r6,12(%r30) - /* Fall through... */ -@@ -145,10 +144,9 @@ L(done_return_value): - #ifndef __NO_FPRS__ - L(fp_return_value): - .cfi_restore_state -- bf 28,L(float_return_value) -+ bf 27,L(float_return_value) - stfd %f1,0(%r30) -- mtcrf 0x02,%r31 /* cr6 */ -- bf 27,L(done_return_value) -+ bf 26,L(done_return_value) - stfd %f2,8(%r30) - b L(done_return_value) - L(float_return_value): diff --git a/devel/libffi/patches/patch-testsuite_lib_libffi_exp b/devel/libffi/patches/patch-testsuite_lib_libffi_exp index ec7bed3d015..3ac5abd576c 100644 --- a/devel/libffi/patches/patch-testsuite_lib_libffi_exp +++ b/devel/libffi/patches/patch-testsuite_lib_libffi_exp @@ -3,7 +3,7 @@ cc1: error: unrecognized command line option "-Wno-psabi" Index: testsuite/lib/libffi.exp --- testsuite/lib/libffi.exp.orig +++ testsuite/lib/libffi.exp -@@ -488,7 +488,7 @@ proc run-many-tests { testcases extra_flags } { +@@ -491,7 +491,7 @@ proc run-many-tests { testcases extra_flags } { } } "gnu" {