Re: [PATCH] build: Add AC_PROG_AR to configure.ac
Zhang Maiyun via Gnupg-devel <[email protected]> Sat, 2 May 2026 08:06:15 -0400
| Newsgroups | gmane.comp.encryption.gpg.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============3788938815957710314==
Content-Type: multipart/signed; micalg=pgp-sha512;
protocol="application/pgp-signature"; boundary="ZPXUuSVLLsmNyx/S"
Content-Disposition: inline
--ZPXUuSVLLsmNyx/S
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
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]>
>=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
--ZPXUuSVLLsmNyx/S
Content-Type: application/pgp-signature; name=signature.asc
-----BEGIN PGP SIGNATURE-----
wr0EARYKAG8Fgmn16LUJEMml8GFfYQgGRxQAAAAAAB4AIHNhbHRAbm90YXRpb25z
LnNlcXVvaWEtcGdwLm9yZ6+cbYmbTofTm+obEie3Vz7g4s/K6ZDsgb/N5lqHzobs
FiEEXyklowO7GgEXU/gsyaXwYV9hCAYAAH0yAQCBG0RgLRmNxuPPaYpfamll2c+a
225EywhIJfwJRYSXvwD/cB8/LXnxyJBES7yahG+YhV9rGfeEm2B7uCPkK2SFrwE=
=rG+b
-----END PGP SIGNATURE-----
--ZPXUuSVLLsmNyx/S--
--===============3788938815957710314==
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
--===============3788938815957710314==--