patches/glibc/linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.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
elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
yann@1
     3
...
yann@1
     4
when building glibc-2.3.3 on cygwin
yann@1
     5
yann@1
     6
Idea from
yann@1
     7
http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
yann@1
     8
Basically, make glibc use .oST as suffix for 'object static'
yann@1
     9
instead of .oS, since cygwin has trouble distinguishing .os from .oS
yann@1
    10
(Original patch had .on, but .oST is more mnemonic for 'object static')
yann@1
    11
yann@1
    12
glibc-linuxthreads-2.3.3 also requires a patch, see 
yann@1
    13
../glibc-linuxthreads-2.3.3/glibc-linuxthreads-2.3.3-cygwin.patch
yann@1
    14
yann@1
    15
[ rediffed against glibc-2.3.5 ]
yann@1
    16
yann@1
    17
diff -aur glibc-2.3.5/linuxthreads/Makefile glibc-2.3.5-cygwin/linuxthreads/Makefile
yann@1
    18
--- glibc-2.3.5/linuxthreads/Makefile	2005-02-16 12:26:38.000000000 +0100
yann@1
    19
+++ glibc-2.3.5-cygwin/linuxthreads/Makefile	2005-05-11 08:32:50.453125000 +0200
yann@1
    20
@@ -159,7 +159,7 @@
yann@1
    21
 install: $(inst_libdir)/libpthread.so
yann@1
    22
 $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
yann@1
    23
 			      $(objpfx)libpthread.so$(libpthread.so-version) \
yann@1
    24
-			      $(inst_libdir)/$(patsubst %,$(libtype.oS),\
yann@1
    25
+			      $(inst_libdir)/$(patsubst %,$(libtype.oST),\
yann@1
    26
 							$(libprefix)pthread) \
yann@1
    27
 			      $(+force)
yann@1
    28
 	(echo '/* GNU ld script';\
yann@1
    29
@@ -167,7 +167,7 @@
yann@1
    30
 	 echo '   the static library, so try that secondarily.  */';\
yann@1
    31
 	 cat $<; \
yann@1
    32
 	 echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
yann@1
    33
-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
yann@1
    34
+	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
yann@1
    35
 	      ')' \
yann@1
    36
 	) > $@.new
yann@1
    37
 	mv -f $@.new $@