gmp.h needs to detect bit width more dynamically to support universal builds on mac
tg at gmplib.org
Thu Dec 5 16:57:19 UTC 2013
nisse at lysator.liu.se (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'.
More information about the gmp-bugs