From 1cb5859f8e993bb0b57ebd62b58cc411794c3bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Sun, 10 May 2026 18:30:17 +0200 Subject: [PATCH] Apply patches/fix_zydis_amalgamated_riscv32_build to subproject We already vendor a patched zydis and this fix should be available to everyone, not only CI. --- .github/riscv32-qemu-setup-all.sh | 2 -- patches/fix_zydis_amalgamated_riscv32_build | 22 ------------------- .../zydis/amalgamated-dist/Zydis.c | 4 ++-- 3 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 patches/fix_zydis_amalgamated_riscv32_build diff --git a/.github/riscv32-qemu-setup-all.sh b/.github/riscv32-qemu-setup-all.sh index 14e03e6ee2..4f4f92efe5 100644 --- a/.github/riscv32-qemu-setup-all.sh +++ b/.github/riscv32-qemu-setup-all.sh @@ -17,8 +17,6 @@ export PATH="${BOOTLIN_TOOLS}:${PATH}" # Build Rizin meson setup build --cross-file doc/examples/cross_builds/meson-linux-riscv32.ini meson compile -C build || true # Expected to fail due to Zydis bug on RISC-V 32-bit -# Quick and dirty fix for Zydis compilation error, remove when upstream merges a fix and we bump -patch -p1 < patches/fix_zydis_amalgamated_riscv32_build # Build again meson compile -C build diff --git a/patches/fix_zydis_amalgamated_riscv32_build b/patches/fix_zydis_amalgamated_riscv32_build deleted file mode 100644 index 3a32953037..0000000000 --- a/patches/fix_zydis_amalgamated_riscv32_build +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/home/mostafa/BEFORE_ZYDIS.c b/subprojects/zydis/amalgamated-dist/Zydis.c -index 66dcb1ed3d..297dfd050a 100644 ---- a/subprojects/zydis/amalgamated-dist/Zydis.c -+++ b/subprojects/zydis/amalgamated-dist/Zydis.c -@@ -54437,7 +54437,7 @@ static const char* const DECIMAL_LOOKUP = - /* Decimal */ - /* ---------------------------------------------------------------------------------------------- */ - --#if defined(ZYAN_X86) || defined(ZYAN_ARM) || defined(ZYAN_EMSCRIPTEN) || defined(ZYAN_WASM) || defined(ZYAN_PPC) || defined(ZYAN_S390) -+#if defined(ZYAN_X86) || defined(ZYAN_ARM) || defined(ZYAN_EMSCRIPTEN) || defined(ZYAN_WASM) || defined(ZYAN_PPC) || defined(ZYAN_S390) || defined(ZYAN_RISCV32) - static ZyanStatus ZydisStringAppendDecU32(ZyanString* string, ZyanU32 value, ZyanU8 padding_length) - { - ZYAN_ASSERT(string); -@@ -54529,7 +54529,7 @@ static ZyanStatus ZydisStringAppendDecU64(ZyanString* string, ZyanU64 value, Zya - /* Hexadecimal */ - /* ---------------------------------------------------------------------------------------------- */ - --#if defined(ZYAN_X86) || defined(ZYAN_ARM) || defined(ZYAN_EMSCRIPTEN) || defined(ZYAN_WASM) || defined(ZYAN_PPC) -+#if defined(ZYAN_X86) || defined(ZYAN_ARM) || defined(ZYAN_EMSCRIPTEN) || defined(ZYAN_WASM) || defined(ZYAN_PPC) || defined(ZYAN_RISCV32) - static ZyanStatus ZydisStringAppendHexU32(ZyanString* string, ZyanU32 value, ZyanU8 padding_length, - ZyanBool force_leading_number, ZyanBool uppercase) - { diff --git a/subprojects/packagefiles/zydis/amalgamated-dist/Zydis.c b/subprojects/packagefiles/zydis/amalgamated-dist/Zydis.c index 66dcb1ed3d..297dfd050a 100644 --- a/subprojects/packagefiles/zydis/amalgamated-dist/Zydis.c +++ b/subprojects/packagefiles/zydis/amalgamated-dist/Zydis.c @@ -54437,7 +54437,7 @@ static const char* const DECIMAL_LOOKUP = /* Decimal */ /* ---------------------------------------------------------------------------------------------- */ -#if defined(ZYAN_X86) || defined(ZYAN_ARM) || defined(ZYAN_EMSCRIPTEN) || defined(ZYAN_WASM) || defined(ZYAN_PPC) || defined(ZYAN_S390) +#if defined(ZYAN_X86) || defined(ZYAN_ARM) || defined(ZYAN_EMSCRIPTEN) || defined(ZYAN_WASM) || defined(ZYAN_PPC) || defined(ZYAN_S390) || defined(ZYAN_RISCV32) static ZyanStatus ZydisStringAppendDecU32(ZyanString* string, ZyanU32 value, ZyanU8 padding_length) { ZYAN_ASSERT(string); @@ -54529,7 +54529,7 @@ static ZyanStatus ZydisStringAppendDecU64(ZyanString* string, ZyanU64 value, Zya /* Hexadecimal */ /* ---------------------------------------------------------------------------------------------- */ -#if defined(ZYAN_X86) || defined(ZYAN_ARM) || defined(ZYAN_EMSCRIPTEN) || defined(ZYAN_WASM) || defined(ZYAN_PPC) +#if defined(ZYAN_X86) || defined(ZYAN_ARM) || defined(ZYAN_EMSCRIPTEN) || defined(ZYAN_WASM) || defined(ZYAN_PPC) || defined(ZYAN_RISCV32) static ZyanStatus ZydisStringAppendHexU32(ZyanString* string, ZyanU32 value, ZyanU8 padding_length, ZyanBool force_leading_number, ZyanBool uppercase) {