gmp.h needs to detect bit width more dynamically to support universal builds on mac

Dan Kegel dank at
Thu Dec 5 17:28:27 UTC 2013

Multilib seems to be arch and gentoo's name for what debian calls multiarch.
Regardless of whether the system is using multilib, multiarch, or fat binaries,
the same .h file needs to be usable for all architectures and all variants.
I have faith that this is doable.
- Dan

On Thu, Dec 5, 2013 at 8:57 AM, Torbjorn Granlund <tg at> wrote:
> nisse at (Niels Möller) writes:
>   It's a known problem, and solving it is not beneficial just for MacOS.
>   E.g., it would be nice to be able to install both 32-bit and 64-bit gmp
>   in parallel on, e.g., gnu/linux x86_64, with libraries in different
>   directories, say /usr/lib and /use/lib32, but sharing the same
>   $prefix/include/gmp.h. In this case, it would be nice to automagically
>   chose default $libdir depending on the ABI (I try do that in Nettle's
>   configure script, see
>   but it's a bit messy).
> This is a can of worms.  I think a GMP-specific solution to this problem
> would be a mistake.  Instead, a GNU-wide solution is needed.
> If each GNU library did it their way, we'd surely make a mess by
> creating variations for installation paths.
> No operating system (or GNU/Linux distribution) seem to agree on ABI
> installation paths and policies.  To make matters worse, some have
> changes with release (for good reasons, I am sure).
> I GNU-wide solution need either resillient configure tests for paths, or
> a database of paths.
> Building a library for multiple ABIs is sometimes known as 'multilib'.
> Torbjörn

More information about the gmp-bugs mailing list