From 9366f56e1303b9c67156f83a1c9477c3f0d9c861 Mon Sep 17 00:00:00 2001 From: autoantwort <41973254+autoantwort@users.noreply.github.com> Date: Thu, 20 Oct 2022 21:52:57 +0200 Subject: [PATCH] [zydis] fix arm64 osx build (#27326) --- ports/zydis/fix-arm64-build.patch | 26 ++++++++++++++++++++++++++ ports/zydis/portfile.cmake | 1 + ports/zydis/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/z-/zydis.json | 5 +++++ 5 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 ports/zydis/fix-arm64-build.patch diff --git a/ports/zydis/fix-arm64-build.patch b/ports/zydis/fix-arm64-build.patch new file mode 100644 index 0000000000..f93f72e982 --- /dev/null +++ b/ports/zydis/fix-arm64-build.patch @@ -0,0 +1,26 @@ +diff --git a/include/Zydis/ShortString.h b/include/Zydis/ShortString.h +index bed45af6..566d673a 100644 +--- a/include/Zydis/ShortString.h ++++ b/include/Zydis/ShortString.h +@@ -45,7 +45,9 @@ extern "C" { + /* Enums and types */ + /* ============================================================================================== */ + +-#pragma pack(push, 1) ++#if !(defined(ZYAN_AARCH64) && defined(ZYAN_APPLE)) ++# pragma pack(push, 1) ++#endif + + /** + * Defines the `ZydisShortString` struct. +@@ -67,7 +69,9 @@ typedef struct ZydisShortString_ + ZyanU8 size; + } ZydisShortString; + +-#pragma pack(pop) ++#if !(defined(ZYAN_AARCH64) && defined(ZYAN_APPLE)) ++# pragma pack(pop) ++#endif + + /* ============================================================================================== */ + /* Macros */ diff --git a/ports/zydis/portfile.cmake b/ports/zydis/portfile.cmake index 1676ab93a2..228c59afe9 100644 --- a/ports/zydis/portfile.cmake +++ b/ports/zydis/portfile.cmake @@ -6,6 +6,7 @@ vcpkg_from_github( HEAD_REF master PATCHES zycore.patch + fix-arm64-build.patch # from https://github.com/zyantific/zydis/pull/259 ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ZYDIS_BUILD_SHARED_LIB) diff --git a/ports/zydis/vcpkg.json b/ports/zydis/vcpkg.json index 1b8fb9ccbe..c1be5d4b00 100644 --- a/ports/zydis/vcpkg.json +++ b/ports/zydis/vcpkg.json @@ -1,7 +1,7 @@ { "name": "zydis", "version-semver": "3.2.1", - "port-version": 1, + "port-version": 2, "description": "Fast and lightweight x86/x86-64 disassembler library.", "homepage": "https://zydis.re", "license": "MIT", diff --git a/versions/baseline.json b/versions/baseline.json index 8296e1ed65..a986082dfd 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -8218,7 +8218,7 @@ }, "zydis": { "baseline": "3.2.1", - "port-version": 1 + "port-version": 2 }, "zyre": { "baseline": "2019-07-07", diff --git a/versions/z-/zydis.json b/versions/z-/zydis.json index 32a9481fb1..0623e09149 100644 --- a/versions/z-/zydis.json +++ b/versions/z-/zydis.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "6f44467c0fc5c106acd0846b22a6c0d3691c10de", + "version-semver": "3.2.1", + "port-version": 2 + }, { "git-tree": "a021ff1e31fecf096d68bb9cc9aa30121f3dd0bc", "version-semver": "3.2.1",