diff options
Diffstat (limited to 'meta/recipes-support/libffi')
-rw-r--r-- | meta/recipes-support/libffi/libffi/0001-arm-sysv-reverted-clang-VFP-mitigation.patch | 102 | ||||
-rw-r--r-- | meta/recipes-support/libffi/libffi/0001-mips-Use-compiler-internal-define-for-linux.patch | 32 | ||||
-rw-r--r-- | meta/recipes-support/libffi/libffi/not-win32.patch | 21 | ||||
-rw-r--r-- | meta/recipes-support/libffi/libffi_3.4.4.bb (renamed from meta/recipes-support/libffi/libffi_3.2.1.bb) | 26 |
4 files changed, 134 insertions, 47 deletions
diff --git a/meta/recipes-support/libffi/libffi/0001-arm-sysv-reverted-clang-VFP-mitigation.patch b/meta/recipes-support/libffi/libffi/0001-arm-sysv-reverted-clang-VFP-mitigation.patch new file mode 100644 index 0000000000..3ffcb3e128 --- /dev/null +++ b/meta/recipes-support/libffi/libffi/0001-arm-sysv-reverted-clang-VFP-mitigation.patch @@ -0,0 +1,102 @@ +From 000f1500b693a84880d2da49b77b1113f98dde35 Mon Sep 17 00:00:00 2001 +From: Brett Warren <brett.warren@arm.com> +Date: Fri, 27 Nov 2020 15:28:42 +0000 +Subject: [PATCH] arm/sysv: reverted clang VFP mitigation + +Since commit e3d2812ce43940aacae5bab2d0e965278cb1e7ea, +seperate instructions were used when compiling under clang, +as clang didn't allow the directives at the time. This mitigation +now causes compilation to fail under clang 10, as described by +https://github.com/libffi/libffi/issues/607. Now that +clang supports the LDC and SDC instructions, this mitigation +has been reverted. + +Upstream-Status: Submitted [https://github.com/libffi/libffi/pull/747] +Signed-off-by: Brett Warren <brett.warren@arm.com> + +--- + src/arm/sysv.S | 33 --------------------------------- + 1 file changed, 33 deletions(-) + +diff --git a/src/arm/sysv.S b/src/arm/sysv.S +index fb36213..e4272a1 100644 +--- a/src/arm/sysv.S ++++ b/src/arm/sysv.S +@@ -142,13 +142,8 @@ ARM_FUNC_START(ffi_call_VFP) + + cmp r3, #3 @ load only d0 if possible + ite le +-#ifdef __clang__ +- vldrle d0, [r0] +- vldmgt r0, {d0-d7} +-#else + ldcle p11, cr0, [r0] @ vldrle d0, [r0] + ldcgt p11, cr0, [r0], {16} @ vldmgt r0, {d0-d7} +-#endif + add r0, r0, #64 @ discard the vfp register args + /* FALLTHRU */ + ARM_FUNC_END(ffi_call_VFP) +@@ -193,25 +188,13 @@ ARM_FUNC_START(ffi_call_SYSV) + #endif + 0: + E(ARM_TYPE_VFP_S) +-#ifdef __clang__ +- vstr s0, [r2] +-#else + stc p10, cr0, [r2] @ vstr s0, [r2] +-#endif + pop {fp,pc} + E(ARM_TYPE_VFP_D) +-#ifdef __clang__ +- vstr d0, [r2] +-#else + stc p11, cr0, [r2] @ vstr d0, [r2] +-#endif + pop {fp,pc} + E(ARM_TYPE_VFP_N) +-#ifdef __clang__ +- vstm r2, {d0-d3} +-#else + stc p11, cr0, [r2], {8} @ vstm r2, {d0-d3} +-#endif + pop {fp,pc} + E(ARM_TYPE_INT64) + str r1, [r2, #4] +@@ -320,11 +303,7 @@ ARM_FUNC_START(ffi_closure_VFP) + add ip, sp, #16 + sub sp, sp, #64+32 @ allocate frame + cfi_adjust_cfa_offset(64+32) +-#ifdef __clang__ +- vstm sp, {d0-d7} +-#else + stc p11, cr0, [sp], {16} @ vstm sp, {d0-d7} +-#endif + stmdb sp!, {ip,lr} + + /* See above. */ +@@ -358,25 +337,13 @@ ARM_FUNC_START_LOCAL(ffi_closure_ret) + cfi_rel_offset(lr, 4) + 0: + E(ARM_TYPE_VFP_S) +-#ifdef __clang__ +- vldr s0, [r2] +-#else + ldc p10, cr0, [r2] @ vldr s0, [r2] +-#endif + b call_epilogue + E(ARM_TYPE_VFP_D) +-#ifdef __clang__ +- vldr d0, [r2] +-#else + ldc p11, cr0, [r2] @ vldr d0, [r2] +-#endif + b call_epilogue + E(ARM_TYPE_VFP_N) +-#ifdef __clang__ +- vldm r2, {d0-d3} +-#else + ldc p11, cr0, [r2], {8} @ vldm r2, {d0-d3} +-#endif + b call_epilogue + E(ARM_TYPE_INT64) + ldr r1, [r2, #4] diff --git a/meta/recipes-support/libffi/libffi/0001-mips-Use-compiler-internal-define-for-linux.patch b/meta/recipes-support/libffi/libffi/0001-mips-Use-compiler-internal-define-for-linux.patch deleted file mode 100644 index db96e63547..0000000000 --- a/meta/recipes-support/libffi/libffi/0001-mips-Use-compiler-internal-define-for-linux.patch +++ /dev/null @@ -1,32 +0,0 @@ -From a5efaa96fd934eb245c234a5275fcf62698ef986 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 2 Apr 2015 21:38:03 -0700 -Subject: [PATCH] mips: Use compiler internal define for linux - -__linux__ is defined by compiler when building for -linux platforms, lets use it - - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/mips/ffitarget.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/mips/ffitarget.h b/src/mips/ffitarget.h -index 717d659..6faa358 100644 ---- a/src/mips/ffitarget.h -+++ b/src/mips/ffitarget.h -@@ -32,7 +32,7 @@ - #error "Please do not include ffitarget.h directly into your source. Use ffi.h instead." - #endif - --#ifdef linux -+#ifdef __linux__ - # include <asm/sgidefs.h> - #elif defined(__rtems__) - /* --- -2.1.4 - diff --git a/meta/recipes-support/libffi/libffi/not-win32.patch b/meta/recipes-support/libffi/libffi/not-win32.patch index 1e90125edd..38f9b0025c 100644 --- a/meta/recipes-support/libffi/libffi/not-win32.patch +++ b/meta/recipes-support/libffi/libffi/not-win32.patch @@ -1,3 +1,8 @@ +From 20bc4e03442e15965ae3907013e9a177878f0323 Mon Sep 17 00:00:00 2001 +From: Ross Burton <ross.burton@intel.com> +Date: Thu, 4 Feb 2016 16:22:50 +0000 +Subject: [PATCH] libffi: ensure sysroot paths are not in libffi.pc + libffi's configure assumes that cross-compiled builds are complicated and introduces convoluted path manipulation involving gcc search paths to the install paths, resulting in paths like -L/usr/lib/../lib/ appearing in @@ -11,12 +16,20 @@ As this block is generally pointless, disable it. Upstream-Status: Inappropriate Signed-off-by: Ross Burton <ross.burton@intel.com> ---- a/configure.ac~ 2014-11-12 11:56:51.000000000 +0000 -+++ b/configure.ac 2016-02-04 14:02:53.765710532 +0000 -@@ -593,5 +593,5 @@ +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 7e8cd98..cf37e88 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -405,7 +405,7 @@ AC_ARG_ENABLE(multi-os-directory, + # These variables are only ever used when we cross-build to X86_WIN32. # And we only support this with GCC, so... -if test "x$GCC" = "xyes"; then +if false; then if test -n "$with_cross_host" && - test x"$with_cross_host" != x"no"; then
\ No newline at end of file + test x"$with_cross_host" != x"no"; then + toolexecdir='${exec_prefix}'/'$(target_alias)' diff --git a/meta/recipes-support/libffi/libffi_3.2.1.bb b/meta/recipes-support/libffi/libffi_3.4.4.bb index 42ab1087f3..15d974c83e 100644 --- a/meta/recipes-support/libffi/libffi_3.2.1.bb +++ b/meta/recipes-support/libffi/libffi_3.4.4.bb @@ -1,4 +1,5 @@ SUMMARY = "A portable foreign function interface library" +HOMEPAGE = "http://sourceware.org/libffi/" DESCRIPTION = "The `libffi' library provides a portable, high level programming interface to various calling \ conventions. This allows a programmer to call any function specified by a call interface description at run \ time. FFI stands for Foreign Function Interface. A foreign function interface is the popular name for the \ @@ -7,24 +8,27 @@ library really only provides the lowest, machine dependent layer of a fully feat A layer must exist above `libffi' that handles type conversions for values passed between the two languages." LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3610bb17683a0089ed64055416b2ae1b" +LIC_FILES_CHKSUM = "file://LICENSE;md5=32c0d09a0641daf4903e5d61cc8f23a8" -SRC_URI = "ftp://sourceware.org/pub/libffi/${BP}.tar.gz \ +SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BPN}-${PV}.tar.gz \ file://not-win32.patch \ - file://0001-mips-Use-compiler-internal-define-for-linux.patch \ - " + file://0001-arm-sysv-reverted-clang-VFP-mitigation.patch \ + " +SRC_URI[sha256sum] = "d66c56ad259a82cf2a9dfc408b32bf5da52371500b84745f7fb8b645712df676" -SRC_URI[md5sum] = "83b89587607e3eb65c70d361f13bab43" -SRC_URI[sha256sum] = "d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37" +EXTRA_OECONF += "--disable-builddir --disable-exec-static-tramp" +EXTRA_OECONF:class-native += "--with-gcc-arch=generic" +EXTRA_OEMAKE:class-target = "LIBTOOLFLAGS='--tag=CC'" +inherit autotools texinfo multilib_header github-releases -EXTRA_OECONF += "--disable-builddir" +do_install:append() { + oe_multilib_header ffi.h ffitarget.h +} -inherit autotools texinfo - -FILES_${PN}-dev += "${libdir}/libffi-${PV}" +FILES:${PN}-dev += "${libdir}/libffi-${PV}" # Doesn't compile in MIPS16e mode due to use of hand-written # assembly -MIPS_INSTRUCTION_SET = "mips16" +MIPS_INSTRUCTION_SET = "mips" BBCLASSEXTEND = "native nativesdk" |