[PATCH bash] Use the same IMP macro for Aarch64 as for x86_64

Mate Dimand via Cygwin-apps <[email protected]> Tue, 19 May 2026 07:23:41 +0000
Newsgroups gmane.os.cygwin.applications
Message-ID <DB4PR08MB93107A4C3A5041D44230BA8DF3002@DB4PR08MB9310.eurprd08.prod.outlook.com>
Hi,=0A=
=0A=
While testing Bash on ARM64, we found that this change is necessary for com=
pilation to succeed, because the ARM64 compiled version of libreadline also=
 uses the "__imp_" prefix.=0A=
=0A=
Best regards,=0A=
M=E1t=E9 Dimand=0A=
=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
In-lined patch:=0A=
From 05e4055896ddf51c31be6fc93416954d707fa89c Mon Sep 17 00:00:00 2001=0A=
From: matdim01 <[email protected]>=0A=
Date: Thu, 16 Apr 2026 13:10:56 +0200=0A=
Subject: [PATCH] Use the same IMP macro for Aarch64 as for x86_64=0A=
=0A=
Change-Id: I2b57dfcfdb6ce9780bb471a2cf26702b469aa2b8=0A=
Signed-off-by: M=E1t=E9 Dimand <[email protected]>=0A=
---=0A=
=0A=
diff --git a/bash-5.2-cygwin.patch b/bash-5.2-cygwin.patch=0A=
index 4883144..78ba439 100644=0A=
--- a/bash-5.2-cygwin.patch=0A=
+++ b/bash-5.2-cygwin.patch=0A=
@@ -7,7 +7,7 @@=0A=
  #endif=0A=
  =0A=
 +#if __CYGWIN__=0A=
-+#  ifdef __x86_64__=0A=
++#  if defined (__x86_64__) || defined (__aarch64__)=0A=
 +#    define IMP(x) __imp_##x=0A=
 +#  else=0A=
 +#    define IMP(x) _imp__##x=0A=
=0A=