summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang Le <r0bertz@gentoo.org>2008-11-08 21:16:28 +0800
committerZhang Le <r0bertz@gentoo.org>2008-11-08 21:16:28 +0800
commitb14ecfe6a0a90668541fef4f68761734ef99adc6 (patch)
treeb2a98899d1500782eea771d703b52c02d512786a /dev-libs
parentfixed conditional dependency of gcc 4.4 (diff)
downloadloongson-b14ecfe6a0a90668541fef4f68761734ef99adc6.tar.gz
loongson-b14ecfe6a0a90668541fef4f68761734ef99adc6.tar.bz2
loongson-b14ecfe6a0a90668541fef4f68761734ef99adc6.zip
copied gmp from tree
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/gmp/ChangeLog404
-rw-r--r--dev-libs/gmp/Manifest27
-rw-r--r--dev-libs/gmp/files/4.2.2/mpf_set_str.c.diff38
-rw-r--r--dev-libs/gmp/files/gmp-4.1.4-noexecstack.patch20
-rw-r--r--dev-libs/gmp/files/gmp-4.2.1-s390.diff68
-rw-r--r--dev-libs/gmp/files/gmp-4.2.2-ABI-multilib.patch262
-rw-r--r--dev-libs/gmp/files/gmp-4.2.2-cstdio-stdfile.patch14
-rw-r--r--dev-libs/gmp/files/gmp-4.2.3-ABI-multilib.patch262
-rw-r--r--dev-libs/gmp/files/gmp-gcc4.4-mips.patch56
-rw-r--r--dev-libs/gmp/gmp-4.2.4.ebuild76
-rw-r--r--dev-libs/gmp/metadata.xml5
11 files changed, 1232 insertions, 0 deletions
diff --git a/dev-libs/gmp/ChangeLog b/dev-libs/gmp/ChangeLog
new file mode 100644
index 0000000..591979f
--- /dev/null
+++ b/dev-libs/gmp/ChangeLog
@@ -0,0 +1,404 @@
+# ChangeLog for dev-libs/gmp
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/gmp/ChangeLog,v 1.105 2008/09/25 04:03:40 vapier Exp $
+
+*gmp-4.2.4 (25 Sep 2008)
+
+ 25 Sep 2008; Mike Frysinger <vapier@gentoo.org> +gmp-4.2.4.ebuild:
+ Version bump.
+
+ 25 Aug 2008; Raúl Porcel <armin76@gentoo.org> gmp-4.2.2-r2.ebuild:
+ ia64 stable wrt #235292
+
+ 24 Aug 2008; Tobias Klausmann <klausman@gentoo.org> gmp-4.2.2-r2.ebuild:
+ Stable on alpha, bug #235292
+
+ 24 Aug 2008; Markus Rothe <corsair@gentoo.org> gmp-4.2.2-r2.ebuild:
+ Stable on ppc64; bug #235292
+
+ 22 Aug 2008; nixnut <nixnut@gentoo.org> gmp-4.2.2-r2.ebuild:
+ Stable on ppc wrt bug 235292
+
+ 21 Aug 2008; Friedrich Oslage <bluebird@gentoo.org> gmp-4.2.2-r2.ebuild:
+ Stable on sparc, bug #235292
+
+ 21 Aug 2008; Jeroen Roovers <jer@gentoo.org> gmp-4.2.2-r2.ebuild:
+ Stable for HPPA (bug #235292).
+
+ 20 Aug 2008; Markus Meier <maekke@gentoo.org> gmp-4.2.2-r2.ebuild:
+ amd64/x86 stable, bug #235292
+
+*gmp-4.2.3 (20 Aug 2008)
+
+ 20 Aug 2008; Mike Frysinger <vapier@gentoo.org>
+ +files/gmp-4.2.3-ABI-multilib.patch, +gmp-4.2.3.ebuild:
+ Version bump.
+
+*gmp-4.2.2-r2 (13 Jul 2008)
+
+ 13 Jul 2008; Peter Alfredsen <loki_val@gentoo.org> -gmp-4.2.2-r1.ebuild,
+ +gmp-4.2.2-r2.ebuild:
+ D'oh, a version bump is needed here, since it's the installed header
+ that's causing problems.
+
+ 12 Jul 2008; Peter Alfredsen <loki_val@gentoo.org>
+ +files/gmp-4.2.2-cstdio-stdfile.patch, gmp-4.2.2-r1.ebuild:
+ Fix include files for gcc-4.3 compat wrt bug #228915
+
+ 02 May 2008; Mike Frysinger <vapier@gentoo.org>
+ files/gmp-4.1.4-noexecstack.patch:
+ Redo how we add noexecstack since #if checks do not work in .s files.
+
+*gmp-4.2.2-r1 (02 May 2008)
+
+ 02 May 2008; Mike Frysinger <vapier@gentoo.org>
+ +files/4.2.2/mpf_set_str.c.diff, +gmp-4.2.2-r1.ebuild:
+ Add fix from upstream.
+
+ 26 Dec 2007; Samuli Suominen <drac@gentoo.org> gmp-4.2.2.ebuild:
+ amd64 stable wrt #202665
+
+ 24 Dec 2007; Brent Baude <ranger@gentoo.org> gmp-4.2.2.ebuild:
+ Marking gmp-4.2.2 ppc64 for bug 202665
+
+ 21 Dec 2007; nixnut <nixnut@gentoo.org> gmp-4.2.2.ebuild:
+ Stable on ppc wrt bug 202665
+
+ 19 Dec 2007; Raúl Porcel <armin76@gentoo.org> gmp-4.2.2.ebuild:
+ alpha/ia64/sparc/x86 stable wrt #202665
+
+ 18 Dec 2007; Jeroen Roovers <jer@gentoo.org> gmp-4.2.2.ebuild:
+ Stable for HPPA (bug #202665).
+
+*gmp-4.2.2 (12 Nov 2007)
+
+ 12 Nov 2007; Mike Frysinger <vapier@gentoo.org>
+ +files/gmp-4.2.2-ABI-multilib.patch, +gmp-4.2.2.ebuild:
+ Version bump #198851.
+
+*gmp-4.2.1-r1 (04 Apr 2007)
+
+ 04 Apr 2007; Mike Frysinger <vapier@gentoo.org>
+ files/gmp-4.1.4-noexecstack.patch, +files/4.2.1/mpz_set_d.diff,
+ +files/gmp-4.2.1-s390.diff, +files/4.2.1/gmpxx.h.ternary.diff,
+ +gmp-4.2.1-r1.ebuild:
+ Some more fixes from upstream and snipe a fix for s390x from SuSE.
+
+ 22 Feb 2007; Simon Stelling <blubb@gentoo.org> gmp-4.2.1.ebuild:
+ replace some more ABIs with GMPABI; fix taken from kanaka's auto-multilib
+ overlay
+
+ 20 Oct 2006; Bryan Østergaard <kloeri@gentoo.org> gmp-4.2.1.ebuild:
+ Stable on Alpha.
+
+ 18 Oct 2006; Roy Marples <uberlord@gentoo.org> gmp-4.2.1.ebuild:
+ Added ~sparc-fbsd keyword.
+
+ 29 Sep 2006; Mike Frysinger <vapier@gentoo.org> gmp-4.1.4.ebuild,
+ gmp-4.1.4-r1.ebuild, gmp-4.1.4-r2.ebuild, gmp-4.1.4-r3.ebuild,
+ gmp-4.2.ebuild, gmp-4.2.1.ebuild:
+ Dont filter -ffast-math; people who use this globally deserve what they get.
+
+ 16 Sep 2006; Markus Rothe <corsair@gentoo.org> gmp-4.2.1.ebuild:
+ Stable on ppc64
+
+ 03 Sep 2006; Joshua Kinard <kumba@gentoo.org> gmp-4.2.1.ebuild:
+ Marked stable on mips.
+
+ 31 Aug 2006; Gustavo Zacarias <gustavoz@gentoo.org> gmp-4.2.1.ebuild:
+ Stable on sparc
+
+ 30 Aug 2006; Chris Gianelloni <wolf31o2@gentoo.org> gmp-4.2.1.ebuild:
+ Stable on x86 for gcc 4.1.1 going stable.
+
+ 19 Aug 2006; Herbie Hopkins <herbs@gentoo.org> gmp-4.2.1.ebuild:
+ Stable on amd64.
+
+ 28 Jul 2006; Fabian Groffen <grobian@gentoo.org> gmp-4.1.4-r1.ebuild,
+ gmp-4.2.1.ebuild:
+ Marked 4.1.4-r1 ppc-macos stable (dependency of bug #139385), marked 4.2.1
+ ~ppc-macos
+
+ 27 Jun 2006; Luca Barbato <lu_zero@gentoo.org> gmp-4.2.1.ebuild:
+ Marked stable on ppc
+
+ 25 Jun 2006; Guy Martin <gmsoft@gentoo.org> gmp-4.2.1.ebuild:
+ Stable on hppa.
+
+*gmp-4.2.1 (18 Jun 2006)
+
+ 18 Jun 2006; Mike Frysinger <vapier@gentoo.org>
+ +files/4.2.1/aix.m4-RW.diff, +files/4.2.1/ia64-popcount.diff,
+ +files/gmp-4.2.1-ABI-multilib.patch, +files/4.2.1/configure-ppc.diff,
+ +files/4.2.1/x86-fat.diff, +gmp-4.2.1.ebuild:
+ Version bump #136824 by Nuno Lopes.
+
+ 23 Apr 2006; Markus Rothe <corsair@gentoo.org> gmp-4.2.ebuild:
+ gmp-4.1.4-ppc64-asm-dots.patch does not apply on top of 4.2, but is also no
+ longer needed: removed from ebuild
+
+*gmp-4.2 (10 Apr 2006)
+
+ 10 Apr 2006; Mike Frysinger <vapier@gentoo.org>
+ +files/gmp-4.2-ABI-multilib.patch, +gmp-4.2.ebuild:
+ Version bump #129007 by Raphael.
+
+ 30 Mar 2006; Diego Pettenò <flameeyes@gentoo.org> gmp-4.1.4-r3.ebuild:
+ Add ~x86-fbsd keyword.
+
+ 27 Feb 2006; Jeroen Roovers <jer@gentoo.org> gmp-4.1.4-r3.ebuild:
+ Stable on hppa (bug #121968).
+
+ 26 Feb 2006; Joshua Kinard <kumba@gentoo.org> gmp-4.1.4-r3.ebuild:
+ Marked stable on mips.
+
+ 17 Feb 2006; Michael Hanselmann <hansmi@gentoo.org> gmp-4.1.4-r3.ebuild:
+ Stable on ppc.
+
+ 15 Feb 2006; Markus Rothe <corsair@gentoo.org> gmp-4.1.4-r3.ebuild:
+ Stable on ppc64; bug #121968
+
+ 14 Feb 2006; Fabian Groffen <grobian@gentoo.org> gmp-4.1.4-r1.ebuild:
+ Marked ~ppc-macos (bugs #89644, #122760)
+
+ 08 Feb 2006; Mark Loeser <halcy0n@gentoo.org> gmp-4.1.4-r3.ebuild:
+ Stable on x86; bug #121968
+
+ 08 Feb 2006; Patrick McLean <chutzpah@gentoo.org> gmp-4.1.4-r3.ebuild:
+ Stable on amd64 (bug #121968).
+
+ 08 Feb 2006; Gustavo Zacarias <gustavoz@gentoo.org> gmp-4.1.4-r3.ebuild:
+ Stable on sparc wrt #121968
+
+ 03 Feb 2006; Aron Griffis <agriffis@gentoo.org> gmp-4.1.4-r3.ebuild:
+ Mark 4.1.4-r3 stable on ia64
+
+ 03 Feb 2006; Mike Frysinger <vapier@gentoo.org>
+ +files/gmp-4.1.4-asm-dots.patch:
+ Add missing patch #121290 by Markus Rothe.
+
+*gmp-4.1.4-r3 (29 Jan 2006)
+
+ 29 Jan 2006; Mike Frysinger <vapier@gentoo.org>
+ +files/gmp-4.1.4-ABI-multilib.patch, +files/gmp-4.1.4-noexecstack.patch,
+ +files/gmp-4.1.4-ppc64-asm-dots.patch, +gmp-4.1.4-r3.ebuild:
+ Rewrite patches to not require autotools since we need gcc-4.x to DEPEND on
+ gmp.
+
+ 29 Dec 2005; Daniel Black <dragonheart@gentoo.org>
+ +files/gmp-4.1.4-nostackexec.patch, gmp-4.1.4-r2.ebuild:
+ fixed executable stack as per bug #115038 thanks to Petteri Raty
+
+*gmp-4.1.4-r2 (19 Oct 2005)
+
+ 19 Oct 2005; Mike Frysinger <vapier@gentoo.org> +files/gmp-hppa-2.0.patch,
+ +files/4.1.4/gmp-impl.h.MPF_SIGNIFICANT_DIGITS.diff,
+ +files/4.1.4/gmp-impl.h.x86.ULONG_PARITY.diff,
+ +files/4.1.4/gmp-impl.h.MPN_SIZEINBASE.diff,
+ +files/4.1.4/mpn_rootrem.c.diff, +gmp-4.1.4-r2.ebuild:
+ Add more patches from upstream, track down the hppa issues, and fork mpfr
+ into a sep package like upstream suggests.
+
+ 18 Oct 2005; Guy Martin <gmsoft@gentoo.org> gmp-4.1.4.ebuild,
+ gmp-4.1.4-r1.ebuild:
+ Forced the usage ot GMPABI 1.0 on hppa. ABI 2.0w is not supported by GNU AS
+ yet.
+
+ 09 Oct 2005; Marcus D. Hanwell <cryos@gentoo.org> gmp-4.1.4-r1.ebuild:
+ Add doc USE flag, thanks to Lucas Chiesa <lucas.chiesa@gmail.com> for the
+ patch, closes bug 80031.
+
+*gmp-4.1.4-r1 (14 Aug 2005)
+
+ 14 Aug 2005; Diego Pettenò <flameeyes@gentoo.org> +gmp-4.1.4-r1.ebuild:
+ Don't build BSD's mp compatibility on FreeBSD libc (already present, would
+ break system).
+
+ 21 Apr 2005; Daniel Black <dragonheart@gentoo.org> gmp-4.1.4.ebuild:
+ Updated minium libtool version as per bug #88616. Thanks Andrew Cowie
+ <andrew@operationaldynSPAMLESSamics.com>
+
+ 15 Feb 2005; Jeremy Huddleston <eradicator@gentoo.org> gmp-4.1.4.ebuild:
+ Fix bug #79662. Always apply ${ABI} patch, and always rerun autoreconf.
+
+ 15 Feb 2005; Daniel Black <dragonheart@gentoo.org> -files/longlong.patch,
+ -files/randraw.c.41.diff, -gmp-4.1.2.ebuild, -gmp-4.1.3.ebuild,
+ gmp-4.1.4.ebuild:
+ Cleaned out old versions. Fixed 4.1.4 with ABI=standard as suggested by Leo
+ Laursen <ll_news@stofanet.dk> in bug #81913. amd64 considerations as per
+ bug #79662.
+
+ 27 Jan 2005; Jeremy Huddleston <eradicator@gentoo.org>
+ +files/gmp-4.1.4-multilib.patch, gmp-4.1.4.ebuild:
+ Multilib fixes and libtoolize --copy --force. No bump since it just affects
+ compilation.
+
+ 21 Dec 2004; Bryan Østergaard <kloeri@gentoo.org> gmp-4.1.4.ebuild:
+ Stable on alpha.
+
+ 20 Dec 2004; Dylan Carlson <absinthe@gentoo.org> gmp-4.1.4.ebuild:
+ Stable on amd64.
+
+ 16 Dec 2004; Gustavo Zacarias <gustavoz@gentoo.org> gmp-4.1.4.ebuild:
+ Stable on sparc
+
+ 28 Nov 2004; Simon Stelling <blubb@gentoo.org> +files/amd64.patch,
+ gmp-4.1.4.ebuild:
+ added a patch to fix -O3 and higher
+ issues; bug #66780
+
+ 07 Nov 2004; Joshua Kinard <kumba@gentoo.org> gmp-4.1.4.ebuild:
+ Marked stable on mips.
+
+ 06 Nov 2004; Bryan Østergaard <kloeri@gentoo.org> gmp-4.1.3.ebuild:
+ Stable on alpha.
+
+ 01 Nov 2004; Lars Weiler <pylon@gentoo.org> gmp-4.1.4.ebuild:
+ Stable on ppc for PHP5, Bug #60442.
+
+ 19 Oct 2004; Dylan Carlson <absinthe@gentoo.org> gmp-4.1.3.ebuild:
+ Stable on amd64.
+
+ 18 Oct 2004; Gustavo Zacarias <gustavoz@gentoo.org> gmp-4.1.3.ebuild:
+ Stable on sparc
+
+*gmp-4.1.4 (14 Oct 2004)
+
+ 14 Oct 2004; Daniel Black <dragonheart@gentoo.org> -gmp-4.1-r1.ebuild,
+ gmp-4.1.3.ebuild, +gmp-4.1.4.ebuild:
+ version bump as per bug #67022. Thanks Thomas Weidner <3.14159@gmx.net>/ Clean
+ out old version. x86 keyword version 4.1.3
+
+ 19 Aug 2004; Tom Gall <tgall@gentoo.org> gmp-4.1.3.ebuild, +ppc64-gmp-acinclude.patch:
+ stable on ppc64
+
+ 01 Jul 2004; Jeremy Huddleston <eradicator@gentoo.org> gmp-4.1.2.ebuild,
+ gmp-4.1.3.ebuild:
+ virtual/glibc -> virtual/libc
+
+ 20 Jun 2004; Daniel Black <dragonheart@gentoo.org> gmp-4.1.2.ebuild,
+ gmp-4.1.3.ebuild, gmp-4.1-r1.ebuild:
+ changed m4 dependancy (bug #54131 thanks Scott Taylor
+ <swtaylor@gentoo.org>). Added src_test functions. gmp-4.1.2 added
+ dependancies. gmp-4.1.3 - reintroducted fft as it is fixed in this
+ version (ref homepage).
+
+ 11 May 2004; Michael McCabe <randy@gentoo.org> gmp-4.1.3.ebuild:
+ Added s390 keywords
+
+*gmp-4.1.3 (08 May 2004)
+
+ 08 May 2004; Daniel Black <dragonheart@gentoo.org> gmp-4.1-r1.ebuild,
+ gmp-4.1.2.ebuild, +gmp-4.1.3.ebuild:
+ QA fixes on 4.1-r1 and 4.1.2. Version bump thanks to Jory A. Pratt
+ <cyberspacecomputers@msn.com> in bug #50416
+
+ 03 Apr 2004; Guy Martin <gmsoft@gentoo.org> gmp-4.1.2.ebuild:
+ Marked stable on hppa. CHOST forced to hppa-unknown-linux-gnu to fix detection
+ of ABI.
+
+ 03 Apr 2004; Lars Weiler <pylon@gentoo.org> gmp-4.1.2.ebuild:
+ stable on ppc
+
+ 24 Mar 2004; Jason Wever <weeve@gentoo.org> gmp-4.1.2.ebuild:
+ Stable on sparc.
+
+ 22 Mar 2004; Chris Aniszczyk <zx@gentoo.org> gmp-4.1.2.ebuild, metadata.xml:
+ Added metadata.xml
+
+ 22 Mar 2004; Chris Aniszczyk <zx@gentoo.org> gmp-4.1.2.ebuild:
+ Added support for ~hppa ;)
+
+ 26 Feb 2004; Joshua Kinard <kumba@gentoo.org> gmp-4.1.2.ebuild:
+ Added ~mips to KEYWORDS to satisfy repoman deps.
+
+ 24 Feb 2004; Seemant Kulleen <seemant@gentoo.org> gmp-3.1.1-r1.ebuild,
+ gmp-4.1-r1.ebuild, gmp-4.1.2.ebuild:
+ Disabling fft, per bug #42549 by qube99@hotmail.com
+
+ 30 Jan 2004; Aron Griffis <agriffis@gentoo.org> gmp-4.1.2.ebuild:
+ stable on x86
+
+ 18 Jan 2004; Adrian Almenar <strider@gentoo.org> gmp-4.1.2.ebuild:
+ Added ia64 keyword.
+
+ 19 Oct 2003; Martin Holzer <mholzer@gentoo.org> gmp-4.1.2.ebuild:
+ corrected amd64 string. Closes #31436.
+
+ 16 Oct 2003; Daniel Robbins <drobbins@gentoo.org> : Added longlong.patch
+ submitted by Kenneth Ayers <kba114@psu.edu>. Unmasked on amd64. Thanks
+ Kenneth!
+
+ 15 Mar 2003; Martin Schlemmer <azarah@gentoo.org> :
+ Fix m4 DEPEND for m4-1.4 we are using now. Libtoolize.
+
+*gmp-4.1.2 (22 Feb 2003)
+
+ 09 Mar 2003; Aron Griffis <agriffis@gentoo.org> gmp-4.1.2.ebuild:
+ Mark stable on alpha
+
+ 02 Mar 2003; Seemant Kulleen <seemant@gentoo.org> gmp-4.1.2.ebuild:
+ filter out -ffast-math, closing bug #16284 by David Cozatt
+ <yggsdrasil@hotmail.com>
+
+ 23 Feb 2003; Aron Griffis <agriffis@gentoo.org> gmp-4.1.2.ebuild :
+ Only run "make check" when DEBUG is set
+
+ 22 Feb 2003; Aron Griffis <agriffis@gentoo.org> gmp-4.1.2.ebuild files/digest-gmp-4.1.2 :
+ Update to 4.1.2 to close bug #12473
+
+ 05 Feb 2003; Aron Griffis <agriffis@gentoo.org> gmp-4.1-r1.ebuild :
+ Mark stable on alpha
+
+ 14 Jan 2003: Jason Wever <weeve@gentoo.org> gmp-4.1-r1.ebuild :
+ Removed --enable-mpfr from configure options for sparc only as with it
+ enabled, gmp would not compile on sparc.
+
+ 17 Dec 2002; Aron Griffis <agriffis@gentoo.org> gmp-4.1-r1.ebuild :
+ Added ~alpha to KEYWORDS
+
+ 06 Dec 2002; Rodney Rees <manson@gentoo.org> : changed sparc ~sparc keywords
+
+*gmp-4.1-r1 (06 Jul 2002)
+
+ 14 Aug 2002; Pieter Van den Abeele <pvdabeel@gentoo.org> :
+ Added ppc keyword
+
+ 04 Aug 2002; Doug Goldstein <cardoe@gentoo.org> gmp-4.1-r1.ebuild :
+
+ seemant ./configure to econf and forgot to remove the params which are
+ automatically defined by econf so the package failed to compile on all
+ systems.
+
+ 01 Aug 2002; Stuart Bouyer <stubear@gentoo.org> gmp-4.1-r1.ebuild :
+
+ Changed emake to make - fixed bug #5857. Also added LICENSE, SLOT and
+ KEYWORDS for QA.
+
+ 06 Jul 2002; Aron Griffis <agriffis@gentoo.org> gmp-4.1-r1.ebuild:
+
+ Add patch to keep sawfish from dying left and right. The patch comes from
+ http://swox.com/gmp/#STATUS
+
+*gmp-4.1 (05 Jul 2002)
+
+ 05 Jul 2002; Nick Hadaway <raker@gentoo.org> gmp-4.1.ebuild:
+
+ Updated to latest version of gmp. Added a couple config options.
+ Removed nonexistant docs from ebuild.
+
+*gmp-3.1.1-r1 (27 Mar 2002)
+
+ 27 Mar 2002; Seemant Kulleen <seemant@gentoo.org> gmp-3.1.1-r1.ebuild :
+
+ Ungzipped HTML documentation.
+
+*gmp-3.1.1-r1 (1 Feb 2002)
+
+ 1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog :
+
+ Added initial ChangeLog which should be updated whenever the package is
+ updated in any way. This changelog is targetted to users. This means that the
+ comments should well explained and written in clean English. The details about
+ writing correct changelogs are explained in the skel.ChangeLog file which you
+ can find in the root directory of the portage repository.
diff --git a/dev-libs/gmp/Manifest b/dev-libs/gmp/Manifest
new file mode 100644
index 0000000..0f51e19
--- /dev/null
+++ b/dev-libs/gmp/Manifest
@@ -0,0 +1,27 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX 4.2.2/mpf_set_str.c.diff 1062 RMD160 455375f049ff8ef809e796441ec7a83ec648287b SHA1 8e5133ec2dbf4c19738faf90f8df5343cf2533f1 SHA256 245601a618cc7fd52e11495ace7d5183dc4822eb7e8089bb5175ec519fc786cd
+AUX gmp-4.1.4-noexecstack.patch 474 RMD160 22aa94eded1650432202b93a79900be1c85a779b SHA1 fd7ca0feb59aa319ba30bdbc71b7796a0a457d76 SHA256 68601777151a1628d7bc839eddd037685c5d2e76c9453166890a5eb3cf6000c3
+AUX gmp-4.2.1-s390.diff 1848 RMD160 04eecb2aaae4c444841e40b33abd38a662254632 SHA1 38ba90ffd6cd9d66e07c5f71b4608e3ad9d32a6b SHA256 13c6b01e71534af2c353d79b7afd171f158b8fa6e3299e0f7c0335e516ce67ec
+AUX gmp-4.2.2-ABI-multilib.patch 12425 RMD160 b30e1a237252663199457f5f020de7fb81118e2a SHA1 d716749bad6f7996f6862bc8468eb2c7b6c89c42 SHA256 deac10a8fd120e3b8d2a566c5babfea3cf7e6ecf6cc234fe7787b4ffecacb521
+AUX gmp-4.2.2-cstdio-stdfile.patch 263 RMD160 53e172ee3824899f765eee3ea8a042ac59b18b7e SHA1 5c8ec47a99c2652c466df3b9a281852c59fc3565 SHA256 469816f18dc19de304e932304c78f01f54b8960b98dd27bd10a984a0f515e733
+AUX gmp-4.2.3-ABI-multilib.patch 12456 RMD160 d225bac7ea2d152bfecf8ce3b887b35a70f09eb4 SHA1 8b9ec5d278db0d1c925c8eff337126c4f9986547 SHA256 5656454b0330686984e012129c0d5889ab9d161e514d69de34b5a2eaa7383d6a
+DIST gmp-4.2.2.tar.bz2 1747068 RMD160 4021720f78b02244197c0c49522289e7fe81aad9 SHA1 8c5f9798956f9b0162a25a56477a3566a92abc72 SHA256 2b2c0aacafa2dc41f4604b381349d49596921e38a58bf782b0d70b33f548657b
+DIST gmp-4.2.3.tar.bz2 1710314 RMD160 01d73df59ae87bff995dd4cf3f20788627715a5e SHA1 0106bae14a96d13819a0833e9938a994df230d3b SHA256 139b5abc49833832184c0a03ff6fc64c59ef102b420d2a5884ad78af5647414b
+DIST gmp-4.2.4.tar.bz2 1710660 RMD160 15c6c40c377088a3bcf9d432bcc27c777991cb12 SHA1 bb721f94fbeeb8c609104540b408da6707c370ec SHA256 5420b0e558a69a53b36f2b2c70a69f547e075d98366a585fc80cbbcce1efe368
+DIST gmp-man-4.2.2.pdf 1002466 RMD160 20b37f581d5c993fcc3e092123d5554efc8b2a81 SHA1 706dfd027e208b089f95bf9ff494d298dfa5b4b7 SHA256 44a5dcfbf1bef54c5244e2a1960c479e18b9740849daffb844472c60bc8e962c
+DIST gmp-man-4.2.3.pdf 994860 RMD160 5f83d5b6149986452de81cb6a3ba126592ff4b06 SHA1 f1f9fafc64435bfa2746b719ed867bf3c30a8238 SHA256 a623c8fd4e5993e35c68e8abff8e8533385eed5aede4e4f15d9a338cbf9f26a4
+EBUILD gmp-4.2.2-r2.ebuild 2116 RMD160 a218a7d342b4741df1fe685558fcd061a4d6fd76 SHA1 d228c5901c10a98a412f3b278fd9fca113781f35 SHA256 b98d3505f6f53db1ab1cce702ceb0aa6054f7f2c15d031673d381e90dfff054c
+EBUILD gmp-4.2.2.ebuild 2058 RMD160 907d052000da0d202e660d1d848495851da11d8b SHA1 aad3a4dda5bd8f35c27a0fc2d340c69df9312c3c SHA256 1c9b5dc08b6dafa0164783858f992e42c10699a051eb249e578acc10f6b79120
+EBUILD gmp-4.2.3.ebuild 2144 RMD160 8efd6a872d2d21b331eee83b5e6c14512f14c082 SHA1 26b8e415be1db3d3bc0e01ec9c83271d21f6cc60 SHA256 306ccfb576ed83852920c98467f67c150a628be66b40408c62648a029fd81c47
+EBUILD gmp-4.2.4.ebuild 2085 RMD160 5407a711f6292476b3807b6abec352ab3c14ff10 SHA1 e701666e5c57e475ed4432b94df35797862a4d74 SHA256 246e49a6e32900c3e8adff2cc2e9d141802a873083b1de90ba6774507987153a
+MISC ChangeLog 14297 RMD160 e93a4ed427da9c758d52dd9fe88d1bf009545412 SHA1 3d91c12bb5bae1396abafea481ce9a49383317c6 SHA256 dcb37a74e2c73e8820721fae07c4f77593a9919ebbcf8bf63b753575599c69d5
+MISC metadata.xml 162 RMD160 d002486a43522f2116b1d9d59828c484956d66e2 SHA1 d6b4923897f6ae673b4f93646f5b4ba61d5a2c3c SHA256 65a915d44de1f01d4b7f72d313b4192c38374a9835d24988c00c1e73dca5805a
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.9 (GNU/Linux)
+
+iEYEARECAAYFAkjbDaIACgkQ67wieSYcaxd4HwCg2nvmYOuRp80JV4FpGpDbKafd
+VRUAnRYBjtL24vuTfn215ImiwgAJRp+H
+=0y9z
+-----END PGP SIGNATURE-----
diff --git a/dev-libs/gmp/files/4.2.2/mpf_set_str.c.diff b/dev-libs/gmp/files/4.2.2/mpf_set_str.c.diff
new file mode 100644
index 0000000..9ea58b9
--- /dev/null
+++ b/dev-libs/gmp/files/4.2.2/mpf_set_str.c.diff
@@ -0,0 +1,38 @@
+*** mpf/set_str.c 30 Aug 2007 18:19:41 -0000
+--- mpf/set_str.c 10 Dec 2007 04:47:18 -0000
+*************** mpf_set_str (mpf_ptr x, const char *str,
+*** 272,277 ****
+
+ if (expptr != 0)
+! /* FIXME: Should do some error checking here. */
+! exp_in_base = strtol (expptr, (char **) 0, exp_base);
+ else
+ exp_in_base = 0;
+--- 272,298 ----
+
+ if (expptr != 0)
+! {
+! /* Scan and convert the exponent, in base exp_base. */
+! long dig, neg = -(long) ('-' == expptr[0]);
+! expptr -= neg; /* conditional increment */
+! c = (unsigned char) *expptr++;
+! dig = digit_value[c];
+! if (dig >= exp_base)
+! {
+! TMP_FREE;
+! return -1;
+! }
+! exp_in_base = dig;
+! c = (unsigned char) *expptr++;
+! dig = digit_value[c];
+! while (dig < exp_base)
+! {
+! exp_in_base = exp_in_base * exp_base;
+! exp_in_base += dig;
+! c = (unsigned char) *expptr++;
+! dig = digit_value[c];
+! }
+! exp_in_base = (exp_in_base ^ neg) - neg; /* conditional negation */
+! }
+ else
+ exp_in_base = 0;
diff --git a/dev-libs/gmp/files/gmp-4.1.4-noexecstack.patch b/dev-libs/gmp/files/gmp-4.1.4-noexecstack.patch
new file mode 100644
index 0000000..093bec1
--- /dev/null
+++ b/dev-libs/gmp/files/gmp-4.1.4-noexecstack.patch
@@ -0,0 +1,20 @@
+fixed executable stack
+
+http://bugs.gentoo.org/115038
+
+--- gmp-4.1.4/configure
++++ gmp-4.1.4/configure
+@@ -21689,6 +21689,13 @@
+ fi
+ echo "')" >> $gmp_configm4
+ echo "define(\`__CONFIG_M4_INCLUDED__')" >> $gmp_configm4
++# Gentoo hack
++case $host_os in
++ *linux*)
++ echo '.section .note.GNU-stack,"",%progbits' >> $gmp_configm4
++ echo '.previous' >> $gmp_configm4
++ ;;
++esac
+
+ # Create Makefiles
+ # FIXME: Upcoming version of autoconf/automake may not like broken lines.
diff --git a/dev-libs/gmp/files/gmp-4.2.1-s390.diff b/dev-libs/gmp/files/gmp-4.2.1-s390.diff
new file mode 100644
index 0000000..82dbb72
--- /dev/null
+++ b/dev-libs/gmp/files/gmp-4.2.1-s390.diff
@@ -0,0 +1,68 @@
+stolen from SuSE
+
+--- configure.in
++++ configure.in
+@@ -1050,6 +1050,9 @@
+ ;;
+
+
++ s390x-*-*)
++ path="s390x" ;;
++
+ # IBM s/370 and similar
+ [s3[6-9]0*-*-*])
+ gcc_cflags="-O2 $fomit_frame_pointer"
+--- configure
++++ configure
+@@ -1050,6 +1050,9 @@
+ ;;
+
+
++ s390x-*-*)
++ path="s390x" ;;
++
+ # IBM s/370 and similar
+ s3[6-9]0*-*-*)
+ gcc_cflags="-O2 $fomit_frame_pointer"
+--- mpn/s390/gmp-mparam.h
++++ mpn/s390/gmp-mparam.h
+@@ -20,7 +20,8 @@
+ MA 02110-1301, USA. */
+
+
+-/* BITS_PER_MP_LIMB etc generated by configure */
++#define BITS_PER_MP_LIMB 32
++#define BYTES_PER_MP_LIMB 4
+
+
+ /* Generated by tuneup.c, 2001-12-03, gcc 2.95 */
+--- mpn/s390x/gmp-mparam.h
++++ mpn/s390x/gmp-mparam.h
+@@ -0,0 +1,27 @@
++/* gmp-mparam.h -- Compiler/machine parameter header file.
++
++Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
++
++This file is part of the GNU MP Library.
++
++The GNU MP Library is free software; you can redistribute it and/or modify
++it under the terms of the GNU Library General Public License as published by
++the Free Software Foundation; either version 2 of the License, or (at your
++option) any later version.
++
++The GNU MP Library is distributed in the hope that it will be useful, but
++WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
++or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
++License for more details.
++
++You should have received a copy of the GNU Library General Public License
++along with the GNU MP Library; see the file COPYING.LIB. If not, write to
++the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
++MA 02111-1307, USA. */
++
++#define BITS_PER_MP_LIMB 64
++#define BYTES_PER_MP_LIMB 8
++#define BITS_PER_LONGINT 64
++#define BITS_PER_INT 32
++#define BITS_PER_SHORTINT 16
++#define BITS_PER_CHAR 8
diff --git a/dev-libs/gmp/files/gmp-4.2.2-ABI-multilib.patch b/dev-libs/gmp/files/gmp-4.2.2-ABI-multilib.patch
new file mode 100644
index 0000000..efded7b
--- /dev/null
+++ b/dev-libs/gmp/files/gmp-4.2.2-ABI-multilib.patch
@@ -0,0 +1,262 @@
+Gentoo uses ABI env var already
+
+--- gmp-4.2.1/configure
++++ gmp-4.2.1/configure
+@@ -489,7 +489,7 @@
+ # include <unistd.h>
+ #endif"
+
+-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT WANT_MPBSD_TRUE WANT_MPBSD_FALSE GMP_NAIL_BITS ABI HAVE_HOST_CPU_FAMILY_power HAVE_HOST_CPU_FAMILY_powerpc GMP_LDFLAGS LIBGMP_LDFLAGS LIBGMPXX_LDFLAGS SPEED_CYCLECOUNTER_OBJ CALLING_CONVENTIONS_OBJS DEFN_LONG_LONG_LIMB CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP CC_FOR_BUILD CPP_FOR_BUILD EXEEXT_FOR_BUILD U_FOR_BUILD LIBM_FOR_BUILD CCAS CXX CXXFLAGS ac_ct_CXX WANT_CXX_TRUE WANT_CXX_FALSE CXXCPP EGREP U ANSI2KNR AR ac_ct_AR LIBGMP_DLL SED LN_S ECHO RANLIB ac_ct_RANLIB DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP LIBTOOL ENABLE_STATIC_TRUE ENABLE_STATIC_FALSE LIBM TAL_OBJECT M4 BITS_PER_MP_LIMB mpn_objs_in_libmp mpn_objects mpn_objs_in_libgmp gmp_srclinks TUNE_SQR_OBJ HAVE_CLOCK_01 HAVE_CPUTIME_01 HAVE_GETRUSAGE_01 HAVE_GETTIMEOFDAY_01 HAVE_SIGACTION_01 HAVE_SIGALTSTACK_01 HAVE_SIGSTACK_01 HAVE_SYS_RESOURCE_H_01 HAVE_STACK_T_01 LIBCURSES WITH_READLINE_01 LIBREADLINE YACC LEX LEXLIB LEX_OUTPUT_ROOT LIBOBJS LTLIBOBJS'
++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT WANT_MPBSD_TRUE WANT_MPBSD_FALSE GMP_NAIL_BITS GMPABI HAVE_HOST_CPU_FAMILY_power HAVE_HOST_CPU_FAMILY_powerpc GMP_LDFLAGS LIBGMP_LDFLAGS LIBGMPXX_LDFLAGS SPEED_CYCLECOUNTER_OBJ CALLING_CONVENTIONS_OBJS DEFN_LONG_LONG_LIMB CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP CC_FOR_BUILD CPP_FOR_BUILD EXEEXT_FOR_BUILD U_FOR_BUILD LIBM_FOR_BUILD CCAS CXX CXXFLAGS ac_ct_CXX WANT_CXX_TRUE WANT_CXX_FALSE CXXCPP EGREP U ANSI2KNR AR ac_ct_AR LIBGMP_DLL SED LN_S ECHO RANLIB ac_ct_RANLIB DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP LIBTOOL ENABLE_STATIC_TRUE ENABLE_STATIC_FALSE LIBM TAL_OBJECT M4 BITS_PER_MP_LIMB mpn_objs_in_libmp mpn_objects mpn_objs_in_libgmp gmp_srclinks TUNE_SQR_OBJ HAVE_CLOCK_01 HAVE_CPUTIME_01 HAVE_GETRUSAGE_01 HAVE_GETTIMEOFDAY_01 HAVE_SIGACTION_01 HAVE_SIGALTSTACK_01 HAVE_SIGSTACK_01 HAVE_SYS_RESOURCE_H_01 HAVE_STACK_T_01 LIBCURSES WITH_READLINE_01 LIBREADLINE YACC LEX LEXLIB LEX_OUTPUT_ROOT LIBOBJS LTLIBOBJS'
+ ac_subst_files=''
+
+ # Initialize some variables set by options.
+@@ -930,10 +930,10 @@
+ ac_env_target_alias_value=$target_alias
+ ac_cv_env_target_alias_set=${target_alias+set}
+ ac_cv_env_target_alias_value=$target_alias
+-ac_env_ABI_set=${ABI+set}
+-ac_env_ABI_value=$ABI
+-ac_cv_env_ABI_set=${ABI+set}
+-ac_cv_env_ABI_value=$ABI
++ac_env_GMPABI_set=${GMPABI+set}
++ac_env_GMPABI_value=$GMPABI
++ac_cv_env_GMPABI_set=${GMPABI+set}
++ac_cv_env_GMPABI_value=$GMPABI
+ ac_env_CC_set=${CC+set}
+ ac_env_CC_value=$CC
+ ac_cv_env_CC_set=${CC+set}
+@@ -1091,7 +1091,7 @@
+ include additional configurations [automatic]
+
+ Some influential environment variables:
+- ABI desired ABI (for processors supporting more than one ABI)
++ GMPABI desired ABI (for processors supporting more than one ABI)
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+@@ -2670,7 +2670,7 @@
+ # (64-bit), but not both, so there's no option to choose the desired
+ # mode, we must instead detect which of the two it is. This is done by
+ # checking sizeof(long), either 4 or 8 bytes respectively. Do this in
+- # ABI=1.0 too, in case someone tries to build that with a 2.0w gcc.
++ # GMPABI=1.0 too, in case someone tries to build that with a 2.0w gcc.
+ #
+ gcc_cflags="-O2"
+ gcc_cflags_optlist="arch"
+@@ -2694,11 +2694,11 @@
+ # gcc 2.7.2.3 knows -mpa-risc-1-0 and -mpa-risc-1-1
+ # gcc 2.95 adds -mpa-risc-2-0, plus synonyms -march=1.0, 1.1 and 2.0
+ #
+- # We don't use -mpa-risc-2-0 in ABI=1.0 because 64-bit registers may not
++ # We don't use -mpa-risc-2-0 in GMPABI=1.0 because 64-bit registers may not
+ # be saved by the kernel on an old system. Actually gcc (as of 3.2)
+ # only adds a few float instructions with -mpa-risc-2-0, so it would
+ # probably be safe, but let's not take the chance. In any case, a
+- # configuration like --host=hppa2.0 ABI=1.0 is far from optimal.
++ # configuration like --host=hppa2.0 GMPABI=1.0 is far from optimal.
+ #
+ case $host_cpu in
+ hppa1.0*) gcc_cflags_arch="-mpa-risc-1-0" ;;
+@@ -2733,9 +2733,9 @@
+ cc_20n_cflags="+DA2.0 +e +O2 -Wl,+vnocompatwarnings"
+ cc_20n_testlist="hpc-hppa-2-0"
+
+- # ABI=2.0w is available for hppa2.0w and hppa2.0, but not for
++ # GMPABI=2.0w is available for hppa2.0w and hppa2.0, but not for
+ # hppa2.0n, on the assumption that that the latter indicates a
+- # desire for ABI=2.0n.
++ # desire for GMPABI=2.0n.
+ case $host in
+ hppa2.0n-*-*) ;;
+ *)
+@@ -3203,7 +3203,7 @@
+ # mode, but not set our ABI. For some reason it's sparc where this
+ # keeps coming up, presumably users there are accustomed to driving the
+ # compiler mode that way. The effect of our testlist setting is to
+- # reject ABI=64 in favour of ABI=32 if the user has forced the flags to
++ # reject GMPABI=64 in favour of GMPABI=32 if the user has forced the flags to
+ # 32-bit mode.
+ #
+ abilist="32"
+@@ -3308,12 +3308,12 @@
+ case $host_cpu in
+ sparc64 | sparcv9* | ultrasparc*)
+ case $host in
+- # Solaris 6 and earlier cannot run ABI=64 since it doesn't save
+- # registers properly, so ABI=32 is left as the only choice.
++ # Solaris 6 and earlier cannot run GMPABI=64 since it doesn't save
++ # registers properly, so GMPABI=32 is left as the only choice.
+ #
+ *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) ;;
+
+- # BSD sparc64 ports are 64-bit-only systems, so ABI=64 is the only
++ # BSD sparc64 ports are 64-bit-only systems, so GMPABI=64 is the only
+ # choice. In fact they need no special compiler flags, gcc -m64
+ # is the default, but it doesn't hurt to add it. v9 CPUs always
+ # use the sparc64 port, since the plain 32-bit sparc ports don't
+@@ -3399,7 +3399,7 @@
+ # -O, but lets assume that's no longer true.
+ #
+ # -m32 forces 32-bit mode on a bi-arch 32/64 amd64 build of gcc. -m64 is
+- # the default in such a build (we think), so -m32 is essential for ABI=32.
++ # the default in such a build (we think), so -m32 is essential for GMPABI=32.
+ # This is, of course, done for any $host_cpu, not just x86_64, so we can
+ # get such a gcc into the right mode to cross-compile to say i486-*-*.
+ #
+@@ -3639,7 +3639,7 @@
+
+ cat >&5 <<EOF
+ User:
+-ABI=$ABI
++GMPABI=$GMPABI
+ CC=$CC
+ CFLAGS=$CFLAGS_or_unset
+ CPPFLAGS=$CPPFLAGS_or_unset
+@@ -3660,24 +3660,24 @@
+ # If the user specifies an ABI then it must be in $abilist, after that
+ # $abilist is restricted to just that choice.
+ #
+-if test -n "$ABI"; then
++if test -n "$GMPABI"; then
+ found=no
+ for abi in $abilist; do
+- if test $abi = "$ABI"; then found=yes; break; fi
++ if test $abi = "$GMPABI"; then found=yes; break; fi
+ done
+ if test $found = no; then
+- { { echo "$as_me:$LINENO: error: ABI=$ABI is not among the following valid choices: $abilist" >&5
+-echo "$as_me: error: ABI=$ABI is not among the following valid choices: $abilist" >&2;}
++ { { echo "$as_me:$LINENO: error: GMPABI=$GMPABI is not among the following valid choices: $abilist" >&5
++echo "$as_me: error: GMPABI=$GMPABI is not among the following valid choices: $abilist" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+- abilist="$ABI"
++ abilist="$GMPABI"
+ fi
+
+ found_compiler=no
+
+ for abi in $abilist; do
+
+- echo "checking ABI=$abi"
++ echo "checking GMPABI=$abi"
+
+ # Suppose abilist="64 32", then for abi=64, will have abi1="_64" and
+ # abi2="_64". For abi=32, will have abi1="_32" and abi2="". This is how
+@@ -5128,7 +5128,7 @@
+ # For -march settings which enable SSE2 we exclude certain bad
+ # gcc versions and we need an OS knowing how to save xmm regs.
+ #
+- # This is only for ABI=32, any 64-bit gcc is good and any OS
++ # This is only for GMPABI=32, any 64-bit gcc is good and any OS
+ # knowing x86_64 will know xmm.
+ #
+ # -march=k8 was only introduced in gcc 3.3, so we shouldn't need
+@@ -6368,16 +6368,16 @@
+ done
+ fi
+
+- ABI="$abi"
++ GMPABI="$abi"
+ CC="$cc"
+ CFLAGS="$cflags"
+ CPPFLAGS="$cppflags"
+
+
+ # Could easily have this in config.h too, if desired.
+- ABI_nodots=`echo $ABI | sed 's/\./_/'`
++ GMPABI_nodots=`echo $GMPABI | sed 's/\./_/'`
+
+-echo "define_not_for_expansion(\`HAVE_ABI_$ABI_nodots')" >> $gmp_tmpconfigm4p
++echo "define_not_for_expansion(\`HAVE_ABI_$GMPABI_nodots')" >> $gmp_tmpconfigm4p
+
+
+
+@@ -8830,12 +8830,12 @@
+ # If there's any sse2 or mmx in the path, check whether the assembler
+ # supports it, and remove if not.
+ #
+-# We only need this in ABI=32, for ABI=64 on x86_64 we can assume a new
++# We only need this in GMPABI=32, for GMPABI=64 on x86_64 we can assume a new
+ # enough assembler.
+ #
+ case $host in
+ i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | athlon64-*-* | core2-*-* | x86_64-*-*)
+- if test "$ABI" = 32; then
++ if test "$GMPABI" = 32; then
+ case "$path $fat_path" in
+ *mmx*) echo "$as_me:$LINENO: checking if the assembler knows about MMX instructions" >&5
+ echo $ECHO_N "checking if the assembler knows about MMX instructions... $ECHO_C" >&6
+@@ -9019,7 +9019,7 @@
+
+ cat >&5 <<EOF
+ Decided:
+-ABI=$ABI
++GMPABI=$GMPABI
+ CC=$CC
+ CFLAGS=$CFLAGS
+ CPPFLAGS=$CPPFLAGS
+@@ -9028,7 +9028,7 @@
+ CXXFLAGS=$CXXFLAGS
+ path=$path
+ EOF
+-echo "using ABI=\"$ABI\""
++echo "using GMPABI=\"$GMPABI\""
+ echo " CC=\"$CC\""
+ echo " CFLAGS=\"$CFLAGS\""
+ echo " CPPFLAGS=\"$CPPFLAGS\""
+@@ -30005,7 +30005,7 @@
+
+ case $host in
+ *-*-aix*)
+- case $ABI in
++ case $GMPABI in
+ 64 | aix64)
+ echo "include_mpn(\`powerpc64/aix.m4')" >> $gmp_tmpconfigm4i
+ ;;
+@@ -30015,7 +30015,7 @@
+ esac
+ ;;
+ *-*-linux* | *-*-*bsd*)
+- case $ABI in
++ case $GMPABI in
+ mode64)
+ echo "include_mpn(\`powerpc64/elf.m4')" >> $gmp_tmpconfigm4i
+ ;;
+@@ -30025,7 +30025,7 @@
+ esac
+ ;;
+ *-*-darwin*)
+- case $ABI in
++ case $GMPABI in
+ mode64)
+ echo "include_mpn(\`powerpc64/darwin.m4')" >> $gmp_tmpconfigm4i
+ ;;
+@@ -30048,7 +30048,7 @@
+
+ ;;
+ sparcv9*-*-* | ultrasparc*-*-* | sparc64-*-*)
+- case $ABI in
++ case $GMPABI in
+ 64)
+
+ echo "$as_me:$LINENO: checking if the assembler accepts \".register\"" >&5
+@@ -30130,7 +30130,7 @@
+ echo "define(<ALIGN_FILL_0x90>,<$gmp_cv_asm_align_fill_0x90>)" >> $gmp_tmpconfigm4
+
+
+- case $ABI in
++ case $GMPABI in
+ 32)
+
+ echo "include_mpn(\`x86/x86-defs.m4')" >> $gmp_tmpconfigm4i
+@@ -34032,7 +34032,7 @@
+ s,@WANT_MPBSD_TRUE@,$WANT_MPBSD_TRUE,;t t
+ s,@WANT_MPBSD_FALSE@,$WANT_MPBSD_FALSE,;t t
+ s,@GMP_NAIL_BITS@,$GMP_NAIL_BITS,;t t
+-s,@ABI@,$ABI,;t t
++s,@GMPABI@,$GMPABI,;t t
+ s,@HAVE_HOST_CPU_FAMILY_power@,$HAVE_HOST_CPU_FAMILY_power,;t t
+ s,@HAVE_HOST_CPU_FAMILY_powerpc@,$HAVE_HOST_CPU_FAMILY_powerpc,;t t
+ s,@GMP_LDFLAGS@,$GMP_LDFLAGS,;t t
diff --git a/dev-libs/gmp/files/gmp-4.2.2-cstdio-stdfile.patch b/dev-libs/gmp/files/gmp-4.2.2-cstdio-stdfile.patch
new file mode 100644
index 0000000..d30abd6
--- /dev/null
+++ b/dev-libs/gmp/files/gmp-4.2.2-cstdio-stdfile.patch
@@ -0,0 +1,14 @@
+http://bugs.gentoo.org/228915
+
+pull in cstdio to fix building with gcc-4.3.1
+
+--- gmp-4.2.2/gmp-h.in
++++ gmp-4.2.2/gmp-h.in
+@@ -517,6 +517,7 @@
+ #if defined (__cplusplus)
+ extern "C" {
+ #ifdef _GMP_H_HAVE_FILE
++#include <cstdio>
+ using std::FILE;
+ #endif
+ #endif
diff --git a/dev-libs/gmp/files/gmp-4.2.3-ABI-multilib.patch b/dev-libs/gmp/files/gmp-4.2.3-ABI-multilib.patch
new file mode 100644
index 0000000..312a1a3
--- /dev/null
+++ b/dev-libs/gmp/files/gmp-4.2.3-ABI-multilib.patch
@@ -0,0 +1,262 @@
+Gentoo uses ABI env var already
+
+--- gmp-4.2.3/configure
++++ gmp-4.2.3/configure
+@@ -489,7 +489,7 @@
+ # include <unistd.h>
+ #endif"
+
+-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT WANT_MPBSD_TRUE WANT_MPBSD_FALSE GMP_NAIL_BITS ABI HAVE_HOST_CPU_FAMILY_power HAVE_HOST_CPU_FAMILY_powerpc GMP_LDFLAGS LIBGMP_LDFLAGS LIBGMPXX_LDFLAGS SPEED_CYCLECOUNTER_OBJ CALLING_CONVENTIONS_OBJS DEFN_LONG_LONG_LIMB CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP CC_FOR_BUILD CPP_FOR_BUILD EXEEXT_FOR_BUILD U_FOR_BUILD LIBM_FOR_BUILD CCAS CXX CXXFLAGS ac_ct_CXX WANT_CXX_TRUE WANT_CXX_FALSE CXXCPP EGREP U ANSI2KNR ASMFLAGS AR ac_ct_AR LIBGMP_DLL SED LN_S ECHO RANLIB ac_ct_RANLIB DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP LIBTOOL ENABLE_STATIC_TRUE ENABLE_STATIC_FALSE LIBM TAL_OBJECT M4 BITS_PER_MP_LIMB mpn_objs_in_libmp mpn_objects mpn_objs_in_libgmp gmp_srclinks TUNE_SQR_OBJ HAVE_CLOCK_01 HAVE_CPUTIME_01 HAVE_GETRUSAGE_01 HAVE_GETTIMEOFDAY_01 HAVE_SIGACTION_01 HAVE_SIGALTSTACK_01 HAVE_SIGSTACK_01 HAVE_SYS_RESOURCE_H_01 HAVE_STACK_T_01 LIBCURSES WITH_READLINE_01 LIBREADLINE YACC LEX LEXLIB LEX_OUTPUT_ROOT LIBOBJS LTLIBOBJS'
++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT WANT_MPBSD_TRUE WANT_MPBSD_FALSE GMP_NAIL_BITS GMPABI HAVE_HOST_CPU_FAMILY_power HAVE_HOST_CPU_FAMILY_powerpc GMP_LDFLAGS LIBGMP_LDFLAGS LIBGMPXX_LDFLAGS SPEED_CYCLECOUNTER_OBJ CALLING_CONVENTIONS_OBJS DEFN_LONG_LONG_LIMB CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP CC_FOR_BUILD CPP_FOR_BUILD EXEEXT_FOR_BUILD U_FOR_BUILD LIBM_FOR_BUILD CCAS CXX CXXFLAGS ac_ct_CXX WANT_CXX_TRUE WANT_CXX_FALSE CXXCPP EGREP U ANSI2KNR ASMFLAGS AR ac_ct_AR LIBGMP_DLL SED LN_S ECHO RANLIB ac_ct_RANLIB DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP LIBTOOL ENABLE_STATIC_TRUE ENABLE_STATIC_FALSE LIBM TAL_OBJECT M4 BITS_PER_MP_LIMB mpn_objs_in_libmp mpn_objects mpn_objs_in_libgmp gmp_srclinks TUNE_SQR_OBJ HAVE_CLOCK_01 HAVE_CPUTIME_01 HAVE_GETRUSAGE_01 HAVE_GETTIMEOFDAY_01 HAVE_SIGACTION_01 HAVE_SIGALTSTACK_01 HAVE_SIGSTACK_01 HAVE_SYS_RESOURCE_H_01 HAVE_STACK_T_01 LIBCURSES WITH_READLINE_01 LIBREADLINE YACC LEX LEXLIB LEX_OUTPUT_ROOT LIBOBJS LTLIBOBJS'
+ ac_subst_files=''
+
+ # Initialize some variables set by options.
+@@ -930,10 +930,10 @@
+ ac_env_target_alias_value=$target_alias
+ ac_cv_env_target_alias_set=${target_alias+set}
+ ac_cv_env_target_alias_value=$target_alias
+-ac_env_ABI_set=${ABI+set}
+-ac_env_ABI_value=$ABI
+-ac_cv_env_ABI_set=${ABI+set}
+-ac_cv_env_ABI_value=$ABI
++ac_env_GMPABI_set=${GMPABI+set}
++ac_env_GMPABI_value=$GMPABI
++ac_cv_env_GMPABI_set=${GMPABI+set}
++ac_cv_env_GMPABI_value=$GMPABI
+ ac_env_CC_set=${CC+set}
+ ac_env_CC_value=$CC
+ ac_cv_env_CC_set=${CC+set}
+@@ -1091,7 +1091,7 @@
+ include additional configurations [automatic]
+
+ Some influential environment variables:
+- ABI desired ABI (for processors supporting more than one ABI)
++ GMPABI desired ABI (for processors supporting more than one ABI)
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+@@ -2670,7 +2670,7 @@
+ # (64-bit), but not both, so there's no option to choose the desired
+ # mode, we must instead detect which of the two it is. This is done by
+ # checking sizeof(long), either 4 or 8 bytes respectively. Do this in
+- # ABI=1.0 too, in case someone tries to build that with a 2.0w gcc.
++ # GMPABI=1.0 too, in case someone tries to build that with a 2.0w gcc.
+ #
+ gcc_cflags="-O2"
+ gcc_cflags_optlist="arch"
+@@ -2694,11 +2694,11 @@
+ # gcc 2.7.2.3 knows -mpa-risc-1-0 and -mpa-risc-1-1
+ # gcc 2.95 adds -mpa-risc-2-0, plus synonyms -march=1.0, 1.1 and 2.0
+ #
+- # We don't use -mpa-risc-2-0 in ABI=1.0 because 64-bit registers may not
++ # We don't use -mpa-risc-2-0 in GMPABI=1.0 because 64-bit registers may not
+ # be saved by the kernel on an old system. Actually gcc (as of 3.2)
+ # only adds a few float instructions with -mpa-risc-2-0, so it would
+ # probably be safe, but let's not take the chance. In any case, a
+- # configuration like --host=hppa2.0 ABI=1.0 is far from optimal.
++ # configuration like --host=hppa2.0 GMPABI=1.0 is far from optimal.
+ #
+ case $host_cpu in
+ hppa1.0*) gcc_cflags_arch="-mpa-risc-1-0" ;;
+@@ -2733,9 +2733,9 @@
+ cc_20n_cflags="+DA2.0 +e +O2 -Wl,+vnocompatwarnings"
+ cc_20n_testlist="hpc-hppa-2-0"
+
+- # ABI=2.0w is available for hppa2.0w and hppa2.0, but not for
++ # GMPABI=2.0w is available for hppa2.0w and hppa2.0, but not for
+ # hppa2.0n, on the assumption that that the latter indicates a
+- # desire for ABI=2.0n.
++ # desire for GMPABI=2.0n.
+ case $host in
+ hppa2.0n-*-*) ;;
+ *)
+@@ -3203,7 +3203,7 @@
+ # mode, but not set our ABI. For some reason it's sparc where this
+ # keeps coming up, presumably users there are accustomed to driving the
+ # compiler mode that way. The effect of our testlist setting is to
+- # reject ABI=64 in favour of ABI=32 if the user has forced the flags to
++ # reject GMPABI=64 in favour of GMPABI=32 if the user has forced the flags to
+ # 32-bit mode.
+ #
+ abilist="32"
+@@ -3308,12 +3308,12 @@
+ case $host_cpu in
+ sparc64 | sparcv9* | ultrasparc*)
+ case $host in
+- # Solaris 6 and earlier cannot run ABI=64 since it doesn't save
+- # registers properly, so ABI=32 is left as the only choice.
++ # Solaris 6 and earlier cannot run GMPABI=64 since it doesn't save
++ # registers properly, so GMPABI=32 is left as the only choice.
+ #
+ *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) ;;
+
+- # BSD sparc64 ports are 64-bit-only systems, so ABI=64 is the only
++ # BSD sparc64 ports are 64-bit-only systems, so GMPABI=64 is the only
+ # choice. In fact they need no special compiler flags, gcc -m64
+ # is the default, but it doesn't hurt to add it. v9 CPUs always
+ # use the sparc64 port, since the plain 32-bit sparc ports don't
+@@ -3399,7 +3399,7 @@
+ # -O, but lets assume that's no longer true.
+ #
+ # -m32 forces 32-bit mode on a bi-arch 32/64 amd64 build of gcc. -m64 is
+- # the default in such a build (we think), so -m32 is essential for ABI=32.
++ # the default in such a build (we think), so -m32 is essential for GMPABI=32.
+ # This is, of course, done for any $host_cpu, not just x86_64, so we can
+ # get such a gcc into the right mode to cross-compile to say i486-*-*.
+ #
+@@ -3639,7 +3639,7 @@
+
+ cat >&5 <<EOF
+ User:
+-ABI=$ABI
++GMPABI=$GMPABI
+ CC=$CC
+ CFLAGS=$CFLAGS_or_unset
+ CPPFLAGS=$CPPFLAGS_or_unset
+@@ -3660,24 +3660,24 @@
+ # If the user specifies an ABI then it must be in $abilist, after that
+ # $abilist is restricted to just that choice.
+ #
+-if test -n "$ABI"; then
++if test -n "$GMPABI"; then
+ found=no
+ for abi in $abilist; do
+- if test $abi = "$ABI"; then found=yes; break; fi
++ if test $abi = "$GMPABI"; then found=yes; break; fi
+ done
+ if test $found = no; then
+- { { echo "$as_me:$LINENO: error: ABI=$ABI is not among the following valid choices: $abilist" >&5
+-echo "$as_me: error: ABI=$ABI is not among the following valid choices: $abilist" >&2;}
++ { { echo "$as_me:$LINENO: error: GMPABI=$GMPABI is not among the following valid choices: $abilist" >&5
++echo "$as_me: error: GMPABI=$GMPABI is not among the following valid choices: $abilist" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+- abilist="$ABI"
++ abilist="$GMPABI"
+ fi
+
+ found_compiler=no
+
+ for abi in $abilist; do
+
+- echo "checking ABI=$abi"
++ echo "checking GMPABI=$abi"
+
+ # Suppose abilist="64 32", then for abi=64, will have abi1="_64" and
+ # abi2="_64". For abi=32, will have abi1="_32" and abi2="". This is how
+@@ -5128,7 +5128,7 @@
+ # For -march settings which enable SSE2 we exclude certain bad
+ # gcc versions and we need an OS knowing how to save xmm regs.
+ #
+- # This is only for ABI=32, any 64-bit gcc is good and any OS
++ # This is only for GMPABI=32, any 64-bit gcc is good and any OS
+ # knowing x86_64 will know xmm.
+ #
+ # -march=k8 was only introduced in gcc 3.3, so we shouldn't need
+@@ -6368,16 +6368,16 @@
+ done
+ fi
+
+- ABI="$abi"
++ GMPABI="$abi"
+ CC="$cc"
+ CFLAGS="$cflags"
+ CPPFLAGS="$cppflags"
+
+
+ # Could easily have this in config.h too, if desired.
+- ABI_nodots=`echo $ABI | sed 's/\./_/'`
++ GMPABI_nodots=`echo $GMPABI | sed 's/\./_/'`
+
+-echo "define_not_for_expansion(\`HAVE_ABI_$ABI_nodots')" >> $gmp_tmpconfigm4p
++echo "define_not_for_expansion(\`HAVE_ABI_$GMPABI_nodots')" >> $gmp_tmpconfigm4p
+
+
+
+@@ -8830,12 +8830,12 @@
+ # If there's any sse2 or mmx in the path, check whether the assembler
+ # supports it, and remove if not.
+ #
+-# We only need this in ABI=32, for ABI=64 on x86_64 we can assume a new
++# We only need this in GMPABI=32, for GMPABI=64 on x86_64 we can assume a new
+ # enough assembler.
+ #
+ case $host in
+ i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | athlon64-*-* | core2-*-* | x86_64-*-*)
+- if test "$ABI" = 32; then
++ if test "$GMPABI" = 32; then
+ case "$path $fat_path" in
+ *mmx*) echo "$as_me:$LINENO: checking if the assembler knows about MMX instructions" >&5
+ echo $ECHO_N "checking if the assembler knows about MMX instructions... $ECHO_C" >&6
+@@ -9019,7 +9019,7 @@
+
+ cat >&5 <<EOF
+ Decided:
+-ABI=$ABI
++GMPABI=$GMPABI
+ CC=$CC
+ CFLAGS=$CFLAGS
+ CPPFLAGS=$CPPFLAGS
+@@ -9028,7 +9028,7 @@
+ CXXFLAGS=$CXXFLAGS
+ path=$path
+ EOF
+-echo "using ABI=\"$ABI\""
++echo "using GMPABI=\"$GMPABI\""
+ echo " CC=\"$CC\""
+ echo " CFLAGS=\"$CFLAGS\""
+ echo " CPPFLAGS=\"$CPPFLAGS\""
+@@ -30005,7 +30005,7 @@
+
+ case $host in
+ *-*-aix*)
+- case $ABI in
++ case $GMPABI in
+ 64 | aix64)
+ echo "include_mpn(\`powerpc64/aix.m4')" >> $gmp_tmpconfigm4i
+ ;;
+@@ -30015,7 +30015,7 @@
+ esac
+ ;;
+ *-*-linux* | *-*-*bsd*)
+- case $ABI in
++ case $GMPABI in
+ mode64)
+ echo "include_mpn(\`powerpc64/elf.m4')" >> $gmp_tmpconfigm4i
+ ;;
+@@ -30025,7 +30025,7 @@
+ esac
+ ;;
+ *-*-darwin*)
+- case $ABI in
++ case $GMPABI in
+ mode64)
+ echo "include_mpn(\`powerpc64/darwin.m4')" >> $gmp_tmpconfigm4i
+ ;;
+@@ -30048,7 +30048,7 @@
+
+ ;;
+ sparcv9*-*-* | ultrasparc*-*-* | sparc64-*-*)
+- case $ABI in
++ case $GMPABI in
+ 64)
+
+ echo "$as_me:$LINENO: checking if the assembler accepts \".register\"" >&5
+@@ -30130,7 +30130,7 @@
+ echo "define(<ALIGN_FILL_0x90>,<$gmp_cv_asm_align_fill_0x90>)" >> $gmp_tmpconfigm4
+
+
+- case $ABI in
++ case $GMPABI in
+ 32)
+
+ echo "include_mpn(\`x86/x86-defs.m4')" >> $gmp_tmpconfigm4i
+@@ -34032,7 +34032,7 @@
+ s,@WANT_MPBSD_TRUE@,$WANT_MPBSD_TRUE,;t t
+ s,@WANT_MPBSD_FALSE@,$WANT_MPBSD_FALSE,;t t
+ s,@GMP_NAIL_BITS@,$GMP_NAIL_BITS,;t t
+-s,@ABI@,$ABI,;t t
++s,@GMPABI@,$GMPABI,;t t
+ s,@HAVE_HOST_CPU_FAMILY_power@,$HAVE_HOST_CPU_FAMILY_power,;t t
+ s,@HAVE_HOST_CPU_FAMILY_powerpc@,$HAVE_HOST_CPU_FAMILY_powerpc,;t t
+ s,@GMP_LDFLAGS@,$GMP_LDFLAGS,;t t
diff --git a/dev-libs/gmp/files/gmp-gcc4.4-mips.patch b/dev-libs/gmp/files/gmp-gcc4.4-mips.patch
new file mode 100644
index 0000000..3c24048
--- /dev/null
+++ b/dev-libs/gmp/files/gmp-gcc4.4-mips.patch
@@ -0,0 +1,56 @@
+diff --git a/gmp-impl.h b/gmp-impl.h
+index bf0dc65..239fc80 100644
+--- a/gmp-impl.h
++++ b/gmp-impl.h
+@@ -2812,6 +2812,9 @@ typedef int SItype __attribute__ ((mode (SI)));
+ typedef unsigned int USItype __attribute__ ((mode (SI)));
+ typedef int DItype __attribute__ ((mode (DI)));
+ typedef unsigned int UDItype __attribute__ ((mode (DI)));
++#if W_TYPE_SIZE == 64
++typedef unsigned int UTItype __attribute__ ((mode (TI)));
++#endif
+ #else
+ typedef unsigned char UQItype;
+ typedef long SItype;
+diff --git a/longlong.h b/longlong.h
+index 234c25c..48f7429 100644
+--- a/longlong.h
++++ b/longlong.h
+@@ -1012,27 +1012,23 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO ((UWtype *, UWtype, UWtype, UWtype));
+ #endif /* __m88000__ */
+
+ #if defined (__mips) && W_TYPE_SIZE == 32
+-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
+ #define umul_ppmm(w1, w0, u, v) \
+- __asm__ ("multu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
+-#else
+-#define umul_ppmm(w1, w0, u, v) \
+- __asm__ ("multu %2,%3\n\tmflo %0\n\tmfhi %1" \
+- : "=d" (w0), "=d" (w1) : "d" (u), "d" (v))
+-#endif
++ do { \
++ UDItype __x = (UDItype) (USItype) (u) * (USItype) (v); \
++ (w1) = (USItype) (__x >> 32); \
++ (w0) = (USItype) (__x); \
++ } while (0)
+ #define UMUL_TIME 10
+ #define UDIV_TIME 100
+ #endif /* __mips */
+
+ #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64
+-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
+ #define umul_ppmm(w1, w0, u, v) \
+- __asm__ ("dmultu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
+-#else
+-#define umul_ppmm(w1, w0, u, v) \
+- __asm__ ("dmultu %2,%3\n\tmflo %0\n\tmfhi %1" \
+- : "=d" (w0), "=d" (w1) : "d" (u), "d" (v))
+-#endif
++ do { \
++ UTItype __x = (UTItype) (UDItype) (u) * (UDItype) (v); \
++ (w1) = (UDItype) (__x >> 64); \
++ (w0) = (UDItype) (__x); \
++ } while (0)
+ #define UMUL_TIME 20
+ #define UDIV_TIME 140
+ #endif /* __mips */
diff --git a/dev-libs/gmp/gmp-4.2.4.ebuild b/dev-libs/gmp/gmp-4.2.4.ebuild
new file mode 100644
index 0000000..54112da
--- /dev/null
+++ b/dev-libs/gmp/gmp-4.2.4.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/gmp/gmp-4.2.4.ebuild,v 1.1 2008/09/25 04:03:40 vapier Exp $
+
+inherit flag-o-matic eutils libtool
+
+DESCRIPTION="Library for arithmetic on arbitrary precision integers, rational numbers, and floating-point numbers"
+HOMEPAGE="http://gmplib.org/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2"
+# doc? ( http://www.nada.kth.se/~tege/${PN}-man-${PV}.pdf )"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+IUSE="nocxx" #doc
+
+RDEPEND=""
+DEPEND=""
+
+src_unpack () {
+ unpack ${A}
+ cd "${S}"
+ [[ -d ${FILESDIR}/${PV} ]] && EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch "${FILESDIR}"/${PV}
+ epatch "${FILESDIR}"/${PN}-4.1.4-noexecstack.patch
+ epatch "${FILESDIR}"/${PN}-4.2.3-ABI-multilib.patch
+ epatch "${FILESDIR}"/${PN}-4.2.1-s390.diff
+
+ sed -i -e 's:ABI = @ABI@:GMPABI = @GMPABI@:' \
+ Makefile.in */Makefile.in */*/Makefile.in
+
+ # note: we cannot run autotools here as gcc depends on this package
+ elibtoolize
+}
+
+src_compile() {
+ # GMP believes hppa2.0 is 64bit
+ local is_hppa_2_0
+ if [[ ${CHOST} == hppa2.0-* ]] ; then
+ is_hppa_2_0=1
+ export CHOST=${CHOST/2.0/1.1}
+ fi
+
+ # ABI mappings (needs all architectures supported)
+ case ${ABI} in
+ 32|x86) export GMPABI=32;;
+ 64|amd64|n64) export GMPABI=64;;
+ o32|n32) export GMPABI=${ABI};;
+ esac
+
+ econf \
+ --localstatedir=/var/state/gmp \
+ --disable-mpfr \
+ --disable-mpbsd \
+ $(use_enable !nocxx cxx) \
+ || die "configure failed"
+
+ # Fix the ABI for hppa2.0
+ if [[ -n ${is_hppa_2_0} ]] ; then
+ sed -i \
+ -e 's:pa32/hppa1_1:pa32/hppa2_0:' \
+ "${S}"/config.h || die
+ export CHOST=${CHOST/1.1/2.0}
+ fi
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+
+ dodoc AUTHORS ChangeLog NEWS README
+ dodoc doc/configuration doc/isa_abi_headache
+ dohtml -r doc
+
+ #use doc && cp "${DISTDIR}"/gmp-man-${PV}.pdf "${D}"/usr/share/doc/${PF}/
+}
diff --git a/dev-libs/gmp/metadata.xml b/dev-libs/gmp/metadata.xml
new file mode 100644
index 0000000..fb4199e
--- /dev/null
+++ b/dev-libs/gmp/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>toolchain</herd>
+</pkgmetadata>