From b4d195e4014f24d9fb21ac5b96d637bb5e04e2a7 Mon Sep 17 00:00:00 2001 From: Xin Shi Date: Mon, 10 Apr 2023 16:25:02 +0800 Subject: [PATCH] fix AARCH64EB support Signed-off-by: Xin Shi --- fix-AARCH64EB-support.patch | 28 ++++++++++++++++++++++++++++ libffi.spec | 9 ++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 fix-AARCH64EB-support.patch diff --git a/fix-AARCH64EB-support.patch b/fix-AARCH64EB-support.patch new file mode 100644 index 0000000..41f1487 --- /dev/null +++ b/fix-AARCH64EB-support.patch @@ -0,0 +1,28 @@ +From b1af55df9b05eaf4b982c135f4ba6f263b72e458 Mon Sep 17 00:00:00 2001 +From: Xin Shi +Date: Mon, 20 Mar 2023 16:42:57 +0800 +Subject: [PATCH] fix AARCH64EB support + +Signed-off-by: Xin Shi +--- + src/aarch64/ffi.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/aarch64/ffi.c b/src/aarch64/ffi.c +index 6544ac0..580e965 100644 +--- a/src/aarch64/ffi.c ++++ b/src/aarch64/ffi.c +@@ -758,6 +758,10 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *orig_rvalue, + } + state.nsrn = N_V_ARG_REG; + dest = allocate_to_stack (&state, stack, ty->alignment, s); ++#ifdef __AARCH64EB__ ++ if (t == FFI_TYPE_FLOAT) ++ dest = dest +4; ++#endif + } + } + else if (s > 16) +-- +2.27.0 + diff --git a/libffi.spec b/libffi.spec index 0ce15e5..4ced0eb 100644 --- a/libffi.spec +++ b/libffi.spec @@ -1,6 +1,6 @@ Name: libffi Version: 3.4.2 -Release: 7 +Release: 8 Summary: A Portable Foreign Function Interface Library License: MIT URL: http://sourceware.org/libffi @@ -13,6 +13,7 @@ Patch1: backport-Fix-check-for-invalid-varargs-arguments-707.patch Patch2: libffi-Add-sw64-architecture.patch Patch3: backport-Fix-signed-vs-unsigned-comparison.patch Patch4: riscv-extend-return-types-smaller-than-ffi_arg-680.patch +Patch5: fix-AARCH64EB-support.patch BuildRequires: gcc gcc-c++ dejagnu BuildRequires: make @@ -100,6 +101,12 @@ fi %{_infodir}/libffi.info.gz %changelog +* Mon Apr 10 2023 shixin - 3.4.2-8 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:Fix AARCH64EB support + * Wed Mar 29 2023 laokz - 3.4.2-7 - Type:bugfix - CVE:NA -- Gitee