Hello all,

I apologize for another trivial patch.

This makes sure cross compilations use the correct `ar`.

While previously `ar`/`ranlib` seemed to silently accept objects for
another architecture, now, Darwin `ar` (macOS) discards unrecognized
objects and causes the `libsecmem.a`/`libpinentry.a` linking steps to
fail during a cross compilation:

```
$ aarch64-linux-gnu-gcc -c -o test.o -x c - <<< 'void f(){}'
$ ar cr test.a test.o
ranlib: warning: archive member 'test.o' not a mach-o file
$ nm test.a
<empty>
$ ar t test.a
__.SYMDEF SORTED
```

On Sat, May 02, 2026 at 08:01:20AM -0400, [email protected] wrote:
> From: Zhang Maiyun <[email protected]>
> 
> * configure.ac: add AC_PROG_AR.
> 
> --
> 
> Signed-off-by: Zhang Maiyun <[email protected]>
> ---
>  configure.ac | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/configure.ac b/configure.ac
> index a4f443d..3df11b3 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -81,6 +81,7 @@ AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
>  AC_PROG_CC
>  AC_PROG_CPP
>  AC_PROG_INSTALL
> +AC_PROG_AR
>  AC_PROG_RANLIB
>  # We need to check for cplusplus here because we may not do the test
>  # for Qt and autoconf does does not allow that.
> -- 
> 2.54.0
> 

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Gnupg-devel mailing list
[email protected]
https://lists.gnupg.org/mailman/listinfo/gnupg-devel

Reply via email to