aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>2021-05-08 06:35:38 +0800
committerGitHub <noreply@github.com>2021-05-07 15:35:38 -0700
commit86d689b2305d8c453418cae1ed2009718d05cddf (patch)
treeeb20c354d4fb894d647b05a812d916c7bbc8fe8b
parentdd630c91e439144f4f2bf878a81dc08cf5f9669c (diff)
downloadvcpkg-86d689b2305d8c453418cae1ed2009718d05cddf.tar.gz
vcpkg-86d689b2305d8c453418cae1ed2009718d05cddf.zip
[libffi] Update patch to fix apply patch failure (#17637)
* [libffi] Update patch to fix apply patch failure * update version record
-rw-r--r--ports/libffi/vcpkg.json2
-rw-r--r--ports/libffi/win32-disable-stackframe-check.patch31
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/l-/libffi.json5
4 files changed, 12 insertions, 28 deletions
diff --git a/ports/libffi/vcpkg.json b/ports/libffi/vcpkg.json
index 8934328b4..d4d8d87ee 100644
--- a/ports/libffi/vcpkg.json
+++ b/ports/libffi/vcpkg.json
@@ -1,7 +1,7 @@
{
"name": "libffi",
"version": "3.3",
- "port-version": 8,
+ "port-version": 9,
"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
index 8fdca8b01..f9a1b186f 100644
--- a/ports/libffi/win32-disable-stackframe-check.patch
+++ b/ports/libffi/win32-disable-stackframe-check.patch
@@ -1,32 +1,11 @@
-Rolf Gebhardt <rolf.gebhardt@lbs-sw.de>
-22 Jul 2020
-[PATCH] x86/win32: disable runtime stack frame checks with msvc
- around built assembly
-
-based on the patch for x86/win64:
-
-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/ffi.c | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
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
@@ -37,14 +16,14 @@ index 9a59218..9f5d703 100644
+#endif
static void
ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue,
- void **avalue, void *closure)
+ 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/versions/baseline.json b/versions/baseline.json
index 9ee1d6cbb..87589d778 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -3078,7 +3078,7 @@
},
"libffi": {
"baseline": "3.3",
- "port-version": 8
+ "port-version": 9
},
"libfido2": {
"baseline": "1.7.0",
diff --git a/versions/l-/libffi.json b/versions/l-/libffi.json
index 340ad5664..328f93a08 100644
--- a/versions/l-/libffi.json
+++ b/versions/l-/libffi.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "c40f59f0527e2336818bd5d6b0d14ae2bdc5c286",
+ "version": "3.3",
+ "port-version": 9
+ },
+ {
"git-tree": "ea2ed30397fc14caf66d8f7290306cfc5c5aa424",
"version": "3.3",
"port-version": 8