Next: Known Build Problems, Previous: Notes for Package Builds, Up: Installing GMP
./configure --enable-shared --disable-static
Note that the `--disable-static' is necessary because in a shared build
libtool makes libgmp.a a symlink to libgmp.so, apparently for
the benefit of old versions of ld which only recognise .a,
but unfortunately this is done even if a fully functional ld is
available.
iostream, a standard one and
an old pre-standard one (see `man iostream_intro'). GMP can only use the
standard one, which unfortunately is not the default but must be selected by
defining __USE_STD_IOSTREAM. Configure with for instance
./configure --enable-cxx CPPFLAGS=-D__USE_STD_IOSTREAM
double cannot be expected to operate to their full
precision when the hardware is in single precision mode. Of course this
affects all code, including application code, not just GMP.
http://www.cygwin.com/
http://www.delorie.com/djgpp/
http://www.mingw.org/
Microsoft also publishes an Interix “Services for Unix” which can be used to
build GMP on Windows (with a normal `./configure'), but it's not free
software.
./configure --disable-static --enable-shared
Static and DLL libraries can't both be built, since certain export directives in gmp.h must be different.
A MINGW DLL build of GMP can be used with Microsoft C. Libtool doesn't install a .lib format import library, but it can be created with MS lib as follows, and copied to the install directory. Similarly for libmp and libgmpxx.
cd .libs
lib /def:libgmp-3.dll.def /out:libgmp-3.lib
MINGW uses the C runtime library `msvcrt.dll' for I/O, so applications
wanting to use the GMP I/O routines must be compiled with `cl /MD' to do
the same. If one of the other C runtime library choices provided by MS C is
desired then the suggestion is to use the GMP string functions and confine I/O
to the application.
eval that makes it
unsuitable for .asm file processing. `./configure' will detect
the problem and either abort or choose another m4 in the PATH. The bug
is fixed in OpenBSD 2.7, so either upgrade or use GNU m4.
g2, g3 and g4, the same way
that the GCC default `-mapp-regs' does (see SPARC Options).
This makes that code unsuitable for use with the special V9
`-mcmodel=embmedany' (which uses g4 as a data segment pointer),
and for applications wanting to use those registers for special purposes. In
these cases the only suggestion currently is to build GMP with CPU `none'
to avoid the assembly code.
Old versions of `gas' don't support MMX instructions, in particular version 1.92.3 that comes with FreeBSD 2.2.8 or the more recent OpenBSD 3.1 doesn't.
Solaris 2.6 and 2.7 as generate incorrect object code for register
to register movq instructions, and so can't be used for MMX code.
Install a recent gas if MMX code is wanted on these systems.