summaryrefslogtreecommitdiff
path: root/doc/mini-gmp
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2015-10-29 08:31:48 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2015-10-29 08:31:48 +0000
commit055f887fb71ed9d3d7a4877c461918a7c8e55cc8 (patch)
tree6294f3be786cad6be2c403e68e23001725122ebd /doc/mini-gmp
parent1ed2b6314fec9b90854669a4ff52e5fdfdb7694c (diff)
downloadmpfr-055f887fb71ed9d3d7a4877c461918a7c8e55cc8.tar.gz
adapt for mini-gmp (from GMP 6.1.0-rc1)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9703 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'doc/mini-gmp')
-rw-r--r--doc/mini-gmp45
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