10.13. GMP-6.1.2 N32 Libraries

GMP is a library for arithmetic on arbitrary precision integers, rational numbers, and floating-point numbers.

10.13.1. Installation of GMP

[Note]

Note

If you are compiling this package on a different CPU than you plan to run the CLFS system on, you must replace GMP's config.guess and config.sub wrappers with the originals. This will prevent GMP from optimizing for the wrong CPU. You can make this change with the following command:

mv -v config{fsf,}.guess
mv -v config{fsf,}.sub

Prepare GMP for compilation:

CC="gcc -isystem /usr/include ${BUILDN32}" \
CXX="g++ -isystem /usr/include ${BUILDN32}" \
LDFLAGS="-Wl,-rpath-link,/usr/lib32:/lib32 ${BUILDN32}" \
  ABI=n32 ./configure \
    --prefix=/usr \
    --libdir=/usr/lib32 \
    --enable-cxx

Compile the package:

make

Test the results:

make check

Install the package:

make install

Create the N32 header file:

mv -v /usr/include/gmp{,-n32}.h

Details on this package are located in Section 10.14.2, “Contents of GMP.”