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