On Sun, Dec 04 2022, Antoine Jacoutot <ajacou...@bsdfrog.org> wrote:
> Hi.
>
> This updates devel/libffi to the latest release.

check_sym says:
/usr/local/lib/libffi.so.2.0 --> 
/usr/ports/pobj/libffi-3.4.4/fake-amd64/usr/local/lib/libffi.so.2.0
Dynamic export changes:
added:
         open_temp_exec_file

This function was previously marked as static, it's now used in
src/tramp.c.  It looks internal so it may be fine to skip bumping the
minor version just for that reason.  Just mentioning it in case you
missed it.

> I got an OK from jasper@ and it survived a bulk on amd64.
> Testers on other arches welcomed.

Not much worse on riscv64 than what we already have: 78 failures vs 75.
The additional failing tests seem new.  No objection from me, I'll
investigate why so many failures on that arch later...

> Thanks.

Thanks for caring about this port!

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/devel/libffi/Makefile,v
> retrieving revision 1.46
> diff -u -p -r1.46 Makefile
> --- Makefile  26 May 2022 07:24:38 -0000      1.46
> +++ Makefile  4 Dec 2022 09:34:33 -0000
> @@ -1,8 +1,8 @@
>  COMMENT=             Foreign Function Interface
>  
> -V=                   3.4.2
> +V=                   3.4.4
>  DISTNAME=            libffi-$V
> -SHARED_LIBS +=  ffi                  2.0      # 9.0
> +SHARED_LIBS +=  ffi                  2.0      # 9.2
>  CATEGORIES=          devel
>  
>  MAINTAINER=          Jasper Lievisse Adriaanse <jas...@openbsd.org>
> @@ -17,14 +17,18 @@ PERMIT_PACKAGE=   Yes
>  WANTLIB += c++abi
>  .endif
>  
> -MASTER_SITES= https://github.com/libffi/libffi/releases/download/v$V/
> +MASTER_SITES=                
> https://github.com/libffi/libffi/releases/download/v$V/
>  
> -DEBUG_PACKAGES =     ${BUILD_PACKAGES}
> +DEBUG_PACKAGES=              ${BUILD_PACKAGES}
> +
> +USE_GMAKE=           Yes
>  
>  TEST_DEPENDS=                devel/dejagnu
>  
>  CONFIGURE_STYLE=     gnu
>  
> -FAKE_FLAGS+=         includesdir="${PREFIX}/include"
> +CONFIGURE_ARGS=              --disable-multi-os-directory
> +
> +FAKE_FLAGS=          includesdir="${PREFIX}/include"
>  
>  .include <bsd.port.mk>
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/devel/libffi/distinfo,v
> retrieving revision 1.7
> diff -u -p -r1.7 distinfo
> --- distinfo  26 May 2022 07:24:38 -0000      1.7
> +++ distinfo  4 Dec 2022 09:34:33 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (libffi-3.4.2.tar.gz) = VA+3IWGaaro73u99lA2Ong5tLBk1lbwkMkG3f/npNiA=
> -SIZE (libffi-3.4.2.tar.gz) = 1351355
> +SHA256 (libffi-3.4.4.tar.gz) = 1mxWrSWags8qnfxAizK/XaUjcVALhHRff7i2RXEt9nY=
> +SIZE (libffi-3.4.4.tar.gz) = 1362394
> Index: patches/patch-configure
> ===================================================================
> RCS file: /cvs/ports/devel/libffi/patches/patch-configure,v
> retrieving revision 1.13
> diff -u -p -r1.13 patch-configure
> --- patches/patch-configure   26 May 2022 07:24:38 -0000      1.13
> +++ patches/patch-configure   4 Dec 2022 09:34:33 -0000
> @@ -1,18 +1,28 @@
> +- Use our own libtool
>  - Link with libc++abi on arm (to access unwind symbols)
>  
>  Index: configure
>  --- configure.orig
>  +++ configure
> -@@ -18650,6 +18650,12 @@ $as_echo "#define SYMBOL_UNDERSCORE 1" >>confdefs.h
> +@@ -9940,7 +9940,7 @@ esac
> + LIBTOOL_DEPS=$ltmain
>   
> - fi
> + # Always use our own libtool.
> +-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
> ++#LIBTOOL='$(SHELL) $(top_builddir)/libtool'
> + 
> + 
> + 
> +@@ -19725,6 +19725,12 @@ if test "x$sys_symbol_underscore" = xyes; then
> + printf "%s\n" "#define SYMBOL_UNDERSCORE 1" >>confdefs.h
>   
> + fi
> ++
>  +case "$target" in
>  +    arm-*-openbsd*)
>  +      LDFLAGS="-lc++abi $LDFLAGS"
>  +    ;;
>  +esac
> -+
> + 
>   FFI_EXEC_TRAMPOLINE_TABLE=0
>   case "$target" in
> -      *arm*-apple-* | aarch64-apple-*)
> Index: patches/patch-configure_host
> ===================================================================
> RCS file: /cvs/ports/devel/libffi/patches/patch-configure_host,v
> retrieving revision 1.3
> diff -u -p -r1.3 patch-configure_host
> --- patches/patch-configure_host      26 May 2022 07:24:38 -0000      1.3
> +++ patches/patch-configure_host      4 Dec 2022 09:34:33 -0000
> @@ -1,7 +1,7 @@
>  Index: configure.host
>  --- configure.host.orig
>  +++ configure.host
> -@@ -216,7 +216,7 @@ case "${host}" in
> +@@ -223,7 +223,7 @@ case "${host}" in
>       TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
>       CFLAGS="$CFLAGS -D__NO_FPRS__"
>       ;;
> Index: patches/patch-src_arm_ffi_c
> ===================================================================
> RCS file: /cvs/ports/devel/libffi/patches/patch-src_arm_ffi_c,v
> retrieving revision 1.11
> diff -u -p -r1.11 patch-src_arm_ffi_c
> --- patches/patch-src_arm_ffi_c       26 May 2022 07:24:38 -0000      1.11
> +++ patches/patch-src_arm_ffi_c       4 Dec 2022 09:34:33 -0000
> @@ -3,8 +3,8 @@ https://svnweb.freebsd.org/ports/head/de
>  Index: src/arm/ffi.c
>  --- src/arm/ffi.c.orig
>  +++ src/arm/ffi.c
> -@@ -64,6 +64,11 @@ extern unsigned char ffi_arm_trampoline[12] FFI_HIDDEN
> - #include <machine/sysarch.h>
> +@@ -68,6 +68,11 @@ extern unsigned char ffi_arm_trampoline[12] FFI_HIDDEN
> + #include <sys/mman.h>
>   #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 *);
> -@@ -621,6 +626,16 @@ ffi_prep_closure_loc (ffi_closure * closure,
> +@@ -625,6 +630,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
>   
> - #if defined(FFI_EXEC_STATIC_TRAMP)
> + # if defined(FFI_EXEC_STATIC_TRAMP)
>     if (ffi_tramp_is_present(closure))
> Index: patches/patch-src_closures_c
> ===================================================================
> RCS file: /cvs/ports/devel/libffi/patches/patch-src_closures_c,v
> retrieving revision 1.4
> diff -u -p -r1.4 patch-src_closures_c
> --- patches/patch-src_closures_c      26 May 2022 07:24:38 -0000      1.4
> +++ patches/patch-src_closures_c      4 Dec 2022 09:34:33 -0000
> @@ -1,19 +1,19 @@
>  Index: src/closures.c
>  --- src/closures.c.orig
>  +++ src/closures.c
> -@@ -878,6 +878,7 @@ dlmmap (void *start, size_t length, int prot,
> +@@ -904,6 +904,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);
> -@@ -896,6 +897,7 @@ dlmmap (void *start, size_t length, int prot,
> +   /* -1 != execfd hints that we already decided to use dlmmap_locked
> +      last time.  */
> +   if (execfd == -1 && is_mprotect_enabled ())
> +@@ -932,6 +933,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.  */
>       }
>  +#endif
>   
> -   if (execsize == 0 || execfd == -1)
> -     {
> +   pthread_mutex_lock (&open_temp_exec_file_mutex);
> +   ptr = dlmmap_locked (start, length, prot, flags, offset);
> Index: patches/patch-testsuite_lib_libffi_exp
> ===================================================================
> RCS file: /cvs/ports/devel/libffi/patches/patch-testsuite_lib_libffi_exp,v
> retrieving revision 1.4
> diff -u -p -r1.4 patch-testsuite_lib_libffi_exp
> --- patches/patch-testsuite_lib_libffi_exp    26 May 2022 07:24:38 -0000      
> 1.4
> +++ patches/patch-testsuite_lib_libffi_exp    4 Dec 2022 09:34:33 -0000
> @@ -3,7 +3,7 @@ cc1: error: unrecognized command line op
>  Index: testsuite/lib/libffi.exp
>  --- testsuite/lib/libffi.exp.orig
>  +++ testsuite/lib/libffi.exp
> -@@ -491,7 +491,7 @@ proc run-many-tests { testcases extra_flags } {
> +@@ -500,7 +500,7 @@ proc run-many-tests { testcases extra_flags } {
>           }
>         }
>         "gnu" {
> @@ -11,4 +11,4 @@ Index: testsuite/lib/libffi.exp
>  +        set common "-W -Wall"
>           if [info exists env(LIBFFI_TEST_OPTIMIZATION)] {
>         set optimizations [ list $env(LIBFFI_TEST_OPTIMIZATION) ]
> -         } else { 
> +         } else {

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

  • libffi update Antoine Jacoutot
    • Re: libffi update Jeremie Courreges-Anglas

Reply via email to