Skip to content
Snippets Groups Projects
Commit 8eecfc2e authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Upgrade gmp, 4.2.4 -> 5.0.2

parent 6e57e93d
No related branches found
No related tags found
No related merge requests found
Download linked from http://gmplib.org/
Untar.
Remove doc/ directory.
Apply patch.
Re-tar.
diff -ur before/memory.c after/memory.c
--- before/memory.c 2007-08-30 19:31:40.000000000 +0100
+++ after/memory.c 2009-06-21 19:12:39.000000000 +0100
diff -ur gmp-5.0.2.orig/Makefile.am gmp-5.0.2/Makefile.am
--- gmp-5.0.2.orig/Makefile.am 2011-05-08 10:49:29.000000000 +0100
+++ gmp-5.0.2/Makefile.am 2011-07-27 17:58:20.000000000 +0100
@@ -93,7 +93,7 @@
LIBMP_LT_AGE = 1
-SUBDIRS = tests mpn mpz mpq mpf printf scanf cxx mpbsd demos tune doc
+SUBDIRS = tests mpn mpz mpq mpf printf scanf cxx mpbsd demos tune
EXTRA_DIST = configfsf.guess configfsf.sub .gdbinit INSTALL.autoconf
diff -ur gmp-5.0.2.orig/Makefile.in gmp-5.0.2/Makefile.in
--- gmp-5.0.2.orig/Makefile.in 2011-05-08 10:49:35.000000000 +0100
+++ gmp-5.0.2/Makefile.in 2011-07-27 17:58:13.000000000 +0100
@@ -435,7 +435,7 @@
LIBMP_LT_CURRENT = 4
LIBMP_LT_REVISION = 22
LIBMP_LT_AGE = 1
-SUBDIRS = tests mpn mpz mpq mpf printf scanf cxx mpbsd demos tune doc
+SUBDIRS = tests mpn mpz mpq mpf printf scanf cxx mpbsd demos tune
# The ansi2knr setups for the build programs are the same as the normal
# automake ansi2knr rules, but using $(CC_FOR_BUILD) instead of $(CC).
diff -ur gmp-5.0.2.orig/configure gmp-5.0.2/configure
--- gmp-5.0.2.orig/configure 2011-05-08 10:49:33.000000000 +0100
+++ gmp-5.0.2/configure 2011-07-27 18:00:11.000000000 +0100
@@ -28478,7 +28478,7 @@
# FIXME: Upcoming version of autoconf/automake may not like broken lines.
# Right now automake isn't accepting the new AC_CONFIG_FILES scheme.
-ac_config_files="$ac_config_files Makefile mpbsd/Makefile mpf/Makefile mpn/Makefile mpq/Makefile mpz/Makefile printf/Makefile scanf/Makefile cxx/Makefile tests/Makefile tests/devel/Makefile tests/mpbsd/Makefile tests/mpf/Makefile tests/mpn/Makefile tests/mpq/Makefile tests/mpz/Makefile tests/rand/Makefile tests/misc/Makefile tests/cxx/Makefile doc/Makefile tune/Makefile demos/Makefile demos/calc/Makefile demos/expr/Makefile gmp.h:gmp-h.in mp.h:mp-h.in"
+ac_config_files="$ac_config_files Makefile mpbsd/Makefile mpf/Makefile mpn/Makefile mpq/Makefile mpz/Makefile printf/Makefile scanf/Makefile cxx/Makefile tests/Makefile tests/devel/Makefile tests/mpbsd/Makefile tests/mpf/Makefile tests/mpn/Makefile tests/mpq/Makefile tests/mpz/Makefile tests/rand/Makefile tests/misc/Makefile tests/cxx/Makefile tune/Makefile demos/Makefile demos/calc/Makefile demos/expr/Makefile gmp.h:gmp-h.in mp.h:mp-h.in"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -29665,7 +29665,6 @@
"tests/rand/Makefile") CONFIG_FILES="$CONFIG_FILES tests/rand/Makefile" ;;
"tests/misc/Makefile") CONFIG_FILES="$CONFIG_FILES tests/misc/Makefile" ;;
"tests/cxx/Makefile") CONFIG_FILES="$CONFIG_FILES tests/cxx/Makefile" ;;
- "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
"tune/Makefile") CONFIG_FILES="$CONFIG_FILES tune/Makefile" ;;
"demos/Makefile") CONFIG_FILES="$CONFIG_FILES demos/Makefile" ;;
"demos/calc/Makefile") CONFIG_FILES="$CONFIG_FILES demos/calc/Makefile" ;;
Only in gmp-5.0.2.orig: doc
diff -ur gmp-5.0.2.orig/memory.c gmp-5.0.2/memory.c
--- gmp-5.0.2.orig/memory.c 2011-05-08 10:49:29.000000000 +0100
+++ gmp-5.0.2/memory.c 2011-07-27 15:18:21.000000000 +0100
@@ -24,10 +24,21 @@
#include "gmp-impl.h"
+/* Patched for GHC: */
+void * stgAllocForGMP (size_t size_in_bytes);
+void * stgReallocForGMP (void *ptr, size_t old_size, size_t new_size);
+void stgDeallocForGMP (void *ptr, size_t size);
+
+void * (*__gmp_allocate_func) _PROTO ((size_t)) = stgAllocForGMP;
+void * (*__gmp_reallocate_func) _PROTO ((void *, size_t, size_t))
+void * (*__gmp_allocate_func) __GMP_PROTO ((size_t)) = stgAllocForGMP;
+void * (*__gmp_reallocate_func) __GMP_PROTO ((void *, size_t, size_t))
+ = stgReallocForGMP;
+void (*__gmp_free_func) _PROTO ((void *, size_t)) = stgDeallocForGMP;
+
+void (*__gmp_free_func) __GMP_PROTO ((void *, size_t)) = stgDeallocForGMP;
+/*
void * (*__gmp_allocate_func) _PROTO ((size_t)) = __gmp_default_allocate;
void * (*__gmp_reallocate_func) _PROTO ((void *, size_t, size_t))
void * (*__gmp_allocate_func) __GMP_PROTO ((size_t)) = __gmp_default_allocate;
void * (*__gmp_reallocate_func) __GMP_PROTO ((void *, size_t, size_t))
= __gmp_default_reallocate;
void (*__gmp_free_func) _PROTO ((void *, size_t)) = __gmp_default_free;
void (*__gmp_free_func) __GMP_PROTO ((void *, size_t)) = __gmp_default_free;
+*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment