SHA256
3
0
forked from pool/libffi

- Update to commit b844a9c7f1ca based on libffi 3.3 with the

following changes:
        Add RISC-V support.
        New API in support of GO closures.
        Add IEEE754 binary128 long double support for 64-bit Power
        Default to Microsoft's 64 bit long double ABI with Visual C++.
        GNU compiler uses 80 bits (128 in memory) FFI_GNUW64 ABI.
        Add Windows on ARM64 (WOA) support.
        Add Windows 32-bit ARM support.
        Raw java (gcj) API deprecated.
        Add pre-built PDF documentation to source distribution.
        Many new test cases and bug fixes.
- SONAME change to libffi.so.8
- stdcall.patch is now upstream
- Adjust baselibs.conf for SONAME change
- Adjust aarch64.patch for upstream changes
- Drop gccbug.patch XFAILing testcases that now PASS with fixed
  GCC 9.3

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libffi?expand=0&rev=19
This commit is contained in:
Richard Biener 2020-03-10 10:06:48 +00:00 committed by Git OBS Bridge
parent 48d02f6cc7
commit 1bc1343f47
9 changed files with 36 additions and 104 deletions

View File

@ -4,8 +4,8 @@
<param name="url">https://github.com/libffi/libffi</param>
<param name="revision">master</param>
<param name="filename">libffi</param>
<param name="parent-tag">v3.2.1</param>
<param name="versionformat">3.2.1.git@TAG_OFFSET@</param>
<param name="parent-tag">v3.3</param>
<param name="versionformat">3.3.git@TAG_OFFSET@</param>
</service>
<service name="recompress" mode="disabled">
<param name="file">*.tar</param>

View File

@ -11,15 +11,4 @@ diff -purN libffi-3.2.1.git505.orig/src/aarch64/ffi.c libffi-3.2.1.git505/src/aa
#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,3 @@
libffi7
libffi8
libffi-devel
requires "libffi7-<targettype> = <version>"
requires "libffi8-<targettype> = <version>"

View File

@ -1,19 +0,0 @@
Index: libffi-3.2.1.git505/testsuite/lib/libffi.exp
===================================================================
--- libffi-3.2.1.git505.orig/testsuite/lib/libffi.exp
+++ libffi-3.2.1.git505/testsuite/lib/libffi.exp
@@ -526,12 +526,8 @@ proc run-many-tests { testcases extra_fl
set has_gccbug false;
if { [string match $compiler_vendor "gnu"] \
&& [string match "*MSABI*" $abi] \
- && ( ( [string match "*DGTEST=57 *" $common] \
- && [string match "*call.c*" $testname] ) \
- || ( [string match "*DGTEST=54 *" $common] \
- && [string match "*callback*" $testname] ) \
- || [string match "*DGTEST=55 *" $common] \
- || [string match "*DGTEST=56 *" $common] ) } then {
+ && [string match {*DGTEST=5[456] *} $common] \
+ && [string match "*callback*" $testname] } then {
set has_gccbug true;
}
verbose "Testing $testname, $options" 1

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a36c0811dd2457696abfa59097444ac5b52c1bcf90eebae5055cfc5bb7f10c09
size 377884

3
libffi-3.3.git30.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7fe63972a44c8024d69959f1db11e3198d44721209cc1afd98b60da1ea7335e4
size 383940

View File

@ -1,3 +1,27 @@
-------------------------------------------------------------------
Tue Mar 10 09:57:24 UTC 2020 - Richard Biener <rguenther@suse.com>
- Update to commit b844a9c7f1ca based on libffi 3.3 with the
following changes:
Add RISC-V support.
New API in support of GO closures.
Add IEEE754 binary128 long double support for 64-bit Power
Default to Microsoft's 64 bit long double ABI with Visual C++.
GNU compiler uses 80 bits (128 in memory) FFI_GNUW64 ABI.
Add Windows on ARM64 (WOA) support.
Add Windows 32-bit ARM support.
Raw java (gcj) API deprecated.
Add pre-built PDF documentation to source distribution.
Many new test cases and bug fixes.
- SONAME change to libffi.so.8
- stdcall.patch is now upstream
- Adjust baselibs.conf for SONAME change
- Adjust aarch64.patch for upstream changes
- Drop gccbug.patch XFAILing testcases that now PASS with fixed
GCC 9.3
-------------------------------------------------------------------
Fri Oct 11 07:27:45 UTC 2019 - Guillaume GARDET <guillaume.gardet@opensuse.org>

View File

@ -1,7 +1,7 @@
#
# spec file for package libffi
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,19 +16,17 @@
#
%define libffi_sover 7
%define libffi_sover 8
Name: libffi
Version: 3.2.1.git505
Version: 3.3.git30
Release: 0
Summary: Foreign Function Interface Library
License: MIT
Group: Development/Languages/C and C++
Url: https://github.com/libffi/
URL: https://github.com/libffi/
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
@ -82,8 +80,6 @@ time.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build

View File

@ -1,58 +0,0 @@
Index: libffi-3.2.1.git505/src/x86/ffi.c
===================================================================
--- libffi-3.2.1.git505.orig/src/x86/ffi.c
+++ libffi-3.2.1.git505/src/x86/ffi.c
@@ -51,6 +51,13 @@
# define __declspec(x) __attribute__((x))
#endif
+#if defined(_MSC_VER) && defined(_M_IX86)
+/* Stack is not 16-byte aligned on Windows. */
+#define STACK_ALIGN(bytes) (bytes)
+#else
+#define STACK_ALIGN(bytes) FFI_ALIGN (bytes, 16)
+#endif
+
/* Perform machine dependent cif processing. */
ffi_status FFI_HIDDEN
ffi_prep_cif_machdep(ffi_cif *cif)
@@ -177,12 +184,7 @@ ffi_prep_cif_machdep(ffi_cif *cif)
bytes = FFI_ALIGN (bytes, t->alignment);
bytes += FFI_ALIGN (t->size, FFI_SIZEOF_ARG);
}
-#if defined(_MSC_VER) && defined(_M_IX86)
- // stack is not 16-bit aligned on Windows
cif->bytes = bytes;
-#else
- cif->bytes = FFI_ALIGN (bytes, 16);
-#endif
return FFI_OK;
}
@@ -290,7 +292,7 @@ ffi_call_int (ffi_cif *cif, void (*fn)(v
}
}
- bytes = cif->bytes;
+ bytes = STACK_ALIGN (cif->bytes);
stack = alloca(bytes + sizeof(*frame) + rsize);
argp = (dir < 0 ? stack + bytes : stack);
frame = (struct call_frame *)(stack + bytes);
@@ -434,7 +436,7 @@ ffi_closure_inner (struct closure_frame
rvalue = frame->rettemp;
pabi = &abi_params[cabi];
dir = pabi->dir;
- argp = (dir < 0 ? stack + cif->bytes : stack);
+ argp = (dir < 0 ? stack + STACK_ALIGN (cif->bytes) : stack);
switch (flags)
{
@@ -698,7 +700,7 @@ ffi_raw_call(ffi_cif *cif, void (*fn)(vo
}
}
- bytes = cif->bytes;
+ bytes = STACK_ALIGN (cif->bytes);
argp = stack =
(void *)((uintptr_t)alloca(bytes + sizeof(*frame) + rsize + 15) & ~16);
frame = (struct call_frame *)(stack + bytes);