GMP - Anonymous1157/cross-compilers GitHub Wiki

The order in which these libraries are built is important! GMP comes first before MPC, MPFR, or ISL.

Extract the tarball somewhere and create a folder outside of the source directory.

tar xf path/to/gmp-6.1.2.tar.xz
mkdir gmp-build

Configure GMP.

cd gmp-build
../gmp-6.1.2/configure --prefix="$HOME/.local/share/cross" --enable-shared --disable-static LDFLAGS="-Wl,-rpath=$HOME/.local/share/cross/lib"

Build and install GMP.

make -j8
make install