SHA256
1
0
forked from pool/libffi

Accepting request 738187 from home:Guillaume_G:branches:openSUSE:Factory:ARM

- Workaround aarch64 bug (boo#1153573) with upstream patch
  https://github.com/libffi/libffi/pull/499 updated to apply
  on current sources (upstream will probably rework this patch
  so we need to monitor the issue for the proper fix):
  * aarch64.patch

OBS-URL: https://build.opensuse.org/request/show/738187
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libffi?expand=0&rev=17
This commit is contained in:
Richard Biener 2019-10-14 09:29:17 +00:00 committed by Git OBS Bridge
parent f32a3fdc9d
commit 48d02f6cc7
3 changed files with 37 additions and 0 deletions

25
aarch64.patch Normal file
View File

@ -0,0 +1,25 @@
diff -purN libffi-3.2.1.git505.orig/src/aarch64/ffi.c libffi-3.2.1.git505/src/aarch64/ffi.c
--- libffi-3.2.1.git505.orig/src/aarch64/ffi.c 2019-08-07 20:57:45.000000000 +0200
+++ libffi-3.2.1.git505/src/aarch64/ffi.c 2019-10-11 08:45:42.702088832 +0200
@@ -815,7 +815,8 @@ ffi_prep_closure_loc (ffi_closure *closu
#else
unsigned char *tramp_code = ffi_data_to_code_pointer (tramp);
#endif
- ffi_clear_cache (tramp_code, tramp_code + FFI_TRAMPOLINE_SIZE);
+ if (tramp_code != NULL)
+ ffi_clear_cache (tramp_code, tramp_code + FFI_TRAMPOLINE_SIZE);
#endif
closure->cif = cif;
diff -purN libffi-3.2.1.git505.orig/src/closures.c libffi-3.2.1.git505/src/closures.c
--- libffi-3.2.1.git505.orig/src/closures.c 2019-08-07 20:57:45.000000000 +0200
+++ libffi-3.2.1.git505/src/closures.c 2019-10-11 08:43:59.265151289 +0200
@@ -925,6 +925,8 @@ void *
ffi_data_to_code_pointer (void *data)
{
msegmentptr seg = segment_holding (gm, data);
+ if (seg == NULL)
+ return NULL;
return add_segment_exec_offset (data, seg);
}

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Fri Oct 11 07:27:45 UTC 2019 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Workaround aarch64 bug (boo#1153573) with upstream patch
https://github.com/libffi/libffi/pull/499 updated to apply
on current sources (upstream will probably rework this patch
so we need to monitor the issue for the proper fix):
* aarch64.patch
-------------------------------------------------------------------
Wed Sep 18 09:39:07 UTC 2019 - Andreas Schwab <schwab@suse.de>

View File

@ -29,6 +29,8 @@ Source: %name-%version.tar.xz
Source99: baselibs.conf
Patch1: gccbug.patch
Patch2: stdcall.patch
# Workaround from https://github.com/libffi/libffi/issues/498
Patch3: aarch64.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf
BuildRequires: automake
@ -82,6 +84,7 @@ time.
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
./autogen.sh