diff options
author | Leo <thinkabit.ukim@gmail.com> | 2020-04-07 13:16:47 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2020-04-09 15:38:03 +0000 |
commit | 61de204159af1b0727f2330cb0c6e6749913660b (patch) | |
tree | a35c0d230dd7f34beea610f0ad5dd753bedfc2ef | |
parent | 085b116d687dac52f6120759ec745d2b6fe8df72 (diff) | |
download | aports-61de204159af1b0727f2330cb0c6e6749913660b.tar.bz2 aports-61de204159af1b0727f2330cb0c6e6749913660b.tar.xz |
main/libffi: upgrade to 3.3
-rw-r--r-- | main/libffi/APKBUILD | 35 | ||||
-rw-r--r-- | main/libffi/gnu-linux-define.patch | 15 | ||||
-rw-r--r-- | main/libffi/mips-softfloat.patch | 158 | ||||
-rw-r--r-- | main/libffi/use-stdc-compatible-linux-define.patch | 11 |
4 files changed, 7 insertions, 212 deletions
diff --git a/main/libffi/APKBUILD b/main/libffi/APKBUILD index 7f3c52864b..a113bf4ef5 100644 --- a/main/libffi/APKBUILD +++ b/main/libffi/APKBUILD @@ -1,29 +1,22 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=libffi -pkgver=3.2.1 -pkgrel=6 +pkgver=3.3 +pkgrel=0 pkgdesc="A portable, high level programming interface to various calling conventions." url="http://sourceware.org/libffi" arch="all" license="MIT" -depends= depends_dev="linux-headers" makedepends_build="texinfo" # on mips* ffitarget.h wants <asm/sgidefs.h> makedepends_host="linux-headers" -install= subpackages="$pkgname-dev $pkgname-doc" -source="ftp://sourceware.org/pub/$pkgname/$pkgname-$pkgver.tar.gz - gnu-linux-define.patch +source="ftp://sourceware.org/pub/libffi/libffi-$pkgver.tar.gz pax-dlmmap.patch - use-stdc-compatible-linux-define.patch - mips-softfloat.patch " -builddir="$srcdir"/$pkgname-$pkgver -build () { - cd "$builddir" +build() { ./configure \ --build=$CBUILD \ --host=$CHOST \ @@ -33,22 +26,8 @@ build () { } package() { - cd "$builddir" - make DESTDIR=""$pkgdir"" install - install -m755 -d ""$pkgdir"/usr/share/licenses/$pkgname" - install -m644 LICENSE ""$pkgdir"/usr/share/licenses/$pkgname/" - # fix location for headers - # see also: https://github.com/libffi/libffi/issues/24 - mkdir -p "$pkgdir"/usr/include/ - mv "$pkgdir"/usr/lib/libffi-$pkgver/include/*.h \ - "$pkgdir"/usr/include/ - rmdir "$pkgdir"/usr/lib/libffi-$pkgver/include || true - sed -i -e '/^includedir=/{s,=.*,=/usr/include,g}' \ - "$pkgdir"/usr/lib/pkgconfig/libffi.pc + make DESTDIR="$pkgdir" install } -sha512sums="980ca30a8d76f963fca722432b1fe5af77d7a4e4d2eac5144fbc5374d4c596609a293440573f4294207e1bdd9fda80ad1e1cafb2ffb543df5a275bc3bd546483 libffi-3.2.1.tar.gz -264af568ae5388d50f647f891a406945c73cc358692266f65ad341787c0bf5f6bf31203b86c39fa1b338101c1a6d2f4fec60f95a90d379951ff5153f8f9e178f gnu-linux-define.patch -72486b389db16055ae4d7d33ba0cb05840537e28fe7a86aa89e2cb922592125d99c18c26c5df7ffde6282742e79f2b9126353e58b58f091f0486589e14dd6474 pax-dlmmap.patch -d15aaf7ecf6fe7a1532695a515a496d462c3930a50ec3e2a019713ecfc810a112250563c41f018834323f201f1c814e7c94d296f167706af300907264ee80924 use-stdc-compatible-linux-define.patch -e306a6cf0a3084e0ab519c291b70c57ab6d62d20879c224860d9a8969015877077b5180607fd407d8b80a0d2ce28239fc5f899a64305554eb7cf2f1f0792ce95 mips-softfloat.patch" +sha512sums="61513801a156f11420f541d325de697131846487122d6bdcf5491b18b4da788589f5c0bb07e88e396495d3be5830d74e9135595e2b8ddbfe95c448d8597fbd6f libffi-3.3.tar.gz +72486b389db16055ae4d7d33ba0cb05840537e28fe7a86aa89e2cb922592125d99c18c26c5df7ffde6282742e79f2b9126353e58b58f091f0486589e14dd6474 pax-dlmmap.patch" diff --git a/main/libffi/gnu-linux-define.patch b/main/libffi/gnu-linux-define.patch deleted file mode 100644 index 8dcae738ba..0000000000 --- a/main/libffi/gnu-linux-define.patch +++ /dev/null @@ -1,15 +0,0 @@ -http://bugs.alpinelinux.org/issues/4275 - -diff --git a/closures.c.orig b/closures.c -index 721ff00..22a699c 100644 ---- a/src/closures.c.orig -+++ b/src/closures.c -@@ -34,7 +34,7 @@ - #include <ffi_common.h> - - #if !FFI_MMAP_EXEC_WRIT && !FFI_EXEC_TRAMPOLINE_TABLE --# if __gnu_linux__ && !defined(__ANDROID__) -+# if __linux__ && !defined(__ANDROID__) - /* This macro indicates it may be forbidden to map anonymous memory - with both write and execute permission. Code compiled when this - option is defined will attempt to map such pages once, but if it diff --git a/main/libffi/mips-softfloat.patch b/main/libffi/mips-softfloat.patch deleted file mode 100644 index bf2ac5d34d..0000000000 --- a/main/libffi/mips-softfloat.patch +++ /dev/null @@ -1,158 +0,0 @@ -diff --git a/src/mips/n32.S b/src/mips/n32.S -index b402c88c..edc6905c 100644 ---- a/src/mips/n32.S -+++ b/src/mips/n32.S -@@ -112,6 +112,16 @@ loadregs: - - REG_L t6, 3*FFI_SIZEOF_ARG($fp) # load the flags word into t6. - -+#ifdef __mips_soft_float -+ REG_L a0, 0*FFI_SIZEOF_ARG(t9) -+ REG_L a1, 1*FFI_SIZEOF_ARG(t9) -+ REG_L a2, 2*FFI_SIZEOF_ARG(t9) -+ REG_L a3, 3*FFI_SIZEOF_ARG(t9) -+ REG_L a4, 4*FFI_SIZEOF_ARG(t9) -+ REG_L a5, 5*FFI_SIZEOF_ARG(t9) -+ REG_L a6, 6*FFI_SIZEOF_ARG(t9) -+ REG_L a7, 7*FFI_SIZEOF_ARG(t9) -+#else - and t4, t6, ((1<<FFI_FLAG_BITS)-1) - REG_L a0, 0*FFI_SIZEOF_ARG(t9) - beqz t4, arg1_next -@@ -198,6 +208,7 @@ arg7_next: - arg8_doublep: - l.d $f19, 7*FFI_SIZEOF_ARG(t9) - arg8_next: -+#endif - - callit: - # Load the function pointer -@@ -222,6 +233,7 @@ retint: - b epilogue - - retfloat: -+#ifndef __mips_soft_float - bne t6, FFI_TYPE_FLOAT, retdouble - jal t9 - REG_L t4, 4*FFI_SIZEOF_ARG($fp) -@@ -280,6 +292,7 @@ retstruct_f_d: - s.s $f0, 0(t4) - s.d $f2, 8(t4) - b epilogue -+#endif - - retstruct_d_soft: - bne t6, FFI_TYPE_STRUCT_D_SOFT, retstruct_f_soft -@@ -483,6 +496,7 @@ $do_closure: - REG_S a6, A6_OFF2($sp) - REG_S a7, A7_OFF2($sp) - -+#ifndef __mips_soft_float - # Store all possible float/double registers. - s.d $f12, F12_OFF2($sp) - s.d $f13, F13_OFF2($sp) -@@ -492,6 +506,7 @@ $do_closure: - s.d $f17, F17_OFF2($sp) - s.d $f18, F18_OFF2($sp) - s.d $f19, F19_OFF2($sp) -+#endif - - jalr t9 - -@@ -506,6 +521,7 @@ cls_retint: - b cls_epilogue - - cls_retfloat: -+#ifndef __mips_soft_float - bne v0, FFI_TYPE_FLOAT, cls_retdouble - l.s $f0, V0_OFF2($sp) - b cls_epilogue -@@ -548,6 +564,7 @@ cls_retstruct_f_d: - l.s $f0, V0_OFF2($sp) - l.d $f2, V1_OFF2($sp) - b cls_epilogue -+#endif - - cls_retstruct_small2: - REG_L v0, V0_OFF2($sp) -diff --git a/src/mips/o32.S b/src/mips/o32.S -index 69324e60..44e74cb9 100644 ---- a/src/mips/o32.S -+++ b/src/mips/o32.S -@@ -82,13 +82,16 @@ sixteen: - - ADDU $sp, 4 * FFI_SIZEOF_ARG # adjust $sp to new args - -+#ifndef __mips_soft_float - bnez t0, pass_d # make it quick for int -+#endif - REG_L a0, 0*FFI_SIZEOF_ARG($sp) # just go ahead and load the - REG_L a1, 1*FFI_SIZEOF_ARG($sp) # four regs. - REG_L a2, 2*FFI_SIZEOF_ARG($sp) - REG_L a3, 3*FFI_SIZEOF_ARG($sp) - b call_it - -+#ifndef __mips_soft_float - pass_d: - bne t0, FFI_ARGS_D, pass_f - l.d $f12, 0*FFI_SIZEOF_ARG($sp) # load $fp regs from args -@@ -130,6 +133,7 @@ pass_f_d: - # bne t0, FFI_ARGS_F_D, call_it - l.s $f12, 0*FFI_SIZEOF_ARG($sp) # load $fp regs from args - l.d $f14, 2*FFI_SIZEOF_ARG($sp) # passing double and float -+#endif - - call_it: - # Load the static chain pointer -@@ -161,14 +165,23 @@ retfloat: - bne t2, FFI_TYPE_FLOAT, retdouble - jalr t9 - REG_L t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp) -+#ifndef __mips_soft_float - s.s $f0, 0(t0) -+#else -+ REG_S v0, 0(t0) -+#endif - b epilogue - - retdouble: - bne t2, FFI_TYPE_DOUBLE, noretval - jalr t9 - REG_L t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp) -+#ifndef __mips_soft_float - s.d $f0, 0(t0) -+#else -+ REG_S v1, 4(t0) -+ REG_S v0, 0(t0) -+#endif - b epilogue - - noretval: -@@ -324,9 +337,11 @@ $LCFI22: - li $13, 1 # FFI_O32 - bne $16, $13, 1f # Skip fp save if FFI_O32_SOFT_FLOAT - -+#ifndef __mips_soft_float - # Store all possible float/double registers. - s.d $f12, FA_0_0_OFF2($fp) - s.d $f14, FA_1_0_OFF2($fp) -+#endif - 1: - # prepare arguments for ffi_closure_mips_inner_O32 - REG_L a0, 20($12) # cif pointer follows tramp. -@@ -353,6 +368,7 @@ $do_closure: - li $13, 1 # FFI_O32 - bne $16, $13, 1f # Skip fp restore if FFI_O32_SOFT_FLOAT - -+#ifndef __mips_soft_float - li $9, FFI_TYPE_FLOAT - l.s $f0, V0_OFF2($fp) - beq $8, $9, closure_done -@@ -360,6 +376,7 @@ $do_closure: - li $9, FFI_TYPE_DOUBLE - l.d $f0, V0_OFF2($fp) - beq $8, $9, closure_done -+#endif - 1: - REG_L $3, V1_OFF2($fp) - REG_L $2, V0_OFF2($fp) diff --git a/main/libffi/use-stdc-compatible-linux-define.patch b/main/libffi/use-stdc-compatible-linux-define.patch deleted file mode 100644 index ad7c875015..0000000000 --- a/main/libffi/use-stdc-compatible-linux-define.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/mips/ffitarget.h -+++ b/src/mips/ffitarget.h -@@ -32,7 +32,7 @@ - #error "Please do not include ffitarget.h directly into your source. Use ffi.h instead." - #endif - --#ifdef linux -+#ifdef __linux__ - # include <asm/sgidefs.h> - #elif defined(__rtems__) - /* |