[PATCH pinentry] build: Add AC_PROG_AR to configure.ac
Zhang Maiyun
me at maiyun.me
Sat May 2 14:12:16 CEST 2026
Apologies. I did not mention that this patch is for pinentry.
GnuPG already has `AC_CHECK_TOOL(AR, ar, :)`.
On Sat, May 02, 2026 at 08:06:48AM -0400, Zhang Maiyun wrote:
> 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, me at maiyun.me wrote:
> > From: Zhang Maiyun <me at maiyun.me>
> >
> > * configure.ac: add AC_PROG_AR.
> >
> > --
> >
> > Signed-off-by: Zhang Maiyun <me at maiyun.me>
> > ---
> > 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
> >
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 325 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-devel/attachments/20260502/f4a60e5b/attachment.sig>
More information about the Gnupg-devel
mailing list