patches/gmp/4.3.1/100-multiplicity-that-does-not-fit-an-int.patch
author |
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> |
|
Sun Sep 12 23:51:25 2010 +0200 (2010-09-12) |
changeset 2123 |
ff2181adbd28 |
permissions |
-rw-r--r-- |
cc/gcc: disable complibs if not selected
Force gcc to not link with some companion libraries when
there are not needed (because selected-out).
There is no option to tell gcc *not* to build the Graphite and/or
LTO stuff. They *will* be built if gcc finds the suitable companion
libraries. If we do not provide them, but the host has them, then
gcc *will* find them, and link with them.
Consider the following:
- host has suitable PPL and CLooG (eg. Debian Squeeze)
- user wants to build gcc>=4.4
- user de-selects GRAPHITE
- gcc will find the hosts PPL and CLooG, and will use them
- the user moves the toolchain to an older host that does
not have them (eg. Debian Lenny)
- the toolchain fails, when it was properly setup not to
So, explicitly tell gcc *not* to use unneeded companion libs.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
yann@1440
|
1 |
diff --git a/mpz/remove.c b/mpz/remove.c
|
yann@1440
|
2 |
--- a/mpz/remove.c
|
yann@1440
|
3 |
+++ b/mpz/remove.c
|
yann@1440
|
4 |
@@ -23,7 +23,7 @@
|
yann@1440
|
5 |
unsigned long int
|
yann@1440
|
6 |
mpz_remove (mpz_ptr dest, mpz_srcptr src, mpz_srcptr f)
|
yann@1440
|
7 |
{
|
yann@1440
|
8 |
- mpz_t fpow[40]; /* inexhaustible...until year 2020 or so */
|
yann@1440
|
9 |
+ mpz_t fpow[GMP_LIMB_BITS]; /* Really MP_SIZE_T_BITS */
|
yann@1440
|
10 |
mpz_t x, rem;
|
yann@1440
|
11 |
unsigned long int pwr;
|
yann@1440
|
12 |
int p;
|
yann@1440
|
13 |
@@ -69,7 +69,7 @@
|
yann@1440
|
14 |
mpz_set (dest, x);
|
yann@1440
|
15 |
}
|
yann@1440
|
16 |
|
yann@1440
|
17 |
- pwr = (1 << p) - 1;
|
yann@1440
|
18 |
+ pwr = (1L << p) - 1;
|
yann@1440
|
19 |
|
yann@1440
|
20 |
mpz_clear (fpow[p]);
|
yann@1440
|
21 |
|
yann@1440
|
22 |
diff --git a/mpz/remove.c b/mpz/remove.c
|
yann@1440
|
23 |
--- a/mpz/remove.c
|
yann@1440
|
24 |
+++ b/mpz/remove.c
|
yann@1440
|
25 |
@@ -80,7 +80,7 @@
|
yann@1440
|
26 |
mpz_tdiv_qr (x, rem, dest, fpow[p]);
|
yann@1440
|
27 |
if (SIZ (rem) == 0)
|
yann@1440
|
28 |
{
|
yann@1440
|
29 |
- pwr += 1 << p;
|
yann@1440
|
30 |
+ pwr += 1L << p;
|
yann@1440
|
31 |
mpz_set (dest, x);
|
yann@1440
|
32 |
}
|
yann@1440
|
33 |
mpz_clear (fpow[p]);
|