patches/gmp/4.3.1/110-unbounded-alloc.patch
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Wed Jun 25 23:33:01 2014 +0200 (2014-06-25)
changeset 3325 069f43a215cc
permissions -rw-r--r--
all: fix wildcard to work with make-4.x

In make-3.8x, the $(wildacrd) function would sort the entries,
while in make-4.x, it would just return the entries in any
unpredictable order [*]

Use the $(sort) function to get reproducible behaviour.

[*] Well, most probably the roder the entries appear when read
from readdir()

Reported-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
     1 diff --git a/mpn/generic/toom44_mul.c b/mpn/generic/toom44_mul.c
     2 --- a/mpn/generic/toom44_mul.c
     3 +++ b/mpn/generic/toom44_mul.c
     4 @@ -116,17 +116,16 @@
     5  
     6    TMP_MARK;
     7  
     8 -  as1  = TMP_SALLOC_LIMBS (n + 1);
     9 -  asm1 = TMP_SALLOC_LIMBS (n + 1);
    10 -  as2  = TMP_SALLOC_LIMBS (n + 1);
    11 -  ash  = TMP_SALLOC_LIMBS (n + 1);
    12 -  asmh = TMP_SALLOC_LIMBS (n + 1);
    13 -
    14 -  bs1  = TMP_SALLOC_LIMBS (n + 1);
    15 -  bsm1 = TMP_SALLOC_LIMBS (n + 1);
    16 -  bs2  = TMP_SALLOC_LIMBS (n + 1);
    17 -  bsh  = TMP_SALLOC_LIMBS (n + 1);
    18 -  bsmh = TMP_SALLOC_LIMBS (n + 1);
    19 +  as1  = TMP_ALLOC_LIMBS (10 * n + 10);
    20 +  asm1 = as1  + n + 1;
    21 +  as2  = asm1 + n + 1;
    22 +  ash  = as2  + n + 1;
    23 +  asmh = ash  + n + 1;
    24 +  bs1  = asmh + n + 1;
    25 +  bsm1 = bs1  + n + 1;
    26 +  bs2  = bsm1 + n + 1;
    27 +  bsh  = bs2  + n + 1;
    28 +  bsmh = bsh  + n + 1;
    29  
    30    gp = pp;
    31    hp = pp + n + 1;