On PowerPC Darwin, libgcrypt incorrectly determines the CPU type and the build
fails when trying to compile an x86 module.
This problem stems from config.links, and seems to have been introduced between
1.5.3 and 1.6.0.
In 1.5 config.links was only governing the MPI ASM to use. PowerPC Darwin and
certain versions of x86 OpenBSD were both unsupported, so they were grouped
together like so:
case "${host}" in
powerpc-apple-darwin* | \ i[34567]86*-*-openbsd[12]* | \ i[34567]86*-*-openbsd3.[0123]*) echo '/* No working assembler modules available */' >>./mpi/asm-syntax.h path="" ;;
In 1.6, CPU type detection was added to config.links. In what looks like an
oversight the grouping wasn't redone, and "x86" was set as the CPU architecture
for this group, presumably due to the OpenBSD entries:
case "${host}" in
powerpc-apple-darwin* | \ i[34567]86*-*-openbsd[12]* | \ i[34567]86*-*-openbsd3.[0123]*) echo '/* No working assembler modules available */' >>./mpi/asm-syntax.h path="" mpi_cpu_arch="x86" ;;
As a result, it tries to build an x86 module and fails. Build logs are provided
in the linked issue at the Tigerbrew package manager, where this was first
reported. This has been tested and confirmed on Mac OS X 10.4 and 10.5 PowerPC.
A proposed patch for this is attached, which separates powerpc-apple-darwin*
into its own case. This patch has been tested on Mac OS X 10.4 PowerPC and
allows the build to succeed.