Commit Graph

27 Commits

Author SHA1 Message Date
Wang Mingyu
c87da3d09f libffi: upgrade 3.4.5 -> 3.4.6
meta/recipes-support/libffi/libffi/not-win32.patch
refreshed for 3.4.6

Changelog:
===========
-chore: update version to 3.4.6 and fix long double regression on mips64 and alpha
-Update sparc64 host
-Update cfarm hostnames
-Always define long double types
-update copyright year in libffi.texi
-Update version, copyright and testsuite info
-Fix test filename reference

(From OE-Core rev: 0ea9b851f3d7ca568b536c7980730ea03333d037)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-01 09:28:51 +00:00
Ross Burton
65da465410 libffi: upgrade to 3.4.5
Drop the clang/VFP patch, merged in 00116b6.

Drop the FILES for ${libdir}/libffi-${PV}, this file isn't installed.

License-Update: Copyright year updated to 2024.

(From OE-Core rev: e3ea7c0ae99171ebaa273f0a1f6d4fa49ed1b257)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-17 18:19:19 +00:00
Alexander Kanavin
55e1e6dd08 libffi: upgrade 3.4.2 -> 3.4.4
License-Update: copyright years

(From OE-Core rev: 5b42ba98ef26a52bad8de1790b402938fec4a160)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-11-08 22:47:16 +00:00
Alexander Kanavin
8506c36e3a libffi: submit patch upstream
(From OE-Core rev: 9555a7dc768c32a009333232e25cef041054b7f7)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-11-01 17:34:59 +00:00
Alexander Kanavin
afefe7de28 meta: fix version checks in all github recipes using the github-releases class
(From OE-Core rev: b04316bdd28b7945c2c91b4e43c007b650eedc14)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-28 08:01:10 +01:00
Maxime Roussin-Bélanger
5ae7621978 libffi: fix native build being not portable
Without `--with-gcc-arch=generic` libffi looks up the cpuid to automatically determine
which mtune/march to use. This makes the native sstate-cache unuseable since it's
possible to have a newer cpu building the recipe and the library being pulled from
another older cpu which doesn't have the instruction.

(From OE-Core rev: cddaecac1fdd4d033c2ff8ccaf1d60e1c598d5b7)

Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-22 22:40:28 +01:00
Richard Purdie
bb6ddc3691 Convert to new override syntax
This is the result of automated script conversion:

scripts/contrib/convert-overrides.py <oe-core directory>

converting the metadata to use ":" as the override character instead of "_".

(From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-02 15:44:10 +01:00
Yi Zhao
dadfef3950 libffi: disable use of static exec trampolines
We encountered a blueman-applet segfault with libffi 3.4.2:
$ blueman-applet
blueman-applet 01.58.45 WARNING  PluginManager:148 __load_plugin: Not loading DhcpClient because its conflict has higher priority
blueman-applet 01.58.45 WARNING  TransferService:189 _make_share_path: Failed to get Download dir from XDG
blueman-applet 01.58.45 WARNING  PluginManager:148 __load_plugin: Not loading PPPSupport because its conflict has higher priority
Segmentation fault

This is because the static exec trampolines is enabled by default in
libffi 3.4.2. However it doesn't work with gobject-introspection[1].

[1] 132699b95d

(From OE-Core rev: 2173003df3beedf49aa0ce30d79a1158179fa3e4)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-18 23:09:51 +01:00
zhengruoqin
d2e5c350e9 libffi: upgrade 3.3 -> 3.4.2
0001-Address-platforms-with-no-__int128-part2.patch
0001-Address-platforms-with-no-__int128.patch
0001-Fixed-missed-ifndef-for-__mips_soft_float.patch
0001-ffi_powerpc.h-fix-build-failure-with-powerpc7.patch
0001-powerpc-fix-build-failure-on-power7-and-older-532.patch
removed since they're included in 3.4.2

refresh 0001-arm-sysv-reverted-clang-VFP-mitigation.patch

License-Updage: Copyright year updated to 2021

(From OE-Core rev: 16cd4351d9e54140ea558229a93b1f89fcf7aa8c)

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@fujitsu.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-02 23:14:32 +01:00
Brett Warren
fe9b4249f7 libffi: add patch to revert clang VFP workaround
Patch is added to address an issue preventing libffi
from compiling under clang.

Change-Id: I55e36d252ec8e84de9b35fea18044c2c0e8c5aab
(From OE-Core rev: 01e8c53488dd5ebb206bef2415549e8ac1ac7601)

Signed-off-by: Brett Warren <brett.warren@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-09 12:20:33 +00:00
Changqing Li
49865a6061 libffi: fix multilib header conflict
fix error:
file /usr/include/ffitarget.h conflicts between attempted installs of lib32-libffi-dev-3.3-r0.armv7vet2hf_vfp and libffi-dev-3.3-r0.cortexa57

part of diff

#ifndef LIBFFI_ASM
-typedef unsigned long          ffi_arg;
-typedef signed long            ffi_sarg;
-
-typedef enum ffi_abi {
-  FFI_FIRST_ABI = 0,
-  FFI_SYSV,
-  FFI_VFP,
-  FFI_LAST_ABI,
-#if defined(__ARM_PCS_VFP) || defined(_M_ARM)
-  FFI_DEFAULT_ABI = FFI_VFP,
+#ifdef __ILP32__
+#define FFI_SIZEOF_ARG 8
+#define FFI_SIZEOF_JAVA_RAW  4
+typedef unsigned long long ffi_arg;
+typedef signed long long ffi_sarg;
+#elif defined(_M_ARM64)
+#define FFI_SIZEOF_ARG 8
+typedef unsigned long long ffi_arg;
+typedef signed long long ffi_sarg;
 #else
-  FFI_DEFAULT_ABI = FFI_SYSV,
-#endif
-} ffi_abi;
+typedef unsigned long ffi_arg;
+typedef signed long ffi_sarg;
 #endif

-#define FFI_EXTRA_CIF_FIELDS			\
-  int vfp_used;					\
-  unsigned short vfp_reg_free, vfp_nargs;	\
-  signed char vfp_args[16]			\
-
-#define FFI_TARGET_SPECIFIC_VARIADIC
-#ifndef _M_ARM
-#define FFI_TARGET_HAS_COMPLEX_TYPE
+typedef enum ffi_abi
+  {
+    FFI_FIRST_ABI = 0,
+    FFI_SYSV,
+    FFI_LAST_ABI,
+    FFI_DEFAULT_ABI = FFI_SYSV
+  } ffi_abi;
 #endif

 /* ---- Definitions for closures ----------------------------------------- */

 #define FFI_CLOSURES 1
-#define FFI_GO_CLOSURES 1
 #define FFI_NATIVE_RAW_API 0

 #if defined (FFI_EXEC_TRAMPOLINE_TABLE) && FFI_EXEC_TRAMPOLINE_TABLE

 #ifdef __MACH__
-#define FFI_TRAMPOLINE_SIZE 12
-#define FFI_TRAMPOLINE_CLOSURE_OFFSET 8
+#define FFI_TRAMPOLINE_SIZE 16
+#define FFI_TRAMPOLINE_CLOSURE_OFFSET 16
 #else
 #error "No trampoline table implementation"
 #endif

 #else
-#ifdef _MSC_VER
-#define FFI_TRAMPOLINE_SIZE 16
-#define FFI_TRAMPOLINE_CLOSURE_FUNCTION 12
-#else
-#define FFI_TRAMPOLINE_SIZE 12
-#endif
+#define FFI_TRAMPOLINE_SIZE 24
 #define FFI_TRAMPOLINE_CLOSURE_OFFSET FFI_TRAMPOLINE_SIZE
 #endif

+#ifdef _M_ARM64
+#define FFI_EXTRA_CIF_FIELDS unsigned is_variadic
+#endif
+

(From OE-Core rev: efe8d76810973e7032e729beee106b8acc39b8ed)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-19 10:57:44 +01:00
Andrew Geissler
11e7f09d60 libffi: fix v3.3 compile on ppc64le
The latest released version of libffi no longer compiles on ppc64le
based machines. Some searching found a patch that fixed our issue but
had not been submitted upstream to libffi.

It has now been submitted upstream with this PR:
https://github.com/libffi/libffi/pull/561

(From OE-Core rev: 76001bd4ae1e4f153f3d670b19e9ccd39c9fc4ef)

Signed-off-by: Andrew Geissler <geissonator@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-29 15:02:19 +01:00
Khem Raj
22e4a63816 libffi: Fix build on ppc64
Similar fix was applied already upstream but not extended to all the
cases

(From OE-Core rev: ec6d1e337f36d75588133d5b6988ee438600b8ad)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-09 12:00:42 +00:00
Alexander Kanavin
991e2b5879 libffi: update to 3.3 final
Add a couple patches to address ppc(64) build failures.

License-Update: copyright years
(From OE-Core rev: 9aab37ac40c8da5121a931f5979fcc88489021d2)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-04 12:30:58 +00:00
Alexander Kanavin
db503d411b libffi: fix upstream version check
As there is no version newer than 3.3-rc0 yet, an exception
from the check is needed.

(From OE-Core rev: 5850d42187de00db4b0c01ba97fe41aaec3f6613)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-01 22:33:07 +01:00
Peter Kjellerstedt
bc1cedc3ea libffi: Make it build for MIPS o32
This solves the following errors:

  src/mips/o32.S: Assembler messages:
  src/mips/o32.S:286: Error: opcode not supported on this processor:
    mips32r2 (mips32r2) `s.d $f12,((16*4)-10*4)($fp)'
  src/mips/o32.S:287: Error: opcode not supported on this processor:
    mips32r2 (mips32r2) `s.d $f14,((16*4)-8*4)($fp)'

(From OE-Core rev: 250d85144c0118aebfce105f02425c25cb028087)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-28 11:31:22 +01:00
Khem Raj
89a01ef7d3 libffi: Upgrade to 3.3-rc0
libffi 3.1 release has been a bit aged and new architectures, compilers
have since been come on stage to compile it, we have been carrying
patches, but its better to use the latest 3.3 rc0 which has lot of these
issues handled and is in good shape.

Use 3.3~rc0 for PV to keep room for upgrade path without PE bump

fix the multilib header conflict

file /usr/include/ffi.h from install of libffi-dev-3.2.1+3.3+rc0-r0.core2_32 conflicts with file from package lib64-libffi-dev-3.2.1+3.3+rc0-r0.x86_64

(From OE-Core rev: 06e731bdea527d5c42e99bbcef7f2835e158c0a0)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-22 22:48:27 +01:00
Adrian Bunk
753949c81d Change ftp:// URIs to http(s)://
(From OE-Core rev: a11edd68b256fffb088cde5b7298a5749161f600)

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-03 23:56:01 +01:00
Alistair Francis
462ae94d70 libffi: Add RISC-V support
Backport a libffi patch to add RISC-V support.

(From OE-Core rev: 24f4b2a8f2a0ed52fd791a5c393dea7d02f45116)

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-19 22:13:39 +01:00
Ross Burton
aa0c57f6a5 libffi: refresh patches
The patch tool will apply patches by default with "fuzz", which is where if the
hunk context isn't present but what is there is close enough, it will force the
patch in.

Whilst this is useful when there's just whitespace changes, when applied to
source it is possible for a patch applied with fuzz to produce broken code which
still compiles (see #10450).  This is obviously bad.

We'd like to eventually have do_patch() rejecting any fuzz on these grounds. For
that to be realistic the existing patches with fuzz need to be rebased and
reviewed.

(From OE-Core rev: 7ae4ce08071c02beaf09675c2c1ed70617b797dd)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-09 09:17:02 -08:00
Huang Qiyu
3de45e35b6 libffi: Add HOMEPAGE info into recipe file.
(From OE-Core rev: cfe74cb67f284e58c6d133d456fb6d8e763f3e5c)

Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-22 17:15:30 +01:00
Khem Raj
26d043bf26 ossp-uuid, libffi, libgcrypt: Pass --tag=CC option to libtool
libtool tries to guess the --tag value based on CC/CXX environment
variables and the compile commandline generated by makefiles. This
heuristics however fails when we construct CC variables in OE
and add security flags to it, especially -fPIE -pie which are added
by external compilers e.g. clang particularly. It fails because
libtool removed PIE flags from compiler cmdline intelligently
if it figures out that its building a library, which means that
the CC variable passed from cmdline does not match with the compiler
cmdline constructed by libtool and we end up with errors like

| arm-bec-linux-musleabi-libtool: compile: unable to infer tagged configuration
| arm-bec-linux-musleabi-libtool:   error: specify a tag with '--tag'

This works with internal gcc toolchain because we configure gcc for
PIE when hardening is selected and dont pass -fPIE -pie options explicitly
but this is not an option for clang, and some external gcc toolchains
using older gcc

This patch adds the --tag option to help libtool set correct tags
in packages where it cant get it right via its heuristics

(From OE-Core rev: 0505075ae8d339ba097aebb82b4d0ae62f87c0a9)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-09 09:24:15 +01:00
sweeaun
027f3d0aef libffi: Support musl-x32 build
Added target musl-x32 in configure.ac to support musl-x32 build in libffi.

(From OE-Core rev: 318e33a708378652edcf61ce7d9d7f3a07743000)

Signed-off-by: sweeaun <swee.aun.khor@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:30 +01:00
André Draszik
0d92f448c4 libffi: backport patch to fix building MIPS soft float
Upstream-Status: Backport [2ded2a4f49]

(From OE-Core rev: 0231a6f92d2c8b89b419aeb09a4b35f871bfb2bf)

(From OE-Core rev: 0ce7415bb50bf1941981ef61590fe642b055d290)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-08 00:32:43 +01:00
André Draszik
cd3c5582a0 libffi: fix a typo (mips)
While code elsewhere checks for
MIPS_INSTRUCTION_SET == mips16e in order to decide how
to compile, hence the typo doesn't affect behaviour, the
intention was to set it to 'mips', as is done everywhere
else. Fixing the typo also helps to avoid confusion.

(From OE-Core rev: 45b27564324c754a34a1930437a7167079fe1ee4)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-20 16:06:03 +01:00
André Draszik
fc97ef905d libffi: don't compile in mips16e mode
libffi contains hand-written assembly which is not compatible with
the MIPS16e mode.

(From OE-Core rev: 27467ca354801aeb6d7e3a658cff3dda37db971a)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:44 +01:00
Ross Burton
fad264b7e7 libffi: move from recipes-gnome to recipes-support
(From OE-Core rev: a2c43ffe55e022cb5621d549c8aae914c6fa54a1)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:39:03 +00:00