I'm testing GnuPG 2.2.27 on an Apple M1. That's the new Apple desktop with the ARMv8.2-a processor. It has Apple Clang 12.0.0 (Apple Clang versions do not follow LLVM Clang versioning). I'm using the latest `config.guess` and `config.sub`, and the triplet `aarch64-apple-darwin`.
`make check` is failing a number of tests:
/usr/bin/clang -Wall -Wno-pointer-sign -Wpointer-arith -g2 -O2 -fno-common -arch arm64 -fPIC -pthread -L/usr/local/lib -Wl,-rpath,@loader_path/../lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -o asschk asschk.o
gpgsm: WARNING: running with faked system time: 2002-12-02 13:29:59
gpgsm: keybox '/Users/jwalton/Build-Scripts/gnupg-2.2.27/tests/pubring.kbx' created
dyld: lazy symbol binding failed: Symbol not found: __gcry_mpih_mul_1
Referenced from: /usr/local/lib/libgcrypt.20.dylib
Expected in: flat namespace
On the Mac-mini with the M1:
% nm /usr/local/lib/libgcrypt.20.dylib | grep gcry_mpih_mul
0000000000075ed4 T __gcry_mpih_mul
0000000000075af8 T __gcry_mpih_mul_karatsuba_case
00000000000753b4 T __gcry_mpih_mul_n
000000000007be64 T _gcry_mpih_mul_1
And on an Intel Mac-mini where GnuPG tests ok:
$ nm /usr/local/lib/libgcrypt.20.dylib | grep gcry_mpih_mul
00000000000bae90 T __gcry_mpih_mul
00000000000c1e4f T __gcry_mpih_mul_1
00000000000ba8f0 T __gcry_mpih_mul_karatsuba_case
00000000000b9fd0 T __gcry_mpih_mul_n
I'm not sure where to look for the difference. It may be in the way `libgcrypt` is being built. Or it may be in the way GnuPG is creating mangled names.
I also noticed other packages that depend on `libgcrypt` do not have a problem. The other packages include Emacs, libxslt, libmicrohttpd and ntbTLS.