Hello. This patch ports `winsup/utils/mingw/cygcheck.cc` to AArch64.
Radek >From db2428722d0a01d61347a53ff8f1f1fecfc81368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20Barto=C5=88?= <radek.bar...@microsoft.com> Date: Mon, 9 Jun 2025 13:08:35 +0200 Subject: [PATCH] Cygwin: cygcheck: port to AArch64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Radek BartoĊ <radek.bar...@microsoft.com> --- winsup/utils/mingw/cygcheck.cc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/winsup/utils/mingw/cygcheck.cc b/winsup/utils/mingw/cygcheck.cc index 89a08e560..6ec7bcf03 100644 --- a/winsup/utils/mingw/cygcheck.cc +++ b/winsup/utils/mingw/cygcheck.cc @@ -654,13 +654,20 @@ dll_info (const char *path, HANDLE fh, int lvl, int recurse) WORD arch = get_word (fh, pe_header_offset + 4); if (GetLastError () != NO_ERROR) display_error ("get_word"); -#ifdef __x86_64__ +#if defined(__x86_64__) if (arch != IMAGE_FILE_MACHINE_AMD64) { puts (verbose ? " (not x86_64 dll)" : "\n"); return; } int base_off = 108; +#elif defined (__aarch64__) + if (arch != IMAGE_FILE_MACHINE_ARM64) + { + puts (verbose ? " (not aarch64 dll)" : "\n"); + return; + } + int base_off = 112; #else #error unimplemented for this target #endif @@ -2108,8 +2115,10 @@ static const char safe_chars[] = "$-_.!*'(),"; static const char grep_base_url[] = "http://cygwin.com/cgi-bin2/package-grep.cgi?text=1&grep="; -#ifdef __x86_64__ +#if defined(__x86_64__) #define ARCH_STR "&arch=x86_64" +#elif defined(__aarch64__) +#define ARCH_STR "&arch=aarch64" #else #error unimplemented for this target #endif -- 2.49.0.vfs.0.4
0001-Cygwin-cygcheck-port-to-AArch64.patch
Description: 0001-Cygwin-cygcheck-port-to-AArch64.patch