diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/mini-gmp | 45 |
1 files changed, 19 insertions, 26 deletions
diff --git a/doc/mini-gmp b/doc/mini-gmp index 1a98996d9..14c1bc00a 100644 --- a/doc/mini-gmp +++ b/doc/mini-gmp @@ -1,13 +1,12 @@ How to compile GNU MPFR with mini-gmp ===================================== -(this was tested with MPFR 3.1.2 and GMP 5.1.3 on x86_64 GNU/Linux machine) -(also with MPFR svn 9700 and GMP 6.1.0-rc1: some GMP functions are missing) +(this was tested with MPFR svn 9703 and GMP 6.1.0-rc1 on x86_64 GNU/Linux) -1) extract the GMP tarball in say /tmp/gmp-5.1.3 - go into /tmp/gmp-5.1.3/mini-gmp - add the following line in mini-gmp.c (say at line 43): - char gmp_version[] = "5.1.3"; +1) extract the GMP tarball in say /tmp/gmp-6.1.0-rc1 + go into /tmp/gmp-6.1.0-rc1/mini-gmp + add the following line in mini-gmp.c (say at line 53): + char gmp_version[] = "6.1.0"; gcc -O2 -g -fPIC -c mini-gmp.c ar r libgmp.a mini-gmp.o @@ -17,30 +16,24 @@ How to compile GNU MPFR with mini-gmp mv libgmp.a /tmp/lib cp mini-gmp.h /tmp/include/gmp.h -3) do the following changes in /tmp/include/gmp.h: - -$ diff gmp.h.orig gmp.h -29a30,35 -> #define __GNU_MP_VERSION 5 -> #define __GNU_MP_VERSION_MINOR 1 -> #define __GNU_MP_VERSION_PATCHLEVEL 3 -> -> extern char gmp_version[]; -> -34a41,46 -> #endif -> -> /* random generation functions */ -> #ifndef gmp_randstate_t -> typedef long int __gmp_randstate_struct; -> typedef __gmp_randstate_struct gmp_randstate_t[1]; - -You also need to define GMP_NUMB_BITS and GMP_NAIL_BITS, for example: +3) add the following in /tmp/include/gmp.h: + +#define __GNU_MP_VERSION 6 +#define __GNU_MP_VERSION_MINOR 1 +#define __GNU_MP_VERSION_PATCHLEVEL 0 #define GMP_NUMB_BITS 64 #define GMP_NAIL_BITS 0 -4) extract the MPFR tarball in say /tmp/mpfr-3.1.2 +extern char gmp_version[]; + +/* random generation functions */ +#ifndef gmp_randstate_t +typedef long int __gmp_randstate_struct; +typedef __gmp_randstate_struct gmp_randstate_t[1]; +#endif + +4) extract the MPFR tarball in say /tmp/mpfr ./configure --with-gmp=/tmp --enable-mini-gmp Note: to use this version of the MPFR library, you need to define |