patches/gmp/4.3.1/100-multiplicity-that-does-not-fit-an-int.patch
author Johannes Stezenbach <js@sig21.net>
Thu Jul 29 19:30:37 2010 +0200 (2010-07-29)
branch1.7
changeset 2047 ace1d90c9b15
permissions -rw-r--r--
scripts: remove . from $PATH

Add CT_SanitizePath function which removes entries referring to ., /tmp
and non-existing directories from $PATH, and call it early in the
build script.

If . is in PATH, gcc-4.4.4 build breaks:

[ALL ] checking what assembler to use...
/tmp/build/targets/arm-unknown-linux-uclibcgnueabi/build/gcc-core-static/arm-unknown-linux-uclibcgnueabi/bin/as
...
[ALL ] config.status: creating as

i.e. "as" is supposed to be the arm-unknown-linux-uclibcgnueabi cross assembler,
but config.status creates a local "as" script which is calling the
host assembler.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
[Yann E. MORIN: style fixes + explanations]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from 20dd8cef1c8adff0aa3e78ae6d7acfbc45ed5a83)
     1 diff --git a/mpz/remove.c b/mpz/remove.c
     2 --- a/mpz/remove.c
     3 +++ b/mpz/remove.c
     4 @@ -23,7 +23,7 @@
     5  unsigned long int
     6  mpz_remove (mpz_ptr dest, mpz_srcptr src, mpz_srcptr f)
     7  {
     8 -  mpz_t fpow[40];		/* inexhaustible...until year 2020 or so */
     9 +  mpz_t fpow[GMP_LIMB_BITS];		/* Really MP_SIZE_T_BITS */
    10    mpz_t x, rem;
    11    unsigned long int pwr;
    12    int p;
    13 @@ -69,7 +69,7 @@
    14        mpz_set (dest, x);
    15      }
    16  
    17 -  pwr = (1 << p) - 1;
    18 +  pwr = (1L << p) - 1;
    19  
    20    mpz_clear (fpow[p]);
    21  
    22 diff --git a/mpz/remove.c b/mpz/remove.c
    23 --- a/mpz/remove.c
    24 +++ b/mpz/remove.c
    25 @@ -80,7 +80,7 @@
    26        mpz_tdiv_qr (x, rem, dest, fpow[p]);
    27        if (SIZ (rem) == 0)
    28  	{
    29 -	  pwr += 1 << p;
    30 +	  pwr += 1L << p;
    31  	  mpz_set (dest, x);
    32  	}
    33        mpz_clear (fpow[p]);