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

Jon Turney via Cygwin-apps <[email protected]> Sun, 24 May 2026 15:04:12 +0100
Newsgroups gmane.os.cygwin.applications
Message-ID <[email protected]>
On 19/05/2026 08:23, Mate Dimand via Cygwin-apps wrote:
> Hi,
> 
> While testing Bash on ARM64, we found that this change is necessary for compilation to succeed, because the ARM64 compiled version of libreadline also uses the "__imp_" prefix.

Thanks!

I applied this so it wont get forgotten, even though we don't have any 
means to build this right now.

Would I be correct in inferring that this means that there are no 
aarch64 specific patches needed for the various build dependencies of bash?

In the future, if possible, please attach your patches, preferably 
produced by 'git format-patch' and against the packaging repository.
(in this case, https://cygwin.com/cgit/cygwin-packages/bash/)

(This was small enough that making the change manually was possible, 
since it had some kind of newline damage that meant that trying to apply 
it had me pulling my hair out...)

Thanks again!

> 
> Best regards,
> Máté Dimand
> 
> =========
> In-lined patch:
>  From 05e4055896ddf51c31be6fc93416954d707fa89c Mon Sep 17 00:00:00 2001
> From: matdim01 <[email protected]>
> Date: Thu, 16 Apr 2026 13:10:56 +0200
> Subject: [PATCH] Use the same IMP macro for Aarch64 as for x86_64
> 
> Change-Id: I2b57dfcfdb6ce9780bb471a2cf26702b469aa2b8
> Signed-off-by: Máté Dimand <[email protected]>
> ---
> 
> diff --git a/bash-5.2-cygwin.patch b/bash-5.2-cygwin.patch
> index 4883144..78ba439 100644
> --- a/bash-5.2-cygwin.patch
> +++ b/bash-5.2-cygwin.patch
> @@ -7,7 +7,7 @@
>    #endif
>    
>   +#if __CYGWIN__
> -+#  ifdef __x86_64__
> ++#  if defined (__x86_64__) || defined (__aarch64__)
>   +#    define IMP(x) __imp_##x
>   +#  else
>   +#    define IMP(x) _imp__##x
>