diff options
| author | Long Nguyen <nguyen.long.908132@gmail.com> | 2021-07-20 02:34:57 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-19 12:34:57 -0700 |
| commit | 3a28333d605f92f8659f3af1137324b2d9886101 (patch) | |
| tree | b792c208804a804d8ab70f02c6132a9377635f2b | |
| parent | fb84265be2166d4d80381823bbcac58dc136c51b (diff) | |
| download | vcpkg-3a28333d605f92f8659f3af1137324b2d9886101.tar.gz vcpkg-3a28333d605f92f8659f3af1137324b2d9886101.zip | |
[libffi] Update to v3.4.2 (#18995)
* [libffi] Update to v3.4.2
* [vcpkg baseline] Update libffi
* [libffi] Add i686 as supported processor
* [vcpkg baseline] Update libffi
| -rw-r--r-- | ports/libffi/CMakeLists.txt | 7 | ||||
| -rw-r--r-- | ports/libffi/fficonfig.h | 6 | ||||
| -rw-r--r-- | ports/libffi/portfile.cmake | 9 | ||||
| -rw-r--r-- | ports/libffi/vcpkg.json | 3 | ||||
| -rw-r--r-- | ports/libffi/win32-disable-stackframe-check.patch | 29 | ||||
| -rw-r--r-- | ports/libffi/win64-disable-stackframe-check.patch | 43 | ||||
| -rw-r--r-- | versions/baseline.json | 4 | ||||
| -rw-r--r-- | versions/l-/libffi.json | 5 |
8 files changed, 18 insertions, 88 deletions
diff --git a/ports/libffi/CMakeLists.txt b/ports/libffi/CMakeLists.txt index bfdd2e60b..f69edfc89 100644 --- a/ports/libffi/CMakeLists.txt +++ b/ports/libffi/CMakeLists.txt @@ -9,9 +9,9 @@ if(NOT CMAKE_SYSTEM_PROCESSOR) endif() # config variables for ffi.h.in -set(VERSION 3.3) +set(VERSION 3.4.2) -set(KNOWN_PROCESSORS x86 x86_64 amd64 arm arm64 i386 armv7l armv7-a aarch64) +set(KNOWN_PROCESSORS x86 x86_64 amd64 arm arm64 i386 i686 armv7l armv7-a aarch64) string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" lower_system_processor) @@ -74,7 +74,8 @@ endif() set(FFI_SOURCES src/closures.c src/prep_cif.c - src/types.c) + src/types.c + src/tramp.c) if ("${TARGET}" STREQUAL "ARM_WIN64" OR "${TARGET}" STREQUAL "ARM64") set(FFI_SOURCES diff --git a/ports/libffi/fficonfig.h b/ports/libffi/fficonfig.h index 2ed4e0199..fc00af94a 100644 --- a/ports/libffi/fficonfig.h +++ b/ports/libffi/fficonfig.h @@ -25,10 +25,10 @@ #define PACKAGE "libffi" #define PACKAGE_BUGREPORT "http://github.com/libffi/libffi/issues" #define PACKAGE_NAME "libffi" -#define PACKAGE_STRING "libffi 3.3" +#define PACKAGE_STRING "libffi 3.4.2" #define PACKAGE_TARNAME "libffi" #define PACKAGE_URL "" -#define PACKAGE_VERSION "3.3" +#define PACKAGE_VERSION "3.4.2" #define SIZEOF_DOUBLE 8 #define SIZEOF_LONG_DOUBLE 8 #ifndef _WIN64 @@ -42,7 +42,7 @@ #define SYMBOL_UNDERSCORE 1 #endif #endif -#define VERSION "3.3" +#define VERSION "3.4.2" #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 diff --git a/ports/libffi/portfile.cmake b/ports/libffi/portfile.cmake index da39de67d..8a9c69489 100644 --- a/ports/libffi/portfile.cmake +++ b/ports/libffi/portfile.cmake @@ -1,14 +1,11 @@ -set(VERSION 3.3) +set(VERSION 3.4.2) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libffi/libffi - REF v3.3 - SHA512 62798fb31ba65fa2a0e1f71dd3daca30edcf745dc562c6f8e7126e54db92572cc63f5aa36d927dd08375bb6f38a2380ebe6c5735f35990681878fc78fc9dbc83 + REF v${VERSION} + SHA512 d399319efcca375fe901b05722e25eca31d11a4261c6a5d5079480bbc552d4e4b42de2026912689d3b2f886ebb3c8bebbea47102e38a2f6acbc526b8d5bba388 HEAD_REF master - PATCHES - win64-disable-stackframe-check.patch - win32-disable-stackframe-check.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/libffi/vcpkg.json b/ports/libffi/vcpkg.json index d4d8d87ee..1b015d403 100644 --- a/ports/libffi/vcpkg.json +++ b/ports/libffi/vcpkg.json @@ -1,7 +1,6 @@ { "name": "libffi", - "version": "3.3", - "port-version": 9, + "version": "3.4.2", "description": "Portable, high level programming interface to various calling conventions", "homepage": "https://github.com/libffi/libffi" } diff --git a/ports/libffi/win32-disable-stackframe-check.patch b/ports/libffi/win32-disable-stackframe-check.patch deleted file mode 100644 index f9a1b186f..000000000 --- a/ports/libffi/win32-disable-stackframe-check.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/src/x86/ffi.c b/src/x86/ffi.c -index 9a59218..9f5d703 100644 ---- a/src/x86/ffi.c -+++ b/src/x86/ffi.c -@@ -255,6 +255,14 @@ static const struct abi_params abi_params[FFI_LAST_ABI] = { - - extern void FFI_DECLARE_FASTCALL ffi_call_i386(struct call_frame *, char *) FFI_HIDDEN; - -+/* we perform some black magic here to use some of the parent's -+ * stack frame in ff_call_win() that breaks with the msvc compiler -+ * with the /RTCs or /GZ flags. Disable the 'Stack frame run time -+ * error checking' for this function so we don't hit weird exceptions -+ * in debug builds */ -+#if defined(_MSC_VER) -+#pragma runtime_checks("s", off) -+#endif - static void - ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue, - void **avalue, void *closure) -@@ -390,6 +398,9 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue, - - ffi_call_i386 (frame, stack); - } -+#if defined(_MSC_VER) -+#pragma runtime_checks("s", restore) -+#endif - - void - ffi_call (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) diff --git a/ports/libffi/win64-disable-stackframe-check.patch b/ports/libffi/win64-disable-stackframe-check.patch deleted file mode 100644 index ce3d3ca55..000000000 --- a/ports/libffi/win64-disable-stackframe-check.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 53291b332b1bc061a3409d3b60c38f313609b98e Mon Sep 17 00:00:00 2001 -From: Matthew Waters <matthew@centricular.com> -Date: Fri, 16 Mar 2018 15:10:04 +1100 -Subject: [PATCH] x86/win64: disable runtime stack frame checks with msvc - around built assembly - -MSVC can add truntime code that checks if a stack frame is mismanaged -however our custom assembly delibrately accesses and modifies the parent -stack frame. Fortunately we can disable that specific check for the -function call so do that. ---- - src/x86/ffiw64.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/src/x86/ffiw64.c b/src/x86/ffiw64.c -index f7875252..88bb3a34 100644 ---- a/src/x86/ffiw64.c -+++ b/src/x86/ffiw64.c -@@ -106,6 +106,14 @@ EFI64(ffi_prep_cif_machdep)(ffi_cif *cif) - return FFI_OK; - } - -+/* we perform some black magic here to use some of the parent's -+ * stack frame in ff_call_win64() that breaks with the msvc compiler -+ * with the /RTCs or /GZ flags. Disable the 'Stack frame run time -+ * error checking' for this function so we don't hit weird exceptions -+ * in debug builds */ -+#if defined(_MSC_VER) -+#pragma runtime_checks("s", off) -+#endif - static void - ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue, - void **avalue, void *closure) -@@ -170,6 +178,9 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue, - - ffi_call_win64 (stack, frame, closure); - } -+#if defined(_MSC_VER) -+#pragma runtime_checks("s", restore) -+#endif - - void - EFI64(ffi_call)(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) diff --git a/versions/baseline.json b/versions/baseline.json index f9fe61ec9..a9ab8edda 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3149,8 +3149,8 @@ "port-version": 0 }, "libffi": { - "baseline": "3.3", - "port-version": 9 + "baseline": "3.4.2", + "port-version": 0 }, "libfido2": { "baseline": "1.7.0", diff --git a/versions/l-/libffi.json b/versions/l-/libffi.json index 328f93a08..f866b7686 100644 --- a/versions/l-/libffi.json +++ b/versions/l-/libffi.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "683012a89ed0185eecbc3035b2490af7d2cd2379", + "version": "3.4.2", + "port-version": 0 + }, + { "git-tree": "c40f59f0527e2336818bd5d6b0d14ae2bdc5c286", "version": "3.3", "port-version": 9 |
