diff options
author | mjl <mjl> | 2002-08-24 00:39:06 +0000 |
---|---|---|
committer | mjl <mjl> | 2002-08-24 00:39:06 +0000 |
commit | 0bf3bed1caf79fd5047ada0a9db0a7e728b29b49 (patch) | |
tree | f6a8dcd2d946d310b66bfbc325955cbdf182fce0 | |
parent | 36e79b7af69252a9b1e3debc12e882c98891a9d5 (diff) | |
download | pkgsrc-0bf3bed1caf79fd5047ada0a9db0a7e728b29b49.tar.gz |
Update to 4.1
* Bug fixes.
* Speed improvements.
* Upwardly binary compatible with 4.0, 4.0.1, and 3.x versions.
* Asymptotically fast conversion to/from strings (mpz, mpq, mpn levels), but
also major speed improvements for tiny operands.
* mpn_get_str parameter restrictions relaxed.
* Major speed improvments for HPPA 2.0 systems.
* Major speed improvments for UltraSPARC systems.
* Major speed improvments for IA-64 systems (but still sub-optimal code).
* Extended test suite.
* mpfr is back, with many bug fixes and portability improvements.
* New function: mpz_ui_sub.
* New functions: mpz_export, mpz_import.
* Optimization for nth root functions (mpz_root, mpz_perfect_power_p).
* Optimization for extended gcd (mpz_gcdext, mpz_invert, mpn_gcdext).
* Generalized low-level number format, reserving a `nails' part of each
limb. (Please note that this is really experimental; some functions
are likely to compute garbage when nails are enabled.)
* Nails-enabled Alpha 21264 assembly code, allowing up to 75% better
performance. (Use --enable-nails=4 to enable it.)
-rw-r--r-- | devel/gmp/Makefile | 8 | ||||
-rw-r--r-- | devel/gmp/PLIST | 10 | ||||
-rw-r--r-- | devel/gmp/buildlink.mk | 4 | ||||
-rw-r--r-- | devel/gmp/distinfo | 11 | ||||
-rw-r--r-- | devel/gmp/patches/patch-aa | 33 | ||||
-rw-r--r-- | devel/gmp/patches/patch-ga | 25 | ||||
-rw-r--r-- | devel/gmp/patches/patch-gb | 33 | ||||
-rw-r--r-- | devel/gmp/patches/patch-gc | 27 | ||||
-rw-r--r-- | devel/gmp/patches/patch-gd | 30 |
9 files changed, 133 insertions, 48 deletions
diff --git a/devel/gmp/Makefile b/devel/gmp/Makefile index e4499f3dfa8..e58dc018035 100644 --- a/devel/gmp/Makefile +++ b/devel/gmp/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.12 2002/04/12 14:12:18 jschauma Exp $ +# $NetBSD: Makefile,v 1.13 2002/08/24 00:39:06 mjl Exp $ # -DISTNAME= gmp-4.0.1 +DISTNAME= gmp-4.1 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_GNU:=gmp/} @@ -13,9 +13,9 @@ BUILD_DEPENDS+= m4-1.4:../../devel/m4 USE_BUILDLINK_ONLY= YES GNU_CONFIGURE= YES -CONFIGURE_ARGS+= --enable-cxx +CONFIGURE_ARGS+= --enable-cxx --without-readline USE_LIBTOOL= YES -LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig +LIBTOOL_OVERRIDE= ${WRKSRC}/libtool M4= ${PREFIX}/bin/gm4 INFO_FILES= gmp.info diff --git a/devel/gmp/PLIST b/devel/gmp/PLIST index 699c97d3d33..832e186873b 100644 --- a/devel/gmp/PLIST +++ b/devel/gmp/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.4 2002/04/12 14:12:18 jschauma Exp $ +@comment $NetBSD: PLIST,v 1.5 2002/08/24 00:39:06 mjl Exp $ include/gmp.h include/gmpxx.h @unexec ${INSTALL_INFO} --delete --info-dir=%D/info %D/info/gmp.info @@ -15,10 +15,10 @@ info/gmp.info-8 lib/libgmp.a lib/libgmp.la lib/libgmp.so -lib/libgmp.so.5 -lib/libgmp.so.5.1 +lib/libgmp.so.6.0 +lib/libgmp.so.6 +lib/libgmpxx.so.3.2 +lib/libgmpxx.so.3 lib/libgmpxx.a lib/libgmpxx.la lib/libgmpxx.so -lib/libgmpxx.so.3 -lib/libgmpxx.so.3.1 diff --git a/devel/gmp/buildlink.mk b/devel/gmp/buildlink.mk index 3c587e4d081..bf584979b73 100644 --- a/devel/gmp/buildlink.mk +++ b/devel/gmp/buildlink.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink.mk,v 1.7 2001/07/27 13:33:23 jlam Exp $ +# $NetBSD: buildlink.mk,v 1.8 2002/08/24 00:39:06 mjl Exp $ # # This Makefile fragment is included by packages that use gmp. # @@ -17,7 +17,7 @@ GMP_BUILDLINK_MK= # defined .include "../../mk/bsd.buildlink.mk" -BUILDLINK_DEPENDS.gmp?= gmp>=3.0 +BUILDLINK_DEPENDS.gmp?= gmp>=4.1 DEPENDS+= ${BUILDLINK_DEPENDS.gmp}:../../devel/gmp EVAL_PREFIX+= BUILDLINK_PREFIX.gmp=gmp diff --git a/devel/gmp/distinfo b/devel/gmp/distinfo index 050ffae21bc..1b7daa60dfc 100644 --- a/devel/gmp/distinfo +++ b/devel/gmp/distinfo @@ -1,5 +1,8 @@ -$NetBSD: distinfo,v 1.4 2002/05/10 05:06:22 fredb Exp $ +$NetBSD: distinfo,v 1.5 2002/08/24 00:39:06 mjl Exp $ -SHA1 (gmp-4.0.1.tar.gz) = 3ead9745123e1324c0f0ab9985d4cb28b6d74655 -Size (gmp-4.0.1.tar.gz) = 1745294 bytes -SHA1 (patch-aa) = 01e298efa337dec5e92e9376f369128cf481fbf0 +SHA1 (gmp-4.1.tar.gz) = 6385fdfda2da9bd8c47256f5766b917f767c181b +Size (gmp-4.1.tar.gz) = 2145387 bytes +SHA1 (patch-ga) = 59b4b5cca8a78c3220b35b5abdbe9354f0c9865e +SHA1 (patch-gb) = fc15a237f4bfc74aec382b3926dbfa1a224b7480 +SHA1 (patch-gc) = 811a6e3ce6691ce63338ca6283ba589db3ed6c84 +SHA1 (patch-gd) = 771fa505e8d2c8eed1e8c09f3d340c461ab350df diff --git a/devel/gmp/patches/patch-aa b/devel/gmp/patches/patch-aa deleted file mode 100644 index 91488883c57..00000000000 --- a/devel/gmp/patches/patch-aa +++ /dev/null @@ -1,33 +0,0 @@ -$NetBSD: patch-aa,v 1.7 2002/05/10 05:06:23 fredb Exp $ - ---- longlong.h.orig Thu Nov 15 14:48:14 2001 -+++ longlong.h -@@ -734,8 +734,8 @@ - #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ - __asm__ ("add%.l %5,%1\n\taddx%.l %3,%0" \ - : "=d" ((USItype)(sh)), "=&d" ((USItype)(sl)) \ -- : "%0" ((USItype)(ah)), "d" ((USItype)(bh)), \ -- "%1" ((USItype)(al)), "g" ((USItype)(bl))) -+ : "0" ((USItype)(ah)), "d" ((USItype)(bh)), \ -+ "1" ((USItype)(al)), "g" ((USItype)(bl))) - #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ - __asm__ ("sub%.l %5,%1\n\tsubx%.l %3,%0" \ - : "=d" ((USItype)(sh)), "=&d" ((USItype)(sl)) \ -@@ -750,7 +750,7 @@ - #define umul_ppmm(w1, w0, u, v) \ - __asm__ ("mulu%.l %3,%1:%0" \ - : "=d" ((USItype)(w0)), "=d" ((USItype)(w1)) \ -- : "%0" ((USItype)(u)), "dmi" ((USItype)(v))) -+ : "0" ((USItype)(u)), "dmi" ((USItype)(v))) - #define UMUL_TIME 45 - #define udiv_qrnnd(q, r, n1, n0, d) \ - __asm__ ("divu%.l %4,%1:%0" \ -@@ -788,7 +788,7 @@ - " | End inlined umul_ppmm" \ - : "=&d" ((USItype)(xh)), "=&d" ((USItype)(xl)), \ - "=d" (__umul_tmp1), "=&d" (__umul_tmp2) \ -- : "%2" ((USItype)(a)), "d" ((USItype)(b))); \ -+ : "2" ((USItype)(a)), "d" ((USItype)(b))); \ - } while (0) - #define UMUL_TIME 100 - #define UDIV_TIME 400 diff --git a/devel/gmp/patches/patch-ga b/devel/gmp/patches/patch-ga new file mode 100644 index 00000000000..7cdd5c4d35e --- /dev/null +++ b/devel/gmp/patches/patch-ga @@ -0,0 +1,25 @@ +$NetBSD: patch-ga,v 1.1 2002/08/24 00:39:07 mjl Exp $ + +This is a patch for 4.1 from the GNU MP Homepage, it should be +removed in future versions + +Index: randraw.c +=================================================================== +RCS file: /home/cvsfiles/gmp/randraw.c,v +retrieving revision 1.18 +retrieving revision 1.19 +diff -u -r1.18 -r1.19 +--- randraw.c 2002/05/14 16:59:44 1.18 ++++ randraw.c 2002/06/09 08:12:03 1.19 +@@ -112,10 +112,8 @@ + if (seedn == 0) + { + /* Seed is 0. Result is C % M. Assume table is sensibly stored, +- with C smaller than M*/ ++ with C smaller than M. */ + *rp = c; +- +- ASSERT_ALWAYS (((mp_limb_t) 1 << m2exp) > c); + + *seedp = c; + SIZ (rstate->_mp_seed) = 1; diff --git a/devel/gmp/patches/patch-gb b/devel/gmp/patches/patch-gb new file mode 100644 index 00000000000..d65b0ad2a25 --- /dev/null +++ b/devel/gmp/patches/patch-gb @@ -0,0 +1,33 @@ +$NetBSD: patch-gb,v 1.1 2002/08/24 00:39:07 mjl Exp $ + +This is a patch for 4.1 from the GNU MP Homepage, it should be +removed in future versions + +--- mpz/powm_ui.c.~1.16.~ Thu May 16 09:20:49 2002 ++++ mpz/powm_ui.c Sat Jun 1 10:41:34 2002 +@@ -115,6 +115,17 @@ + + /* Main loop. */ + ++ /* If m is already normalized (high bit of high limb set), and b is the ++ same size, but a bigger value, and e==1, then there's no modular ++ reductions done and we can end up with a result out of range at the ++ end. */ ++ if (c == 0) ++ { ++ if (xn == mn && mpn_cmp (xp, mp, mn) >= 0) ++ mpn_sub_n (xp, xp, mp, mn); ++ goto finishup; ++ } ++ + while (c != 0) + { + mpn_sqr_n (tp, xp, xn); +@@ -149,6 +160,7 @@ + c--; + } + ++ finishup: + /* We shifted m left m_zero_cnt steps. Adjust the result by reducing + it with the original MOD. */ + if (m_zero_cnt != 0) diff --git a/devel/gmp/patches/patch-gc b/devel/gmp/patches/patch-gc new file mode 100644 index 00000000000..00a77a4bff8 --- /dev/null +++ b/devel/gmp/patches/patch-gc @@ -0,0 +1,27 @@ +$NetBSD: patch-gc,v 1.1 2002/08/24 00:39:08 mjl Exp $ + +This is a patch for 4.1 from the GNU MP Homepage, it should be +removed in future versions + +--- mpf/inp_str.c.old Tue Jan 2 18:53:42 2001 ++++ mpf/inp_str.c Wed Jul 3 10:57:33 2002 +@@ -64,6 +64,7 @@ + c = getc (stream); + } + ungetc (c, stream); ++ nread--; + + if (str_size >= alloc_size) + { +@@ -74,9 +75,10 @@ + str[str_size] = 0; + + retval = mpf_set_str (rop, str, base); ++ (*__gmp_free_func) (str, alloc_size); ++ + if (retval == -1) + return 0; /* error */ + +- (*__gmp_free_func) (str, alloc_size); + return str_size + nread; + } diff --git a/devel/gmp/patches/patch-gd b/devel/gmp/patches/patch-gd new file mode 100644 index 00000000000..c2a30d496e8 --- /dev/null +++ b/devel/gmp/patches/patch-gd @@ -0,0 +1,30 @@ +$NetBSD: patch-gd,v 1.1 2002/08/24 00:39:08 mjl Exp $ + +This is a patch for 4.1 from the GNU MP Homepage, it should be +removed in future versions + +--- gmpxx.h.old Wed Jul 3 10:45:48 2002 ++++ gmpxx.h Wed Jul 3 10:49:28 2002 +@@ -2633,10 +2633,18 @@ + } + + // conversion functions +- const mpz_classref get_num() const { return mpz_classref(mpq_numref(mp)); } +- mpz_classref get_num() { return mpz_classref(mpq_numref(mp)); } +- const mpz_classref get_den() const { return mpz_classref(mpq_denref(mp)); } +- mpz_classref get_den() { return mpz_classref(mpq_denref(mp)); } ++ ++ // casting a reference to an mpz_t to mpz_class & is a dirty hack, ++ // but works because the internal representation of mpz_class is ++ // exactly an mpz_t ++ const mpz_class & get_num() const ++ { return reinterpret_cast<const mpz_class &>(*mpq_numref(mp)); } ++ mpz_class & get_num() ++ { return reinterpret_cast<mpz_class &>(*mpq_numref(mp)); } ++ const mpz_class & get_den() const ++ { return reinterpret_cast<const mpz_class &>(*mpq_denref(mp)); } ++ mpz_class & get_den() ++ { return reinterpret_cast<mpz_class &>(*mpq_denref(mp)); } + + mpq_srcptr get_mpq_t() const { return mp; } + mpq_ptr get_mpq_t() { return mp; } |