Hello.

Sending the version with `SEARCH_DIR("=/usr/lib/w32api")` only, with detailed 
commit message added. I've also removed semicolon for `SEARCH_DIR` as it's not 
needed and other directives do not use it.

Radek

---
>From 44f33bdb2e564c9dd6207b951f3074a2b98b9bb3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Radek=20Barto=C5=88?= <[email protected]>
Date: Fri, 6 Jun 2025 14:13:16 +0200
Subject: [PATCH v4] Cygwin: define OUTPUT_FORMAT and SEARCH_DIR for AArch64
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This patch defines binutils output binary format for AArch64 which is 
pei-aarch64-little.

Since =/usr/lib/w32api resolves to $SYSROOT/usr/lib/w32api and Fedora 
cross-build takes libraries from
/usr/aarch64-pc-cygwin/sys-root/usr/lib/w32api, the 
SEARCH_DIR("/usr/x86_64-pc-cygwin/lib/w32api"); is
redundant and can be removed.

Signed-off-by: Radek BartoĊˆ <[email protected]>
---
 winsup/cygwin/cygwin.sc.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/winsup/cygwin/cygwin.sc.in b/winsup/cygwin/cygwin.sc.in
index 5007a3694..25739a198 100644
--- a/winsup/cygwin/cygwin.sc.in
+++ b/winsup/cygwin/cygwin.sc.in
@@ -1,9 +1,11 @@
 #ifdef __x86_64__
 OUTPUT_FORMAT(pei-x86-64)
-SEARCH_DIR("/usr/x86_64-pc-cygwin/lib/w32api"); SEARCH_DIR("=/usr/lib/w32api");
+#elif __aarch64__
+OUTPUT_FORMAT(pei-aarch64-little)
 #else
 #error unimplemented for this target
 #endif
+SEARCH_DIR("=/usr/lib/w32api")
 #define __CONCAT1(a,b) a##b
 #define __CONCAT(a,b) __CONCAT1(a,b)
 #define _SYM(x)        __CONCAT(__USER_LABEL_PREFIX__, x)
-- 
2.49.0.vfs.0.4

Attachment: v4-0001-Cygwin-define-OUTPUT_FORMAT-and-SEARCH_DIR-for-AArch64.patch
Description: v4-0001-Cygwin-define-OUTPUT_FORMAT-and-SEARCH_DIR-for-AArch64.patch

Reply via email to