pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/libffi Fix build for ILP32 powerpc, which doesn'...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d54011e68922
branches:  trunk
changeset: 413646:d54011e68922
user:      rin <rin%pkgsrc.org@localhost>
date:      Sat Mar 21 16:08:34 2020 +0000

description:
Fix build for ILP32 powerpc, which doesn't have 128-bit-length data types.

diffstat:

 devel/libffi/distinfo                                 |   4 +-
 devel/libffi/patches/patch-src_powerpc_ffi.c          |  18 ++++++++++
 devel/libffi/patches/patch-src_powerpc_ffi__powerpc.h |  34 +++++++++++++++++++
 3 files changed, 55 insertions(+), 1 deletions(-)

diffs (76 lines):

diff -r fc0cddfbeb70 -r d54011e68922 devel/libffi/distinfo
--- a/devel/libffi/distinfo     Sat Mar 21 16:05:21 2020 +0000
+++ b/devel/libffi/distinfo     Sat Mar 21 16:08:34 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.51 2020/03/16 09:35:47 rin Exp $
+$NetBSD: distinfo,v 1.52 2020/03/21 16:08:34 rin Exp $
 
 SHA1 (libffi-3.3.tar.gz) = 8df6cb570c8d6596a67d1c0773bf00650154f7aa
 RMD160 (libffi-3.3.tar.gz) = 2cd43b66d792f1bad76df2e19a8411beacfcb8e0
@@ -12,4 +12,6 @@
 SHA1 (patch-src_m88k_elfbsd.S) = 6572c7fa39c00096cb4a80bb88993ff1b4aaa8cc
 SHA1 (patch-src_mips_ffi.c) = 7353f68f73917af6bff0b90393ac3404ea54fb99
 SHA1 (patch-src_mips_ffitarget.h) = 7fe62634803ccb5a168e76d597409c9af809c448
+SHA1 (patch-src_powerpc_ffi.c) = b68a93d0f8552efaa8c50256da3af3bde5de7059
+SHA1 (patch-src_powerpc_ffi__powerpc.h) = 573b6f0f496ed7b8b6bc0df197515020519ae024
 SHA1 (patch-testsuite_libffi.call_float2.c) = 2a42a428b0cc55065968c7f0748026da12b70b9d
diff -r fc0cddfbeb70 -r d54011e68922 devel/libffi/patches/patch-src_powerpc_ffi.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libffi/patches/patch-src_powerpc_ffi.c      Sat Mar 21 16:08:34 2020 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_powerpc_ffi.c,v 1.1 2020/03/21 16:08:34 rin Exp $
+
+Workaround for ILP32 powerpc, which doesn't have 128-bit-length data types.
+
+--- src/powerpc/ffi.c.orig     2019-11-18 20:35:19.000000000 +0900
++++ src/powerpc/ffi.c  2020-03-22 00:26:32.702408263 +0900
+@@ -87,7 +87,11 @@ ffi_call_int (ffi_cif *cif,
+      For ELFv2 ABI, use a bounce buffer for homogeneous structs too,
+      for similar reasons. This bounce buffer must be aligned to 16
+      bytes for use with homogeneous structs of vectors (float128).  */
++#ifdef POWERPC64
+   float128 smst_buffer[8];
++#else
++  __int64_t smst_buffer[16];
++#endif
+   extended_cif ecif;
+ 
+   ecif.cif = cif;
diff -r fc0cddfbeb70 -r d54011e68922 devel/libffi/patches/patch-src_powerpc_ffi__powerpc.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libffi/patches/patch-src_powerpc_ffi__powerpc.h     Sat Mar 21 16:08:34 2020 +0000
@@ -0,0 +1,34 @@
+$NetBSD: patch-src_powerpc_ffi__powerpc.h,v 1.1 2020/03/21 16:08:34 rin Exp $
+
+Workaround for ILP32 powerpc, which doesn't have 128-bit-length data types.
+
+--- src/powerpc/ffi_powerpc.h.orig     2019-11-18 20:35:19.000000000 +0900
++++ src/powerpc/ffi_powerpc.h  2020-03-22 00:31:24.149783131 +0900
+@@ -57,6 +57,7 @@ typedef union
+   double d;
+ } ffi_dblfl;
+ 
++#ifdef POWERPC64
+ #if defined(__FLOAT128_TYPE__)
+ typedef _Float128 float128;
+ #elif defined(__FLOAT128__)
+@@ -64,6 +65,7 @@ typedef __float128 float128;
+ #else
+ typedef __int128 float128;
+ #endif
++#endif /* POWERPC64 */
+ 
+ void FFI_HIDDEN ffi_closure_SYSV (void);
+ void FFI_HIDDEN ffi_go_closure_sysv (void);
+@@ -97,9 +99,11 @@ ffi_status FFI_HIDDEN ffi_prep_closure_l
+                                                   void (*) (ffi_cif *, void *,
+                                                             void **, void *),
+                                                   void *, void *);
++#ifdef POWERPC64
+ int FFI_HIDDEN ffi_closure_helper_LINUX64 (ffi_cif *,
+                                          void (*) (ffi_cif *, void *,
+                                                    void **, void *),
+                                          void *, void *,
+                                          unsigned long *, ffi_dblfl *,
+                                          float128 *);
++#endif



Home | Main Index | Thread Index | Old Index