Cross-compilation of libgpg-error fails on toolchain without threads since commit 988211d3d4c1f3d5cfa6b460210f65ab636763b5, 9ee011259f819a3cf50fe7019fa4366dbc437e0e and 50e62b36ea01ed25d12c443088b85d4f41a2b3e1
Indeed, since that time, libgpg-error assumes that pthread.h is always available resulting in the following error at configure time:
checking for arm-unknown-linux-gnueabi-objdump... (cached) /tmp/instance-1/output-1/host/bin/arm-linux-objdump
conftest.c:1:10: fatal error: pthread.h: No such file or directory
1 | #include <pthread.h>
| ^~~~~~~~~~~
compilation terminated.
configure: generated src/lock-obj-pub.native.h using arm-unknown-linux-gnueabi-objdump and gawk
checking whether to enable log_clock... noThis error will in turn result in a build failure because "Can't determine mutex size" is echoed by gen-lock-obj.sh:
In file included from strsource-sym.c:27:
./gpg-error.h:1115:4: warning: missing terminating ' character
1115 | Can't determine mutex size
| ^I would advise to update configure.ac to set force_use_syscfg to yes when threads are not available.
Full build log: http://autobuild.buildroot.org/results/334/3344c96e5627a9327b0eabe0b27f34490bbabc0d/build-end.log