Patches for glibc-2.5, courtesy of "Robert P. J. Day" <rpjday@mindspring.com>
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/glibc/2.5/fix-pr398.patch Fri May 18 08:27:50 2007 +0000
1.3 @@ -0,0 +1,70 @@
1.4 +Fixes error
1.5 +
1.6 +dl-runtime.c:222: error: parse error before "CFI_STARTPROC"
1.7 +make[2]: *** [crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/elf/dl-runtim
1.8 +e.o] Error 1
1.9 +make[2]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
1.10 +822/elf'
1.11 +make[1]: *** [elf/subdir_lib] Error 2
1.12 +make[1]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
1.13 +822'
1.14 +make: *** [all] Error 2
1.15 +
1.16 +-----------------
1.17 +
1.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=398
1.19 +http://sources.redhat.com/ml/libc-alpha/2004-07/msg00023.html
1.20 +
1.21 +-----------------
1.22 +
1.23 +CVSROOT: /cvs/glibc
1.24 +Module name: libc
1.25 +Branch: glibc-2_3-branch
1.26 +Changes by: roland@sources.redhat.com 2006-02-23 22:36:51
1.27 +
1.28 +Modified files:
1.29 + sysdeps/s390/s390-64: dl-machine.h
1.30 + sysdeps/s390/s390-32: dl-machine.h
1.31 +
1.32 +Log message:
1.33 + 2004-07-10 GOTO Masanori <gotom@debian.or.jp>
1.34 +
1.35 + [BZ #398]
1.36 + * sysdeps/s390/s390-32/dl-machine.h: Include <sysdep.h> for CFI
1.37 + directive.
1.38 + * sysdeps/s390/s390-64/dl-machine.h: Likewise.
1.39 +
1.40 +Patches:
1.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
1.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
1.43 +
1.44 +===================================================================
1.45 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-64/dl-machine.h,v
1.46 +retrieving revision 1.19.4.1
1.47 +retrieving revision 1.19.4.2
1.48 +diff -u -r1.19.4.1 -r1.19.4.2
1.49 +--- libc/sysdeps/s390/s390-64/dl-machine.h 2005/10/17 04:57:27 1.19.4.1
1.50 ++++ libc/sysdeps/s390/s390-64/dl-machine.h 2006/02/23 22:36:51 1.19.4.2
1.51 +@@ -27,6 +27,7 @@
1.52 + #include <sys/param.h>
1.53 + #include <string.h>
1.54 + #include <link.h>
1.55 ++#include <sysdep.h>
1.56 +
1.57 + /* This is an older, now obsolete value. */
1.58 + #define EM_S390_OLD 0xA390
1.59 +===================================================================
1.60 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-32/dl-machine.h,v
1.61 +retrieving revision 1.20.4.1
1.62 +retrieving revision 1.20.4.2
1.63 +diff -u -r1.20.4.1 -r1.20.4.2
1.64 +--- libc/sysdeps/s390/s390-32/dl-machine.h 2005/10/17 04:57:27 1.20.4.1
1.65 ++++ libc/sysdeps/s390/s390-32/dl-machine.h 2006/02/23 22:36:51 1.20.4.2
1.66 +@@ -27,6 +27,7 @@
1.67 + #include <sys/param.h>
1.68 + #include <string.h>
1.69 + #include <link.h>
1.70 ++#include <sysdep.h>
1.71 +
1.72 + /* This is an older, now obsolete value. */
1.73 + #define EM_S390_OLD 0xA390
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/patches/glibc/2.5/glibc-2.3.5-allow-gcc4-wcstol_l.patch Fri May 18 08:27:50 2007 +0000
2.3 @@ -0,0 +1,59 @@
2.4 +Fixes
2.5 +../sysdeps/wordsize-64/wcstol_l.c:11: error: '____wcstoll_l_internal' aliased to undefined symbol '____wcstol_l_internal'
2.6 +../sysdeps/wordsize-64/wcstol_l.c:12: error: '__wcstoll_l' aliased to undefined symbol '__wcstol_l'
2.7 +../sysdeps/wordsize-64/wcstol_l.c:13: error: 'wcstoll_l' aliased to undefined symbol '__wcstol_l'
2.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
2.9 +
2.10 +https://www.redhat.com/archives/fedora-cvs-commits/2005-March/msg00408.html
2.11 +%changelog
2.12 ++* Fri Mar 25 2005 Jakub Jelinek <jakub redhat com> 2.3.4-18
2.13 ++- fix build on 64-bit arches with new GCC
2.14 +
2.15 +Revision 1.4.2.1, Fri Mar 25 11:59:01 2005 UTC (3 weeks, 4 days ago) by jakub
2.16 +Branch: fedora-branch
2.17 +CVS Tags: fedora-glibc-2_3_4-18
2.18 +Changes since 1.4: +2 -0 lines
2.19 +Diff to previous 1.4 (colored)
2.20 +
2.21 + * sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
2.22 + * sysdeps/wordsize-64/wcstol_l.c: Likewise.
2.23 +
2.24 +
2.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
2.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
2.27 +
2.28 +===================================================================
2.29 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol_l.c,v
2.30 +retrieving revision 1.4
2.31 +retrieving revision 1.4.2.1
2.32 +diff -u -r1.4 -r1.4.2.1
2.33 +--- libc/sysdeps/wordsize-64/strtol_l.c 2003/03/03 09:45:12 1.4
2.34 ++++ libc/sysdeps/wordsize-64/strtol_l.c 2005/03/25 11:59:01 1.4.2.1
2.35 +@@ -8,7 +8,9 @@
2.36 + #undef ____strtoll_l_internal
2.37 + #undef __strtoll_l
2.38 + #undef strtoll_l
2.39 ++#if !UNSIGNED
2.40 + strong_alias (____strtol_l_internal, ____strtoll_l_internal)
2.41 + libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
2.42 + weak_alias (__strtol_l, __strtoll_l)
2.43 + weak_alias (__strtol_l, strtoll_l)
2.44 ++#endif
2.45 +===================================================================
2.46 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol_l.c,v
2.47 +retrieving revision 1.4
2.48 +retrieving revision 1.4.2.1
2.49 +diff -u -r1.4 -r1.4.2.1
2.50 +--- libc/sysdeps/wordsize-64/wcstol_l.c 2002/08/08 11:44:51 1.4
2.51 ++++ libc/sysdeps/wordsize-64/wcstol_l.c 2005/03/25 11:59:01 1.4.2.1
2.52 +@@ -8,6 +8,8 @@
2.53 + #undef ____wcstoll_l_internal
2.54 + #undef __wcstoll_l
2.55 + #undef wcstoll_l
2.56 ++#if !UNSIGNED
2.57 + strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
2.58 + weak_alias (__wcstol_l, __wcstoll_l)
2.59 + weak_alias (__wcstol_l, wcstoll_l)
2.60 ++#endif
2.61 +
2.62 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/patches/glibc/2.5/glibc-2.3.5-cygwin.patch Fri May 18 08:27:50 2007 +0000
3.3 @@ -0,0 +1,187 @@
3.4 +Fixes
3.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
3.6 +...
3.7 +when building glibc-2.3.x on cygwin
3.8 +
3.9 +Idea from
3.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
3.11 +Basically, make glibc use .oST as suffix for 'object static'
3.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
3.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
3.14 +
3.15 +glibc-linuxthreads-2.3.5 also requires a patch, see
3.16 +../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
3.17 +
3.18 +[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
3.19 +
3.20 +Message-ID: <4282FCBA.3040000@unicontrols.cz>
3.21 +Date: Thu, 12 May 2005 08:50:34 +0200
3.22 +From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
3.23 +To: Dan Kegel <dank@kegel.com>
3.24 +CC: crossgcc@sources.redhat.com
3.25 +Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
3.26 +
3.27 +Hi Dan,
3.28 +following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
3.29 +on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
3.30 +
3.31 +--
3.32 + Petr Cvachoucek
3.33 + Unicontrols a.s.
3.34 + http://www.unicontrols.cz
3.35 +]
3.36 +
3.37 +diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
3.38 +--- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
3.39 ++++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
3.40 +@@ -472,7 +472,7 @@
3.41 + # run the linked programs.
3.42 + link-libc = -Wl,-rpath-link=$(rpath-link) \
3.43 + $(common-objpfx)libc.so$(libc.so-version) \
3.44 +- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
3.45 ++ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
3.46 + # This is how to find at build-time things that will be installed there.
3.47 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
3.48 + endif
3.49 +@@ -693,7 +693,7 @@
3.50 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
3.51 + # to pass different flags for each flavor.
3.52 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
3.53 +-all-object-suffixes := .o .os .op .og .ob .oS
3.54 ++all-object-suffixes := .o .os .op .og .ob .oST
3.55 + object-suffixes :=
3.56 + CPPFLAGS-.o = $(pic-default)
3.57 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
3.58 +@@ -749,14 +749,14 @@
3.59 +
3.60 + ifeq (yes,$(build-shared))
3.61 + # Build special library that contains the static-only routines for libc.
3.62 +-object-suffixes-for-libc += .oS
3.63 ++object-suffixes-for-libc += .oST
3.64 +
3.65 + # Must build the routines as PIC, though, because they can end up in (users')
3.66 + # shared objects. We don't want to use CFLAGS-os because users may, for
3.67 + # example, make that processor-specific.
3.68 +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
3.69 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
3.70 +-libtype.oS = lib%_nonshared.a
3.71 ++CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
3.72 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
3.73 ++libtype.oST = lib%_nonshared.a
3.74 + endif
3.75 +
3.76 + # The assembler can generate debug information too.
3.77 +diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
3.78 +--- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
3.79 ++++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
3.80 +@@ -417,7 +417,7 @@
3.81 + # Bounded pointer thunks are only built for *.ob
3.82 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
3.83 +
3.84 +-elide-routines.oS += $(filter-out $(static-only-routines),\
3.85 ++elide-routines.oST += $(filter-out $(static-only-routines),\
3.86 + $(routines) $(aux) $(sysdep_routines)) \
3.87 + $(elide-bp-thunks)
3.88 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
3.89 +@@ -981,7 +981,7 @@
3.90 + install: $(inst_libdir)/libc.so
3.91 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
3.92 + $(common-objpfx)libc.so$(libc.so-version) \
3.93 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
3.94 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
3.95 + $(libprefix)$(libc-name)) \
3.96 + $(+force)
3.97 + (echo '/* GNU ld script';\
3.98 +@@ -989,7 +989,7 @@
3.99 + echo ' the static library, so try that secondarily. */';\
3.100 + cat $<; \
3.101 + echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
3.102 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
3.103 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
3.104 + ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
3.105 + ) > $@.new
3.106 + mv -f $@.new $@
3.107 +diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
3.108 +--- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
3.109 ++++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
3.110 +@@ -13,7 +13,7 @@
3.111 +
3.112 + ifneq (,$($(lib)-static-only-routines))
3.113 + ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
3.114 +-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
3.115 ++object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
3.116 + endif
3.117 + endif
3.118 +
3.119 +@@ -29,7 +29,7 @@
3.120 +
3.121 + # Add each flavor of library to the lists of things to build and install.
3.122 + install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
3.123 +-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
3.124 ++extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
3.125 + $(patsubst %,%$o,$(filter-out \
3.126 + $($(lib)-shared-only-routines),\
3.127 + $(all-$(lib)-routines))))
3.128 +@@ -57,7 +57,7 @@
3.129 +
3.130 +
3.131 + # Use o-iterator.mk to generate a rule for each flavor of library.
3.132 +-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
3.133 ++ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
3.134 + define o-iterator-doit
3.135 + $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
3.136 + $(patsubst %,$(objpfx)%$o,\
3.137 +@@ -65,7 +65,7 @@
3.138 + $(all-$(lib)-routines))); \
3.139 + $$(build-extra-lib)
3.140 + endef
3.141 +-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
3.142 ++object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
3.143 + include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
3.144 + endif
3.145 +
3.146 +@@ -77,9 +77,9 @@
3.147 + $(build-extra-lib)
3.148 + endif
3.149 +
3.150 +-ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
3.151 +-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
3.152 +- $(patsubst %,$(objpfx)%.oS,\
3.153 ++ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
3.154 ++$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
3.155 ++ $(patsubst %,$(objpfx)%.oST,\
3.156 + $(filter $($(lib)-static-only-routines),\
3.157 + $(all-$(lib)-routines)))
3.158 + $(build-extra-lib)
3.159 +diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
3.160 +--- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
3.161 ++++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
3.162 +@@ -375,7 +375,7 @@
3.163 +
3.164 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
3.165 + $(objpfx)libpthread.so$(libpthread.so-version) \
3.166 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
3.167 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
3.168 + $(libprefix)pthread) \
3.169 + $(+force)
3.170 + (echo '/* GNU ld script';\
3.171 +@@ -383,7 +383,7 @@
3.172 + echo ' the static library, so try that secondarily. */';\
3.173 + cat $<; \
3.174 + echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
3.175 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
3.176 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
3.177 + ')' \
3.178 + ) > $@.new
3.179 + mv -f $@.new $@
3.180 +diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
3.181 +--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
3.182 ++++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
3.183 +@@ -10,4 +10,4 @@
3.184 + ASFLAGS-.op += -Wa,-Av9a
3.185 + ASFLAGS-.og += -Wa,-Av9a
3.186 + ASFLAGS-.ob += -Wa,-Av9a
3.187 +-ASFLAGS-.oS += -Wa,-Av9a
3.188 ++ASFLAGS-.oST += -Wa,-Av9a
3.189 +
3.190 +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/glibc-2.3.6-allow-gcc-4.0-elf.patch Fri May 18 08:27:50 2007 +0000
4.3 @@ -0,0 +1,67 @@
4.4 +From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
4.5 +Fixes
4.6 + rtld.c: In function '_dl_start':
4.7 + dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
4.8 + dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
4.9 +when compiling glibc-2.3.4 with gcc-4.0
4.10 +
4.11 +But see also
4.12 +http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
4.13 +and
4.14 +http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
4.15 +which seem to propose less radical fixes?
4.16 +
4.17 +Aha. See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
4.18 +
4.19 +--- glibc-2.3.6.orig/elf/dynamic-link.h 2005-03-12 18:12:37.000000000 -0800
4.20 ++++ glibc-2.3.6/elf/dynamic-link.h 2005-03-12 18:12:59.777820848 -0800
4.21 +@@ -19,47 +19,6 @@
4.22 +
4.23 + #include <elf.h>
4.24 + #include <assert.h>
4.25 +-
4.26 +-#ifdef RESOLVE_MAP
4.27 +-/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
4.28 +- ElfW(Addr), because not all architectures can assume that the
4.29 +- relocated address is properly aligned, whereas the compiler is
4.30 +- entitled to assume that a pointer to a type is properly aligned for
4.31 +- the type. Even if we cast the pointer back to some other type with
4.32 +- less strict alignment requirements, the compiler might still
4.33 +- remember that the pointer was originally more aligned, thereby
4.34 +- optimizing away alignment tests or using word instructions for
4.35 +- copying memory, breaking the very code written to handle the
4.36 +- unaligned cases. */
4.37 +-# if ! ELF_MACHINE_NO_REL
4.38 +-auto inline void __attribute__((always_inline))
4.39 +-elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
4.40 +- const ElfW(Sym) *sym, const struct r_found_version *version,
4.41 +- void *const reloc_addr);
4.42 +-auto inline void __attribute__((always_inline))
4.43 +-elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
4.44 +- void *const reloc_addr);
4.45 +-# endif
4.46 +-# if ! ELF_MACHINE_NO_RELA
4.47 +-auto inline void __attribute__((always_inline))
4.48 +-elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
4.49 +- const ElfW(Sym) *sym, const struct r_found_version *version,
4.50 +- void *const reloc_addr);
4.51 +-auto inline void __attribute__((always_inline))
4.52 +-elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
4.53 +- void *const reloc_addr);
4.54 +-# endif
4.55 +-# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
4.56 +-auto inline void __attribute__((always_inline))
4.57 +-elf_machine_lazy_rel (struct link_map *map,
4.58 +- ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
4.59 +-# else
4.60 +-auto inline void __attribute__((always_inline))
4.61 +-elf_machine_lazy_rel (struct link_map *map,
4.62 +- ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
4.63 +-# endif
4.64 +-#endif
4.65 +-
4.66 + #include <dl-machine.h>
4.67 +
4.68 + #ifndef VERSYMIDX
4.69 +
4.70 +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/glibc-2.3.6-configure-apple-as.patch Fri May 18 08:27:50 2007 +0000
5.3 @@ -0,0 +1,25 @@
5.4 +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
5.5 +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
5.6 +
5.7 +The following makes it possible to configure glibc-2.3.2 on Mac OS X,
5.8 +where the assembler but doesn't understand the --version flag.
5.9 +
5.10 +Fixes the symptom
5.11 +checking whether ld is GNU ld... no
5.12 +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
5.13 +checking version of /usr/libexec/gcc/darwin/ppc/as...
5.14 +<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
5.15 +
5.16 +--- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
5.17 ++++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
5.18 +@@ -4039,7 +4039,7 @@
5.19 + # Found it, now check the version.
5.20 + echo "$as_me:$LINENO: checking version of $AS" >&5
5.21 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
5.22 +- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
5.23 ++ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
5.24 + case $ac_prog_version in
5.25 + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
5.26 + 2.1[3-9]*)
5.27 +
5.28 +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/glibc-2.3.6-fix-pr631.patch Fri May 18 08:27:50 2007 +0000
6.3 @@ -0,0 +1,45 @@
6.4 +From dank@kegel.com
6.5 +Wed Jun 15 09:12:43 PDT 2005
6.6 +
6.7 +Fixes
6.8 +
6.9 +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
6.10 +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
6.11 +... 53 lines deleted ...
6.12 +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
6.13 +collect2: ld returned 1 exit status
6.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
6.15 +
6.16 +when building glibc with --enable-static-nss.
6.17 +
6.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
6.19 +
6.20 +--- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
6.21 ++++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
6.22 +@@ -510,7 +510,7 @@
6.23 +
6.24 + # The static libraries.
6.25 + ifeq (yes,$(build-static))
6.26 +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
6.27 ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
6.28 + else
6.29 + ifeq (yes,$(build-shared))
6.30 + # We can try to link the programs with lib*_pic.a...
6.31 +--- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
6.32 ++++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
6.33 +@@ -120,6 +120,13 @@
6.34 + install-bin-script = ldd
6.35 + endif
6.36 +
6.37 ++ifeq (yes,$(build-static-nss))
6.38 ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
6.39 ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
6.40 ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
6.41 ++ $(resolvobjdir)/libresolv.a
6.42 ++endif
6.43 ++
6.44 + others = sprof sln
6.45 + install-bin = sprof
6.46 + others-static = sln
6.47 +
6.48 +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/make-install-lib-all.patch Fri May 18 08:27:50 2007 +0000
7.3 @@ -0,0 +1,26 @@
7.4 +From http://svn.exactcode.de/t2/trunk/package/base/glibc32/make-install-lib-all.patch
7.5 +Rule to install all needed libraries, not just the ones installed by install-lib,
7.6 +yet not install programs.
7.7 +Needed because we can't use the main install target, as we can't build programs before
7.8 +we have the final gcc installed; linking fails because libeh.a is not present,
7.9 +and glibc insists on linking programs with that library.
7.10 +
7.11 +diff -Naur glibc-2.3.4.orig/Makerules glibc-2.3.4/Makerules
7.12 +--- glibc-2.3.4.orig/Makerules 2004-12-15 20:52:39.000000000 +0200
7.13 ++++ glibc-2.3.4/Makerules 2005-02-19 15:16:31.415125176 +0200
7.14 +@@ -864,6 +864,13 @@
7.15 + installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
7.16 + $(inst_libdir)/$(patsubst %,$(libtype$o),\
7.17 + $(libprefix)$(libc-name)))
7.18 ++
7.19 ++install-lib-all: $(inst_slibdir)/libc.so$(libc.so-version) \
7.20 ++ $(inst_slibdir)/libc-$(version).so \
7.21 ++ $(inst_libdir)/libc.so \
7.22 ++ $(inst_libdir)/libc.a \
7.23 ++ install-lib
7.24 ++
7.25 + install: $(installed-libcs)
7.26 + $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
7.27 + $(make-target-directory)
7.28 +
7.29 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>