On 25/06/2025 08:47, Corinna Vinschen wrote:
[...]
diff --git a/winsup/cygwin/cygwin.sc.in b/winsup/cygwin/cygwin.sc.in
index 5007a3694..3322810cc 100644
--- a/winsup/cygwin/cygwin.sc.in
+++ b/winsup/cygwin/cygwin.sc.in
@@ -1,6 +1,9 @@
#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)
+SEARCH_DIR("/usr/aarch64-pc-cygwin/lib/w32api");
SEARCH_DIR("=/usr/lib/w32api");
Given that /usr/lib/w32api is arch independent, maybe we should
take out that SEARCH_DIR from the arch dependent code, i.e.
if x86_64
SEARCH_DIR("/usr/x86_64-pc-cygwin/lib/w32api");
elif aarch
SEARCH_DIR("/usr/aarch64-pc-cygwin/lib/w32api");
else
error
endif
SEARCH_DIR("=/usr/lib/w32api");
What do you think?
Maybe even a pair of comments, to identify that the first search path in
the sys-root when cross-compiling, the second is for when building natively?
(I'm guessing that's what's going on?)
(Hmm... in which case, couldn't the first one be written as just
"=/lib/w32api"? (since the '=' stands for $SYSROOT?). But maybe there's
some wrinkle which prevents that from working?)