Re: [PATCH pinentry] build: Add AC_PROG_AR to configure.ac

Zhang Maiyun via Gnupg-devel <[email protected]> Sat, 2 May 2026 08:12:16 -0400
Newsgroups gmane.comp.encryption.gpg.devel
Message-ID <[email protected]>
--===============4257508733562913812==
Content-Type: multipart/signed; micalg=pgp-sha512;
	protocol="application/pgp-signature"; boundary="yV1mK32anWawEFvR"
Content-Disposition: inline


--yV1mK32anWawEFvR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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,
>=20
> I apologize for another trivial patch.
>=20
> This makes sure cross compilations use the correct `ar`.
>=20
> 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:
>=20
> ```
> $ 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
> ```
>=20
> On Sat, May 02, 2026 at 08:01:20AM -0400, [email protected] wrote:
> > From: Zhang Maiyun <[email protected]>
> >=20
> > * configure.ac: add AC_PROG_AR.
> >=20
> > --
> >=20
> > Signed-off-by: Zhang Maiyun <[email protected]>
> > ---
> >  configure.ac | 1 +
> >  1 file changed, 1 insertion(+)
> >=20
> > 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.
> > --=20
> > 2.54.0
> >=20



--yV1mK32anWawEFvR
Content-Type: application/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

wr0EARYKAG8Fgmn16h8JEMml8GFfYQgGRxQAAAAAAB4AIHNhbHRAbm90YXRpb25z
LnNlcXVvaWEtcGdwLm9yZ2DdgZL4GStvhxkbAF5EJbZeIFvYIeh8SZrvp+kGog01
FiEEXyklowO7GgEXU/gsyaXwYV9hCAYAAD5HAP9BG5yzof6gQt39VO+XydSRd7qc
5pYLTaT9eQnDqvOz5QEAyU0ThGkxk4twc5+doqVIadKS5swhomwtVHO61HyXRQA=
=bx8q
-----END PGP SIGNATURE-----

--yV1mK32anWawEFvR--


--===============4257508733562913812==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============4257508733562913812==--