pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/libffi libffi: kludge for aarch64. Bump rev.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a9534477e92b
branches:  trunk
changeset: 423879:a9534477e92b
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Fri Feb 28 22:37:24 2020 +0000

description:
libffi: kludge for aarch64. Bump rev.

Disable i-cache flushing. This is wrong but the previous version of
libffi didn't do it either and that worked in practice.

diffstat:

 devel/libffi/Makefile                        |   3 ++-
 devel/libffi/distinfo                        |   3 ++-
 devel/libffi/patches/patch-src_aarch64_ffi.c |  19 +++++++++++++++++++
 3 files changed, 23 insertions(+), 2 deletions(-)

diffs (51 lines):

diff -r ba85c7f9c32d -r a9534477e92b devel/libffi/Makefile
--- a/devel/libffi/Makefile     Fri Feb 28 22:17:35 2020 +0000
+++ b/devel/libffi/Makefile     Fri Feb 28 22:37:24 2020 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.38 2020/02/28 13:20:10 jperkin Exp $
+# $NetBSD: Makefile,v 1.39 2020/02/28 22:37:24 tnn Exp $
 
 DISTNAME=      libffi-3.3
+PKGREVISION=   1
 CATEGORIES=    devel
 MASTER_SITES=  ftp://sourceware.org/pub/libffi/
 
diff -r ba85c7f9c32d -r a9534477e92b devel/libffi/distinfo
--- a/devel/libffi/distinfo     Fri Feb 28 22:17:35 2020 +0000
+++ b/devel/libffi/distinfo     Fri Feb 28 22:37:24 2020 +0000
@@ -1,10 +1,11 @@
-$NetBSD: distinfo,v 1.49 2020/02/28 18:14:28 tnn Exp $
+$NetBSD: distinfo,v 1.50 2020/02/28 22:37:24 tnn Exp $
 
 SHA1 (libffi-3.3.tar.gz) = 8df6cb570c8d6596a67d1c0773bf00650154f7aa
 RMD160 (libffi-3.3.tar.gz) = 2cd43b66d792f1bad76df2e19a8411beacfcb8e0
 SHA512 (libffi-3.3.tar.gz) = 61513801a156f11420f541d325de697131846487122d6bdcf5491b18b4da788589f5c0bb07e88e396495d3be5830d74e9135595e2b8ddbfe95c448d8597fbd6f
 Size (libffi-3.3.tar.gz) = 1305466 bytes
 SHA1 (patch-configure) = 81f1f2bee39a40f2a34b3a6cea0b210d13037482
+SHA1 (patch-src_aarch64_ffi.c) = c5bd73abcb7445b073eb3e61feda212ee3396246
 SHA1 (patch-src_closures.c) = f818bd0384f146a17964e2320df1321d8b83ec73
 SHA1 (patch-src_m68k_ffi.c) = 5179cfd150bc7de15eb1c5ee0a327016c2c32b3e
 SHA1 (patch-src_m88k_elfbsd.S) = 6572c7fa39c00096cb4a80bb88993ff1b4aaa8cc
diff -r ba85c7f9c32d -r a9534477e92b devel/libffi/patches/patch-src_aarch64_ffi.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libffi/patches/patch-src_aarch64_ffi.c      Fri Feb 28 22:37:24 2020 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_aarch64_ffi.c,v 1.1 2020/02/28 22:37:24 tnn Exp $
+
+For closures, aarch64 needs explicit invalidation of the code segments
+i-cache after data is written through the data mapping.
+But we don't have any way to look up the address of the code segment
+right now so for now skip doing the cache flush.
+
+--- src/aarch64/ffi.c.orig     2019-10-31 14:49:54.000000000 +0000
++++ src/aarch64/ffi.c
+@@ -808,7 +808,8 @@ ffi_prep_closure_loc (ffi_closure *closu
+   ffi_clear_cache(tramp, tramp + FFI_TRAMPOLINE_SIZE);
+ 
+   /* Also flush the cache for code mapping.  */
+-#ifdef _M_ARM64
++#if defined(_M_ARM64) || defined(__NetBSD__)
++  // ffi_data_to_code_pointer is broken on NetBSD
+   // Not using dlmalloc.c for Windows ARM64 builds
+   // so calling ffi_data_to_code_pointer() isn't necessary
+   unsigned char *tramp_code = tramp;



Home | Main Index | Thread Index | Old Index