Add glibc: 2.5.1 - 2.6 - 2.6.1.
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Aug 11 10:57:18 2007 +0000 (2007-08-11)
changeset 32390fefc8790fb
parent 322 3f14c769a4dc
child 324 04b1dfca8a43
Add glibc: 2.5.1 - 2.6 - 2.6.1.
Apply the same patches as glibc 2.5: they apply without any problem (except for ridiculously small offsets).
config/libc_glibc.in
patches/glibc/2.5.1/fix-pr398.patch
patches/glibc/2.5.1/glibc-2.3.5-allow-gcc4-wcstol_l.patch
patches/glibc/2.5.1/glibc-2.3.5-cygwin.patch
patches/glibc/2.5.1/glibc-2.3.6-allow-gcc-4.0-elf.patch
patches/glibc/2.5.1/glibc-2.3.6-configure-apple-as.patch
patches/glibc/2.5.1/glibc-2.3.6-fix-pr631.patch
patches/glibc/2.5.1/glibc-2.4-i686-assembler.patch
patches/glibc/2.5.1/glibc-i386-preferred-stack-boundary.patch
patches/glibc/2.5.1/make-install-lib-all.patch.dont_apply
patches/glibc/2.6.1/fix-pr398.patch
patches/glibc/2.6.1/glibc-2.3.5-allow-gcc4-wcstol_l.patch
patches/glibc/2.6.1/glibc-2.3.5-cygwin.patch
patches/glibc/2.6.1/glibc-2.3.6-allow-gcc-4.0-elf.patch
patches/glibc/2.6.1/glibc-2.3.6-configure-apple-as.patch
patches/glibc/2.6.1/glibc-2.3.6-fix-pr631.patch
patches/glibc/2.6.1/glibc-2.4-i686-assembler.patch
patches/glibc/2.6.1/glibc-i386-preferred-stack-boundary.patch
patches/glibc/2.6.1/make-install-lib-all.patch.dont_apply
patches/glibc/2.6/fix-pr398.patch
patches/glibc/2.6/glibc-2.3.5-allow-gcc4-wcstol_l.patch
patches/glibc/2.6/glibc-2.3.5-cygwin.patch
patches/glibc/2.6/glibc-2.3.6-allow-gcc-4.0-elf.patch
patches/glibc/2.6/glibc-2.3.6-configure-apple-as.patch
patches/glibc/2.6/glibc-2.3.6-fix-pr631.patch
patches/glibc/2.6/glibc-2.4-i686-assembler.patch
patches/glibc/2.6/glibc-i386-preferred-stack-boundary.patch
patches/glibc/2.6/make-install-lib-all.patch.dont_apply
     1.1 --- a/config/libc_glibc.in	Sat Aug 11 10:55:38 2007 +0000
     1.2 +++ b/config/libc_glibc.in	Sat Aug 11 10:57:18 2007 +0000
     1.3 @@ -106,6 +106,21 @@
     1.4      bool
     1.5      prompt "2.5"
     1.6  
     1.7 +config LIBC_V_2_5_1
     1.8 +    bool
     1.9 +    prompt "2.5.1 (EXPERIMENTAL)"
    1.10 +    depends on EXPERIMENTAL
    1.11 +
    1.12 +config LIBC_V_2_6
    1.13 +    bool
    1.14 +    prompt "2.6 (EXPERIMENTAL)"
    1.15 +    depends on EXPERIMENTAL
    1.16 +
    1.17 +config LIBC_V_2_6_1
    1.18 +    bool
    1.19 +    prompt "2.6.1 (EXPERIMENTAL)"
    1.20 +    depends on EXPERIMENTAL
    1.21 +
    1.22  # CT_INSERT_VERSION_ABOVE
    1.23  # Don't remove above line!
    1.24  endchoice
    1.25 @@ -133,6 +148,9 @@
    1.26      default "2.3.6" if LIBC_V_2_3_6
    1.27      default "2.4" if LIBC_V_2_4
    1.28      default "2.5" if LIBC_V_2_5
    1.29 +    default "2.5.1" if LIBC_V_2_5_1
    1.30 +    default "2.6" if LIBC_V_2_6
    1.31 +    default "2.6.1" if LIBC_V_2_6_1
    1.32  # CT_INSERT_VERSION_STRING_ABOVE
    1.33  # Don't remove above line!
    1.34  
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/patches/glibc/2.5.1/fix-pr398.patch	Sat Aug 11 10:57:18 2007 +0000
     2.3 @@ -0,0 +1,70 @@
     2.4 +Fixes error
     2.5 +
     2.6 +dl-runtime.c:222: error: parse error before "CFI_STARTPROC"
     2.7 +make[2]: *** [crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/elf/dl-runtim
     2.8 +e.o] Error 1
     2.9 +make[2]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
    2.10 +822/elf'
    2.11 +make[1]: *** [elf/subdir_lib] Error 2
    2.12 +make[1]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
    2.13 +822'
    2.14 +make: *** [all] Error 2
    2.15 +
    2.16 +-----------------
    2.17 +
    2.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=398
    2.19 +http://sources.redhat.com/ml/libc-alpha/2004-07/msg00023.html
    2.20 +
    2.21 +-----------------
    2.22 +
    2.23 +CVSROOT:	/cvs/glibc
    2.24 +Module name:	libc
    2.25 +Branch: 	glibc-2_3-branch
    2.26 +Changes by:	roland@sources.redhat.com	2006-02-23 22:36:51
    2.27 +
    2.28 +Modified files:
    2.29 +	sysdeps/s390/s390-64: dl-machine.h 
    2.30 +	sysdeps/s390/s390-32: dl-machine.h 
    2.31 +
    2.32 +Log message:
    2.33 +	2004-07-10  GOTO Masanori  <gotom@debian.or.jp>
    2.34 +	
    2.35 +	[BZ #398]
    2.36 +	* sysdeps/s390/s390-32/dl-machine.h: Include <sysdep.h> for CFI
    2.37 +	directive.
    2.38 +	* sysdeps/s390/s390-64/dl-machine.h: Likewise.
    2.39 +
    2.40 +Patches:
    2.41 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-64/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.19.4.1&r2=1.19.4.2
    2.42 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-32/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.20.4.1&r2=1.20.4.2
    2.43 +
    2.44 +===================================================================
    2.45 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-64/dl-machine.h,v
    2.46 +retrieving revision 1.19.4.1
    2.47 +retrieving revision 1.19.4.2
    2.48 +diff -u -r1.19.4.1 -r1.19.4.2
    2.49 +--- libc/sysdeps/s390/s390-64/dl-machine.h	2005/10/17 04:57:27	1.19.4.1
    2.50 ++++ libc/sysdeps/s390/s390-64/dl-machine.h	2006/02/23 22:36:51	1.19.4.2
    2.51 +@@ -27,6 +27,7 @@
    2.52 + #include <sys/param.h>
    2.53 + #include <string.h>
    2.54 + #include <link.h>
    2.55 ++#include <sysdep.h>
    2.56 + 
    2.57 + /* This is an older, now obsolete value.  */
    2.58 + #define EM_S390_OLD	0xA390
    2.59 +===================================================================
    2.60 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-32/dl-machine.h,v
    2.61 +retrieving revision 1.20.4.1
    2.62 +retrieving revision 1.20.4.2
    2.63 +diff -u -r1.20.4.1 -r1.20.4.2
    2.64 +--- libc/sysdeps/s390/s390-32/dl-machine.h	2005/10/17 04:57:27	1.20.4.1
    2.65 ++++ libc/sysdeps/s390/s390-32/dl-machine.h	2006/02/23 22:36:51	1.20.4.2
    2.66 +@@ -27,6 +27,7 @@
    2.67 + #include <sys/param.h>
    2.68 + #include <string.h>
    2.69 + #include <link.h>
    2.70 ++#include <sysdep.h>
    2.71 + 
    2.72 + /* This is an older, now obsolete value.  */
    2.73 + #define EM_S390_OLD	0xA390
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/patches/glibc/2.5.1/glibc-2.3.5-allow-gcc4-wcstol_l.patch	Sat Aug 11 10:57:18 2007 +0000
     3.3 @@ -0,0 +1,59 @@
     3.4 +Fixes
     3.5 +../sysdeps/wordsize-64/wcstol_l.c:11: error: '____wcstoll_l_internal' aliased to undefined symbol '____wcstol_l_internal'
     3.6 +../sysdeps/wordsize-64/wcstol_l.c:12: error: '__wcstoll_l' aliased to undefined symbol '__wcstol_l'
     3.7 +../sysdeps/wordsize-64/wcstol_l.c:13: error: 'wcstoll_l' aliased to undefined symbol '__wcstol_l'
     3.8 +make[2]: *** [/home/dkegel/queue/jobdir.produser_cpsm10/crosstool-0.32/build/x86_64-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/wcsmbs/wcstoul_l.o] Error 1
     3.9 +
    3.10 +https://www.redhat.com/archives/fedora-cvs-commits/2005-March/msg00408.html
    3.11 +%changelog
    3.12 ++* Fri Mar 25 2005 Jakub Jelinek <jakub redhat com> 2.3.4-18
    3.13 ++- fix build on 64-bit arches with new GCC
    3.14 +
    3.15 +Revision 1.4.2.1, Fri Mar 25 11:59:01 2005 UTC (3 weeks, 4 days ago) by jakub
    3.16 +Branch: fedora-branch
    3.17 +CVS Tags: fedora-glibc-2_3_4-18
    3.18 +Changes since 1.4: +2 -0 lines
    3.19 +Diff to previous 1.4 (colored)
    3.20 +
    3.21 +	* sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
    3.22 +	* sysdeps/wordsize-64/wcstol_l.c: Likewise.
    3.23 +
    3.24 +
    3.25 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/strtol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
    3.26 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/wcstol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
    3.27 +
    3.28 +===================================================================
    3.29 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol_l.c,v
    3.30 +retrieving revision 1.4
    3.31 +retrieving revision 1.4.2.1
    3.32 +diff -u -r1.4 -r1.4.2.1
    3.33 +--- libc/sysdeps/wordsize-64/strtol_l.c	2003/03/03 09:45:12	1.4
    3.34 ++++ libc/sysdeps/wordsize-64/strtol_l.c	2005/03/25 11:59:01	1.4.2.1
    3.35 +@@ -8,7 +8,9 @@
    3.36 + #undef ____strtoll_l_internal
    3.37 + #undef __strtoll_l
    3.38 + #undef strtoll_l
    3.39 ++#if !UNSIGNED
    3.40 + strong_alias (____strtol_l_internal, ____strtoll_l_internal)
    3.41 + libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
    3.42 + weak_alias (__strtol_l, __strtoll_l)
    3.43 + weak_alias (__strtol_l, strtoll_l)
    3.44 ++#endif
    3.45 +===================================================================
    3.46 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol_l.c,v
    3.47 +retrieving revision 1.4
    3.48 +retrieving revision 1.4.2.1
    3.49 +diff -u -r1.4 -r1.4.2.1
    3.50 +--- libc/sysdeps/wordsize-64/wcstol_l.c	2002/08/08 11:44:51	1.4
    3.51 ++++ libc/sysdeps/wordsize-64/wcstol_l.c	2005/03/25 11:59:01	1.4.2.1
    3.52 +@@ -8,6 +8,8 @@
    3.53 + #undef ____wcstoll_l_internal
    3.54 + #undef __wcstoll_l
    3.55 + #undef wcstoll_l
    3.56 ++#if !UNSIGNED
    3.57 + strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
    3.58 + weak_alias (__wcstol_l, __wcstoll_l)
    3.59 + weak_alias (__wcstol_l, wcstoll_l)
    3.60 ++#endif
    3.61 +
    3.62 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/patches/glibc/2.5.1/glibc-2.3.5-cygwin.patch	Sat Aug 11 10:57:18 2007 +0000
     4.3 @@ -0,0 +1,187 @@
     4.4 +Fixes
     4.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
     4.6 +...
     4.7 +when building glibc-2.3.x on cygwin
     4.8 +
     4.9 +Idea from
    4.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
    4.11 +Basically, make glibc use .oST as suffix for 'object static'
    4.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
    4.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
    4.14 +
    4.15 +glibc-linuxthreads-2.3.5 also requires a patch, see 
    4.16 +../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
    4.17 +
    4.18 +[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
    4.19 +
    4.20 +Message-ID: <4282FCBA.3040000@unicontrols.cz>
    4.21 +Date: Thu, 12 May 2005 08:50:34 +0200
    4.22 +From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
    4.23 +To: Dan Kegel <dank@kegel.com>
    4.24 +CC:  crossgcc@sources.redhat.com
    4.25 +Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
    4.26 +
    4.27 +Hi Dan,
    4.28 +following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
    4.29 +on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
    4.30 +
    4.31 +-- 
    4.32 +                     Petr Cvachoucek
    4.33 +                     Unicontrols a.s.
    4.34 +                     http://www.unicontrols.cz
    4.35 +]
    4.36 +
    4.37 +diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
    4.38 +--- glibc-2.3.5/Makeconfig	2005-02-16 11:50:19.000000000 +0100
    4.39 ++++ glibc-2.3.5-cygwin/Makeconfig	2005-05-11 08:24:51.046875000 +0200
    4.40 +@@ -472,7 +472,7 @@
    4.41 + # run the linked programs.
    4.42 + link-libc = -Wl,-rpath-link=$(rpath-link) \
    4.43 + 	    $(common-objpfx)libc.so$(libc.so-version) \
    4.44 +-	    $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
    4.45 ++	    $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
    4.46 + # This is how to find at build-time things that will be installed there.
    4.47 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
    4.48 + endif
    4.49 +@@ -693,7 +693,7 @@
    4.50 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
    4.51 + # to pass different flags for each flavor.
    4.52 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
    4.53 +-all-object-suffixes := .o .os .op .og .ob .oS
    4.54 ++all-object-suffixes := .o .os .op .og .ob .oST
    4.55 + object-suffixes :=
    4.56 + CPPFLAGS-.o = $(pic-default)
    4.57 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
    4.58 +@@ -749,14 +749,14 @@
    4.59 + 
    4.60 + ifeq (yes,$(build-shared))
    4.61 + # Build special library that contains the static-only routines for libc.
    4.62 +-object-suffixes-for-libc += .oS
    4.63 ++object-suffixes-for-libc += .oST
    4.64 + 
    4.65 + # Must build the routines as PIC, though, because they can end up in (users')
    4.66 + # shared objects.  We don't want to use CFLAGS-os because users may, for
    4.67 + # example, make that processor-specific.
    4.68 +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
    4.69 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
    4.70 +-libtype.oS = lib%_nonshared.a
    4.71 ++CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
    4.72 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
    4.73 ++libtype.oST = lib%_nonshared.a
    4.74 + endif
    4.75 + 
    4.76 + # The assembler can generate debug information too.
    4.77 +diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
    4.78 +--- glibc-2.3.5/Makerules	2004-12-15 19:52:39.000000000 +0100
    4.79 ++++ glibc-2.3.5-cygwin/Makerules	2005-05-11 08:25:33.578125000 +0200
    4.80 +@@ -417,7 +417,7 @@
    4.81 + # Bounded pointer thunks are only built for *.ob
    4.82 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
    4.83 + 
    4.84 +-elide-routines.oS += $(filter-out $(static-only-routines),\
    4.85 ++elide-routines.oST += $(filter-out $(static-only-routines),\
    4.86 + 				  $(routines) $(aux) $(sysdep_routines)) \
    4.87 + 		     $(elide-bp-thunks)
    4.88 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
    4.89 +@@ -981,7 +981,7 @@
    4.90 + install: $(inst_libdir)/libc.so
    4.91 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
    4.92 + 			$(common-objpfx)libc.so$(libc.so-version) \
    4.93 +-			$(inst_libdir)/$(patsubst %,$(libtype.oS),\
    4.94 ++			$(inst_libdir)/$(patsubst %,$(libtype.oST),\
    4.95 + 						  $(libprefix)$(libc-name)) \
    4.96 + 			$(+force)
    4.97 + 	(echo '/* GNU ld script';\
    4.98 +@@ -989,7 +989,7 @@
    4.99 + 	 echo '   the static library, so try that secondarily.  */';\
   4.100 + 	 cat $<; \
   4.101 + 	 echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
   4.102 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
   4.103 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
   4.104 +	      ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
   4.105 + 	) > $@.new
   4.106 +	mv -f $@.new $@
   4.107 +diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
   4.108 +--- glibc-2.3.5/extra-lib.mk	2004-12-02 23:54:47.000000000 +0100
   4.109 ++++ glibc-2.3.5-cygwin/extra-lib.mk	2005-05-11 08:27:28.156250000 +0200
   4.110 +@@ -13,7 +13,7 @@
   4.111 + 
   4.112 + ifneq (,$($(lib)-static-only-routines))
   4.113 + ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
   4.114 +-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
   4.115 ++object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
   4.116 + endif
   4.117 + endif
   4.118 + 
   4.119 +@@ -29,7 +29,7 @@
   4.120 + 
   4.121 + # Add each flavor of library to the lists of things to build and install.
   4.122 + install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
   4.123 +-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
   4.124 ++extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
   4.125 + 			$(patsubst %,%$o,$(filter-out \
   4.126 + 					   $($(lib)-shared-only-routines),\
   4.127 + 					   $(all-$(lib)-routines))))
   4.128 +@@ -57,7 +57,7 @@
   4.129 + 
   4.130 + 
   4.131 + # Use o-iterator.mk to generate a rule for each flavor of library.
   4.132 +-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
   4.133 ++ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
   4.134 + define o-iterator-doit
   4.135 + $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
   4.136 +   $(patsubst %,$(objpfx)%$o,\
   4.137 +@@ -65,7 +65,7 @@
   4.138 + 			  $(all-$(lib)-routines))); \
   4.139 + 	$$(build-extra-lib)
   4.140 + endef
   4.141 +-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
   4.142 ++object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
   4.143 + include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
   4.144 + endif
   4.145 + 
   4.146 +@@ -77,9 +77,9 @@
   4.147 + 	$(build-extra-lib)
   4.148 + endif
   4.149 + 
   4.150 +-ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
   4.151 +-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
   4.152 +-  $(patsubst %,$(objpfx)%.oS,\
   4.153 ++ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
   4.154 ++$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
   4.155 ++  $(patsubst %,$(objpfx)%.oST,\
   4.156 + 	     $(filter $($(lib)-static-only-routines),\
   4.157 + 		      $(all-$(lib)-routines)))
   4.158 + 	$(build-extra-lib)
   4.159 +diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
   4.160 +--- glibc-2.3.5/nptl/Makefile	2005-02-16 09:45:56.000000000 +0100
   4.161 ++++ glibc-2.3.5-cygwin/nptl/Makefile	2005-05-11 08:26:01.812500000 +0200
   4.162 +@@ -375,7 +375,7 @@
   4.163 + 
   4.164 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
   4.165 + 			      $(objpfx)libpthread.so$(libpthread.so-version) \
   4.166 +-			      $(inst_libdir)/$(patsubst %,$(libtype.oS),\
   4.167 ++			      $(inst_libdir)/$(patsubst %,$(libtype.oST),\
   4.168 + 							$(libprefix)pthread) \
   4.169 + 			      $(+force)
   4.170 + 	(echo '/* GNU ld script';\
   4.171 +@@ -383,7 +383,7 @@
   4.172 + 	 echo '   the static library, so try that secondarily.  */';\
   4.173 + 	 cat $<; \
   4.174 + 	 echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
   4.175 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
   4.176 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
   4.177 + 	      ')' \
   4.178 + 	) > $@.new
   4.179 + 	mv -f $@.new $@
   4.180 +diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
   4.181 +--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile	2004-08-16 08:46:14.000000000 +0200
   4.182 ++++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile	2005-05-11 08:26:25.937500000 +0200
   4.183 +@@ -10,4 +10,4 @@
   4.184 + ASFLAGS-.op += -Wa,-Av9a
   4.185 + ASFLAGS-.og += -Wa,-Av9a
   4.186 + ASFLAGS-.ob += -Wa,-Av9a
   4.187 +-ASFLAGS-.oS += -Wa,-Av9a
   4.188 ++ASFLAGS-.oST += -Wa,-Av9a
   4.189 +
   4.190 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/patches/glibc/2.5.1/glibc-2.3.6-allow-gcc-4.0-elf.patch	Sat Aug 11 10:57:18 2007 +0000
     5.3 @@ -0,0 +1,67 @@
     5.4 +From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
     5.5 +Fixes
     5.6 +  rtld.c: In function '_dl_start':
     5.7 +  dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
     5.8 +  dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
     5.9 +when compiling glibc-2.3.4 with gcc-4.0
    5.10 +
    5.11 +But see also
    5.12 +http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
    5.13 +and
    5.14 +http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
    5.15 +which seem to propose less radical fixes?
    5.16 +
    5.17 +Aha.  See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
    5.18 +
    5.19 +--- glibc-2.3.6.orig/elf/dynamic-link.h	2005-03-12 18:12:37.000000000 -0800
    5.20 ++++ glibc-2.3.6/elf/dynamic-link.h	2005-03-12 18:12:59.777820848 -0800
    5.21 +@@ -19,47 +19,6 @@
    5.22 + 
    5.23 + #include <elf.h>
    5.24 + #include <assert.h>
    5.25 +-
    5.26 +-#ifdef RESOLVE_MAP
    5.27 +-/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
    5.28 +-   ElfW(Addr), because not all architectures can assume that the
    5.29 +-   relocated address is properly aligned, whereas the compiler is
    5.30 +-   entitled to assume that a pointer to a type is properly aligned for
    5.31 +-   the type.  Even if we cast the pointer back to some other type with
    5.32 +-   less strict alignment requirements, the compiler might still
    5.33 +-   remember that the pointer was originally more aligned, thereby
    5.34 +-   optimizing away alignment tests or using word instructions for
    5.35 +-   copying memory, breaking the very code written to handle the
    5.36 +-   unaligned cases.  */
    5.37 +-# if ! ELF_MACHINE_NO_REL
    5.38 +-auto inline void __attribute__((always_inline))
    5.39 +-elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
    5.40 +-		 const ElfW(Sym) *sym, const struct r_found_version *version,
    5.41 +-		 void *const reloc_addr);
    5.42 +-auto inline void __attribute__((always_inline))
    5.43 +-elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
    5.44 +-			  void *const reloc_addr);
    5.45 +-# endif
    5.46 +-# if ! ELF_MACHINE_NO_RELA
    5.47 +-auto inline void __attribute__((always_inline))
    5.48 +-elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
    5.49 +-		  const ElfW(Sym) *sym, const struct r_found_version *version,
    5.50 +-		  void *const reloc_addr);
    5.51 +-auto inline void __attribute__((always_inline))
    5.52 +-elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
    5.53 +-			   void *const reloc_addr);
    5.54 +-# endif
    5.55 +-# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
    5.56 +-auto inline void __attribute__((always_inline))
    5.57 +-elf_machine_lazy_rel (struct link_map *map,
    5.58 +-		      ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
    5.59 +-# else
    5.60 +-auto inline void __attribute__((always_inline))
    5.61 +-elf_machine_lazy_rel (struct link_map *map,
    5.62 +-		      ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
    5.63 +-# endif
    5.64 +-#endif
    5.65 +-
    5.66 + #include <dl-machine.h>
    5.67 + 
    5.68 + #ifndef VERSYMIDX
    5.69 +
    5.70 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/patches/glibc/2.5.1/glibc-2.3.6-configure-apple-as.patch	Sat Aug 11 10:57:18 2007 +0000
     6.3 @@ -0,0 +1,25 @@
     6.4 +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
     6.5 +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
     6.6 +
     6.7 +The following makes it possible to configure glibc-2.3.2 on Mac OS X,
     6.8 +where the assembler but doesn't understand the --version flag.
     6.9 +
    6.10 +Fixes the symptom
    6.11 +checking whether ld is GNU ld... no
    6.12 +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
    6.13 +checking version of /usr/libexec/gcc/darwin/ppc/as... 
    6.14 +<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
    6.15 +
    6.16 +--- glibc-2.3.2/configure~	Wed Feb 26 09:20:48 2003
    6.17 ++++ glibc-2.3.2/configure	Fri Feb 27 13:12:53 2004
    6.18 +@@ -4039,7 +4039,7 @@
    6.19 +   # Found it, now check the version.
    6.20 +   echo "$as_me:$LINENO: checking version of $AS" >&5
    6.21 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
    6.22 +-  ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
    6.23 ++  ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
    6.24 +   case $ac_prog_version in
    6.25 +     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
    6.26 +     2.1[3-9]*)
    6.27 +
    6.28 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/patches/glibc/2.5.1/glibc-2.3.6-fix-pr631.patch	Sat Aug 11 10:57:18 2007 +0000
     7.3 @@ -0,0 +1,45 @@
     7.4 +From dank@kegel.com
     7.5 +Wed Jun 15 09:12:43 PDT 2005
     7.6 +
     7.7 +Fixes
     7.8 +
     7.9 +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
    7.10 +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
    7.11 +... 53 lines deleted ...
    7.12 +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
    7.13 +collect2: ld returned 1 exit status
    7.14 +make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1
    7.15 +
    7.16 +when building glibc with --enable-static-nss.
    7.17 +
    7.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
    7.19 +
    7.20 +--- glibc-2.3.5/Makeconfig.old	Wed Jun 15 08:13:12 2005
    7.21 ++++ glibc-2.3.5/Makeconfig	Wed Jun 15 08:13:14 2005
    7.22 +@@ -510,7 +510,7 @@
    7.23 + 
    7.24 + # The static libraries.
    7.25 + ifeq (yes,$(build-static))
    7.26 +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
    7.27 ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
    7.28 + else
    7.29 + ifeq (yes,$(build-shared))
    7.30 + # We can try to link the programs with lib*_pic.a...
    7.31 +--- glibc-2.3.5/elf/Makefile.old	Wed Jun 15 07:46:49 2005
    7.32 ++++ glibc-2.3.5/elf/Makefile	Wed Jun 15 08:14:00 2005
    7.33 +@@ -120,6 +120,13 @@
    7.34 + install-bin-script = ldd
    7.35 + endif
    7.36 + 
    7.37 ++ifeq (yes,$(build-static-nss))
    7.38 ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
    7.39 ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
    7.40 ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
    7.41 ++	     $(resolvobjdir)/libresolv.a
    7.42 ++endif
    7.43 ++
    7.44 + others		= sprof sln
    7.45 + install-bin	= sprof
    7.46 + others-static   = sln
    7.47 +
    7.48 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/patches/glibc/2.5.1/glibc-2.4-i686-assembler.patch	Sat Aug 11 10:57:18 2007 +0000
     8.3 @@ -0,0 +1,38 @@
     8.4 +2007-02-15  Khem Raj  <kraj@xxxxxxxxxx>
     8.5 +
     8.6 +       * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
     8.7 +       * nptl/sysdeps/pthread/pt-initfini.c: Ditto.
     8.8 +
     8.9 +
    8.10 +
    8.11 +Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
    8.12 +===================================================================
    8.13 +--- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h	(revision 1469)
    8.14 ++++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h	(working copy)
    8.15 +@@ -29,6 +29,10 @@
    8.16 + #include <dl-sysdep.h>
    8.17 + #include <tls.h>
    8.18 + 
    8.19 ++#if defined __i686 && defined __ASSEMBLER__
    8.20 ++#undef __i686
    8.21 ++#define __i686 __i686
    8.22 ++#endif
    8.23 + 
    8.24 + /* For Linux we can use the system call table in the header file
    8.25 + 	/usr/include/asm/unistd.h
    8.26 +Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
    8.27 +===================================================================
    8.28 +--- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c	(revision 1469)
    8.29 ++++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c	(working copy)
    8.30 +@@ -45,6 +45,11 @@
    8.31 + /* Embed an #include to pull in the alignment and .end directives. */
    8.32 + asm ("\n#include \"defs.h\"");
    8.33 + 
    8.34 ++asm ("\n#if defined __i686 && defined __ASSEMBLER__");
    8.35 ++asm ("\n#undef __i686");
    8.36 ++asm ("\n#define __i686 __i686");
    8.37 ++asm ("\n#endif");
    8.38 ++
    8.39 + /* The initial common code ends here. */
    8.40 + asm ("\n/*@HEADER_ENDS*/");
    8.41 + 
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/patches/glibc/2.5.1/glibc-i386-preferred-stack-boundary.patch	Sat Aug 11 10:57:18 2007 +0000
     9.3 @@ -0,0 +1,18 @@
     9.4 +(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
     9.5 +License: LGPL v2.1
     9.6 +
     9.7 +Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
     9.8 +and 2 is not.
     9.9 +
    9.10 +diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
    9.11 +--- glibc-2.5.orig/sysdeps/i386/Makefile	2005-03-06 01:18:16.000000000 +0100
    9.12 ++++ glibc-2.5/sysdeps/i386/Makefile	2007-05-27 17:49:37.000000000 +0200
    9.13 +@@ -36,7 +36,7 @@
    9.14 + ifeq ($(subdir),csu)
    9.15 + sysdep-CFLAGS += -mpreferred-stack-boundary=4
    9.16 + else
    9.17 +-sysdep-CFLAGS += -mpreferred-stack-boundary=2
    9.18 ++sysdep-CFLAGS += -mpreferred-stack-boundary=4
    9.19 + # Likewise, any function which calls user callbacks
    9.20 + uses-callbacks += -mpreferred-stack-boundary=4
    9.21 + # Likewise, any stack alignment tests
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/patches/glibc/2.5.1/make-install-lib-all.patch.dont_apply	Sat Aug 11 10:57:18 2007 +0000
    10.3 @@ -0,0 +1,26 @@
    10.4 +From http://svn.exactcode.de/t2/trunk/package/base/glibc32/make-install-lib-all.patch
    10.5 +Rule to install all needed libraries, not just the ones installed by install-lib,
    10.6 +yet not install programs.  
    10.7 +Needed because we can't use the main install target, as we can't build programs before
    10.8 +we have the final gcc installed; linking fails because libeh.a is not present,
    10.9 +and glibc insists on linking programs with that library.
   10.10 +
   10.11 +diff -Naur glibc-2.3.4.orig/Makerules glibc-2.3.4/Makerules
   10.12 +--- glibc-2.3.4.orig/Makerules	2004-12-15 20:52:39.000000000 +0200
   10.13 ++++ glibc-2.3.4/Makerules	2005-02-19 15:16:31.415125176 +0200
   10.14 +@@ -864,6 +864,13 @@
   10.15 + installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
   10.16 + 			     $(inst_libdir)/$(patsubst %,$(libtype$o),\
   10.17 + 						     $(libprefix)$(libc-name)))
   10.18 ++
   10.19 ++install-lib-all: $(inst_slibdir)/libc.so$(libc.so-version) \
   10.20 ++		$(inst_slibdir)/libc-$(version).so \
   10.21 ++		$(inst_libdir)/libc.so \
   10.22 ++		$(inst_libdir)/libc.a \
   10.23 ++		install-lib
   10.24 ++
   10.25 + install: $(installed-libcs)
   10.26 + $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
   10.27 + 	$(make-target-directory)
   10.28 +
   10.29 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/patches/glibc/2.6.1/fix-pr398.patch	Sat Aug 11 10:57:18 2007 +0000
    11.3 @@ -0,0 +1,70 @@
    11.4 +Fixes error
    11.5 +
    11.6 +dl-runtime.c:222: error: parse error before "CFI_STARTPROC"
    11.7 +make[2]: *** [crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/elf/dl-runtim
    11.8 +e.o] Error 1
    11.9 +make[2]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
   11.10 +822/elf'
   11.11 +make[1]: *** [elf/subdir_lib] Error 2
   11.12 +make[1]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
   11.13 +822'
   11.14 +make: *** [all] Error 2
   11.15 +
   11.16 +-----------------
   11.17 +
   11.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=398
   11.19 +http://sources.redhat.com/ml/libc-alpha/2004-07/msg00023.html
   11.20 +
   11.21 +-----------------
   11.22 +
   11.23 +CVSROOT:	/cvs/glibc
   11.24 +Module name:	libc
   11.25 +Branch: 	glibc-2_3-branch
   11.26 +Changes by:	roland@sources.redhat.com	2006-02-23 22:36:51
   11.27 +
   11.28 +Modified files:
   11.29 +	sysdeps/s390/s390-64: dl-machine.h 
   11.30 +	sysdeps/s390/s390-32: dl-machine.h 
   11.31 +
   11.32 +Log message:
   11.33 +	2004-07-10  GOTO Masanori  <gotom@debian.or.jp>
   11.34 +	
   11.35 +	[BZ #398]
   11.36 +	* sysdeps/s390/s390-32/dl-machine.h: Include <sysdep.h> for CFI
   11.37 +	directive.
   11.38 +	* sysdeps/s390/s390-64/dl-machine.h: Likewise.
   11.39 +
   11.40 +Patches:
   11.41 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-64/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.19.4.1&r2=1.19.4.2
   11.42 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-32/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.20.4.1&r2=1.20.4.2
   11.43 +
   11.44 +===================================================================
   11.45 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-64/dl-machine.h,v
   11.46 +retrieving revision 1.19.4.1
   11.47 +retrieving revision 1.19.4.2
   11.48 +diff -u -r1.19.4.1 -r1.19.4.2
   11.49 +--- libc/sysdeps/s390/s390-64/dl-machine.h	2005/10/17 04:57:27	1.19.4.1
   11.50 ++++ libc/sysdeps/s390/s390-64/dl-machine.h	2006/02/23 22:36:51	1.19.4.2
   11.51 +@@ -27,6 +27,7 @@
   11.52 + #include <sys/param.h>
   11.53 + #include <string.h>
   11.54 + #include <link.h>
   11.55 ++#include <sysdep.h>
   11.56 + 
   11.57 + /* This is an older, now obsolete value.  */
   11.58 + #define EM_S390_OLD	0xA390
   11.59 +===================================================================
   11.60 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-32/dl-machine.h,v
   11.61 +retrieving revision 1.20.4.1
   11.62 +retrieving revision 1.20.4.2
   11.63 +diff -u -r1.20.4.1 -r1.20.4.2
   11.64 +--- libc/sysdeps/s390/s390-32/dl-machine.h	2005/10/17 04:57:27	1.20.4.1
   11.65 ++++ libc/sysdeps/s390/s390-32/dl-machine.h	2006/02/23 22:36:51	1.20.4.2
   11.66 +@@ -27,6 +27,7 @@
   11.67 + #include <sys/param.h>
   11.68 + #include <string.h>
   11.69 + #include <link.h>
   11.70 ++#include <sysdep.h>
   11.71 + 
   11.72 + /* This is an older, now obsolete value.  */
   11.73 + #define EM_S390_OLD	0xA390
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/patches/glibc/2.6.1/glibc-2.3.5-allow-gcc4-wcstol_l.patch	Sat Aug 11 10:57:18 2007 +0000
    12.3 @@ -0,0 +1,59 @@
    12.4 +Fixes
    12.5 +../sysdeps/wordsize-64/wcstol_l.c:11: error: '____wcstoll_l_internal' aliased to undefined symbol '____wcstol_l_internal'
    12.6 +../sysdeps/wordsize-64/wcstol_l.c:12: error: '__wcstoll_l' aliased to undefined symbol '__wcstol_l'
    12.7 +../sysdeps/wordsize-64/wcstol_l.c:13: error: 'wcstoll_l' aliased to undefined symbol '__wcstol_l'
    12.8 +make[2]: *** [/home/dkegel/queue/jobdir.produser_cpsm10/crosstool-0.32/build/x86_64-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/wcsmbs/wcstoul_l.o] Error 1
    12.9 +
   12.10 +https://www.redhat.com/archives/fedora-cvs-commits/2005-March/msg00408.html
   12.11 +%changelog
   12.12 ++* Fri Mar 25 2005 Jakub Jelinek <jakub redhat com> 2.3.4-18
   12.13 ++- fix build on 64-bit arches with new GCC
   12.14 +
   12.15 +Revision 1.4.2.1, Fri Mar 25 11:59:01 2005 UTC (3 weeks, 4 days ago) by jakub
   12.16 +Branch: fedora-branch
   12.17 +CVS Tags: fedora-glibc-2_3_4-18
   12.18 +Changes since 1.4: +2 -0 lines
   12.19 +Diff to previous 1.4 (colored)
   12.20 +
   12.21 +	* sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
   12.22 +	* sysdeps/wordsize-64/wcstol_l.c: Likewise.
   12.23 +
   12.24 +
   12.25 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/strtol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
   12.26 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/wcstol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
   12.27 +
   12.28 +===================================================================
   12.29 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol_l.c,v
   12.30 +retrieving revision 1.4
   12.31 +retrieving revision 1.4.2.1
   12.32 +diff -u -r1.4 -r1.4.2.1
   12.33 +--- libc/sysdeps/wordsize-64/strtol_l.c	2003/03/03 09:45:12	1.4
   12.34 ++++ libc/sysdeps/wordsize-64/strtol_l.c	2005/03/25 11:59:01	1.4.2.1
   12.35 +@@ -8,7 +8,9 @@
   12.36 + #undef ____strtoll_l_internal
   12.37 + #undef __strtoll_l
   12.38 + #undef strtoll_l
   12.39 ++#if !UNSIGNED
   12.40 + strong_alias (____strtol_l_internal, ____strtoll_l_internal)
   12.41 + libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
   12.42 + weak_alias (__strtol_l, __strtoll_l)
   12.43 + weak_alias (__strtol_l, strtoll_l)
   12.44 ++#endif
   12.45 +===================================================================
   12.46 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol_l.c,v
   12.47 +retrieving revision 1.4
   12.48 +retrieving revision 1.4.2.1
   12.49 +diff -u -r1.4 -r1.4.2.1
   12.50 +--- libc/sysdeps/wordsize-64/wcstol_l.c	2002/08/08 11:44:51	1.4
   12.51 ++++ libc/sysdeps/wordsize-64/wcstol_l.c	2005/03/25 11:59:01	1.4.2.1
   12.52 +@@ -8,6 +8,8 @@
   12.53 + #undef ____wcstoll_l_internal
   12.54 + #undef __wcstoll_l
   12.55 + #undef wcstoll_l
   12.56 ++#if !UNSIGNED
   12.57 + strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
   12.58 + weak_alias (__wcstol_l, __wcstoll_l)
   12.59 + weak_alias (__wcstol_l, wcstoll_l)
   12.60 ++#endif
   12.61 +
   12.62 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/patches/glibc/2.6.1/glibc-2.3.5-cygwin.patch	Sat Aug 11 10:57:18 2007 +0000
    13.3 @@ -0,0 +1,187 @@
    13.4 +Fixes
    13.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
    13.6 +...
    13.7 +when building glibc-2.3.x on cygwin
    13.8 +
    13.9 +Idea from
   13.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
   13.11 +Basically, make glibc use .oST as suffix for 'object static'
   13.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
   13.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
   13.14 +
   13.15 +glibc-linuxthreads-2.3.5 also requires a patch, see 
   13.16 +../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
   13.17 +
   13.18 +[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
   13.19 +
   13.20 +Message-ID: <4282FCBA.3040000@unicontrols.cz>
   13.21 +Date: Thu, 12 May 2005 08:50:34 +0200
   13.22 +From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
   13.23 +To: Dan Kegel <dank@kegel.com>
   13.24 +CC:  crossgcc@sources.redhat.com
   13.25 +Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
   13.26 +
   13.27 +Hi Dan,
   13.28 +following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
   13.29 +on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
   13.30 +
   13.31 +-- 
   13.32 +                     Petr Cvachoucek
   13.33 +                     Unicontrols a.s.
   13.34 +                     http://www.unicontrols.cz
   13.35 +]
   13.36 +
   13.37 +diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
   13.38 +--- glibc-2.3.5/Makeconfig	2005-02-16 11:50:19.000000000 +0100
   13.39 ++++ glibc-2.3.5-cygwin/Makeconfig	2005-05-11 08:24:51.046875000 +0200
   13.40 +@@ -472,7 +472,7 @@
   13.41 + # run the linked programs.
   13.42 + link-libc = -Wl,-rpath-link=$(rpath-link) \
   13.43 + 	    $(common-objpfx)libc.so$(libc.so-version) \
   13.44 +-	    $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
   13.45 ++	    $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
   13.46 + # This is how to find at build-time things that will be installed there.
   13.47 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
   13.48 + endif
   13.49 +@@ -693,7 +693,7 @@
   13.50 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
   13.51 + # to pass different flags for each flavor.
   13.52 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
   13.53 +-all-object-suffixes := .o .os .op .og .ob .oS
   13.54 ++all-object-suffixes := .o .os .op .og .ob .oST
   13.55 + object-suffixes :=
   13.56 + CPPFLAGS-.o = $(pic-default)
   13.57 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
   13.58 +@@ -749,14 +749,14 @@
   13.59 + 
   13.60 + ifeq (yes,$(build-shared))
   13.61 + # Build special library that contains the static-only routines for libc.
   13.62 +-object-suffixes-for-libc += .oS
   13.63 ++object-suffixes-for-libc += .oST
   13.64 + 
   13.65 + # Must build the routines as PIC, though, because they can end up in (users')
   13.66 + # shared objects.  We don't want to use CFLAGS-os because users may, for
   13.67 + # example, make that processor-specific.
   13.68 +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
   13.69 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
   13.70 +-libtype.oS = lib%_nonshared.a
   13.71 ++CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
   13.72 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
   13.73 ++libtype.oST = lib%_nonshared.a
   13.74 + endif
   13.75 + 
   13.76 + # The assembler can generate debug information too.
   13.77 +diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
   13.78 +--- glibc-2.3.5/Makerules	2004-12-15 19:52:39.000000000 +0100
   13.79 ++++ glibc-2.3.5-cygwin/Makerules	2005-05-11 08:25:33.578125000 +0200
   13.80 +@@ -417,7 +417,7 @@
   13.81 + # Bounded pointer thunks are only built for *.ob
   13.82 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
   13.83 + 
   13.84 +-elide-routines.oS += $(filter-out $(static-only-routines),\
   13.85 ++elide-routines.oST += $(filter-out $(static-only-routines),\
   13.86 + 				  $(routines) $(aux) $(sysdep_routines)) \
   13.87 + 		     $(elide-bp-thunks)
   13.88 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
   13.89 +@@ -981,7 +981,7 @@
   13.90 + install: $(inst_libdir)/libc.so
   13.91 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
   13.92 + 			$(common-objpfx)libc.so$(libc.so-version) \
   13.93 +-			$(inst_libdir)/$(patsubst %,$(libtype.oS),\
   13.94 ++			$(inst_libdir)/$(patsubst %,$(libtype.oST),\
   13.95 + 						  $(libprefix)$(libc-name)) \
   13.96 + 			$(+force)
   13.97 + 	(echo '/* GNU ld script';\
   13.98 +@@ -989,7 +989,7 @@
   13.99 + 	 echo '   the static library, so try that secondarily.  */';\
  13.100 + 	 cat $<; \
  13.101 + 	 echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
  13.102 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
  13.103 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
  13.104 +	      ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
  13.105 + 	) > $@.new
  13.106 +	mv -f $@.new $@
  13.107 +diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
  13.108 +--- glibc-2.3.5/extra-lib.mk	2004-12-02 23:54:47.000000000 +0100
  13.109 ++++ glibc-2.3.5-cygwin/extra-lib.mk	2005-05-11 08:27:28.156250000 +0200
  13.110 +@@ -13,7 +13,7 @@
  13.111 + 
  13.112 + ifneq (,$($(lib)-static-only-routines))
  13.113 + ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
  13.114 +-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
  13.115 ++object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
  13.116 + endif
  13.117 + endif
  13.118 + 
  13.119 +@@ -29,7 +29,7 @@
  13.120 + 
  13.121 + # Add each flavor of library to the lists of things to build and install.
  13.122 + install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
  13.123 +-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
  13.124 ++extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
  13.125 + 			$(patsubst %,%$o,$(filter-out \
  13.126 + 					   $($(lib)-shared-only-routines),\
  13.127 + 					   $(all-$(lib)-routines))))
  13.128 +@@ -57,7 +57,7 @@
  13.129 + 
  13.130 + 
  13.131 + # Use o-iterator.mk to generate a rule for each flavor of library.
  13.132 +-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
  13.133 ++ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
  13.134 + define o-iterator-doit
  13.135 + $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
  13.136 +   $(patsubst %,$(objpfx)%$o,\
  13.137 +@@ -65,7 +65,7 @@
  13.138 + 			  $(all-$(lib)-routines))); \
  13.139 + 	$$(build-extra-lib)
  13.140 + endef
  13.141 +-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
  13.142 ++object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
  13.143 + include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
  13.144 + endif
  13.145 + 
  13.146 +@@ -77,9 +77,9 @@
  13.147 + 	$(build-extra-lib)
  13.148 + endif
  13.149 + 
  13.150 +-ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
  13.151 +-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
  13.152 +-  $(patsubst %,$(objpfx)%.oS,\
  13.153 ++ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
  13.154 ++$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
  13.155 ++  $(patsubst %,$(objpfx)%.oST,\
  13.156 + 	     $(filter $($(lib)-static-only-routines),\
  13.157 + 		      $(all-$(lib)-routines)))
  13.158 + 	$(build-extra-lib)
  13.159 +diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
  13.160 +--- glibc-2.3.5/nptl/Makefile	2005-02-16 09:45:56.000000000 +0100
  13.161 ++++ glibc-2.3.5-cygwin/nptl/Makefile	2005-05-11 08:26:01.812500000 +0200
  13.162 +@@ -375,7 +375,7 @@
  13.163 + 
  13.164 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
  13.165 + 			      $(objpfx)libpthread.so$(libpthread.so-version) \
  13.166 +-			      $(inst_libdir)/$(patsubst %,$(libtype.oS),\
  13.167 ++			      $(inst_libdir)/$(patsubst %,$(libtype.oST),\
  13.168 + 							$(libprefix)pthread) \
  13.169 + 			      $(+force)
  13.170 + 	(echo '/* GNU ld script';\
  13.171 +@@ -383,7 +383,7 @@
  13.172 + 	 echo '   the static library, so try that secondarily.  */';\
  13.173 + 	 cat $<; \
  13.174 + 	 echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
  13.175 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
  13.176 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
  13.177 + 	      ')' \
  13.178 + 	) > $@.new
  13.179 + 	mv -f $@.new $@
  13.180 +diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
  13.181 +--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile	2004-08-16 08:46:14.000000000 +0200
  13.182 ++++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile	2005-05-11 08:26:25.937500000 +0200
  13.183 +@@ -10,4 +10,4 @@
  13.184 + ASFLAGS-.op += -Wa,-Av9a
  13.185 + ASFLAGS-.og += -Wa,-Av9a
  13.186 + ASFLAGS-.ob += -Wa,-Av9a
  13.187 +-ASFLAGS-.oS += -Wa,-Av9a
  13.188 ++ASFLAGS-.oST += -Wa,-Av9a
  13.189 +
  13.190 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/patches/glibc/2.6.1/glibc-2.3.6-allow-gcc-4.0-elf.patch	Sat Aug 11 10:57:18 2007 +0000
    14.3 @@ -0,0 +1,67 @@
    14.4 +From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
    14.5 +Fixes
    14.6 +  rtld.c: In function '_dl_start':
    14.7 +  dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
    14.8 +  dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
    14.9 +when compiling glibc-2.3.4 with gcc-4.0
   14.10 +
   14.11 +But see also
   14.12 +http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
   14.13 +and
   14.14 +http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
   14.15 +which seem to propose less radical fixes?
   14.16 +
   14.17 +Aha.  See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
   14.18 +
   14.19 +--- glibc-2.3.6.orig/elf/dynamic-link.h	2005-03-12 18:12:37.000000000 -0800
   14.20 ++++ glibc-2.3.6/elf/dynamic-link.h	2005-03-12 18:12:59.777820848 -0800
   14.21 +@@ -19,47 +19,6 @@
   14.22 + 
   14.23 + #include <elf.h>
   14.24 + #include <assert.h>
   14.25 +-
   14.26 +-#ifdef RESOLVE_MAP
   14.27 +-/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
   14.28 +-   ElfW(Addr), because not all architectures can assume that the
   14.29 +-   relocated address is properly aligned, whereas the compiler is
   14.30 +-   entitled to assume that a pointer to a type is properly aligned for
   14.31 +-   the type.  Even if we cast the pointer back to some other type with
   14.32 +-   less strict alignment requirements, the compiler might still
   14.33 +-   remember that the pointer was originally more aligned, thereby
   14.34 +-   optimizing away alignment tests or using word instructions for
   14.35 +-   copying memory, breaking the very code written to handle the
   14.36 +-   unaligned cases.  */
   14.37 +-# if ! ELF_MACHINE_NO_REL
   14.38 +-auto inline void __attribute__((always_inline))
   14.39 +-elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
   14.40 +-		 const ElfW(Sym) *sym, const struct r_found_version *version,
   14.41 +-		 void *const reloc_addr);
   14.42 +-auto inline void __attribute__((always_inline))
   14.43 +-elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
   14.44 +-			  void *const reloc_addr);
   14.45 +-# endif
   14.46 +-# if ! ELF_MACHINE_NO_RELA
   14.47 +-auto inline void __attribute__((always_inline))
   14.48 +-elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
   14.49 +-		  const ElfW(Sym) *sym, const struct r_found_version *version,
   14.50 +-		  void *const reloc_addr);
   14.51 +-auto inline void __attribute__((always_inline))
   14.52 +-elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
   14.53 +-			   void *const reloc_addr);
   14.54 +-# endif
   14.55 +-# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
   14.56 +-auto inline void __attribute__((always_inline))
   14.57 +-elf_machine_lazy_rel (struct link_map *map,
   14.58 +-		      ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
   14.59 +-# else
   14.60 +-auto inline void __attribute__((always_inline))
   14.61 +-elf_machine_lazy_rel (struct link_map *map,
   14.62 +-		      ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
   14.63 +-# endif
   14.64 +-#endif
   14.65 +-
   14.66 + #include <dl-machine.h>
   14.67 + 
   14.68 + #ifndef VERSYMIDX
   14.69 +
   14.70 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/patches/glibc/2.6.1/glibc-2.3.6-configure-apple-as.patch	Sat Aug 11 10:57:18 2007 +0000
    15.3 @@ -0,0 +1,25 @@
    15.4 +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
    15.5 +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
    15.6 +
    15.7 +The following makes it possible to configure glibc-2.3.2 on Mac OS X,
    15.8 +where the assembler but doesn't understand the --version flag.
    15.9 +
   15.10 +Fixes the symptom
   15.11 +checking whether ld is GNU ld... no
   15.12 +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
   15.13 +checking version of /usr/libexec/gcc/darwin/ppc/as... 
   15.14 +<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
   15.15 +
   15.16 +--- glibc-2.3.2/configure~	Wed Feb 26 09:20:48 2003
   15.17 ++++ glibc-2.3.2/configure	Fri Feb 27 13:12:53 2004
   15.18 +@@ -4039,7 +4039,7 @@
   15.19 +   # Found it, now check the version.
   15.20 +   echo "$as_me:$LINENO: checking version of $AS" >&5
   15.21 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
   15.22 +-  ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
   15.23 ++  ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
   15.24 +   case $ac_prog_version in
   15.25 +     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
   15.26 +     2.1[3-9]*)
   15.27 +
   15.28 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/patches/glibc/2.6.1/glibc-2.3.6-fix-pr631.patch	Sat Aug 11 10:57:18 2007 +0000
    16.3 @@ -0,0 +1,45 @@
    16.4 +From dank@kegel.com
    16.5 +Wed Jun 15 09:12:43 PDT 2005
    16.6 +
    16.7 +Fixes
    16.8 +
    16.9 +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
   16.10 +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
   16.11 +... 53 lines deleted ...
   16.12 +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
   16.13 +collect2: ld returned 1 exit status
   16.14 +make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1
   16.15 +
   16.16 +when building glibc with --enable-static-nss.
   16.17 +
   16.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
   16.19 +
   16.20 +--- glibc-2.3.5/Makeconfig.old	Wed Jun 15 08:13:12 2005
   16.21 ++++ glibc-2.3.5/Makeconfig	Wed Jun 15 08:13:14 2005
   16.22 +@@ -510,7 +510,7 @@
   16.23 + 
   16.24 + # The static libraries.
   16.25 + ifeq (yes,$(build-static))
   16.26 +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
   16.27 ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
   16.28 + else
   16.29 + ifeq (yes,$(build-shared))
   16.30 + # We can try to link the programs with lib*_pic.a...
   16.31 +--- glibc-2.3.5/elf/Makefile.old	Wed Jun 15 07:46:49 2005
   16.32 ++++ glibc-2.3.5/elf/Makefile	Wed Jun 15 08:14:00 2005
   16.33 +@@ -120,6 +120,13 @@
   16.34 + install-bin-script = ldd
   16.35 + endif
   16.36 + 
   16.37 ++ifeq (yes,$(build-static-nss))
   16.38 ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
   16.39 ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
   16.40 ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
   16.41 ++	     $(resolvobjdir)/libresolv.a
   16.42 ++endif
   16.43 ++
   16.44 + others		= sprof sln
   16.45 + install-bin	= sprof
   16.46 + others-static   = sln
   16.47 +
   16.48 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/patches/glibc/2.6.1/glibc-2.4-i686-assembler.patch	Sat Aug 11 10:57:18 2007 +0000
    17.3 @@ -0,0 +1,38 @@
    17.4 +2007-02-15  Khem Raj  <kraj@xxxxxxxxxx>
    17.5 +
    17.6 +       * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
    17.7 +       * nptl/sysdeps/pthread/pt-initfini.c: Ditto.
    17.8 +
    17.9 +
   17.10 +
   17.11 +Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
   17.12 +===================================================================
   17.13 +--- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h	(revision 1469)
   17.14 ++++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h	(working copy)
   17.15 +@@ -29,6 +29,10 @@
   17.16 + #include <dl-sysdep.h>
   17.17 + #include <tls.h>
   17.18 + 
   17.19 ++#if defined __i686 && defined __ASSEMBLER__
   17.20 ++#undef __i686
   17.21 ++#define __i686 __i686
   17.22 ++#endif
   17.23 + 
   17.24 + /* For Linux we can use the system call table in the header file
   17.25 + 	/usr/include/asm/unistd.h
   17.26 +Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
   17.27 +===================================================================
   17.28 +--- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c	(revision 1469)
   17.29 ++++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c	(working copy)
   17.30 +@@ -45,6 +45,11 @@
   17.31 + /* Embed an #include to pull in the alignment and .end directives. */
   17.32 + asm ("\n#include \"defs.h\"");
   17.33 + 
   17.34 ++asm ("\n#if defined __i686 && defined __ASSEMBLER__");
   17.35 ++asm ("\n#undef __i686");
   17.36 ++asm ("\n#define __i686 __i686");
   17.37 ++asm ("\n#endif");
   17.38 ++
   17.39 + /* The initial common code ends here. */
   17.40 + asm ("\n/*@HEADER_ENDS*/");
   17.41 + 
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/patches/glibc/2.6.1/glibc-i386-preferred-stack-boundary.patch	Sat Aug 11 10:57:18 2007 +0000
    18.3 @@ -0,0 +1,18 @@
    18.4 +(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
    18.5 +License: LGPL v2.1
    18.6 +
    18.7 +Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
    18.8 +and 2 is not.
    18.9 +
   18.10 +diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
   18.11 +--- glibc-2.5.orig/sysdeps/i386/Makefile	2005-03-06 01:18:16.000000000 +0100
   18.12 ++++ glibc-2.5/sysdeps/i386/Makefile	2007-05-27 17:49:37.000000000 +0200
   18.13 +@@ -36,7 +36,7 @@
   18.14 + ifeq ($(subdir),csu)
   18.15 + sysdep-CFLAGS += -mpreferred-stack-boundary=4
   18.16 + else
   18.17 +-sysdep-CFLAGS += -mpreferred-stack-boundary=2
   18.18 ++sysdep-CFLAGS += -mpreferred-stack-boundary=4
   18.19 + # Likewise, any function which calls user callbacks
   18.20 + uses-callbacks += -mpreferred-stack-boundary=4
   18.21 + # Likewise, any stack alignment tests
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/patches/glibc/2.6.1/make-install-lib-all.patch.dont_apply	Sat Aug 11 10:57:18 2007 +0000
    19.3 @@ -0,0 +1,26 @@
    19.4 +From http://svn.exactcode.de/t2/trunk/package/base/glibc32/make-install-lib-all.patch
    19.5 +Rule to install all needed libraries, not just the ones installed by install-lib,
    19.6 +yet not install programs.  
    19.7 +Needed because we can't use the main install target, as we can't build programs before
    19.8 +we have the final gcc installed; linking fails because libeh.a is not present,
    19.9 +and glibc insists on linking programs with that library.
   19.10 +
   19.11 +diff -Naur glibc-2.3.4.orig/Makerules glibc-2.3.4/Makerules
   19.12 +--- glibc-2.3.4.orig/Makerules	2004-12-15 20:52:39.000000000 +0200
   19.13 ++++ glibc-2.3.4/Makerules	2005-02-19 15:16:31.415125176 +0200
   19.14 +@@ -864,6 +864,13 @@
   19.15 + installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
   19.16 + 			     $(inst_libdir)/$(patsubst %,$(libtype$o),\
   19.17 + 						     $(libprefix)$(libc-name)))
   19.18 ++
   19.19 ++install-lib-all: $(inst_slibdir)/libc.so$(libc.so-version) \
   19.20 ++		$(inst_slibdir)/libc-$(version).so \
   19.21 ++		$(inst_libdir)/libc.so \
   19.22 ++		$(inst_libdir)/libc.a \
   19.23 ++		install-lib
   19.24 ++
   19.25 + install: $(installed-libcs)
   19.26 + $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
   19.27 + 	$(make-target-directory)
   19.28 +
   19.29 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
    20.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.2 +++ b/patches/glibc/2.6/fix-pr398.patch	Sat Aug 11 10:57:18 2007 +0000
    20.3 @@ -0,0 +1,70 @@
    20.4 +Fixes error
    20.5 +
    20.6 +dl-runtime.c:222: error: parse error before "CFI_STARTPROC"
    20.7 +make[2]: *** [crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/elf/dl-runtim
    20.8 +e.o] Error 1
    20.9 +make[2]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
   20.10 +822/elf'
   20.11 +make[1]: *** [elf/subdir_lib] Error 2
   20.12 +make[1]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
   20.13 +822'
   20.14 +make: *** [all] Error 2
   20.15 +
   20.16 +-----------------
   20.17 +
   20.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=398
   20.19 +http://sources.redhat.com/ml/libc-alpha/2004-07/msg00023.html
   20.20 +
   20.21 +-----------------
   20.22 +
   20.23 +CVSROOT:	/cvs/glibc
   20.24 +Module name:	libc
   20.25 +Branch: 	glibc-2_3-branch
   20.26 +Changes by:	roland@sources.redhat.com	2006-02-23 22:36:51
   20.27 +
   20.28 +Modified files:
   20.29 +	sysdeps/s390/s390-64: dl-machine.h 
   20.30 +	sysdeps/s390/s390-32: dl-machine.h 
   20.31 +
   20.32 +Log message:
   20.33 +	2004-07-10  GOTO Masanori  <gotom@debian.or.jp>
   20.34 +	
   20.35 +	[BZ #398]
   20.36 +	* sysdeps/s390/s390-32/dl-machine.h: Include <sysdep.h> for CFI
   20.37 +	directive.
   20.38 +	* sysdeps/s390/s390-64/dl-machine.h: Likewise.
   20.39 +
   20.40 +Patches:
   20.41 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-64/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.19.4.1&r2=1.19.4.2
   20.42 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-32/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.20.4.1&r2=1.20.4.2
   20.43 +
   20.44 +===================================================================
   20.45 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-64/dl-machine.h,v
   20.46 +retrieving revision 1.19.4.1
   20.47 +retrieving revision 1.19.4.2
   20.48 +diff -u -r1.19.4.1 -r1.19.4.2
   20.49 +--- libc/sysdeps/s390/s390-64/dl-machine.h	2005/10/17 04:57:27	1.19.4.1
   20.50 ++++ libc/sysdeps/s390/s390-64/dl-machine.h	2006/02/23 22:36:51	1.19.4.2
   20.51 +@@ -27,6 +27,7 @@
   20.52 + #include <sys/param.h>
   20.53 + #include <string.h>
   20.54 + #include <link.h>
   20.55 ++#include <sysdep.h>
   20.56 + 
   20.57 + /* This is an older, now obsolete value.  */
   20.58 + #define EM_S390_OLD	0xA390
   20.59 +===================================================================
   20.60 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-32/dl-machine.h,v
   20.61 +retrieving revision 1.20.4.1
   20.62 +retrieving revision 1.20.4.2
   20.63 +diff -u -r1.20.4.1 -r1.20.4.2
   20.64 +--- libc/sysdeps/s390/s390-32/dl-machine.h	2005/10/17 04:57:27	1.20.4.1
   20.65 ++++ libc/sysdeps/s390/s390-32/dl-machine.h	2006/02/23 22:36:51	1.20.4.2
   20.66 +@@ -27,6 +27,7 @@
   20.67 + #include <sys/param.h>
   20.68 + #include <string.h>
   20.69 + #include <link.h>
   20.70 ++#include <sysdep.h>
   20.71 + 
   20.72 + /* This is an older, now obsolete value.  */
   20.73 + #define EM_S390_OLD	0xA390
    21.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.2 +++ b/patches/glibc/2.6/glibc-2.3.5-allow-gcc4-wcstol_l.patch	Sat Aug 11 10:57:18 2007 +0000
    21.3 @@ -0,0 +1,59 @@
    21.4 +Fixes
    21.5 +../sysdeps/wordsize-64/wcstol_l.c:11: error: '____wcstoll_l_internal' aliased to undefined symbol '____wcstol_l_internal'
    21.6 +../sysdeps/wordsize-64/wcstol_l.c:12: error: '__wcstoll_l' aliased to undefined symbol '__wcstol_l'
    21.7 +../sysdeps/wordsize-64/wcstol_l.c:13: error: 'wcstoll_l' aliased to undefined symbol '__wcstol_l'
    21.8 +make[2]: *** [/home/dkegel/queue/jobdir.produser_cpsm10/crosstool-0.32/build/x86_64-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/wcsmbs/wcstoul_l.o] Error 1
    21.9 +
   21.10 +https://www.redhat.com/archives/fedora-cvs-commits/2005-March/msg00408.html
   21.11 +%changelog
   21.12 ++* Fri Mar 25 2005 Jakub Jelinek <jakub redhat com> 2.3.4-18
   21.13 ++- fix build on 64-bit arches with new GCC
   21.14 +
   21.15 +Revision 1.4.2.1, Fri Mar 25 11:59:01 2005 UTC (3 weeks, 4 days ago) by jakub
   21.16 +Branch: fedora-branch
   21.17 +CVS Tags: fedora-glibc-2_3_4-18
   21.18 +Changes since 1.4: +2 -0 lines
   21.19 +Diff to previous 1.4 (colored)
   21.20 +
   21.21 +	* sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
   21.22 +	* sysdeps/wordsize-64/wcstol_l.c: Likewise.
   21.23 +
   21.24 +
   21.25 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/strtol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
   21.26 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/wcstol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
   21.27 +
   21.28 +===================================================================
   21.29 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol_l.c,v
   21.30 +retrieving revision 1.4
   21.31 +retrieving revision 1.4.2.1
   21.32 +diff -u -r1.4 -r1.4.2.1
   21.33 +--- libc/sysdeps/wordsize-64/strtol_l.c	2003/03/03 09:45:12	1.4
   21.34 ++++ libc/sysdeps/wordsize-64/strtol_l.c	2005/03/25 11:59:01	1.4.2.1
   21.35 +@@ -8,7 +8,9 @@
   21.36 + #undef ____strtoll_l_internal
   21.37 + #undef __strtoll_l
   21.38 + #undef strtoll_l
   21.39 ++#if !UNSIGNED
   21.40 + strong_alias (____strtol_l_internal, ____strtoll_l_internal)
   21.41 + libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
   21.42 + weak_alias (__strtol_l, __strtoll_l)
   21.43 + weak_alias (__strtol_l, strtoll_l)
   21.44 ++#endif
   21.45 +===================================================================
   21.46 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol_l.c,v
   21.47 +retrieving revision 1.4
   21.48 +retrieving revision 1.4.2.1
   21.49 +diff -u -r1.4 -r1.4.2.1
   21.50 +--- libc/sysdeps/wordsize-64/wcstol_l.c	2002/08/08 11:44:51	1.4
   21.51 ++++ libc/sysdeps/wordsize-64/wcstol_l.c	2005/03/25 11:59:01	1.4.2.1
   21.52 +@@ -8,6 +8,8 @@
   21.53 + #undef ____wcstoll_l_internal
   21.54 + #undef __wcstoll_l
   21.55 + #undef wcstoll_l
   21.56 ++#if !UNSIGNED
   21.57 + strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
   21.58 + weak_alias (__wcstol_l, __wcstoll_l)
   21.59 + weak_alias (__wcstol_l, wcstoll_l)
   21.60 ++#endif
   21.61 +
   21.62 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
    22.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.2 +++ b/patches/glibc/2.6/glibc-2.3.5-cygwin.patch	Sat Aug 11 10:57:18 2007 +0000
    22.3 @@ -0,0 +1,187 @@
    22.4 +Fixes
    22.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
    22.6 +...
    22.7 +when building glibc-2.3.x on cygwin
    22.8 +
    22.9 +Idea from
   22.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
   22.11 +Basically, make glibc use .oST as suffix for 'object static'
   22.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
   22.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
   22.14 +
   22.15 +glibc-linuxthreads-2.3.5 also requires a patch, see 
   22.16 +../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
   22.17 +
   22.18 +[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
   22.19 +
   22.20 +Message-ID: <4282FCBA.3040000@unicontrols.cz>
   22.21 +Date: Thu, 12 May 2005 08:50:34 +0200
   22.22 +From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
   22.23 +To: Dan Kegel <dank@kegel.com>
   22.24 +CC:  crossgcc@sources.redhat.com
   22.25 +Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
   22.26 +
   22.27 +Hi Dan,
   22.28 +following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
   22.29 +on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
   22.30 +
   22.31 +-- 
   22.32 +                     Petr Cvachoucek
   22.33 +                     Unicontrols a.s.
   22.34 +                     http://www.unicontrols.cz
   22.35 +]
   22.36 +
   22.37 +diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
   22.38 +--- glibc-2.3.5/Makeconfig	2005-02-16 11:50:19.000000000 +0100
   22.39 ++++ glibc-2.3.5-cygwin/Makeconfig	2005-05-11 08:24:51.046875000 +0200
   22.40 +@@ -472,7 +472,7 @@
   22.41 + # run the linked programs.
   22.42 + link-libc = -Wl,-rpath-link=$(rpath-link) \
   22.43 + 	    $(common-objpfx)libc.so$(libc.so-version) \
   22.44 +-	    $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
   22.45 ++	    $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
   22.46 + # This is how to find at build-time things that will be installed there.
   22.47 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
   22.48 + endif
   22.49 +@@ -693,7 +693,7 @@
   22.50 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
   22.51 + # to pass different flags for each flavor.
   22.52 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
   22.53 +-all-object-suffixes := .o .os .op .og .ob .oS
   22.54 ++all-object-suffixes := .o .os .op .og .ob .oST
   22.55 + object-suffixes :=
   22.56 + CPPFLAGS-.o = $(pic-default)
   22.57 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
   22.58 +@@ -749,14 +749,14 @@
   22.59 + 
   22.60 + ifeq (yes,$(build-shared))
   22.61 + # Build special library that contains the static-only routines for libc.
   22.62 +-object-suffixes-for-libc += .oS
   22.63 ++object-suffixes-for-libc += .oST
   22.64 + 
   22.65 + # Must build the routines as PIC, though, because they can end up in (users')
   22.66 + # shared objects.  We don't want to use CFLAGS-os because users may, for
   22.67 + # example, make that processor-specific.
   22.68 +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
   22.69 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
   22.70 +-libtype.oS = lib%_nonshared.a
   22.71 ++CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
   22.72 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
   22.73 ++libtype.oST = lib%_nonshared.a
   22.74 + endif
   22.75 + 
   22.76 + # The assembler can generate debug information too.
   22.77 +diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
   22.78 +--- glibc-2.3.5/Makerules	2004-12-15 19:52:39.000000000 +0100
   22.79 ++++ glibc-2.3.5-cygwin/Makerules	2005-05-11 08:25:33.578125000 +0200
   22.80 +@@ -417,7 +417,7 @@
   22.81 + # Bounded pointer thunks are only built for *.ob
   22.82 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
   22.83 + 
   22.84 +-elide-routines.oS += $(filter-out $(static-only-routines),\
   22.85 ++elide-routines.oST += $(filter-out $(static-only-routines),\
   22.86 + 				  $(routines) $(aux) $(sysdep_routines)) \
   22.87 + 		     $(elide-bp-thunks)
   22.88 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
   22.89 +@@ -981,7 +981,7 @@
   22.90 + install: $(inst_libdir)/libc.so
   22.91 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
   22.92 + 			$(common-objpfx)libc.so$(libc.so-version) \
   22.93 +-			$(inst_libdir)/$(patsubst %,$(libtype.oS),\
   22.94 ++			$(inst_libdir)/$(patsubst %,$(libtype.oST),\
   22.95 + 						  $(libprefix)$(libc-name)) \
   22.96 + 			$(+force)
   22.97 + 	(echo '/* GNU ld script';\
   22.98 +@@ -989,7 +989,7 @@
   22.99 + 	 echo '   the static library, so try that secondarily.  */';\
  22.100 + 	 cat $<; \
  22.101 + 	 echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
  22.102 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
  22.103 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
  22.104 +	      ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
  22.105 + 	) > $@.new
  22.106 +	mv -f $@.new $@
  22.107 +diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
  22.108 +--- glibc-2.3.5/extra-lib.mk	2004-12-02 23:54:47.000000000 +0100
  22.109 ++++ glibc-2.3.5-cygwin/extra-lib.mk	2005-05-11 08:27:28.156250000 +0200
  22.110 +@@ -13,7 +13,7 @@
  22.111 + 
  22.112 + ifneq (,$($(lib)-static-only-routines))
  22.113 + ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
  22.114 +-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
  22.115 ++object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
  22.116 + endif
  22.117 + endif
  22.118 + 
  22.119 +@@ -29,7 +29,7 @@
  22.120 + 
  22.121 + # Add each flavor of library to the lists of things to build and install.
  22.122 + install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
  22.123 +-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
  22.124 ++extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
  22.125 + 			$(patsubst %,%$o,$(filter-out \
  22.126 + 					   $($(lib)-shared-only-routines),\
  22.127 + 					   $(all-$(lib)-routines))))
  22.128 +@@ -57,7 +57,7 @@
  22.129 + 
  22.130 + 
  22.131 + # Use o-iterator.mk to generate a rule for each flavor of library.
  22.132 +-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
  22.133 ++ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
  22.134 + define o-iterator-doit
  22.135 + $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
  22.136 +   $(patsubst %,$(objpfx)%$o,\
  22.137 +@@ -65,7 +65,7 @@
  22.138 + 			  $(all-$(lib)-routines))); \
  22.139 + 	$$(build-extra-lib)
  22.140 + endef
  22.141 +-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
  22.142 ++object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
  22.143 + include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
  22.144 + endif
  22.145 + 
  22.146 +@@ -77,9 +77,9 @@
  22.147 + 	$(build-extra-lib)
  22.148 + endif
  22.149 + 
  22.150 +-ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
  22.151 +-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
  22.152 +-  $(patsubst %,$(objpfx)%.oS,\
  22.153 ++ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
  22.154 ++$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
  22.155 ++  $(patsubst %,$(objpfx)%.oST,\
  22.156 + 	     $(filter $($(lib)-static-only-routines),\
  22.157 + 		      $(all-$(lib)-routines)))
  22.158 + 	$(build-extra-lib)
  22.159 +diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
  22.160 +--- glibc-2.3.5/nptl/Makefile	2005-02-16 09:45:56.000000000 +0100
  22.161 ++++ glibc-2.3.5-cygwin/nptl/Makefile	2005-05-11 08:26:01.812500000 +0200
  22.162 +@@ -375,7 +375,7 @@
  22.163 + 
  22.164 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
  22.165 + 			      $(objpfx)libpthread.so$(libpthread.so-version) \
  22.166 +-			      $(inst_libdir)/$(patsubst %,$(libtype.oS),\
  22.167 ++			      $(inst_libdir)/$(patsubst %,$(libtype.oST),\
  22.168 + 							$(libprefix)pthread) \
  22.169 + 			      $(+force)
  22.170 + 	(echo '/* GNU ld script';\
  22.171 +@@ -383,7 +383,7 @@
  22.172 + 	 echo '   the static library, so try that secondarily.  */';\
  22.173 + 	 cat $<; \
  22.174 + 	 echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
  22.175 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
  22.176 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
  22.177 + 	      ')' \
  22.178 + 	) > $@.new
  22.179 + 	mv -f $@.new $@
  22.180 +diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
  22.181 +--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile	2004-08-16 08:46:14.000000000 +0200
  22.182 ++++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile	2005-05-11 08:26:25.937500000 +0200
  22.183 +@@ -10,4 +10,4 @@
  22.184 + ASFLAGS-.op += -Wa,-Av9a
  22.185 + ASFLAGS-.og += -Wa,-Av9a
  22.186 + ASFLAGS-.ob += -Wa,-Av9a
  22.187 +-ASFLAGS-.oS += -Wa,-Av9a
  22.188 ++ASFLAGS-.oST += -Wa,-Av9a
  22.189 +
  22.190 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
    23.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.2 +++ b/patches/glibc/2.6/glibc-2.3.6-allow-gcc-4.0-elf.patch	Sat Aug 11 10:57:18 2007 +0000
    23.3 @@ -0,0 +1,67 @@
    23.4 +From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
    23.5 +Fixes
    23.6 +  rtld.c: In function '_dl_start':
    23.7 +  dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
    23.8 +  dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
    23.9 +when compiling glibc-2.3.4 with gcc-4.0
   23.10 +
   23.11 +But see also
   23.12 +http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
   23.13 +and
   23.14 +http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
   23.15 +which seem to propose less radical fixes?
   23.16 +
   23.17 +Aha.  See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
   23.18 +
   23.19 +--- glibc-2.3.6.orig/elf/dynamic-link.h	2005-03-12 18:12:37.000000000 -0800
   23.20 ++++ glibc-2.3.6/elf/dynamic-link.h	2005-03-12 18:12:59.777820848 -0800
   23.21 +@@ -19,47 +19,6 @@
   23.22 + 
   23.23 + #include <elf.h>
   23.24 + #include <assert.h>
   23.25 +-
   23.26 +-#ifdef RESOLVE_MAP
   23.27 +-/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
   23.28 +-   ElfW(Addr), because not all architectures can assume that the
   23.29 +-   relocated address is properly aligned, whereas the compiler is
   23.30 +-   entitled to assume that a pointer to a type is properly aligned for
   23.31 +-   the type.  Even if we cast the pointer back to some other type with
   23.32 +-   less strict alignment requirements, the compiler might still
   23.33 +-   remember that the pointer was originally more aligned, thereby
   23.34 +-   optimizing away alignment tests or using word instructions for
   23.35 +-   copying memory, breaking the very code written to handle the
   23.36 +-   unaligned cases.  */
   23.37 +-# if ! ELF_MACHINE_NO_REL
   23.38 +-auto inline void __attribute__((always_inline))
   23.39 +-elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
   23.40 +-		 const ElfW(Sym) *sym, const struct r_found_version *version,
   23.41 +-		 void *const reloc_addr);
   23.42 +-auto inline void __attribute__((always_inline))
   23.43 +-elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
   23.44 +-			  void *const reloc_addr);
   23.45 +-# endif
   23.46 +-# if ! ELF_MACHINE_NO_RELA
   23.47 +-auto inline void __attribute__((always_inline))
   23.48 +-elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
   23.49 +-		  const ElfW(Sym) *sym, const struct r_found_version *version,
   23.50 +-		  void *const reloc_addr);
   23.51 +-auto inline void __attribute__((always_inline))
   23.52 +-elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
   23.53 +-			   void *const reloc_addr);
   23.54 +-# endif
   23.55 +-# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
   23.56 +-auto inline void __attribute__((always_inline))
   23.57 +-elf_machine_lazy_rel (struct link_map *map,
   23.58 +-		      ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
   23.59 +-# else
   23.60 +-auto inline void __attribute__((always_inline))
   23.61 +-elf_machine_lazy_rel (struct link_map *map,
   23.62 +-		      ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
   23.63 +-# endif
   23.64 +-#endif
   23.65 +-
   23.66 + #include <dl-machine.h>
   23.67 + 
   23.68 + #ifndef VERSYMIDX
   23.69 +
   23.70 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/patches/glibc/2.6/glibc-2.3.6-configure-apple-as.patch	Sat Aug 11 10:57:18 2007 +0000
    24.3 @@ -0,0 +1,25 @@
    24.4 +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
    24.5 +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
    24.6 +
    24.7 +The following makes it possible to configure glibc-2.3.2 on Mac OS X,
    24.8 +where the assembler but doesn't understand the --version flag.
    24.9 +
   24.10 +Fixes the symptom
   24.11 +checking whether ld is GNU ld... no
   24.12 +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
   24.13 +checking version of /usr/libexec/gcc/darwin/ppc/as... 
   24.14 +<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
   24.15 +
   24.16 +--- glibc-2.3.2/configure~	Wed Feb 26 09:20:48 2003
   24.17 ++++ glibc-2.3.2/configure	Fri Feb 27 13:12:53 2004
   24.18 +@@ -4039,7 +4039,7 @@
   24.19 +   # Found it, now check the version.
   24.20 +   echo "$as_me:$LINENO: checking version of $AS" >&5
   24.21 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
   24.22 +-  ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
   24.23 ++  ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
   24.24 +   case $ac_prog_version in
   24.25 +     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
   24.26 +     2.1[3-9]*)
   24.27 +
   24.28 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
    25.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.2 +++ b/patches/glibc/2.6/glibc-2.3.6-fix-pr631.patch	Sat Aug 11 10:57:18 2007 +0000
    25.3 @@ -0,0 +1,45 @@
    25.4 +From dank@kegel.com
    25.5 +Wed Jun 15 09:12:43 PDT 2005
    25.6 +
    25.7 +Fixes
    25.8 +
    25.9 +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
   25.10 +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
   25.11 +... 53 lines deleted ...
   25.12 +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
   25.13 +collect2: ld returned 1 exit status
   25.14 +make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1
   25.15 +
   25.16 +when building glibc with --enable-static-nss.
   25.17 +
   25.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
   25.19 +
   25.20 +--- glibc-2.3.5/Makeconfig.old	Wed Jun 15 08:13:12 2005
   25.21 ++++ glibc-2.3.5/Makeconfig	Wed Jun 15 08:13:14 2005
   25.22 +@@ -510,7 +510,7 @@
   25.23 + 
   25.24 + # The static libraries.
   25.25 + ifeq (yes,$(build-static))
   25.26 +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
   25.27 ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
   25.28 + else
   25.29 + ifeq (yes,$(build-shared))
   25.30 + # We can try to link the programs with lib*_pic.a...
   25.31 +--- glibc-2.3.5/elf/Makefile.old	Wed Jun 15 07:46:49 2005
   25.32 ++++ glibc-2.3.5/elf/Makefile	Wed Jun 15 08:14:00 2005
   25.33 +@@ -120,6 +120,13 @@
   25.34 + install-bin-script = ldd
   25.35 + endif
   25.36 + 
   25.37 ++ifeq (yes,$(build-static-nss))
   25.38 ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
   25.39 ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
   25.40 ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
   25.41 ++	     $(resolvobjdir)/libresolv.a
   25.42 ++endif
   25.43 ++
   25.44 + others		= sprof sln
   25.45 + install-bin	= sprof
   25.46 + others-static   = sln
   25.47 +
   25.48 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
    26.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.2 +++ b/patches/glibc/2.6/glibc-2.4-i686-assembler.patch	Sat Aug 11 10:57:18 2007 +0000
    26.3 @@ -0,0 +1,38 @@
    26.4 +2007-02-15  Khem Raj  <kraj@xxxxxxxxxx>
    26.5 +
    26.6 +       * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
    26.7 +       * nptl/sysdeps/pthread/pt-initfini.c: Ditto.
    26.8 +
    26.9 +
   26.10 +
   26.11 +Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
   26.12 +===================================================================
   26.13 +--- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h	(revision 1469)
   26.14 ++++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h	(working copy)
   26.15 +@@ -29,6 +29,10 @@
   26.16 + #include <dl-sysdep.h>
   26.17 + #include <tls.h>
   26.18 + 
   26.19 ++#if defined __i686 && defined __ASSEMBLER__
   26.20 ++#undef __i686
   26.21 ++#define __i686 __i686
   26.22 ++#endif
   26.23 + 
   26.24 + /* For Linux we can use the system call table in the header file
   26.25 + 	/usr/include/asm/unistd.h
   26.26 +Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
   26.27 +===================================================================
   26.28 +--- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c	(revision 1469)
   26.29 ++++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c	(working copy)
   26.30 +@@ -45,6 +45,11 @@
   26.31 + /* Embed an #include to pull in the alignment and .end directives. */
   26.32 + asm ("\n#include \"defs.h\"");
   26.33 + 
   26.34 ++asm ("\n#if defined __i686 && defined __ASSEMBLER__");
   26.35 ++asm ("\n#undef __i686");
   26.36 ++asm ("\n#define __i686 __i686");
   26.37 ++asm ("\n#endif");
   26.38 ++
   26.39 + /* The initial common code ends here. */
   26.40 + asm ("\n/*@HEADER_ENDS*/");
   26.41 + 
    27.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.2 +++ b/patches/glibc/2.6/glibc-i386-preferred-stack-boundary.patch	Sat Aug 11 10:57:18 2007 +0000
    27.3 @@ -0,0 +1,18 @@
    27.4 +(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
    27.5 +License: LGPL v2.1
    27.6 +
    27.7 +Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
    27.8 +and 2 is not.
    27.9 +
   27.10 +diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
   27.11 +--- glibc-2.5.orig/sysdeps/i386/Makefile	2005-03-06 01:18:16.000000000 +0100
   27.12 ++++ glibc-2.5/sysdeps/i386/Makefile	2007-05-27 17:49:37.000000000 +0200
   27.13 +@@ -36,7 +36,7 @@
   27.14 + ifeq ($(subdir),csu)
   27.15 + sysdep-CFLAGS += -mpreferred-stack-boundary=4
   27.16 + else
   27.17 +-sysdep-CFLAGS += -mpreferred-stack-boundary=2
   27.18 ++sysdep-CFLAGS += -mpreferred-stack-boundary=4
   27.19 + # Likewise, any function which calls user callbacks
   27.20 + uses-callbacks += -mpreferred-stack-boundary=4
   27.21 + # Likewise, any stack alignment tests
    28.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.2 +++ b/patches/glibc/2.6/make-install-lib-all.patch.dont_apply	Sat Aug 11 10:57:18 2007 +0000
    28.3 @@ -0,0 +1,26 @@
    28.4 +From http://svn.exactcode.de/t2/trunk/package/base/glibc32/make-install-lib-all.patch
    28.5 +Rule to install all needed libraries, not just the ones installed by install-lib,
    28.6 +yet not install programs.  
    28.7 +Needed because we can't use the main install target, as we can't build programs before
    28.8 +we have the final gcc installed; linking fails because libeh.a is not present,
    28.9 +and glibc insists on linking programs with that library.
   28.10 +
   28.11 +diff -Naur glibc-2.3.4.orig/Makerules glibc-2.3.4/Makerules
   28.12 +--- glibc-2.3.4.orig/Makerules	2004-12-15 20:52:39.000000000 +0200
   28.13 ++++ glibc-2.3.4/Makerules	2005-02-19 15:16:31.415125176 +0200
   28.14 +@@ -864,6 +864,13 @@
   28.15 + installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
   28.16 + 			     $(inst_libdir)/$(patsubst %,$(libtype$o),\
   28.17 + 						     $(libprefix)$(libc-name)))
   28.18 ++
   28.19 ++install-lib-all: $(inst_slibdir)/libc.so$(libc.so-version) \
   28.20 ++		$(inst_slibdir)/libc-$(version).so \
   28.21 ++		$(inst_libdir)/libc.so \
   28.22 ++		$(inst_libdir)/libc.a \
   28.23 ++		install-lib
   28.24 ++
   28.25 + install: $(installed-libcs)
   28.26 + $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
   28.27 + 	$(make-target-directory)
   28.28 +
   28.29 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>