patches/gcc/3.4.0/gcc-3.4.0-arm-lib1asm.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 # Origin: from a patch by Dimitry Andric <dimitry@andric.com>, 2004-05-01
     2 # See http://gcc.gnu.org/PR14352 and http://gcc.gnu.org/PR16314
     3 # See also http://gcc.gnu.org/ml/gcc-patches/2004-08/msg02568.html et seq for why this isn't in mainline
     4 # Fixes errors like the following when building glibc (or any other executable
     5 # or shared library) when using gcc 3.4.0 for ARM with softfloat:
     6 #
     7 # .../libc_pic.os(.text+0x15834): In function `__modf': undefined reference to `__subdf3'
     8 # .../libc_pic.os(.text+0x158b8): In function `__modf': undefined reference to `__subdf3'
     9 # .../libc_pic.os(.text+0x1590c): In function `scalbn': undefined reference to `__muldf3'
    10 # .../libc_pic.os(.text+0x15e94): In function `__ldexpf': undefined reference to `__eqsf2'
    11 # .../libc_pic.os(.text+0xcee4c): In function `monstartup': undefined reference to `__fixsfsi'
    12 
    13 diff -urNd gcc-3.4.0-orig/gcc/config/arm/t-linux gcc-3.4.0/gcc/config/arm/t-linux
    14 --- gcc-3.4.0-orig/gcc/config/arm/t-linux	2003-09-20 23:09:07.000000000 +0200
    15 +++ gcc-3.4.0/gcc/config/arm/t-linux	2004-05-01 20:31:59.102846400 +0200
    16 @@ -4,7 +4,10 @@
    17  LIBGCC2_DEBUG_CFLAGS = -g0
    18  
    19  LIB1ASMSRC = arm/lib1funcs.asm
    20 -LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
    21 +LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
    22 +	_negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
    23 +	_truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
    24 +	_fixsfsi _fixunssfsi
    25  
    26  # MULTILIB_OPTIONS = mhard-float/msoft-float
    27  # MULTILIB_DIRNAMES = hard-float soft-float