patches/glibc/linuxthreads-2.3.3/glibc-linuxthreads-2.3.3-cygwin.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue May 08 17:48:32 2007 +0000 (2007-05-08)
changeset 78 c3868084d81a
permissions -rw-r--r--
Huge fixes to glibc build, so that we can build at least (and at last):
- use ports addon even when installing headers,
- use optimisation (-O) when installing headers, to avoid unnecessary warnings (thanks Robert P. J. DAY for pointing this out!),
- lowest kernel version to use is only X.Y.Z, not X.Y.Z.T,
- a bit of preparations for NPTL (RSN I hope),
- fix fixing the linker scripts (changing the backup file is kind of useless and stupid);

Shut uClibc finish step: there really is nothing to do;

Add a patch for glibc-2.3.6 weak aliases handling on some archs (ARM and ALPHA at least);

Did not catch the make errors: fixed the pattern matching in scripts/functions;

Introduce a new log level, ALL:
- send components' build messages there,
- DEBUG log level is destined only for crosstool-NG debug messages,
- migrate sub-actions to use appropriate log levels;

Update the armeb-unknown-linux-gnu sample:
- it builds!
- uses gcc-4.0.4 and glibc-2.3.6,
- updated to latest config options set.
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.3 ]
yann@1
    16
yann@1
    17
yann@1
    18
diff -aur glibc-linuxthreads-2.3.3/linuxthreads/Makefile glibc-linuxthreads-2.3.3-cygwin/linuxthreads/Makefile
yann@1
    19
--- glibc-linuxthreads-2.3.3/linuxthreads/Makefile	2004-08-27 20:38:40.000000000 -0700
yann@1
    20
+++ glibc-linuxthreads-2.3.3-cygwin/linuxthreads/Makefile	2003-10-02 11:48:48.000000000 -0700
yann@1
    21
@@ -156,7 +156,7 @@
yann@1
    22
 install: $(inst_libdir)/libpthread.so
yann@1
    23
 $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
yann@1
    24
 			      $(objpfx)libpthread.so$(libpthread.so-version) \
yann@1
    25
-			      $(inst_libdir)/$(patsubst %,$(libtype.oS),\
yann@1
    26
+			      $(inst_libdir)/$(patsubst %,$(libtype.oST),\
yann@1
    27
 							$(libprefix)pthread) \
yann@1
    28
 			      $(+force)
yann@1
    29
 	(echo '/* GNU ld script';\
yann@1
    30
@@ -164,7 +164,7 @@
yann@1
    31
 	 echo '   the static library, so try that secondarily.  */';\
yann@1
    32
 	 cat $<; \
yann@1
    33
 	 echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
yann@1
    34
-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
yann@1
    35
+	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
yann@1
    36
 	      ')' \
yann@1
    37
 	) > $@.new
yann@1
    38
 	mv -f $@.new $@