blob: 12b31f58189dc270c8cba34c56b58ae280c72493 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
How to compile GNU MPFR with mini-gmp
=====================================
This was tested with MPFR svn 13047 and GMP 6.1.2 on x86_64 GNU/Linux:
============================================================================
Testsuite summary for MPFR 4.0.0-dev
============================================================================
# TOTAL: 183
# PASS: 173
# SKIP: 10
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
1) extract the GMP tarball in say /tmp/gmp-6.1.2
go into /tmp/gmp-6.1.2/mini-gmp
gcc -O2 -g -fPIC -c mini-gmp.c
ar r libgmp.a mini-gmp.o
2) create a GMP install directory in say /tmp
mkdir /tmp/include
mkdir /tmp/lib
cp libgmp.a /tmp/lib
cp mini-gmp.h /tmp/include/gmp.h
3) extract the MPFR tarball in say /tmp/mpfr
./configure --with-gmp=/tmp --enable-mini-gmp --disable-shared
Note: to use this version of the MPFR library, you need to define
the MPFR_USE_MINI_GMP macro before including mpfr.h (alternatively,
you can modify mpfr.h to define this macro at the beginning).
|