Next: , Previous: Building with Microsoft Visual Studio, Up: Installing MPIR   [Index]


2.5 Notes for Particular Systems

ARM

On systems ‘arm*-*-*’, versions of GCC up to and including 2.95.3 have a bug in unsigned division, giving wrong results for some operands. MPIR ‘./configure’ will demand GCC 2.95.4 or later.

Floating Point Mode

On some systems, the hardware floating point has a control mode which can set all operations to be done in a particular precision, for instance single, double or extended on x86 systems (x87 floating point). The MPIR functions involving a 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 MPIR.

MS-DOS and MS Windows

On an MS Windows system Cygwin and Cygwin64 and Msys2/Mingw can be used, they are ports of GCC and the various GNU tools.

Both 32 and 64 bit versions of Msys2/Mingw and Cygwin are supported. Building on these systems is very similar to building on Linux.

We strongly recommend using recent versions of Cygwin/Msys2.

MS Windows DLLs

On systems ‘*-*-cygwin*’ and ‘*-*-mingw*’ and ‘*-*-msys’ static and DLL libraries can’t both be built, since certain export directives in mpir.h must be different. Therefore you must specify whether you want a shared library or a static library. For example if you want just a shared library you can type the following.

./configure --disable-static --enable-shared

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 libmpir and libmpirxx.

cd .libs
lib /def:libgmp-3.dll.def /out:libgmp-3.lib
Sparc CPU Types

sparcv8’ or ‘supersparc’ on relevant systems will give a significant performance increase over the V7 code selected by plain ‘sparc’.

Sparc App Regs

The MPIR assembler code for both 32-bit and 64-bit Sparc clobbers the “application registers” g2, g3 and g4, the same way that the GCC default ‘-mapp-regs’ does (see SPARC Options in Using the GNU Compiler Collection (GCC)).

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 MPIR with CPU ‘none’ to avoid the assembler code.

SPARC Solaris

Building applications against MPIR on SPARC Solaris (including make check) requires the LD_LIBRARY_PATH to be set appropriately. In particular if one is building with ABI=64 the linker needs to know where to find libgcc (often often /usr/lib/sparcv9 or /usr/local/lib/sparcv9 or /lib/sparcv9).

It is not enough to specify the location in LD_LIBRARY_PATH_64 unless LD_LIBRARY_PATH_64 is added to LD_LIBRARY_PATH. Specifically the 64 bit libgcc path needs to be in LD_LIBRARY_PATH.

The linker is able to automatically distinguish 32 and 64 bit libraries, so it is safe to include paths to both the 32 and 64 bit libraries in the LD_LIBRARY_PATH.

Solaris 10 First Release on SPARC

MPIR fails to build with Solaris 10 first release. Patch 123647-01 for SPARC, released by Sun in August 2006 fixes this problem.

x86 CPU Types

i586’, ‘pentium’ or ‘pentiummmx’ code is good for its intended P5 Pentium chips, but quite slow when run on Intel P6 class chips (PPro, P-II, P-III). ‘i386’ is a better choice when making binaries that must run on both.

x86 MMX and SSE2 Code

If the CPU selected has MMX code but the assembler doesn’t support it, a warning is given and non-MMX code is used instead. This will be an inferior build, since the MMX code that’s present is there because it’s faster than the corresponding plain integer code. The same applies to SSE2.

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.


Next: , Previous: Building with Microsoft Visual Studio, Up: Installing MPIR   [Index]