patches/gcc/3.3.2/thunk3.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun May 20 13:48:26 2007 +0000 (2007-05-20)
changeset 112 ea15433daba0
permissions -rw-r--r--
Ah! I finally have a progress bar that doesn't stall the build!
- pipe size in Linux is only 8*512=4096 bytes
- pipe size is not setable
- when the feeding process spits out data faster than the eating
process can read it, then the feeding process stalls after 4KiB
of data sent to the pipe
- for us, the progress bar would spawn a sub-shell every line,
and the sub-shell would in turn spawn a 'date' command.
Which was sloooww as hell, and would cause some kind of a
starvation: the pipe was full most of the time, and the
feeding process was stalled all this time.

Now, we use internal variables and a little hack based onan offset
to determine the elapsed time. Much faster this way, but still
CPU-intensive.
     1 Fixes 
     2 FAIL: g++.jason/thunk3.C (test for excess errors)
     3 on sh4-unknown-linux-gnu.
     4 
     5 Does any sh variant *not* use the generic thunk support?  If so, the patch should be
     6 more cautious.  As it is, it excludes all sh processors from this test.
     7 
     8 Index: thunk3.C
     9 ===================================================================
    10 RCS file: /cvsroot/gcc/gcc/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C,v
    11 retrieving revision 1.13
    12 diff -u -d -u -r1.13 thunk3.C
    13 --- gcc-ss-3_3-20030714/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C.old	25 Mar 2002 17:57:03 -0000	1.13
    14 +++ gcc-ss-3_3-20030714/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C	20 Jul 2003 16:57:38 -0000
    15 @@ -2,7 +2,7 @@
    16  // Note that this will break on any target that uses the generic thunk
    17  //  support, because it doesn't support variadic functions.
    18  
    19 -// excess errors test - XFAIL mips*-*-* rs6000-*-* powerpc-*-eabi m68k-*-coff m68k-motorola-sysv m88k-motorola-sysv3  mn10300-*-* mn10200-*-* v850-*-* sh-*-* sh64-*-* h8*-*-* xtensa-*-*
    20 +// excess errors test - XFAIL mips*-*-* rs6000-*-* powerpc-*-eabi m68k-*-coff m68k-motorola-sysv m88k-motorola-sysv3  mn10300-*-* mn10200-*-* v850-*-* sh*-*-* h8*-*-* xtensa-*-*
    21  
    22  #include <stdarg.h>
    23