From 0a0390c55fd5f5f195ebed870615359e0a99ac91 Mon Sep 17 00:00:00 2001 From: Xin Shi Date: Tue, 25 Apr 2023 15:46:25 +0800 Subject: [PATCH] Fix AARCH64EB support Signed-off-by: Xin Shi (cherry picked from commit cdbfbae203a69674058d70071f639a6c6af1caaf) --- 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..306f343 --- /dev/null +++ b/fix-AARCH64EB-support.patch @@ -0,0 +1,28 @@ +From 53907f56e9aa729e6134e807b46e68e2dee62feb Mon Sep 17 00:00:00 2001 +From: Xin Shi +Date: Tue, 25 Apr 2023 15:37:07 +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 1ebf43c..fde9113 100644 +--- a/src/aarch64/ffi.c ++++ b/src/aarch64/ffi.c +@@ -690,6 +690,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 + #ifdef _M_ARM64 /* for handling armasm calling convention */ + } + #endif /* for handling armasm calling convention */ +-- +2.27.0 + diff --git a/libffi.spec b/libffi.spec index eacf2a0..dd0a825 100644 --- a/libffi.spec +++ b/libffi.spec @@ -1,12 +1,13 @@ Name: libffi Version: 3.3 -Release: 9 +Release: 10 Summary: A Portable Foreign Function Interface Library License: MIT URL: http://sourceware.org/libff Source0: ftp://sourceware.org/pub/libffi/%{name}-%{version}.tar.gz Patch0: Add-gcc-bug-tests-back.patch +Patch1: fix-AARCH64EB-support.patch BuildRequires: gcc gcc-c++ dejagnu BuildRequires: make @@ -89,6 +90,12 @@ fi %{_infodir}/libffi.info.gz %changelog +* Tue Apr 25 2023 shixin - 3.3-10 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:Fix AARCH64EB support + * Fri Dec 16 2022 wangjiang - 3.3-9 - Type:bugfix - ID:NA -- Gitee