This bug has been discussed before (eg,
T1744) but no adequate solution has been
proposed. It still exists for various host triplets such as, in my case,
The problem as I understand it:
- The configure script uses build-aux/config.sub to validate the given host
triplet. AFAIK it's not expected to map names to the most common subarch
triplet, just to validate, invalidate, or adjust such triplets for GNU conformance.
- The host name triplet is then fed to /src/mkheader.
For "x86_64-pc-linux-gnu" for instance, './mkheader linux-gnu
../config.h 1.22 0x011600 >gpg-error.h'.
src/mkheader uses the canonical host name for the header file in "src/syscfg",
i.e., "src/syscfg/lock-obj-pub.x86_64-pc-linux-gnu.h". If the name isn't in the
name of one of the now 31 header files, the build ends in an error. Though
there exists a mapping table in src/mkheader.c it is quite small and only offers
a one-to-one correspondence between host triplets.
Assumptions shouldn't be made about the subarch component of the host name.
libgpg-error shouldn't rely on a one-to-one correspondence between valid GNU
host triplets and header files. Though there is no perfect solution there
should at least some minimal glob pattern matching for host triplets and header
This patch is to src/mkheader.c, to enable some host name glob pattern matching.
For instance "arm*linux-gnueabi" to "arm-unknown-linux-gnueabi" and
"i?86*linux-gnu" to "i686-pc-linux-gnu".