From 2c0d1bdbed04cabae5188f3623f3686baba3cf20 Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Tue, 27 Oct 2020 22:30:20 +0800 Subject: [PATCH 1/7] [patch tracking] 20201027223007629796 - https://github.com/libffi/libffi/commit/2d86809db6d1d626a9df40c283ec564ac98ff85d --- ...809db6d1d626a9df40c283ec564ac98ff85d.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 2d86809db6d1d626a9df40c283ec564ac98ff85d.patch diff --git a/2d86809db6d1d626a9df40c283ec564ac98ff85d.patch b/2d86809db6d1d626a9df40c283ec564ac98ff85d.patch new file mode 100644 index 0000000..5987a74 --- /dev/null +++ b/2d86809db6d1d626a9df40c283ec564ac98ff85d.patch @@ -0,0 +1,19 @@ +diff --git a/configure.ac b/configure.ac +index 3ca1f4fb..790274ea 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -260,11 +260,13 @@ EOF + fi + + if test "x$GCC" = "xyes"; then ++ AX_CHECK_COMPILE_FLAG(-fno-lto, libffi_cv_no_lto=-fno-lto) ++ + AC_CACHE_CHECK([whether .eh_frame section should be read-only], + libffi_cv_ro_eh_frame, [ + libffi_cv_ro_eh_frame=yes + echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c +- if $CC $CFLAGS -c -fpic -fexceptions -o conftest.o conftest.c > /dev/null 2>&1; then ++ if $CC $CFLAGS -c -fpic -fexceptions $libffi_cv_no_lto -o conftest.o conftest.c > /dev/null 2>&1; then + if readelf -WS conftest.o | grep -q -n 'eh_frame .* WA'; then + libffi_cv_ro_eh_frame=no + fi -- Gitee From 5ece5429253b2e070dc761d756475bd92f1324b1 Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Tue, 27 Oct 2020 22:30:20 +0800 Subject: [PATCH 2/7] [patch tracking] 20201027223007629796 - https://github.com/libffi/libffi/commit/c78fcf88ab13a5cc414826a018dd46c3f886adee --- ...cf88ab13a5cc414826a018dd46c3f886adee.patch | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 c78fcf88ab13a5cc414826a018dd46c3f886adee.patch diff --git a/c78fcf88ab13a5cc414826a018dd46c3f886adee.patch b/c78fcf88ab13a5cc414826a018dd46c3f886adee.patch new file mode 100644 index 0000000..e1b1bdf --- /dev/null +++ b/c78fcf88ab13a5cc414826a018dd46c3f886adee.patch @@ -0,0 +1,21 @@ +diff --git a/src/x86/unix64.S b/src/x86/unix64.S +index ee3c04fd..89d7db11 100644 +--- a/src/x86/unix64.S ++++ b/src/x86/unix64.S +@@ -84,7 +84,6 @@ L(UW1): + + movq %rdi, %r10 /* Save a copy of the register area. */ + movq %r8, %r11 /* Save a copy of the target fn. */ +- movl %r9d, %eax /* Set number of SSE registers. */ + + /* Load up all argument registers. */ + movq (%r10), %rdi +@@ -93,7 +92,7 @@ L(UW1): + movq 0x18(%r10), %rcx + movq 0x20(%r10), %r8 + movq 0x28(%r10), %r9 +- movl 0xb0(%r10), %eax ++ movl 0xb0(%r10), %eax /* Set number of SSE registers. */ + testl %eax, %eax + jnz L(load_sse) + L(ret_from_load_sse): -- Gitee From 52e2a2cc8bc836cd09101db4397e8c8da4f7e936 Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Tue, 27 Oct 2020 22:30:20 +0800 Subject: [PATCH 3/7] [patch tracking] 20201027223007629796 - https://github.com/libffi/libffi/commit/93cf288ddd59c7cb203c1aba25de5e5b8f308da6 --- 93cf288ddd59c7cb203c1aba25de5e5b8f308da6.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 93cf288ddd59c7cb203c1aba25de5e5b8f308da6.patch diff --git a/93cf288ddd59c7cb203c1aba25de5e5b8f308da6.patch b/93cf288ddd59c7cb203c1aba25de5e5b8f308da6.patch new file mode 100644 index 0000000..adbf55a --- /dev/null +++ b/93cf288ddd59c7cb203c1aba25de5e5b8f308da6.patch @@ -0,0 +1,13 @@ +diff --git a/testsuite/libffi.closures/huge_struct.c b/testsuite/libffi.closures/huge_struct.c +index 1915c3f1..e8e1d860 100644 +--- a/testsuite/libffi.closures/huge_struct.c ++++ b/testsuite/libffi.closures/huge_struct.c +@@ -9,6 +9,8 @@ + /* { dg-options -mlong-double-128 { target powerpc64*-*-linux* } } */ + /* { dg-options -Wformat=0 { target moxie*-*-elf or1k-*-* } } */ + ++#include ++ + #include "ffitest.h" + + typedef struct BigStruct{ -- Gitee From 2a64e7231771456fd35f17b490919f76e2dbe7a4 Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Tue, 27 Oct 2020 22:30:20 +0800 Subject: [PATCH 4/7] [patch tracking] 20201027223007629796 - https://github.com/libffi/libffi/commit/032b3cd6f7850f3ebc1269eeab7d1db3ea518d29 --- ...3cd6f7850f3ebc1269eeab7d1db3ea518d29.patch | 152 ++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 032b3cd6f7850f3ebc1269eeab7d1db3ea518d29.patch diff --git a/032b3cd6f7850f3ebc1269eeab7d1db3ea518d29.patch b/032b3cd6f7850f3ebc1269eeab7d1db3ea518d29.patch new file mode 100644 index 0000000..41ae2e7 --- /dev/null +++ b/032b3cd6f7850f3ebc1269eeab7d1db3ea518d29.patch @@ -0,0 +1,152 @@ +diff --git a/src/arm/ffi.c b/src/arm/ffi.c +index efea031f..00583900 100644 +--- a/src/arm/ffi.c ++++ b/src/arm/ffi.c +@@ -426,12 +426,14 @@ ffi_call (ffi_cif *cif, void (*fn) (void), void *rvalue, void **avalue) + ffi_call_int (cif, fn, rvalue, avalue, NULL); + } + ++#ifdef FFI_GO_CLOSURES + void + ffi_call_go (ffi_cif *cif, void (*fn) (void), void *rvalue, + void **avalue, void *closure) + { + ffi_call_int (cif, fn, rvalue, avalue, closure); + } ++#endif + + static void * + ffi_prep_incoming_args_SYSV (ffi_cif *cif, void *rvalue, +@@ -569,8 +571,11 @@ ffi_closure_inner_VFP (ffi_cif *cif, + + void ffi_closure_SYSV (void) FFI_HIDDEN; + void ffi_closure_VFP (void) FFI_HIDDEN; ++ ++#ifdef FFI_GO_CLOSURES + void ffi_go_closure_SYSV (void) FFI_HIDDEN; + void ffi_go_closure_VFP (void) FFI_HIDDEN; ++#endif + + /* the cif must already be prep'ed */ + +@@ -637,6 +642,7 @@ ffi_prep_closure_loc (ffi_closure * closure, + return FFI_OK; + } + ++#ifdef FFI_GO_CLOSURES + ffi_status + ffi_prep_go_closure (ffi_go_closure *closure, ffi_cif *cif, + void (*fun) (ffi_cif *, void *, void **, void *)) +@@ -658,6 +664,7 @@ ffi_prep_go_closure (ffi_go_closure *closure, ffi_cif *cif, + + return FFI_OK; + } ++#endif + + /* Below are routines for VFP hard-float support. */ + +diff --git a/src/x86/ffi.c b/src/x86/ffi.c +index 5903793d..5f7fd81d 100644 +--- a/src/x86/ffi.c ++++ b/src/x86/ffi.c +@@ -397,12 +397,14 @@ ffi_call (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) + ffi_call_int (cif, fn, rvalue, avalue, NULL); + } + ++#ifdef FFI_GO_CLOSURES + void + ffi_call_go (ffi_cif *cif, void (*fn)(void), void *rvalue, + void **avalue, void *closure) + { + ffi_call_int (cif, fn, rvalue, avalue, closure); + } ++#endif + + /** private members **/ + +@@ -575,6 +577,8 @@ ffi_prep_closure_loc (ffi_closure* closure, + return FFI_OK; + } + ++#ifdef FFI_GO_CLOSURES ++ + void FFI_HIDDEN ffi_go_closure_EAX(void); + void FFI_HIDDEN ffi_go_closure_ECX(void); + void FFI_HIDDEN ffi_go_closure_STDCALL(void); +@@ -611,6 +615,8 @@ ffi_prep_go_closure (ffi_go_closure* closure, ffi_cif* cif, + return FFI_OK; + } + ++#endif /* FFI_GO_CLOSURES */ ++ + /* ------- Native raw API support -------------------------------- */ + + #if !FFI_NO_RAW_API +diff --git a/src/x86/ffi64.c b/src/x86/ffi64.c +index ed82e235..39f95981 100644 +--- a/src/x86/ffi64.c ++++ b/src/x86/ffi64.c +@@ -688,6 +688,8 @@ ffi_call (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) + ffi_call_int (cif, fn, rvalue, avalue, NULL); + } + ++#ifdef FFI_GO_CLOSURES ++ + #ifndef __ILP32__ + extern void + ffi_call_go_efi64(ffi_cif *cif, void (*fn)(void), void *rvalue, +@@ -708,6 +710,7 @@ ffi_call_go (ffi_cif *cif, void (*fn)(void), void *rvalue, + ffi_call_int (cif, fn, rvalue, avalue, closure); + } + ++#endif /* FFI_GO_CLOSURES */ + + extern void ffi_closure_unix64(void) FFI_HIDDEN; + extern void ffi_closure_unix64_sse(void) FFI_HIDDEN; +@@ -856,6 +859,8 @@ ffi_closure_unix64_inner(ffi_cif *cif, + return flags; + } + ++#ifdef FFI_GO_CLOSURES ++ + extern void ffi_go_closure_unix64(void) FFI_HIDDEN; + extern void ffi_go_closure_unix64_sse(void) FFI_HIDDEN; + +@@ -885,4 +890,6 @@ ffi_prep_go_closure (ffi_go_closure* closure, ffi_cif* cif, + return FFI_OK; + } + ++#endif /* FFI_GO_CLOSURES */ ++ + #endif /* __x86_64__ */ +diff --git a/src/x86/ffiw64.c b/src/x86/ffiw64.c +index 034dffda..a43a9ebe 100644 +--- a/src/x86/ffiw64.c ++++ b/src/x86/ffiw64.c +@@ -187,7 +187,10 @@ EFI64(ffi_call_go)(ffi_cif *cif, void (*fn)(void), void *rvalue, + + + extern void ffi_closure_win64(void) FFI_HIDDEN; ++ ++#ifdef FFI_GO_CLOSURES + extern void ffi_go_closure_win64(void) FFI_HIDDEN; ++#endif + + ffi_status + EFI64(ffi_prep_closure_loc)(ffi_closure* closure, +@@ -227,6 +230,7 @@ EFI64(ffi_prep_closure_loc)(ffi_closure* closure, + return FFI_OK; + } + ++#ifdef FFI_GO_CLOSURES + ffi_status + EFI64(ffi_prep_go_closure)(ffi_go_closure* closure, ffi_cif* cif, + void (*fun)(ffi_cif*, void*, void**, void*)) +@@ -246,6 +250,7 @@ EFI64(ffi_prep_go_closure)(ffi_go_closure* closure, ffi_cif* cif, + + return FFI_OK; + } ++#endif + + struct win64_closure_frame + { -- Gitee From f565857adf784172fed8f756fed998cfbccbfa0e Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Tue, 27 Oct 2020 22:30:21 +0800 Subject: [PATCH 5/7] [patch tracking] 20201027223007629796 - https://github.com/libffi/libffi/commit/484c1a0d7536be60002473f7bb82223efe139883 --- ...1a0d7536be60002473f7bb82223efe139883.patch | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 484c1a0d7536be60002473f7bb82223efe139883.patch diff --git a/484c1a0d7536be60002473f7bb82223efe139883.patch b/484c1a0d7536be60002473f7bb82223efe139883.patch new file mode 100644 index 0000000..7f05a87 --- /dev/null +++ b/484c1a0d7536be60002473f7bb82223efe139883.patch @@ -0,0 +1,84 @@ +diff --git a/src/powerpc/ffi_darwin.c b/src/powerpc/ffi_darwin.c +index 61a18c49..64bb94df 100644 +--- a/src/powerpc/ffi_darwin.c ++++ b/src/powerpc/ffi_darwin.c +@@ -33,7 +33,10 @@ + #include + + extern void ffi_closure_ASM (void); ++ ++#if defined (FFI_GO_CLOSURES) + extern void ffi_go_closure_ASM (void); ++#endif + + enum { + /* The assembly depends on these exact flags. +@@ -909,8 +912,10 @@ ffi_prep_cif_machdep (ffi_cif *cif) + extern void ffi_call_AIX(extended_cif *, long, unsigned, unsigned *, + void (*fn)(void), void (*fn2)(void)); + ++#if defined (FFI_GO_CLOSURES) + extern void ffi_call_go_AIX(extended_cif *, long, unsigned, unsigned *, + void (*fn)(void), void (*fn2)(void), void *closure); ++#endif + + extern void ffi_call_DARWIN(extended_cif *, long, unsigned, unsigned *, + void (*fn)(void), void (*fn2)(void), ffi_type*); +@@ -950,6 +955,7 @@ ffi_call (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) + } + } + ++#if defined (FFI_GO_CLOSURES) + void + ffi_call_go (ffi_cif *cif, void (*fn) (void), void *rvalue, void **avalue, + void *closure) +@@ -981,6 +987,7 @@ ffi_call_go (ffi_cif *cif, void (*fn) (void), void *rvalue, void **avalue, + break; + } + } ++#endif + + static void flush_icache(char *); + static void flush_range(char *, int); +@@ -1110,6 +1117,7 @@ ffi_prep_closure_loc (ffi_closure* closure, + return FFI_OK; + } + ++#if defined (FFI_GO_CLOSURES) + ffi_status + ffi_prep_go_closure (ffi_go_closure* closure, + ffi_cif* cif, +@@ -1133,6 +1141,7 @@ ffi_prep_go_closure (ffi_go_closure* closure, + } + return FFI_OK; + } ++#endif + + static void + flush_icache(char *addr) +@@ -1168,9 +1177,11 @@ ffi_type * + ffi_closure_helper_DARWIN (ffi_closure *, void *, + unsigned long *, ffi_dblfl *); + ++#if defined (FFI_GO_CLOSURES) + ffi_type * + ffi_go_closure_helper_DARWIN (ffi_go_closure*, void *, + unsigned long *, ffi_dblfl *); ++#endif + + /* Basically the trampoline invokes ffi_closure_ASM, and on + entry, r11 holds the address of the closure. +@@ -1430,6 +1441,7 @@ ffi_closure_helper_DARWIN (ffi_closure *closure, void *rvalue, + closure->user_data, rvalue, pgr, pfr); + } + ++#if defined (FFI_GO_CLOSURES) + ffi_type * + ffi_go_closure_helper_DARWIN (ffi_go_closure *closure, void *rvalue, + unsigned long *pgr, ffi_dblfl *pfr) +@@ -1437,4 +1449,4 @@ ffi_go_closure_helper_DARWIN (ffi_go_closure *closure, void *rvalue, + return ffi_closure_helper_common (closure->cif, closure->fun, + closure, rvalue, pgr, pfr); + } +- ++#endif -- Gitee From 957cf11e06aadf669ead22a79a06b9cae79b1b83 Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Tue, 27 Oct 2020 22:30:21 +0800 Subject: [PATCH 6/7] [patch tracking] 20201027223007629796 - https://github.com/libffi/libffi/commit/8111cd06921e80d5d7192ce8d1f64733072fdbcd --- 8111cd06921e80d5d7192ce8d1f64733072fdbcd.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 8111cd06921e80d5d7192ce8d1f64733072fdbcd.patch diff --git a/8111cd06921e80d5d7192ce8d1f64733072fdbcd.patch b/8111cd06921e80d5d7192ce8d1f64733072fdbcd.patch new file mode 100644 index 0000000..50d9895 --- /dev/null +++ b/8111cd06921e80d5d7192ce8d1f64733072fdbcd.patch @@ -0,0 +1,13 @@ +diff --git a/configure.host b/configure.host +index c7d63fd9..d9623e92 100644 +--- a/configure.host ++++ b/configure.host +@@ -222,7 +222,7 @@ case "${host}" in + TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc + CFLAGS="$CFLAGS -D__NO_FPRS__" + ;; +- powerpc64-*-freebsd*) ++ powerpc64-*-freebsd* | powerpc64le-*-freebsd*) + TARGET=POWERPC; TARGETDIR=powerpc + ;; + powerpc*-*-rtems*) -- Gitee From 719c84d2ecd1930be1151f2700b86041b97906fd Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Tue, 27 Oct 2020 22:30:22 +0800 Subject: [PATCH 7/7] [patch tracking] 20201027223007629796 - update spec file --- libffi.spec | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/libffi.spec b/libffi.spec index cdb35df..b9af28b 100644 --- a/libffi.spec +++ b/libffi.spec @@ -1,10 +1,16 @@ Name: libffi Version: 3.3 -Release: 9 +Release: 10 Summary: A Portable Foreign Function Interface Library License: MIT URL: http://sourceware.org/libffi Source0: ftp://sourceware.org/pub/libffi/%{name}-%{version}.tar.gz +Patch6000: 2d86809db6d1d626a9df40c283ec564ac98ff85d.patch +Patch6001: c78fcf88ab13a5cc414826a018dd46c3f886adee.patch +Patch6002: 93cf288ddd59c7cb203c1aba25de5e5b8f308da6.patch +Patch6003: 032b3cd6f7850f3ebc1269eeab7d1db3ea518d29.patch +Patch6004: 484c1a0d7536be60002473f7bb82223efe139883.patch +Patch6005: 8111cd06921e80d5d7192ce8d1f64733072fdbcd.patch BuildRequires: gcc gdb @@ -91,6 +97,9 @@ fi %{_infodir}/libffi.info.gz %changelog +* 20201027223007629796 patch-tracking 3.3-10 +- append patch file of upstream repository from <2d86809db6d1d626a9df40c283ec564ac98ff85d> to <8111cd06921e80d5d7192ce8d1f64733072fdbcd> + * Thu Jul 23 2020 Zhipeng Xie - 3.3-9 - Type:bugfix - ID:NA @@ -152,4 +161,4 @@ fi - DESC:update to 3.2.1 * Mon Sep 09 2019 openEuler Buildteam - 3.1-19 -- Package init +- Package init \ No newline at end of file -- Gitee