Rename patches for glibc: include neither 'glibc' not he version in patch names, it's a duplicate of info already available from the directories they are in.
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/glibc/2.3.6/120-allow-gcc-4.0-wordexp.patch Mon Jul 28 20:10:34 2008 +0000
1.3 @@ -0,0 +1,21 @@
1.4 +../sysdeps/generic/wordexp.c: In function 'exec_comm':
1.5 +../sysdeps/generic/wordexp.c:815: sorry, unimplemented: inlining failed in call to 'exec_comm_child': function body not available
1.6 +../sysdeps/generic/wordexp.c:900: sorry, unimplemented: called from here
1.7 +make[2]: *** [/home/dank/queue/jobdir.fast2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/build-glibc/posix/wordexp.o] Error
1.8 +
1.9 +I had to add the keyword 'inline' to get it to compile:
1.10 +
1.11 +--- glibc-2.3-20050307/sysdeps/generic/wordexp.c.old 2005-03-12 08:54:15.709253928 -0800
1.12 ++++ glibc-2.3-20050307/sysdeps/generic/wordexp.c 2005-03-12 08:54:51.242852000 -0800
1.13 +@@ -809,7 +809,7 @@
1.14 + }
1.15 +
1.16 + /* Function called by child process in exec_comm() */
1.17 +-static void
1.18 ++static inline void
1.19 + internal_function __attribute__ ((always_inline))
1.20 + exec_comm_child (char *comm, int *fildes, int showerr, int noexec)
1.21 + {
1.22 +
1.23 +
1.24 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
2.1 --- a/patches/glibc/2.3.6/120-glibc-2.3.5-allow-gcc-4.0-wordexp.patch Mon Jul 28 11:43:29 2008 +0000
2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2.3 @@ -1,21 +0,0 @@
2.4 -../sysdeps/generic/wordexp.c: In function 'exec_comm':
2.5 -../sysdeps/generic/wordexp.c:815: sorry, unimplemented: inlining failed in call to 'exec_comm_child': function body not available
2.6 -../sysdeps/generic/wordexp.c:900: sorry, unimplemented: called from here
2.7 -make[2]: *** [/home/dank/queue/jobdir.fast2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/build-glibc/posix/wordexp.o] Error
2.8 -
2.9 -I had to add the keyword 'inline' to get it to compile:
2.10 -
2.11 ---- glibc-2.3-20050307/sysdeps/generic/wordexp.c.old 2005-03-12 08:54:15.709253928 -0800
2.12 -+++ glibc-2.3-20050307/sysdeps/generic/wordexp.c 2005-03-12 08:54:51.242852000 -0800
2.13 -@@ -809,7 +809,7 @@
2.14 - }
2.15 -
2.16 - /* Function called by child process in exec_comm() */
2.17 --static void
2.18 -+static inline void
2.19 - internal_function __attribute__ ((always_inline))
2.20 - exec_comm_child (char *comm, int *fildes, int showerr, int noexec)
2.21 - {
2.22 -
2.23 -
2.24 -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.3.6/130-allow-gcc4-wcstol_l.patch Mon Jul 28 20:10:34 2008 +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 --- a/patches/glibc/2.3.6/130-glibc-2.3.5-allow-gcc4-wcstol_l.patch Mon Jul 28 11:43:29 2008 +0000
4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
4.3 @@ -1,59 +0,0 @@
4.4 -Fixes
4.5 -../sysdeps/wordsize-64/wcstol_l.c:11: error: '____wcstoll_l_internal' aliased to undefined symbol '____wcstol_l_internal'
4.6 -../sysdeps/wordsize-64/wcstol_l.c:12: error: '__wcstoll_l' aliased to undefined symbol '__wcstol_l'
4.7 -../sysdeps/wordsize-64/wcstol_l.c:13: error: 'wcstoll_l' aliased to undefined symbol '__wcstol_l'
4.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
4.9 -
4.10 -https://www.redhat.com/archives/fedora-cvs-commits/2005-March/msg00408.html
4.11 -%changelog
4.12 -+* Fri Mar 25 2005 Jakub Jelinek <jakub redhat com> 2.3.4-18
4.13 -+- fix build on 64-bit arches with new GCC
4.14 -
4.15 -Revision 1.4.2.1, Fri Mar 25 11:59:01 2005 UTC (3 weeks, 4 days ago) by jakub
4.16 -Branch: fedora-branch
4.17 -CVS Tags: fedora-glibc-2_3_4-18
4.18 -Changes since 1.4: +2 -0 lines
4.19 -Diff to previous 1.4 (colored)
4.20 -
4.21 - * sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
4.22 - * sysdeps/wordsize-64/wcstol_l.c: Likewise.
4.23 -
4.24 -
4.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
4.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
4.27 -
4.28 -===================================================================
4.29 -RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol_l.c,v
4.30 -retrieving revision 1.4
4.31 -retrieving revision 1.4.2.1
4.32 -diff -u -r1.4 -r1.4.2.1
4.33 ---- libc/sysdeps/wordsize-64/strtol_l.c 2003/03/03 09:45:12 1.4
4.34 -+++ libc/sysdeps/wordsize-64/strtol_l.c 2005/03/25 11:59:01 1.4.2.1
4.35 -@@ -8,7 +8,9 @@
4.36 - #undef ____strtoll_l_internal
4.37 - #undef __strtoll_l
4.38 - #undef strtoll_l
4.39 -+#if !UNSIGNED
4.40 - strong_alias (____strtol_l_internal, ____strtoll_l_internal)
4.41 - libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
4.42 - weak_alias (__strtol_l, __strtoll_l)
4.43 - weak_alias (__strtol_l, strtoll_l)
4.44 -+#endif
4.45 -===================================================================
4.46 -RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol_l.c,v
4.47 -retrieving revision 1.4
4.48 -retrieving revision 1.4.2.1
4.49 -diff -u -r1.4 -r1.4.2.1
4.50 ---- libc/sysdeps/wordsize-64/wcstol_l.c 2002/08/08 11:44:51 1.4
4.51 -+++ libc/sysdeps/wordsize-64/wcstol_l.c 2005/03/25 11:59:01 1.4.2.1
4.52 -@@ -8,6 +8,8 @@
4.53 - #undef ____wcstoll_l_internal
4.54 - #undef __wcstoll_l
4.55 - #undef wcstoll_l
4.56 -+#if !UNSIGNED
4.57 - strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
4.58 - weak_alias (__wcstol_l, __wcstoll_l)
4.59 - weak_alias (__wcstol_l, wcstoll_l)
4.60 -+#endif
4.61 -
4.62 -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.3.6/140-cygwin.patch Mon Jul 28 20:10:34 2008 +0000
5.3 @@ -0,0 +1,187 @@
5.4 +Fixes
5.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
5.6 +...
5.7 +when building glibc-2.3.x on cygwin
5.8 +
5.9 +Idea from
5.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
5.11 +Basically, make glibc use .oST as suffix for 'object static'
5.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
5.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
5.14 +
5.15 +glibc-linuxthreads-2.3.5 also requires a patch, see
5.16 +../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
5.17 +
5.18 +[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
5.19 +
5.20 +Message-ID: <4282FCBA.3040000@unicontrols.cz>
5.21 +Date: Thu, 12 May 2005 08:50:34 +0200
5.22 +From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
5.23 +To: Dan Kegel <dank@kegel.com>
5.24 +CC: crossgcc@sources.redhat.com
5.25 +Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
5.26 +
5.27 +Hi Dan,
5.28 +following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
5.29 +on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
5.30 +
5.31 +--
5.32 + Petr Cvachoucek
5.33 + Unicontrols a.s.
5.34 + http://www.unicontrols.cz
5.35 +]
5.36 +
5.37 +diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
5.38 +--- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
5.39 ++++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
5.40 +@@ -449,7 +449,7 @@
5.41 + # run the linked programs.
5.42 + link-libc = -Wl,-rpath-link=$(rpath-link) \
5.43 + $(common-objpfx)libc.so$(libc.so-version) \
5.44 +- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
5.45 ++ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
5.46 + # This is how to find at build-time things that will be installed there.
5.47 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
5.48 + endif
5.49 +@@ -656,7 +656,7 @@
5.50 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
5.51 + # to pass different flags for each flavor.
5.52 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
5.53 +-all-object-suffixes := .o .os .op .og .ob .oS
5.54 ++all-object-suffixes := .o .os .op .og .ob .oST
5.55 + object-suffixes :=
5.56 + CPPFLAGS-.o = $(pic-default)
5.57 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
5.58 +@@ -712,14 +712,14 @@
5.59 +
5.60 + ifeq (yes,$(build-shared))
5.61 + # Build special library that contains the static-only routines for libc.
5.62 +-object-suffixes-for-libc += .oS
5.63 ++object-suffixes-for-libc += .oST
5.64 +
5.65 + # Must build the routines as PIC, though, because they can end up in (users')
5.66 + # shared objects. We don't want to use CFLAGS-os because users may, for
5.67 + # example, make that processor-specific.
5.68 +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
5.69 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
5.70 +-libtype.oS = lib%_nonshared.a
5.71 ++CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
5.72 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
5.73 ++libtype.oST = lib%_nonshared.a
5.74 + endif
5.75 +
5.76 + # The assembler can generate debug information too.
5.77 +diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
5.78 +--- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
5.79 ++++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
5.80 +@@ -416,7 +416,7 @@
5.81 + # Bounded pointer thunks are only built for *.ob
5.82 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
5.83 +
5.84 +-elide-routines.oS += $(filter-out $(static-only-routines),\
5.85 ++elide-routines.oST += $(filter-out $(static-only-routines),\
5.86 + $(routines) $(aux) $(sysdep_routines)) \
5.87 + $(elide-bp-thunks)
5.88 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
5.89 +@@ -961,7 +961,7 @@
5.90 + install: $(inst_libdir)/libc.so
5.91 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
5.92 + $(common-objpfx)libc.so$(libc.so-version) \
5.93 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
5.94 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
5.95 + $(libprefix)$(libc-name)) \
5.96 + $(+force)
5.97 + (echo '/* GNU ld script';\
5.98 +@@ -969,7 +969,7 @@
5.99 + echo ' the static library, so try that secondarily. */';\
5.100 + cat $<; \
5.101 + echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
5.102 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
5.103 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
5.104 + ')' \
5.105 + ) > $@.new
5.106 + mv -f $@.new $@
5.107 +diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
5.108 +--- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
5.109 ++++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
5.110 +@@ -13,7 +13,7 @@
5.111 +
5.112 + ifneq (,$($(lib)-static-only-routines))
5.113 + ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
5.114 +-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
5.115 ++object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
5.116 + endif
5.117 + endif
5.118 +
5.119 +@@ -29,7 +29,7 @@
5.120 +
5.121 + # Add each flavor of library to the lists of things to build and install.
5.122 + install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
5.123 +-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
5.124 ++extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
5.125 + $(patsubst %,%$o,$(filter-out \
5.126 + $($(lib)-shared-only-routines),\
5.127 + $(all-$(lib)-routines))))
5.128 +@@ -57,7 +57,7 @@
5.129 +
5.130 +
5.131 + # Use o-iterator.mk to generate a rule for each flavor of library.
5.132 +-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
5.133 ++ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
5.134 + define o-iterator-doit
5.135 + $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
5.136 + $(patsubst %,$(objpfx)%$o,\
5.137 +@@ -65,7 +65,7 @@
5.138 + $(all-$(lib)-routines))); \
5.139 + $$(build-extra-lib)
5.140 + endef
5.141 +-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
5.142 ++object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
5.143 + include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
5.144 + endif
5.145 +
5.146 +@@ -77,9 +77,9 @@
5.147 + $(build-extra-lib)
5.148 + endif
5.149 +
5.150 +-ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
5.151 +-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
5.152 +- $(patsubst %,$(objpfx)%.oS,\
5.153 ++ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
5.154 ++$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
5.155 ++ $(patsubst %,$(objpfx)%.oST,\
5.156 + $(filter $($(lib)-static-only-routines),\
5.157 + $(all-$(lib)-routines)))
5.158 + $(build-extra-lib)
5.159 +diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
5.160 +--- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
5.161 ++++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
5.162 +@@ -360,7 +360,7 @@
5.163 +
5.164 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
5.165 + $(objpfx)libpthread.so$(libpthread.so-version) \
5.166 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
5.167 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
5.168 + $(libprefix)pthread) \
5.169 + $(+force)
5.170 + (echo '/* GNU ld script';\
5.171 +@@ -368,7 +368,7 @@
5.172 + echo ' the static library, so try that secondarily. */';\
5.173 + cat $<; \
5.174 + echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
5.175 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
5.176 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
5.177 + ')' \
5.178 + ) > $@.new
5.179 + mv -f $@.new $@
5.180 +diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
5.181 +--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
5.182 ++++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
5.183 +@@ -10,4 +10,4 @@
5.184 + ASFLAGS-.op += -Wa,-Av9a
5.185 + ASFLAGS-.og += -Wa,-Av9a
5.186 + ASFLAGS-.ob += -Wa,-Av9a
5.187 +-ASFLAGS-.oS += -Wa,-Av9a
5.188 ++ASFLAGS-.oST += -Wa,-Av9a
5.189 +
5.190 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
6.1 --- a/patches/glibc/2.3.6/140-glibc-2.3.5-cygwin.patch Mon Jul 28 11:43:29 2008 +0000
6.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
6.3 @@ -1,187 +0,0 @@
6.4 -Fixes
6.5 -elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
6.6 -...
6.7 -when building glibc-2.3.x on cygwin
6.8 -
6.9 -Idea from
6.10 -http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
6.11 -Basically, make glibc use .oST as suffix for 'object static'
6.12 -instead of .oS, since cygwin has trouble distinguishing .os from .oS
6.13 -(Original patch had .on, but .oST is more mnemonic for 'object static')
6.14 -
6.15 -glibc-linuxthreads-2.3.5 also requires a patch, see
6.16 -../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
6.17 -
6.18 -[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
6.19 -
6.20 -Message-ID: <4282FCBA.3040000@unicontrols.cz>
6.21 -Date: Thu, 12 May 2005 08:50:34 +0200
6.22 -From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
6.23 -To: Dan Kegel <dank@kegel.com>
6.24 -CC: crossgcc@sources.redhat.com
6.25 -Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
6.26 -
6.27 -Hi Dan,
6.28 -following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
6.29 -on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
6.30 -
6.31 ---
6.32 - Petr Cvachoucek
6.33 - Unicontrols a.s.
6.34 - http://www.unicontrols.cz
6.35 -]
6.36 -
6.37 -diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
6.38 ---- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
6.39 -+++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
6.40 -@@ -449,7 +449,7 @@
6.41 - # run the linked programs.
6.42 - link-libc = -Wl,-rpath-link=$(rpath-link) \
6.43 - $(common-objpfx)libc.so$(libc.so-version) \
6.44 -- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
6.45 -+ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
6.46 - # This is how to find at build-time things that will be installed there.
6.47 - rpath-dirs = math elf dlfcn nss nis rt resolv crypt
6.48 - endif
6.49 -@@ -656,7 +656,7 @@
6.50 - # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
6.51 - # to pass different flags for each flavor.
6.52 - libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
6.53 --all-object-suffixes := .o .os .op .og .ob .oS
6.54 -+all-object-suffixes := .o .os .op .og .ob .oST
6.55 - object-suffixes :=
6.56 - CPPFLAGS-.o = $(pic-default)
6.57 - CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
6.58 -@@ -712,14 +712,14 @@
6.59 -
6.60 - ifeq (yes,$(build-shared))
6.61 - # Build special library that contains the static-only routines for libc.
6.62 --object-suffixes-for-libc += .oS
6.63 -+object-suffixes-for-libc += .oST
6.64 -
6.65 - # Must build the routines as PIC, though, because they can end up in (users')
6.66 - # shared objects. We don't want to use CFLAGS-os because users may, for
6.67 - # example, make that processor-specific.
6.68 --CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
6.69 --CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
6.70 --libtype.oS = lib%_nonshared.a
6.71 -+CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
6.72 -+CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
6.73 -+libtype.oST = lib%_nonshared.a
6.74 - endif
6.75 -
6.76 - # The assembler can generate debug information too.
6.77 -diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
6.78 ---- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
6.79 -+++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
6.80 -@@ -416,7 +416,7 @@
6.81 - # Bounded pointer thunks are only built for *.ob
6.82 - elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
6.83 -
6.84 --elide-routines.oS += $(filter-out $(static-only-routines),\
6.85 -+elide-routines.oST += $(filter-out $(static-only-routines),\
6.86 - $(routines) $(aux) $(sysdep_routines)) \
6.87 - $(elide-bp-thunks)
6.88 - elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
6.89 -@@ -961,7 +961,7 @@
6.90 - install: $(inst_libdir)/libc.so
6.91 - $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
6.92 - $(common-objpfx)libc.so$(libc.so-version) \
6.93 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
6.94 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
6.95 - $(libprefix)$(libc-name)) \
6.96 - $(+force)
6.97 - (echo '/* GNU ld script';\
6.98 -@@ -969,7 +969,7 @@
6.99 - echo ' the static library, so try that secondarily. */';\
6.100 - cat $<; \
6.101 - echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
6.102 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
6.103 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
6.104 - ')' \
6.105 - ) > $@.new
6.106 - mv -f $@.new $@
6.107 -diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
6.108 ---- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
6.109 -+++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
6.110 -@@ -13,7 +13,7 @@
6.111 -
6.112 - ifneq (,$($(lib)-static-only-routines))
6.113 - ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
6.114 --object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
6.115 -+object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
6.116 - endif
6.117 - endif
6.118 -
6.119 -@@ -29,7 +29,7 @@
6.120 -
6.121 - # Add each flavor of library to the lists of things to build and install.
6.122 - install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
6.123 --extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
6.124 -+extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
6.125 - $(patsubst %,%$o,$(filter-out \
6.126 - $($(lib)-shared-only-routines),\
6.127 - $(all-$(lib)-routines))))
6.128 -@@ -57,7 +57,7 @@
6.129 -
6.130 -
6.131 - # Use o-iterator.mk to generate a rule for each flavor of library.
6.132 --ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
6.133 -+ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
6.134 - define o-iterator-doit
6.135 - $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
6.136 - $(patsubst %,$(objpfx)%$o,\
6.137 -@@ -65,7 +65,7 @@
6.138 - $(all-$(lib)-routines))); \
6.139 - $$(build-extra-lib)
6.140 - endef
6.141 --object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
6.142 -+object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
6.143 - include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
6.144 - endif
6.145 -
6.146 -@@ -77,9 +77,9 @@
6.147 - $(build-extra-lib)
6.148 - endif
6.149 -
6.150 --ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
6.151 --$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
6.152 -- $(patsubst %,$(objpfx)%.oS,\
6.153 -+ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
6.154 -+$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
6.155 -+ $(patsubst %,$(objpfx)%.oST,\
6.156 - $(filter $($(lib)-static-only-routines),\
6.157 - $(all-$(lib)-routines)))
6.158 - $(build-extra-lib)
6.159 -diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
6.160 ---- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
6.161 -+++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
6.162 -@@ -360,7 +360,7 @@
6.163 -
6.164 - $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
6.165 - $(objpfx)libpthread.so$(libpthread.so-version) \
6.166 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
6.167 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
6.168 - $(libprefix)pthread) \
6.169 - $(+force)
6.170 - (echo '/* GNU ld script';\
6.171 -@@ -368,7 +368,7 @@
6.172 - echo ' the static library, so try that secondarily. */';\
6.173 - cat $<; \
6.174 - echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
6.175 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
6.176 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
6.177 - ')' \
6.178 - ) > $@.new
6.179 - mv -f $@.new $@
6.180 -diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
6.181 ---- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
6.182 -+++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
6.183 -@@ -10,4 +10,4 @@
6.184 - ASFLAGS-.op += -Wa,-Av9a
6.185 - ASFLAGS-.og += -Wa,-Av9a
6.186 - ASFLAGS-.ob += -Wa,-Av9a
6.187 --ASFLAGS-.oS += -Wa,-Av9a
6.188 -+ASFLAGS-.oST += -Wa,-Av9a
6.189 -
6.190 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
7.1 --- a/patches/glibc/2.3.6/150-glibc-2.3.5-sh-lowlevellock.patch Mon Jul 28 11:43:29 2008 +0000
7.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
7.3 @@ -1,43 +0,0 @@
7.4 -ML: http://sources.redhat.com/ml/libc-hacker/2005-09/msg00002.html
7.5 -
7.6 -Date: Mon, 05 Sep 2005 21:07:15 +0900 (JST)
7.7 -Message-Id: <20050905.210715.15267870.kkojima@rr.iij4u.or.jp>
7.8 -To: libc-hacker at sources dot redhat dot com
7.9 -Subject: SH: A typo in lowlevellock.S
7.10 -From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
7.11 -
7.12 -Hi,
7.13 -
7.14 -The appended patch fixes a typo in a low-level lock function. It
7.15 -set the correct 3rd argument for the futex syscall in loop. Sorry
7.16 -for missing such an embarrassing bug.
7.17 -
7.18 -Regards,
7.19 - kaz
7.20 -
7.21 -nptl/ChangeLog:
7.22 -2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7.23 -
7.24 - * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
7.25 - Fix typo in register name.
7.26 -
7.27 ---- glibc.old/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S 2004-10-26 04:06:44.000000000 +0900
7.28 -+++ glibc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S 2005-09-05 19:18:25.000000000 +0900
7.29 -@@ -1,4 +1,4 @@
7.30 --/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
7.31 -+/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
7.32 - This file is part of the GNU C Library.
7.33 -
7.34 - The GNU C Library is free software; you can redistribute it and/or
7.35 -@@ -51,8 +51,8 @@ __lll_mutex_lock_wait:
7.36 - SYSCALL_INST_PAD
7.37 -
7.38 - 2:
7.39 -- mov #2, r4
7.40 -- XCHG (r4, @r8, r2)
7.41 -+ mov #2, r6
7.42 -+ XCHG (r6, @r8, r2)
7.43 - tst r2, r2
7.44 - bf 1b
7.45 -
7.46 -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.3.6/150-sh-lowlevellock.patch Mon Jul 28 20:10:34 2008 +0000
8.3 @@ -0,0 +1,43 @@
8.4 +ML: http://sources.redhat.com/ml/libc-hacker/2005-09/msg00002.html
8.5 +
8.6 +Date: Mon, 05 Sep 2005 21:07:15 +0900 (JST)
8.7 +Message-Id: <20050905.210715.15267870.kkojima@rr.iij4u.or.jp>
8.8 +To: libc-hacker at sources dot redhat dot com
8.9 +Subject: SH: A typo in lowlevellock.S
8.10 +From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
8.11 +
8.12 +Hi,
8.13 +
8.14 +The appended patch fixes a typo in a low-level lock function. It
8.15 +set the correct 3rd argument for the futex syscall in loop. Sorry
8.16 +for missing such an embarrassing bug.
8.17 +
8.18 +Regards,
8.19 + kaz
8.20 +
8.21 +nptl/ChangeLog:
8.22 +2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8.23 +
8.24 + * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
8.25 + Fix typo in register name.
8.26 +
8.27 +--- glibc.old/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S 2004-10-26 04:06:44.000000000 +0900
8.28 ++++ glibc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S 2005-09-05 19:18:25.000000000 +0900
8.29 +@@ -1,4 +1,4 @@
8.30 +-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
8.31 ++/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
8.32 + This file is part of the GNU C Library.
8.33 +
8.34 + The GNU C Library is free software; you can redistribute it and/or
8.35 +@@ -51,8 +51,8 @@ __lll_mutex_lock_wait:
8.36 + SYSCALL_INST_PAD
8.37 +
8.38 + 2:
8.39 +- mov #2, r4
8.40 +- XCHG (r4, @r8, r2)
8.41 ++ mov #2, r6
8.42 ++ XCHG (r6, @r8, r2)
8.43 + tst r2, r2
8.44 + bf 1b
8.45 +
8.46 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
9.1 --- a/patches/glibc/2.3.6/160-glibc-2.3.5-sh-memset.patch Mon Jul 28 11:43:29 2008 +0000
9.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
9.3 @@ -1,30 +0,0 @@
9.4 -From:
9.5 - http://sources.redhat.com/ml/libc-alpha/2005-07/msg00051.html
9.6 - http://sources.redhat.com/ml/crossgcc/2005-10/msg00035.html
9.7 -
9.8 -Message-ID: <434576E1.6020305@sscd.de>
9.9 -Date: Thu, 06 Oct 2005 21:11:29 +0200
9.10 -From: Alexander Sieb <sieb at sscd dot de>
9.11 -To: crossgcc at sourceware dot org
9.12 -Subject: Crosstool sh4-linux-gcc-4.0.2-glibc-2.3.5 patches
9.13 -
9.14 -On sh[34]-linux, memset function does not work if 2nd argument is negative
9.15 -and 3rd argument is greater than 12.
9.16 -for example, memset(ptr, "\xda", 20) sets 0xff instead of 0xda.
9.17 -
9.18 -Attached patch fixes this problem.
9.19 -
9.20 - * sysdeps/sh/memset.S (memset): Correct 2nd argument handling.
9.21 -
9.22 ---- glibc-2.3.5.old/sysdeps/sh/memset.S 29 Apr 2003 22:47:18 -0000 1.4
9.23 -+++ glibc-2.3.5/sysdeps/sh/memset.S 23 Jul 2005 08:37:21 -0000
9.24 -@@ -28,6 +28,7 @@ ENTRY(memset)
9.25 - bt.s L_byte_loop_init
9.26 - mov r4,r7
9.27 -
9.28 -+ extu.b r5,r5
9.29 - swap.b r5,r1
9.30 - or r1,r5
9.31 - swap.w r5,r1
9.32 -
9.33 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/patches/glibc/2.3.6/160-sh-memset.patch Mon Jul 28 20:10:34 2008 +0000
10.3 @@ -0,0 +1,30 @@
10.4 +From:
10.5 + http://sources.redhat.com/ml/libc-alpha/2005-07/msg00051.html
10.6 + http://sources.redhat.com/ml/crossgcc/2005-10/msg00035.html
10.7 +
10.8 +Message-ID: <434576E1.6020305@sscd.de>
10.9 +Date: Thu, 06 Oct 2005 21:11:29 +0200
10.10 +From: Alexander Sieb <sieb at sscd dot de>
10.11 +To: crossgcc at sourceware dot org
10.12 +Subject: Crosstool sh4-linux-gcc-4.0.2-glibc-2.3.5 patches
10.13 +
10.14 +On sh[34]-linux, memset function does not work if 2nd argument is negative
10.15 +and 3rd argument is greater than 12.
10.16 +for example, memset(ptr, "\xda", 20) sets 0xff instead of 0xda.
10.17 +
10.18 +Attached patch fixes this problem.
10.19 +
10.20 + * sysdeps/sh/memset.S (memset): Correct 2nd argument handling.
10.21 +
10.22 +--- glibc-2.3.5.old/sysdeps/sh/memset.S 29 Apr 2003 22:47:18 -0000 1.4
10.23 ++++ glibc-2.3.5/sysdeps/sh/memset.S 23 Jul 2005 08:37:21 -0000
10.24 +@@ -28,6 +28,7 @@ ENTRY(memset)
10.25 + bt.s L_byte_loop_init
10.26 + mov r4,r7
10.27 +
10.28 ++ extu.b r5,r5
10.29 + swap.b r5,r1
10.30 + or r1,r5
10.31 + swap.w r5,r1
10.32 +
10.33 +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.3.6/170-allow-gcc-4.0-arm.patch Mon Jul 28 20:10:34 2008 +0000
11.3 @@ -0,0 +1,35 @@
11.4 +Fixes
11.5 +In file included from dynamic-link.h:22,
11.6 + from dl-reloc.c:265:
11.7 +../sysdeps/arm/dl-machine.h: In function '_dl_relocate_object':
11.8 +../sysdeps/arm/dl-machine.h:371: error: invalid storage class for function 'fix_bad_pc24'
11.9 +make[2]: Leaving directory `/home/dank/queue/jobdir.k8/crosstool-dev/build/arm-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3.6/glibc-2.3.6/elf'
11.10 +
11.11 +when building glibc-2.3.6 with gcc-4.0
11.12 +
11.13 +Like
11.14 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/arm/dl-machine.h.diff?r1=1.51&r2=1.52&cvsroot=glibc
11.15 +but fixes fix_bad_pc24.
11.16 +
11.17 +
11.18 +--- glibc-2.3.6-orig/sysdeps/arm/dl-machine.h Sun Mar 20 17:54:37 2005
11.19 ++++ glibc-2.3.6/sysdeps/arm/dl-machine.h Sun Mar 20 17:57:32 2005
11.20 +@@ -357,7 +357,14 @@
11.21 + #ifdef RESOLVE
11.22 +
11.23 + /* Deal with an out-of-range PC24 reloc. */
11.24 +-static Elf32_Addr
11.25 ++#if __GNUC__ >= 4
11.26 ++ auto inline Elf32_Addr
11.27 ++#else
11.28 ++ static inline Elf32_Addr
11.29 ++#endif
11.30 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
11.31 ++ __attribute ((always_inline))
11.32 ++#endif
11.33 + fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value)
11.34 + {
11.35 + static void *fix_page;
11.36 +
11.37 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
11.38 +with a little editing by dank@kegel.com
12.1 --- a/patches/glibc/2.3.6/170-glibc-2.3.6-allow-gcc-4.0-arm.patch Mon Jul 28 11:43:29 2008 +0000
12.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
12.3 @@ -1,35 +0,0 @@
12.4 -Fixes
12.5 -In file included from dynamic-link.h:22,
12.6 - from dl-reloc.c:265:
12.7 -../sysdeps/arm/dl-machine.h: In function '_dl_relocate_object':
12.8 -../sysdeps/arm/dl-machine.h:371: error: invalid storage class for function 'fix_bad_pc24'
12.9 -make[2]: Leaving directory `/home/dank/queue/jobdir.k8/crosstool-dev/build/arm-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3.6/glibc-2.3.6/elf'
12.10 -
12.11 -when building glibc-2.3.6 with gcc-4.0
12.12 -
12.13 -Like
12.14 -http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/arm/dl-machine.h.diff?r1=1.51&r2=1.52&cvsroot=glibc
12.15 -but fixes fix_bad_pc24.
12.16 -
12.17 -
12.18 ---- glibc-2.3.6-orig/sysdeps/arm/dl-machine.h Sun Mar 20 17:54:37 2005
12.19 -+++ glibc-2.3.6/sysdeps/arm/dl-machine.h Sun Mar 20 17:57:32 2005
12.20 -@@ -357,7 +357,14 @@
12.21 - #ifdef RESOLVE
12.22 -
12.23 - /* Deal with an out-of-range PC24 reloc. */
12.24 --static Elf32_Addr
12.25 -+#if __GNUC__ >= 4
12.26 -+ auto inline Elf32_Addr
12.27 -+#else
12.28 -+ static inline Elf32_Addr
12.29 -+#endif
12.30 -+#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
12.31 -+ __attribute ((always_inline))
12.32 -+#endif
12.33 - fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value)
12.34 - {
12.35 - static void *fix_page;
12.36 -
12.37 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
12.38 -with a little editing by dank@kegel.com
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
13.2 +++ b/patches/glibc/2.3.6/180-allow-gcc-4.0-elf.patch Mon Jul 28 20:10:34 2008 +0000
13.3 @@ -0,0 +1,67 @@
13.4 +From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
13.5 +Fixes
13.6 + rtld.c: In function '_dl_start':
13.7 + dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
13.8 + dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
13.9 +when compiling glibc-2.3.4 with gcc-4.0
13.10 +
13.11 +But see also
13.12 +http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
13.13 +and
13.14 +http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
13.15 +which seem to propose less radical fixes?
13.16 +
13.17 +Aha. See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
13.18 +
13.19 +--- glibc-2.3.6.orig/elf/dynamic-link.h 2005-03-12 18:12:37.000000000 -0800
13.20 ++++ glibc-2.3.6/elf/dynamic-link.h 2005-03-12 18:12:59.777820848 -0800
13.21 +@@ -19,47 +19,6 @@
13.22 +
13.23 + #include <elf.h>
13.24 + #include <assert.h>
13.25 +-
13.26 +-#ifdef RESOLVE
13.27 +-/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
13.28 +- ElfW(Addr), because not all architectures can assume that the
13.29 +- relocated address is properly aligned, whereas the compiler is
13.30 +- entitled to assume that a pointer to a type is properly aligned for
13.31 +- the type. Even if we cast the pointer back to some other type with
13.32 +- less strict alignment requirements, the compiler might still
13.33 +- remember that the pointer was originally more aligned, thereby
13.34 +- optimizing away alignment tests or using word instructions for
13.35 +- copying memory, breaking the very code written to handle the
13.36 +- unaligned cases. */
13.37 +-# if ! ELF_MACHINE_NO_REL
13.38 +-auto inline void __attribute__((always_inline))
13.39 +-elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
13.40 +- const ElfW(Sym) *sym, const struct r_found_version *version,
13.41 +- void *const reloc_addr);
13.42 +-auto inline void __attribute__((always_inline))
13.43 +-elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
13.44 +- void *const reloc_addr);
13.45 +-# endif
13.46 +-# if ! ELF_MACHINE_NO_RELA
13.47 +-auto inline void __attribute__((always_inline))
13.48 +-elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
13.49 +- const ElfW(Sym) *sym, const struct r_found_version *version,
13.50 +- void *const reloc_addr);
13.51 +-auto inline void __attribute__((always_inline))
13.52 +-elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
13.53 +- void *const reloc_addr);
13.54 +-# endif
13.55 +-# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
13.56 +-auto inline void __attribute__((always_inline))
13.57 +-elf_machine_lazy_rel (struct link_map *map,
13.58 +- ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
13.59 +-# else
13.60 +-auto inline void __attribute__((always_inline))
13.61 +-elf_machine_lazy_rel (struct link_map *map,
13.62 +- ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
13.63 +-# endif
13.64 +-#endif
13.65 +-
13.66 + #include <dl-machine.h>
13.67 +
13.68 + #ifndef VERSYMIDX
13.69 +
13.70 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
14.1 --- a/patches/glibc/2.3.6/180-glibc-2.3.6-allow-gcc-4.0-elf.patch Mon Jul 28 11:43:29 2008 +0000
14.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
14.3 @@ -1,67 +0,0 @@
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
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.3.6/190-configure-apple-as.patch Mon Jul 28 20:10:34 2008 +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 +@@ -3914,7 +3914,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 --- a/patches/glibc/2.3.6/190-glibc-2.3.6-configure-apple-as.patch Mon Jul 28 11:43:29 2008 +0000
16.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
16.3 @@ -1,25 +0,0 @@
16.4 -http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
16.5 -http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
16.6 -
16.7 -The following makes it possible to configure glibc-2.3.2 on Mac OS X,
16.8 -where the assembler but doesn't understand the --version flag.
16.9 -
16.10 -Fixes the symptom
16.11 -checking whether ld is GNU ld... no
16.12 -checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
16.13 -checking version of /usr/libexec/gcc/darwin/ppc/as...
16.14 -<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
16.15 -
16.16 ---- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
16.17 -+++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
16.18 -@@ -3914,7 +3914,7 @@
16.19 - # Found it, now check the version.
16.20 - echo "$as_me:$LINENO: checking version of $AS" >&5
16.21 - echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
16.22 -- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
16.23 -+ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
16.24 - case $ac_prog_version in
16.25 - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
16.26 - 2.1[3-9]*)
16.27 -
16.28 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
17.1 --- a/patches/glibc/2.3.6/190-use_short_for_fnstsw.patch Mon Jul 28 11:43:29 2008 +0000
17.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
17.3 @@ -1,18 +0,0 @@
17.4 -Original patch from H.J. Lu, as reported there:
17.5 -http://www.nabble.com/PATCH:-Use-short-for-fnstsw-td14775171.html
17.6 -
17.7 -fnstsw stores 16bit into %ax. The upper 16bit of %eax is unchanged.
17.8 -The new assembler (binutils-2.18.50.0.4 and up) will disallow "fnstsw %eax".
17.9 -
17.10 -diff -dur glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c
17.11 ---- glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c 2004-03-05 11:14:48.000000000 +0100
17.12 -+++ glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c 2008-06-24 10:56:14.000000000 +0200
17.13 -@@ -26,7 +26,7 @@
17.14 - int
17.15 - fetestexcept (int excepts)
17.16 - {
17.17 -- int temp;
17.18 -+ short temp;
17.19 - int xtemp = 0;
17.20 -
17.21 - /* Get current exceptions. */
18.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
18.2 +++ b/patches/glibc/2.3.6/195-use_short_for_fnstsw.patch Mon Jul 28 20:10:34 2008 +0000
18.3 @@ -0,0 +1,18 @@
18.4 +Original patch from H.J. Lu, as reported there:
18.5 +http://www.nabble.com/PATCH:-Use-short-for-fnstsw-td14775171.html
18.6 +
18.7 +fnstsw stores 16bit into %ax. The upper 16bit of %eax is unchanged.
18.8 +The new assembler (binutils-2.18.50.0.4 and up) will disallow "fnstsw %eax".
18.9 +
18.10 +diff -dur glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c
18.11 +--- glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c 2004-03-05 11:14:48.000000000 +0100
18.12 ++++ glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c 2008-06-24 10:56:14.000000000 +0200
18.13 +@@ -26,7 +26,7 @@
18.14 + int
18.15 + fetestexcept (int excepts)
18.16 + {
18.17 +- int temp;
18.18 ++ short temp;
18.19 + int xtemp = 0;
18.20 +
18.21 + /* Get current exceptions. */
19.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
19.2 +++ b/patches/glibc/2.3.6/200-fix-pr631.patch Mon Jul 28 20:10:34 2008 +0000
19.3 @@ -0,0 +1,45 @@
19.4 +From dank@kegel.com
19.5 +Wed Jun 15 09:12:43 PDT 2005
19.6 +
19.7 +Fixes
19.8 +
19.9 +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
19.10 +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
19.11 +... 53 lines deleted ...
19.12 +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
19.13 +collect2: ld returned 1 exit status
19.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
19.15 +
19.16 +when building glibc with --enable-static-nss.
19.17 +
19.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
19.19 +
19.20 +--- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
19.21 ++++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
19.22 +@@ -487,7 +487,7 @@
19.23 +
19.24 + # The static libraries.
19.25 + ifeq (yes,$(build-static))
19.26 +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
19.27 ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
19.28 + else
19.29 + ifeq (yes,$(build-shared))
19.30 + # We can try to link the programs with lib*_pic.a...
19.31 +--- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
19.32 ++++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
19.33 +@@ -115,6 +115,13 @@
19.34 + install-bin-script = ldd
19.35 + endif
19.36 +
19.37 ++ifeq (yes,$(build-static-nss))
19.38 ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
19.39 ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
19.40 ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
19.41 ++ $(resolvobjdir)/libresolv.a
19.42 ++endif
19.43 ++
19.44 + others = sprof sln
19.45 + install-bin = sprof
19.46 + others-static = sln
19.47 +
19.48 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
20.1 --- a/patches/glibc/2.3.6/200-glibc-2.3.6-fix-pr631.patch Mon Jul 28 11:43:29 2008 +0000
20.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
20.3 @@ -1,45 +0,0 @@
20.4 -From dank@kegel.com
20.5 -Wed Jun 15 09:12:43 PDT 2005
20.6 -
20.7 -Fixes
20.8 -
20.9 -build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
20.10 -build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
20.11 -... 53 lines deleted ...
20.12 -build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
20.13 -collect2: ld returned 1 exit status
20.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
20.15 -
20.16 -when building glibc with --enable-static-nss.
20.17 -
20.18 -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
20.19 -
20.20 ---- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
20.21 -+++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
20.22 -@@ -487,7 +487,7 @@
20.23 -
20.24 - # The static libraries.
20.25 - ifeq (yes,$(build-static))
20.26 --link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
20.27 -+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
20.28 - else
20.29 - ifeq (yes,$(build-shared))
20.30 - # We can try to link the programs with lib*_pic.a...
20.31 ---- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
20.32 -+++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
20.33 -@@ -115,6 +115,13 @@
20.34 - install-bin-script = ldd
20.35 - endif
20.36 -
20.37 -+ifeq (yes,$(build-static-nss))
20.38 -+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
20.39 -+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
20.40 -+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
20.41 -+ $(resolvobjdir)/libresolv.a
20.42 -+endif
20.43 -+
20.44 - others = sprof sln
20.45 - install-bin = sprof
20.46 - others-static = sln
20.47 -
20.48 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
21.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
21.2 +++ b/patches/glibc/2.3.6/210-fp-byteorder.patch Mon Jul 28 20:10:34 2008 +0000
21.3 @@ -0,0 +1,205 @@
21.4 +Taken from http://sources.redhat.com/ml/crossgcc/2004-02/msg00104.html
21.5 +Author: addsub@eyou.com
21.6 +Target: ARM
21.7 +
21.8 +Fixes http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/920501-8.c
21.9 +and makes printf("%f", 1.0) work.
21.10 +
21.11 +Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00115.html :
21.12 + It ... fixes the 'printf("%f\n", 0.5); prints 0.000000' and general 'floating point
21.13 + is broken' on my big-endian hardfloat FPA ARM platform. ...
21.14 + It's definitely needed for hardfloat. So I'd think it's needed for
21.15 + big-endian systems in any case, and for VFP on little-endian systems
21.16 + too. Someone would have to verify that though.
21.17 +
21.18 +Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00123.html
21.19 + I just had a look at glibc-20040830, and [this patch] is still needed and useful
21.20 + for this version. glibc-20040830 out-of-the-box still contains the
21.21 + following wrong assumptions:
21.22 + - sysdeps/arm/bits/endian.h: float word order is big endian (which it is
21.23 + not on vfp systems)
21.24 + - sysdeps/arm/gmp-mparam.h: IEEE doubles are mixed endian (which they
21.25 + are not on big endian systems, neither on vfp systems)
21.26 + - sysdeps/arm/ieee754.h: IEEE doubles are in little endian byte order
21.27 + (which they are not on big endian systems)
21.28 + [This patch] seems the right solution for all of these issues.
21.29 +
21.30 +Dimitry Andric wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00132.html :
21.31 + It's even needed for glibc CVS, AFAICS.
21.32 + The patch hunk which modifies glibc.new/sysdeps/arm/bits/endian.h
21.33 + (currently at version 1.4) is only needed for proper VFP operation.
21.34 + But the hunk which modifies sysdeps/arm/gmp-mparam.h, and the hunk
21.35 + that deletes sysdeps/arm/ieee754.h (yes, this IS correct), are needed
21.36 + for proper operation of *any* FP model on big endian ARM.
21.37 +
21.38 +See also discussion in followups to
21.39 +http://sources.redhat.com/ml/crossgcc/2004-05/msg00245.html)
21.40 +
21.41 +Message-ID: <276985760.37584@eyou.com>
21.42 +Received: from unknown (HELO eyou.com) (172.16.2.2)
21.43 + by 0.0.0.0 with SMTP; Tue, 17 Feb 2004 10:42:40 +0800
21.44 +Received: (qmail 8238 invoked by uid 65534); 17 Feb 2004 10:42:38 +0800
21.45 +Date: 17 Feb 2004 10:42:38 +0800
21.46 +Message-ID: <20040217104238.8237.qmail@eyou.com>
21.47 +From: "add" <addsub@eyou.com>
21.48 +To: dank@kegel.com
21.49 +Reply-To: "add" <addsub@eyou.com>
21.50 +Subject: Re: problem while building arm vfp softfloat gcc `
21.51 +
21.52 +Hi, Dan, This is a patch I applied to my glibc-2.3.2, then my softfloat
21.53 +toolchain can printf("%f\n",1.0). So you may have a try of this
21.54 +
21.55 +
21.56 +diff -uNrp glibc.old/sysdeps/arm/bits/endian.h glibc.new/sysdeps/arm/bits/endian.h
21.57 +--- glibc.old/sysdeps/arm/bits/endian.h 1999-04-12 11:59:13.000000000 -0400
21.58 ++++ glibc.new/sysdeps/arm/bits/endian.h 2004-02-12 09:15:13.000000000 -0500
21.59 +@@ -9,4 +9,9 @@
21.60 + #else
21.61 + #define __BYTE_ORDER __LITTLE_ENDIAN
21.62 + #endif
21.63 ++
21.64 ++#ifdef __VFP_FP__
21.65 ++#define __FLOAT_WORD_ORDER __BYTE_ORDER
21.66 ++#else
21.67 + #define __FLOAT_WORD_ORDER __BIG_ENDIAN
21.68 ++#endif
21.69 +diff -uNrp glibc.old/sysdeps/arm/gmp-mparam.h glibc.new/sysdeps/arm/gmp-mparam.h
21.70 +--- glibc.old/sysdeps/arm/gmp-mparam.h 2001-07-07 15:21:19.000000000 -0400
21.71 ++++ glibc.new/sysdeps/arm/gmp-mparam.h 2004-02-12 09:15:13.000000000 -0500
21.72 +@@ -26,5 +26,13 @@ MA 02111-1307, USA. */
21.73 + #define BITS_PER_SHORTINT 16
21.74 + #define BITS_PER_CHAR 8
21.75 +
21.76 +-#define IEEE_DOUBLE_BIG_ENDIAN 0
21.77 +-#define IEEE_DOUBLE_MIXED_ENDIAN 1
21.78 ++#if defined(__ARMEB__)
21.79 ++# define IEEE_DOUBLE_MIXED_ENDIAN 0
21.80 ++# define IEEE_DOUBLE_BIG_ENDIAN 1
21.81 ++#elif defined(__VFP_FP__)
21.82 ++# define IEEE_DOUBLE_MIXED_ENDIAN 0
21.83 ++# define IEEE_DOUBLE_BIG_ENDIAN 0
21.84 ++#else
21.85 ++# define IEEE_DOUBLE_BIG_ENDIAN 0
21.86 ++# define IEEE_DOUBLE_MIXED_ENDIAN 1
21.87 ++#endif
21.88 +diff -uNrp glibc.old/sysdeps/arm/ieee754.h glibc.new/sysdeps/arm/ieee754.h
21.89 +--- glibc.old/sysdeps/arm/ieee754.h 2001-07-07 15:21:19.000000000 -0400
21.90 ++++ glibc.new/sysdeps/arm/ieee754.h 1969-12-31 19:00:00.000000000 -0500
21.91 +@@ -1,115 +0,0 @@
21.92 +-/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
21.93 +- This file is part of the GNU C Library.
21.94 +-
21.95 +- The GNU C Library is free software; you can redistribute it and/or
21.96 +- modify it under the terms of the GNU Lesser General Public
21.97 +- License as published by the Free Software Foundation; either
21.98 +- version 2.1 of the License, or (at your option) any later version.
21.99 +-
21.100 +- The GNU C Library is distributed in the hope that it will be useful,
21.101 +- but WITHOUT ANY WARRANTY; without even the implied warranty of
21.102 +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21.103 +- Lesser General Public License for more details.
21.104 +-
21.105 +- You should have received a copy of the GNU Lesser General Public
21.106 +- License along with the GNU C Library; if not, write to the Free
21.107 +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21.108 +- 02111-1307 USA. */
21.109 +-
21.110 +-#ifndef _IEEE754_H
21.111 +-
21.112 +-#define _IEEE754_H 1
21.113 +-#include <features.h>
21.114 +-
21.115 +-#include <endian.h>
21.116 +-
21.117 +-__BEGIN_DECLS
21.118 +-
21.119 +-union ieee754_float
21.120 +- {
21.121 +- float f;
21.122 +-
21.123 +- /* This is the IEEE 754 single-precision format. */
21.124 +- struct
21.125 +- {
21.126 +- unsigned int mantissa:23;
21.127 +- unsigned int exponent:8;
21.128 +- unsigned int negative:1;
21.129 +- } ieee;
21.130 +-
21.131 +- /* This format makes it easier to see if a NaN is a signalling NaN. */
21.132 +- struct
21.133 +- {
21.134 +- unsigned int mantissa:22;
21.135 +- unsigned int quiet_nan:1;
21.136 +- unsigned int exponent:8;
21.137 +- unsigned int negative:1;
21.138 +- } ieee_nan;
21.139 +- };
21.140 +-
21.141 +-#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
21.142 +-
21.143 +-
21.144 +-union ieee754_double
21.145 +- {
21.146 +- double d;
21.147 +-
21.148 +- /* This is the IEEE 754 double-precision format. */
21.149 +- struct
21.150 +- {
21.151 +- unsigned int mantissa0:20;
21.152 +- unsigned int exponent:11;
21.153 +- unsigned int negative:1;
21.154 +- unsigned int mantissa1:32;
21.155 +- } ieee;
21.156 +-
21.157 +- /* This format makes it easier to see if a NaN is a signalling NaN. */
21.158 +- struct
21.159 +- {
21.160 +- unsigned int mantissa0:19;
21.161 +- unsigned int quiet_nan:1;
21.162 +- unsigned int exponent:11;
21.163 +- unsigned int negative:1;
21.164 +- unsigned int mantissa1:32;
21.165 +- } ieee_nan;
21.166 +- };
21.167 +-
21.168 +-#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
21.169 +-
21.170 +-
21.171 +-/* The following two structures are correct for `new' floating point systems but
21.172 +- wrong for the old FPPC. The only solution seems to be to avoid their use on
21.173 +- old hardware. */
21.174 +-
21.175 +-union ieee854_long_double
21.176 +- {
21.177 +- long double d;
21.178 +-
21.179 +- /* This is the IEEE 854 double-extended-precision format. */
21.180 +- struct
21.181 +- {
21.182 +- unsigned int exponent:15;
21.183 +- unsigned int empty:16;
21.184 +- unsigned int negative:1;
21.185 +- unsigned int mantissa1:32;
21.186 +- unsigned int mantissa0:32;
21.187 +- } ieee;
21.188 +-
21.189 +- /* This is for NaNs in the IEEE 854 double-extended-precision format. */
21.190 +- struct
21.191 +- {
21.192 +- unsigned int exponent:15;
21.193 +- unsigned int empty:16;
21.194 +- unsigned int negative:1;
21.195 +- unsigned int mantissa1:32;
21.196 +- unsigned int mantissa0:30;
21.197 +- unsigned int quiet_nan:1;
21.198 +- unsigned int one:1;
21.199 +- } ieee_nan;
21.200 +- };
21.201 +-
21.202 +-#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
21.203 +-
21.204 +-__END_DECLS
21.205 +-
21.206 +-#endif /* ieee754.h */
21.207 +
21.208 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
22.1 --- a/patches/glibc/2.3.6/210-glibc-fp-byteorder.patch Mon Jul 28 11:43:29 2008 +0000
22.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
22.3 @@ -1,205 +0,0 @@
22.4 -Taken from http://sources.redhat.com/ml/crossgcc/2004-02/msg00104.html
22.5 -Author: addsub@eyou.com
22.6 -Target: ARM
22.7 -
22.8 -Fixes http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/920501-8.c
22.9 -and makes printf("%f", 1.0) work.
22.10 -
22.11 -Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00115.html :
22.12 - It ... fixes the 'printf("%f\n", 0.5); prints 0.000000' and general 'floating point
22.13 - is broken' on my big-endian hardfloat FPA ARM platform. ...
22.14 - It's definitely needed for hardfloat. So I'd think it's needed for
22.15 - big-endian systems in any case, and for VFP on little-endian systems
22.16 - too. Someone would have to verify that though.
22.17 -
22.18 -Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00123.html
22.19 - I just had a look at glibc-20040830, and [this patch] is still needed and useful
22.20 - for this version. glibc-20040830 out-of-the-box still contains the
22.21 - following wrong assumptions:
22.22 - - sysdeps/arm/bits/endian.h: float word order is big endian (which it is
22.23 - not on vfp systems)
22.24 - - sysdeps/arm/gmp-mparam.h: IEEE doubles are mixed endian (which they
22.25 - are not on big endian systems, neither on vfp systems)
22.26 - - sysdeps/arm/ieee754.h: IEEE doubles are in little endian byte order
22.27 - (which they are not on big endian systems)
22.28 - [This patch] seems the right solution for all of these issues.
22.29 -
22.30 -Dimitry Andric wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00132.html :
22.31 - It's even needed for glibc CVS, AFAICS.
22.32 - The patch hunk which modifies glibc.new/sysdeps/arm/bits/endian.h
22.33 - (currently at version 1.4) is only needed for proper VFP operation.
22.34 - But the hunk which modifies sysdeps/arm/gmp-mparam.h, and the hunk
22.35 - that deletes sysdeps/arm/ieee754.h (yes, this IS correct), are needed
22.36 - for proper operation of *any* FP model on big endian ARM.
22.37 -
22.38 -See also discussion in followups to
22.39 -http://sources.redhat.com/ml/crossgcc/2004-05/msg00245.html)
22.40 -
22.41 -Message-ID: <276985760.37584@eyou.com>
22.42 -Received: from unknown (HELO eyou.com) (172.16.2.2)
22.43 - by 0.0.0.0 with SMTP; Tue, 17 Feb 2004 10:42:40 +0800
22.44 -Received: (qmail 8238 invoked by uid 65534); 17 Feb 2004 10:42:38 +0800
22.45 -Date: 17 Feb 2004 10:42:38 +0800
22.46 -Message-ID: <20040217104238.8237.qmail@eyou.com>
22.47 -From: "add" <addsub@eyou.com>
22.48 -To: dank@kegel.com
22.49 -Reply-To: "add" <addsub@eyou.com>
22.50 -Subject: Re: problem while building arm vfp softfloat gcc `
22.51 -
22.52 -Hi, Dan, This is a patch I applied to my glibc-2.3.2, then my softfloat
22.53 -toolchain can printf("%f\n",1.0). So you may have a try of this
22.54 -
22.55 -
22.56 -diff -uNrp glibc.old/sysdeps/arm/bits/endian.h glibc.new/sysdeps/arm/bits/endian.h
22.57 ---- glibc.old/sysdeps/arm/bits/endian.h 1999-04-12 11:59:13.000000000 -0400
22.58 -+++ glibc.new/sysdeps/arm/bits/endian.h 2004-02-12 09:15:13.000000000 -0500
22.59 -@@ -9,4 +9,9 @@
22.60 - #else
22.61 - #define __BYTE_ORDER __LITTLE_ENDIAN
22.62 - #endif
22.63 -+
22.64 -+#ifdef __VFP_FP__
22.65 -+#define __FLOAT_WORD_ORDER __BYTE_ORDER
22.66 -+#else
22.67 - #define __FLOAT_WORD_ORDER __BIG_ENDIAN
22.68 -+#endif
22.69 -diff -uNrp glibc.old/sysdeps/arm/gmp-mparam.h glibc.new/sysdeps/arm/gmp-mparam.h
22.70 ---- glibc.old/sysdeps/arm/gmp-mparam.h 2001-07-07 15:21:19.000000000 -0400
22.71 -+++ glibc.new/sysdeps/arm/gmp-mparam.h 2004-02-12 09:15:13.000000000 -0500
22.72 -@@ -26,5 +26,13 @@ MA 02111-1307, USA. */
22.73 - #define BITS_PER_SHORTINT 16
22.74 - #define BITS_PER_CHAR 8
22.75 -
22.76 --#define IEEE_DOUBLE_BIG_ENDIAN 0
22.77 --#define IEEE_DOUBLE_MIXED_ENDIAN 1
22.78 -+#if defined(__ARMEB__)
22.79 -+# define IEEE_DOUBLE_MIXED_ENDIAN 0
22.80 -+# define IEEE_DOUBLE_BIG_ENDIAN 1
22.81 -+#elif defined(__VFP_FP__)
22.82 -+# define IEEE_DOUBLE_MIXED_ENDIAN 0
22.83 -+# define IEEE_DOUBLE_BIG_ENDIAN 0
22.84 -+#else
22.85 -+# define IEEE_DOUBLE_BIG_ENDIAN 0
22.86 -+# define IEEE_DOUBLE_MIXED_ENDIAN 1
22.87 -+#endif
22.88 -diff -uNrp glibc.old/sysdeps/arm/ieee754.h glibc.new/sysdeps/arm/ieee754.h
22.89 ---- glibc.old/sysdeps/arm/ieee754.h 2001-07-07 15:21:19.000000000 -0400
22.90 -+++ glibc.new/sysdeps/arm/ieee754.h 1969-12-31 19:00:00.000000000 -0500
22.91 -@@ -1,115 +0,0 @@
22.92 --/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
22.93 -- This file is part of the GNU C Library.
22.94 --
22.95 -- The GNU C Library is free software; you can redistribute it and/or
22.96 -- modify it under the terms of the GNU Lesser General Public
22.97 -- License as published by the Free Software Foundation; either
22.98 -- version 2.1 of the License, or (at your option) any later version.
22.99 --
22.100 -- The GNU C Library is distributed in the hope that it will be useful,
22.101 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
22.102 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22.103 -- Lesser General Public License for more details.
22.104 --
22.105 -- You should have received a copy of the GNU Lesser General Public
22.106 -- License along with the GNU C Library; if not, write to the Free
22.107 -- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
22.108 -- 02111-1307 USA. */
22.109 --
22.110 --#ifndef _IEEE754_H
22.111 --
22.112 --#define _IEEE754_H 1
22.113 --#include <features.h>
22.114 --
22.115 --#include <endian.h>
22.116 --
22.117 --__BEGIN_DECLS
22.118 --
22.119 --union ieee754_float
22.120 -- {
22.121 -- float f;
22.122 --
22.123 -- /* This is the IEEE 754 single-precision format. */
22.124 -- struct
22.125 -- {
22.126 -- unsigned int mantissa:23;
22.127 -- unsigned int exponent:8;
22.128 -- unsigned int negative:1;
22.129 -- } ieee;
22.130 --
22.131 -- /* This format makes it easier to see if a NaN is a signalling NaN. */
22.132 -- struct
22.133 -- {
22.134 -- unsigned int mantissa:22;
22.135 -- unsigned int quiet_nan:1;
22.136 -- unsigned int exponent:8;
22.137 -- unsigned int negative:1;
22.138 -- } ieee_nan;
22.139 -- };
22.140 --
22.141 --#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
22.142 --
22.143 --
22.144 --union ieee754_double
22.145 -- {
22.146 -- double d;
22.147 --
22.148 -- /* This is the IEEE 754 double-precision format. */
22.149 -- struct
22.150 -- {
22.151 -- unsigned int mantissa0:20;
22.152 -- unsigned int exponent:11;
22.153 -- unsigned int negative:1;
22.154 -- unsigned int mantissa1:32;
22.155 -- } ieee;
22.156 --
22.157 -- /* This format makes it easier to see if a NaN is a signalling NaN. */
22.158 -- struct
22.159 -- {
22.160 -- unsigned int mantissa0:19;
22.161 -- unsigned int quiet_nan:1;
22.162 -- unsigned int exponent:11;
22.163 -- unsigned int negative:1;
22.164 -- unsigned int mantissa1:32;
22.165 -- } ieee_nan;
22.166 -- };
22.167 --
22.168 --#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
22.169 --
22.170 --
22.171 --/* The following two structures are correct for `new' floating point systems but
22.172 -- wrong for the old FPPC. The only solution seems to be to avoid their use on
22.173 -- old hardware. */
22.174 --
22.175 --union ieee854_long_double
22.176 -- {
22.177 -- long double d;
22.178 --
22.179 -- /* This is the IEEE 854 double-extended-precision format. */
22.180 -- struct
22.181 -- {
22.182 -- unsigned int exponent:15;
22.183 -- unsigned int empty:16;
22.184 -- unsigned int negative:1;
22.185 -- unsigned int mantissa1:32;
22.186 -- unsigned int mantissa0:32;
22.187 -- } ieee;
22.188 --
22.189 -- /* This is for NaNs in the IEEE 854 double-extended-precision format. */
22.190 -- struct
22.191 -- {
22.192 -- unsigned int exponent:15;
22.193 -- unsigned int empty:16;
22.194 -- unsigned int negative:1;
22.195 -- unsigned int mantissa1:32;
22.196 -- unsigned int mantissa0:30;
22.197 -- unsigned int quiet_nan:1;
22.198 -- unsigned int one:1;
22.199 -- } ieee_nan;
22.200 -- };
22.201 --
22.202 --#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
22.203 --
22.204 --__END_DECLS
22.205 --
22.206 --#endif /* ieee754.h */
22.207 -
22.208 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
23.1 --- a/patches/glibc/2.3.6/220-glibc-mips-bootstrap-gcc-header-install.patch Mon Jul 28 11:43:29 2008 +0000
23.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
23.3 @@ -1,37 +0,0 @@
23.4 -http://sourceware.org/ml/crossgcc/2005-05/msg00165.html
23.5 -Fixes a MIPS build problem (unrelated to NPTL)
23.6 -
23.7 -Message-ID: <428E8B24.1000201@realitydiluted.com>
23.8 -Date: Fri, 20 May 2005 20:13:08 -0500
23.9 -From: "Steven J dot Hill" <sjhill at realitydiluted dot com>
23.10 -To: crossgcc at sources dot redhat dot com, toolchain at gentoo dot org,
23.11 - Shay_Gal-On at pmc-sierra dot com, TheNop at gmx dot net
23.12 -Subject: New NPTL patches for crosstools and MIPS NPTL patches....
23.13 -
23.14 -Greetings.
23.15 -
23.16 -I have uploaded the latest NPTL patch for crosstool-0.34. I have also
23.17 -uploaded a tarball of the patches necessary to build a MIPS NPTL
23.18 -cross toolchain. To build a MIPS NPTL toolchain you will need the
23.19 -released version of binutils-2.16 and the absolute latest GCC and
23.20 -glibc code from the HEAD of cvs. Use the 'demo-mips-nptl.sh' script
23.21 -to build the toolchain. Please report bugs or issues to the crossgcc
23.22 -mailing list. Here is the link off of my FTP site:
23.23 -
23.24 - ftp://ftp.realitydiluted.com/crosstools/crosstool-0.34/
23.25 -
23.26 -[Note: BOOTSTRAP_GCC is set by crosstool.sh when invoking make install-headers]
23.27 -
23.28 -diff -ur glibc-2.4.0-20050406/sysdeps/mips/mips32/Makefile glibc-2.4.0-20050406-patched/sysdeps/mips/mips32/Makefile
23.29 ---- glibc-2.4.0-20050406/sysdeps/mips/mips32/Makefile 2003-03-29 02:15:28.000000000 -0600
23.30 -+++ glibc-2.4.0-20050406-patched/sysdeps/mips/mips32/Makefile 2005-04-12 21:36:51.318837655 -0500
23.31 -@@ -1,3 +1,7 @@
23.32 -+ifeq ($(filter -DBOOTSTRAP_GCC,$(CFLAGS)),)
23.33 - ifeq ($(filter -mabi=32,$(CC)),)
23.34 - CC += -mabi=32
23.35 - endif
23.36 -+else
23.37 -+CC += -D"_MIPS_SZPTR=32"
23.38 -+endif
23.39 -
23.40 -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.3.6/220-mips-bootstrap-gcc-header-install.patch Mon Jul 28 20:10:34 2008 +0000
24.3 @@ -0,0 +1,37 @@
24.4 +http://sourceware.org/ml/crossgcc/2005-05/msg00165.html
24.5 +Fixes a MIPS build problem (unrelated to NPTL)
24.6 +
24.7 +Message-ID: <428E8B24.1000201@realitydiluted.com>
24.8 +Date: Fri, 20 May 2005 20:13:08 -0500
24.9 +From: "Steven J dot Hill" <sjhill at realitydiluted dot com>
24.10 +To: crossgcc at sources dot redhat dot com, toolchain at gentoo dot org,
24.11 + Shay_Gal-On at pmc-sierra dot com, TheNop at gmx dot net
24.12 +Subject: New NPTL patches for crosstools and MIPS NPTL patches....
24.13 +
24.14 +Greetings.
24.15 +
24.16 +I have uploaded the latest NPTL patch for crosstool-0.34. I have also
24.17 +uploaded a tarball of the patches necessary to build a MIPS NPTL
24.18 +cross toolchain. To build a MIPS NPTL toolchain you will need the
24.19 +released version of binutils-2.16 and the absolute latest GCC and
24.20 +glibc code from the HEAD of cvs. Use the 'demo-mips-nptl.sh' script
24.21 +to build the toolchain. Please report bugs or issues to the crossgcc
24.22 +mailing list. Here is the link off of my FTP site:
24.23 +
24.24 + ftp://ftp.realitydiluted.com/crosstools/crosstool-0.34/
24.25 +
24.26 +[Note: BOOTSTRAP_GCC is set by crosstool.sh when invoking make install-headers]
24.27 +
24.28 +diff -ur glibc-2.4.0-20050406/sysdeps/mips/mips32/Makefile glibc-2.4.0-20050406-patched/sysdeps/mips/mips32/Makefile
24.29 +--- glibc-2.4.0-20050406/sysdeps/mips/mips32/Makefile 2003-03-29 02:15:28.000000000 -0600
24.30 ++++ glibc-2.4.0-20050406-patched/sysdeps/mips/mips32/Makefile 2005-04-12 21:36:51.318837655 -0500
24.31 +@@ -1,3 +1,7 @@
24.32 ++ifeq ($(filter -DBOOTSTRAP_GCC,$(CFLAGS)),)
24.33 + ifeq ($(filter -mabi=32,$(CC)),)
24.34 + CC += -mabi=32
24.35 + endif
24.36 ++else
24.37 ++CC += -D"_MIPS_SZPTR=32"
24.38 ++endif
24.39 +
24.40 +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.3.6/maybe/100-allow-gcc-4.0-powerpc32.patch Mon Jul 28 20:10:34 2008 +0000
25.3 @@ -0,0 +1,45 @@
25.4 +Fixes
25.5 +
25.6 +../sysdeps/powerpc/powerpc32/dl-machine.h: In function '_dl_relocate_object':
25.7 +../sysdeps/powerpc/powerpc32/dl-machine.h:461: error: invalid storage class for function 'elf_machine_rela_relative'
25.8 +../sysdeps/powerpc/powerpc32/dl-machine.h:469: error: invalid storage class for function 'elf_machine_lazy_rel'
25.9 +make[2]: *** [/home/dank/queue/jobdir.dual2/crosstool-dev/build/powerpc-750-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/build-glibc/elf/dl-reloc.o] Error 1
25.10 +
25.11 +--- glibc-2.3.6.orig/sysdeps/powerpc/powerpc32/dl-machine.h Wed Jul 30 23:33:52 2003
25.12 ++++ glibc-2.3.6/sysdeps/powerpc/powerpc32/dl-machine.h Thu Mar 17 13:19:16 2005
25.13 +@@ -455,8 +455,14 @@
25.14 + }
25.15 + }
25.16 +
25.17 +-auto inline void
25.18 +-__attribute__ ((always_inline))
25.19 ++#if __GNUC__ >= 4
25.20 ++ auto inline void
25.21 ++#else
25.22 ++ static inline void
25.23 ++#endif
25.24 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
25.25 ++ __attribute ((always_inline))
25.26 ++#endif
25.27 + elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
25.28 + void *const reloc_addr_arg)
25.29 + {
25.30 +@@ -464,8 +470,14 @@
25.31 + *reloc_addr = l_addr + reloc->r_addend;
25.32 + }
25.33 +
25.34 +-auto inline void
25.35 +-__attribute__ ((always_inline))
25.36 ++#if __GNUC__ >= 4
25.37 ++ auto inline void
25.38 ++#else
25.39 ++ static inline void
25.40 ++#endif
25.41 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
25.42 ++ __attribute ((always_inline))
25.43 ++#endif
25.44 + elf_machine_lazy_rel (struct link_map *map,
25.45 + Elf32_Addr l_addr, const Elf32_Rela *reloc)
25.46 + {
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.3.6/maybe/101-allow-gcc-4.0-powerpc64.patch Mon Jul 28 20:10:34 2008 +0000
26.3 @@ -0,0 +1,65 @@
26.4 +Fixes:
26.5 +
26.6 +In file included from dynamic-link.h:22,
26.7 + from dl-reloc.c:269:
26.8 +../sysdeps/powerpc/powerpc64/dl-machine.h: In function '_dl_relocate_object':
26.9 +../sysdeps/powerpc/powerpc64/dl-machine.h:573: error: invalid storage class for function 'elf_machine_rela_relative'
26.10 +../sysdeps/powerpc/powerpc64/dl-machine.h:607: error: invalid storage class for function 'elf_machine_rela'
26.11 +../sysdeps/powerpc/powerpc64/dl-machine.h:889: error: invalid storage class for function 'elf_machine_lazy_rel'
26.12 +make[2]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/powerpc64-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/glibc-2.3-20050307/elf'
26.13 +
26.14 +--- glibc-2.3.6.orig/sysdeps/powerpc/powerpc64/dl-machine.h Thu Mar 17 13:35:23 2005
26.15 ++++ glibc-2.3.6/sysdeps/powerpc/powerpc64/dl-machine.h Thu Mar 17 13:37:12 2005
26.16 +@@ -567,8 +567,14 @@
26.17 + const Elf64_Sym *refsym)
26.18 + attribute_hidden;
26.19 +
26.20 +-auto inline void
26.21 +-__attribute__ ((always_inline))
26.22 ++#if __GNUC__ >= 4
26.23 ++ auto inline void
26.24 ++#else
26.25 ++ static inline void
26.26 ++#endif
26.27 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
26.28 ++ __attribute ((always_inline))
26.29 ++#endif
26.30 + elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
26.31 + void *const reloc_addr_arg)
26.32 + {
26.33 +@@ -599,8 +605,14 @@
26.34 +
26.35 + /* Perform the relocation specified by RELOC and SYM (which is fully
26.36 + resolved). MAP is the object containing the reloc. */
26.37 +-auto inline void
26.38 +-__attribute__ ((always_inline))
26.39 ++#if __GNUC__ >= 4
26.40 ++ auto inline void
26.41 ++#else
26.42 ++ static inline void
26.43 ++#endif
26.44 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
26.45 ++ __attribute ((always_inline))
26.46 ++#endif
26.47 + elf_machine_rela (struct link_map *map,
26.48 + const Elf64_Rela *reloc,
26.49 + const Elf64_Sym *sym,
26.50 +@@ -885,8 +897,14 @@
26.51 + MODIFIED_CODE_NOQUEUE (reloc_addr);
26.52 + }
26.53 +
26.54 +-auto inline void
26.55 +-__attribute__ ((always_inline))
26.56 ++#if __GNUC__ >= 4
26.57 ++ auto inline void
26.58 ++#else
26.59 ++ static inline void
26.60 ++#endif
26.61 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
26.62 ++ __attribute ((always_inline))
26.63 ++#endif
26.64 + elf_machine_lazy_rel (struct link_map *map,
26.65 + Elf64_Addr l_addr, const Elf64_Rela *reloc)
26.66 + {
26.67 +
26.68 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
27.1 --- a/patches/glibc/2.3.6/maybe/glibc-2.3.6-allow-gcc-4.0-powerpc32.patch Mon Jul 28 11:43:29 2008 +0000
27.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
27.3 @@ -1,45 +0,0 @@
27.4 -Fixes
27.5 -
27.6 -../sysdeps/powerpc/powerpc32/dl-machine.h: In function '_dl_relocate_object':
27.7 -../sysdeps/powerpc/powerpc32/dl-machine.h:461: error: invalid storage class for function 'elf_machine_rela_relative'
27.8 -../sysdeps/powerpc/powerpc32/dl-machine.h:469: error: invalid storage class for function 'elf_machine_lazy_rel'
27.9 -make[2]: *** [/home/dank/queue/jobdir.dual2/crosstool-dev/build/powerpc-750-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/build-glibc/elf/dl-reloc.o] Error 1
27.10 -
27.11 ---- glibc-2.3.6.orig/sysdeps/powerpc/powerpc32/dl-machine.h Wed Jul 30 23:33:52 2003
27.12 -+++ glibc-2.3.6/sysdeps/powerpc/powerpc32/dl-machine.h Thu Mar 17 13:19:16 2005
27.13 -@@ -455,8 +455,14 @@
27.14 - }
27.15 - }
27.16 -
27.17 --auto inline void
27.18 --__attribute__ ((always_inline))
27.19 -+#if __GNUC__ >= 4
27.20 -+ auto inline void
27.21 -+#else
27.22 -+ static inline void
27.23 -+#endif
27.24 -+#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
27.25 -+ __attribute ((always_inline))
27.26 -+#endif
27.27 - elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
27.28 - void *const reloc_addr_arg)
27.29 - {
27.30 -@@ -464,8 +470,14 @@
27.31 - *reloc_addr = l_addr + reloc->r_addend;
27.32 - }
27.33 -
27.34 --auto inline void
27.35 --__attribute__ ((always_inline))
27.36 -+#if __GNUC__ >= 4
27.37 -+ auto inline void
27.38 -+#else
27.39 -+ static inline void
27.40 -+#endif
27.41 -+#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
27.42 -+ __attribute ((always_inline))
27.43 -+#endif
27.44 - elf_machine_lazy_rel (struct link_map *map,
27.45 - Elf32_Addr l_addr, const Elf32_Rela *reloc)
27.46 - {
27.47 -
27.48 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
28.1 --- a/patches/glibc/2.3.6/maybe/glibc-2.3.6-allow-gcc-4.0-powerpc64.patch Mon Jul 28 11:43:29 2008 +0000
28.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
28.3 @@ -1,65 +0,0 @@
28.4 -Fixes:
28.5 -
28.6 -In file included from dynamic-link.h:22,
28.7 - from dl-reloc.c:269:
28.8 -../sysdeps/powerpc/powerpc64/dl-machine.h: In function '_dl_relocate_object':
28.9 -../sysdeps/powerpc/powerpc64/dl-machine.h:573: error: invalid storage class for function 'elf_machine_rela_relative'
28.10 -../sysdeps/powerpc/powerpc64/dl-machine.h:607: error: invalid storage class for function 'elf_machine_rela'
28.11 -../sysdeps/powerpc/powerpc64/dl-machine.h:889: error: invalid storage class for function 'elf_machine_lazy_rel'
28.12 -make[2]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/powerpc64-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/glibc-2.3-20050307/elf'
28.13 -
28.14 ---- glibc-2.3.6.orig/sysdeps/powerpc/powerpc64/dl-machine.h Thu Mar 17 13:35:23 2005
28.15 -+++ glibc-2.3.6/sysdeps/powerpc/powerpc64/dl-machine.h Thu Mar 17 13:37:12 2005
28.16 -@@ -567,8 +567,14 @@
28.17 - const Elf64_Sym *refsym)
28.18 - attribute_hidden;
28.19 -
28.20 --auto inline void
28.21 --__attribute__ ((always_inline))
28.22 -+#if __GNUC__ >= 4
28.23 -+ auto inline void
28.24 -+#else
28.25 -+ static inline void
28.26 -+#endif
28.27 -+#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
28.28 -+ __attribute ((always_inline))
28.29 -+#endif
28.30 - elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
28.31 - void *const reloc_addr_arg)
28.32 - {
28.33 -@@ -599,8 +605,14 @@
28.34 -
28.35 - /* Perform the relocation specified by RELOC and SYM (which is fully
28.36 - resolved). MAP is the object containing the reloc. */
28.37 --auto inline void
28.38 --__attribute__ ((always_inline))
28.39 -+#if __GNUC__ >= 4
28.40 -+ auto inline void
28.41 -+#else
28.42 -+ static inline void
28.43 -+#endif
28.44 -+#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
28.45 -+ __attribute ((always_inline))
28.46 -+#endif
28.47 - elf_machine_rela (struct link_map *map,
28.48 - const Elf64_Rela *reloc,
28.49 - const Elf64_Sym *sym,
28.50 -@@ -885,8 +897,14 @@
28.51 - MODIFIED_CODE_NOQUEUE (reloc_addr);
28.52 - }
28.53 -
28.54 --auto inline void
28.55 --__attribute__ ((always_inline))
28.56 -+#if __GNUC__ >= 4
28.57 -+ auto inline void
28.58 -+#else
28.59 -+ static inline void
28.60 -+#endif
28.61 -+#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
28.62 -+ __attribute ((always_inline))
28.63 -+#endif
28.64 - elf_machine_lazy_rel (struct link_map *map,
28.65 - Elf64_Addr l_addr, const Elf64_Rela *reloc)
28.66 - {
28.67 -
28.68 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
29.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
29.2 +++ b/patches/glibc/2.5.1/120-cygwin.patch Mon Jul 28 20:10:34 2008 +0000
29.3 @@ -0,0 +1,187 @@
29.4 +Fixes
29.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
29.6 +...
29.7 +when building glibc-2.3.x on cygwin
29.8 +
29.9 +Idea from
29.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
29.11 +Basically, make glibc use .oST as suffix for 'object static'
29.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
29.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
29.14 +
29.15 +glibc-linuxthreads-2.3.5 also requires a patch, see
29.16 +../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
29.17 +
29.18 +[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
29.19 +
29.20 +Message-ID: <4282FCBA.3040000@unicontrols.cz>
29.21 +Date: Thu, 12 May 2005 08:50:34 +0200
29.22 +From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
29.23 +To: Dan Kegel <dank@kegel.com>
29.24 +CC: crossgcc@sources.redhat.com
29.25 +Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
29.26 +
29.27 +Hi Dan,
29.28 +following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
29.29 +on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
29.30 +
29.31 +--
29.32 + Petr Cvachoucek
29.33 + Unicontrols a.s.
29.34 + http://www.unicontrols.cz
29.35 +]
29.36 +
29.37 +diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
29.38 +--- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
29.39 ++++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
29.40 +@@ -472,7 +472,7 @@
29.41 + # run the linked programs.
29.42 + link-libc = -Wl,-rpath-link=$(rpath-link) \
29.43 + $(common-objpfx)libc.so$(libc.so-version) \
29.44 +- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
29.45 ++ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
29.46 + # This is how to find at build-time things that will be installed there.
29.47 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
29.48 + endif
29.49 +@@ -693,7 +693,7 @@
29.50 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
29.51 + # to pass different flags for each flavor.
29.52 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
29.53 +-all-object-suffixes := .o .os .op .og .ob .oS
29.54 ++all-object-suffixes := .o .os .op .og .ob .oST
29.55 + object-suffixes :=
29.56 + CPPFLAGS-.o = $(pic-default)
29.57 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
29.58 +@@ -749,14 +749,14 @@
29.59 +
29.60 + ifeq (yes,$(build-shared))
29.61 + # Build special library that contains the static-only routines for libc.
29.62 +-object-suffixes-for-libc += .oS
29.63 ++object-suffixes-for-libc += .oST
29.64 +
29.65 + # Must build the routines as PIC, though, because they can end up in (users')
29.66 + # shared objects. We don't want to use CFLAGS-os because users may, for
29.67 + # example, make that processor-specific.
29.68 +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
29.69 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
29.70 +-libtype.oS = lib%_nonshared.a
29.71 ++CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
29.72 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
29.73 ++libtype.oST = lib%_nonshared.a
29.74 + endif
29.75 +
29.76 + # The assembler can generate debug information too.
29.77 +diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
29.78 +--- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
29.79 ++++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
29.80 +@@ -417,7 +417,7 @@
29.81 + # Bounded pointer thunks are only built for *.ob
29.82 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
29.83 +
29.84 +-elide-routines.oS += $(filter-out $(static-only-routines),\
29.85 ++elide-routines.oST += $(filter-out $(static-only-routines),\
29.86 + $(routines) $(aux) $(sysdep_routines)) \
29.87 + $(elide-bp-thunks)
29.88 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
29.89 +@@ -981,7 +981,7 @@
29.90 + install: $(inst_libdir)/libc.so
29.91 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
29.92 + $(common-objpfx)libc.so$(libc.so-version) \
29.93 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
29.94 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
29.95 + $(libprefix)$(libc-name)) \
29.96 + $(+force)
29.97 + (echo '/* GNU ld script';\
29.98 +@@ -989,7 +989,7 @@
29.99 + echo ' the static library, so try that secondarily. */';\
29.100 + cat $<; \
29.101 + echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
29.102 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
29.103 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
29.104 + ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
29.105 + ) > $@.new
29.106 + mv -f $@.new $@
29.107 +diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
29.108 +--- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
29.109 ++++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
29.110 +@@ -13,7 +13,7 @@
29.111 +
29.112 + ifneq (,$($(lib)-static-only-routines))
29.113 + ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
29.114 +-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
29.115 ++object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
29.116 + endif
29.117 + endif
29.118 +
29.119 +@@ -29,7 +29,7 @@
29.120 +
29.121 + # Add each flavor of library to the lists of things to build and install.
29.122 + install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
29.123 +-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
29.124 ++extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
29.125 + $(patsubst %,%$o,$(filter-out \
29.126 + $($(lib)-shared-only-routines),\
29.127 + $(all-$(lib)-routines))))
29.128 +@@ -57,7 +57,7 @@
29.129 +
29.130 +
29.131 + # Use o-iterator.mk to generate a rule for each flavor of library.
29.132 +-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
29.133 ++ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
29.134 + define o-iterator-doit
29.135 + $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
29.136 + $(patsubst %,$(objpfx)%$o,\
29.137 +@@ -65,7 +65,7 @@
29.138 + $(all-$(lib)-routines))); \
29.139 + $$(build-extra-lib)
29.140 + endef
29.141 +-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
29.142 ++object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
29.143 + include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
29.144 + endif
29.145 +
29.146 +@@ -77,9 +77,9 @@
29.147 + $(build-extra-lib)
29.148 + endif
29.149 +
29.150 +-ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
29.151 +-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
29.152 +- $(patsubst %,$(objpfx)%.oS,\
29.153 ++ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
29.154 ++$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
29.155 ++ $(patsubst %,$(objpfx)%.oST,\
29.156 + $(filter $($(lib)-static-only-routines),\
29.157 + $(all-$(lib)-routines)))
29.158 + $(build-extra-lib)
29.159 +diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
29.160 +--- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
29.161 ++++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
29.162 +@@ -375,7 +375,7 @@
29.163 +
29.164 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
29.165 + $(objpfx)libpthread.so$(libpthread.so-version) \
29.166 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
29.167 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
29.168 + $(libprefix)pthread) \
29.169 + $(+force)
29.170 + (echo '/* GNU ld script';\
29.171 +@@ -383,7 +383,7 @@
29.172 + echo ' the static library, so try that secondarily. */';\
29.173 + cat $<; \
29.174 + echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
29.175 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
29.176 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
29.177 + ')' \
29.178 + ) > $@.new
29.179 + mv -f $@.new $@
29.180 +diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
29.181 +--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
29.182 ++++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
29.183 +@@ -10,4 +10,4 @@
29.184 + ASFLAGS-.op += -Wa,-Av9a
29.185 + ASFLAGS-.og += -Wa,-Av9a
29.186 + ASFLAGS-.ob += -Wa,-Av9a
29.187 +-ASFLAGS-.oS += -Wa,-Av9a
29.188 ++ASFLAGS-.oST += -Wa,-Av9a
29.189 +
29.190 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
30.1 --- a/patches/glibc/2.5.1/120-glibc-2.3.5-cygwin.patch Mon Jul 28 11:43:29 2008 +0000
30.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
30.3 @@ -1,187 +0,0 @@
30.4 -Fixes
30.5 -elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
30.6 -...
30.7 -when building glibc-2.3.x on cygwin
30.8 -
30.9 -Idea from
30.10 -http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
30.11 -Basically, make glibc use .oST as suffix for 'object static'
30.12 -instead of .oS, since cygwin has trouble distinguishing .os from .oS
30.13 -(Original patch had .on, but .oST is more mnemonic for 'object static')
30.14 -
30.15 -glibc-linuxthreads-2.3.5 also requires a patch, see
30.16 -../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
30.17 -
30.18 -[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
30.19 -
30.20 -Message-ID: <4282FCBA.3040000@unicontrols.cz>
30.21 -Date: Thu, 12 May 2005 08:50:34 +0200
30.22 -From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
30.23 -To: Dan Kegel <dank@kegel.com>
30.24 -CC: crossgcc@sources.redhat.com
30.25 -Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
30.26 -
30.27 -Hi Dan,
30.28 -following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
30.29 -on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
30.30 -
30.31 ---
30.32 - Petr Cvachoucek
30.33 - Unicontrols a.s.
30.34 - http://www.unicontrols.cz
30.35 -]
30.36 -
30.37 -diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
30.38 ---- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
30.39 -+++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
30.40 -@@ -472,7 +472,7 @@
30.41 - # run the linked programs.
30.42 - link-libc = -Wl,-rpath-link=$(rpath-link) \
30.43 - $(common-objpfx)libc.so$(libc.so-version) \
30.44 -- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
30.45 -+ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
30.46 - # This is how to find at build-time things that will be installed there.
30.47 - rpath-dirs = math elf dlfcn nss nis rt resolv crypt
30.48 - endif
30.49 -@@ -693,7 +693,7 @@
30.50 - # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
30.51 - # to pass different flags for each flavor.
30.52 - libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
30.53 --all-object-suffixes := .o .os .op .og .ob .oS
30.54 -+all-object-suffixes := .o .os .op .og .ob .oST
30.55 - object-suffixes :=
30.56 - CPPFLAGS-.o = $(pic-default)
30.57 - CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
30.58 -@@ -749,14 +749,14 @@
30.59 -
30.60 - ifeq (yes,$(build-shared))
30.61 - # Build special library that contains the static-only routines for libc.
30.62 --object-suffixes-for-libc += .oS
30.63 -+object-suffixes-for-libc += .oST
30.64 -
30.65 - # Must build the routines as PIC, though, because they can end up in (users')
30.66 - # shared objects. We don't want to use CFLAGS-os because users may, for
30.67 - # example, make that processor-specific.
30.68 --CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
30.69 --CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
30.70 --libtype.oS = lib%_nonshared.a
30.71 -+CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
30.72 -+CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
30.73 -+libtype.oST = lib%_nonshared.a
30.74 - endif
30.75 -
30.76 - # The assembler can generate debug information too.
30.77 -diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
30.78 ---- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
30.79 -+++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
30.80 -@@ -417,7 +417,7 @@
30.81 - # Bounded pointer thunks are only built for *.ob
30.82 - elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
30.83 -
30.84 --elide-routines.oS += $(filter-out $(static-only-routines),\
30.85 -+elide-routines.oST += $(filter-out $(static-only-routines),\
30.86 - $(routines) $(aux) $(sysdep_routines)) \
30.87 - $(elide-bp-thunks)
30.88 - elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
30.89 -@@ -981,7 +981,7 @@
30.90 - install: $(inst_libdir)/libc.so
30.91 - $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
30.92 - $(common-objpfx)libc.so$(libc.so-version) \
30.93 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
30.94 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
30.95 - $(libprefix)$(libc-name)) \
30.96 - $(+force)
30.97 - (echo '/* GNU ld script';\
30.98 -@@ -989,7 +989,7 @@
30.99 - echo ' the static library, so try that secondarily. */';\
30.100 - cat $<; \
30.101 - echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
30.102 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
30.103 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
30.104 - ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
30.105 - ) > $@.new
30.106 - mv -f $@.new $@
30.107 -diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
30.108 ---- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
30.109 -+++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
30.110 -@@ -13,7 +13,7 @@
30.111 -
30.112 - ifneq (,$($(lib)-static-only-routines))
30.113 - ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
30.114 --object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
30.115 -+object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
30.116 - endif
30.117 - endif
30.118 -
30.119 -@@ -29,7 +29,7 @@
30.120 -
30.121 - # Add each flavor of library to the lists of things to build and install.
30.122 - install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
30.123 --extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
30.124 -+extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
30.125 - $(patsubst %,%$o,$(filter-out \
30.126 - $($(lib)-shared-only-routines),\
30.127 - $(all-$(lib)-routines))))
30.128 -@@ -57,7 +57,7 @@
30.129 -
30.130 -
30.131 - # Use o-iterator.mk to generate a rule for each flavor of library.
30.132 --ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
30.133 -+ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
30.134 - define o-iterator-doit
30.135 - $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
30.136 - $(patsubst %,$(objpfx)%$o,\
30.137 -@@ -65,7 +65,7 @@
30.138 - $(all-$(lib)-routines))); \
30.139 - $$(build-extra-lib)
30.140 - endef
30.141 --object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
30.142 -+object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
30.143 - include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
30.144 - endif
30.145 -
30.146 -@@ -77,9 +77,9 @@
30.147 - $(build-extra-lib)
30.148 - endif
30.149 -
30.150 --ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
30.151 --$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
30.152 -- $(patsubst %,$(objpfx)%.oS,\
30.153 -+ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
30.154 -+$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
30.155 -+ $(patsubst %,$(objpfx)%.oST,\
30.156 - $(filter $($(lib)-static-only-routines),\
30.157 - $(all-$(lib)-routines)))
30.158 - $(build-extra-lib)
30.159 -diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
30.160 ---- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
30.161 -+++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
30.162 -@@ -375,7 +375,7 @@
30.163 -
30.164 - $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
30.165 - $(objpfx)libpthread.so$(libpthread.so-version) \
30.166 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
30.167 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
30.168 - $(libprefix)pthread) \
30.169 - $(+force)
30.170 - (echo '/* GNU ld script';\
30.171 -@@ -383,7 +383,7 @@
30.172 - echo ' the static library, so try that secondarily. */';\
30.173 - cat $<; \
30.174 - echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
30.175 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
30.176 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
30.177 - ')' \
30.178 - ) > $@.new
30.179 - mv -f $@.new $@
30.180 -diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
30.181 ---- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
30.182 -+++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
30.183 -@@ -10,4 +10,4 @@
30.184 - ASFLAGS-.op += -Wa,-Av9a
30.185 - ASFLAGS-.og += -Wa,-Av9a
30.186 - ASFLAGS-.ob += -Wa,-Av9a
30.187 --ASFLAGS-.oS += -Wa,-Av9a
30.188 -+ASFLAGS-.oST += -Wa,-Av9a
30.189 -
30.190 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
31.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
31.2 +++ b/patches/glibc/2.5.1/140-configure-apple-as.patch Mon Jul 28 20:10:34 2008 +0000
31.3 @@ -0,0 +1,25 @@
31.4 +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
31.5 +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
31.6 +
31.7 +The following makes it possible to configure glibc-2.3.2 on Mac OS X,
31.8 +where the assembler but doesn't understand the --version flag.
31.9 +
31.10 +Fixes the symptom
31.11 +checking whether ld is GNU ld... no
31.12 +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
31.13 +checking version of /usr/libexec/gcc/darwin/ppc/as...
31.14 +<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
31.15 +
31.16 +--- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
31.17 ++++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
31.18 +@@ -4039,7 +4039,7 @@
31.19 + # Found it, now check the version.
31.20 + echo "$as_me:$LINENO: checking version of $AS" >&5
31.21 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
31.22 +- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
31.23 ++ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
31.24 + case $ac_prog_version in
31.25 + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
31.26 + 2.1[3-9]*)
31.27 +
31.28 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
32.1 --- a/patches/glibc/2.5.1/140-glibc-2.3.6-configure-apple-as.patch Mon Jul 28 11:43:29 2008 +0000
32.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
32.3 @@ -1,25 +0,0 @@
32.4 -http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
32.5 -http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
32.6 -
32.7 -The following makes it possible to configure glibc-2.3.2 on Mac OS X,
32.8 -where the assembler but doesn't understand the --version flag.
32.9 -
32.10 -Fixes the symptom
32.11 -checking whether ld is GNU ld... no
32.12 -checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
32.13 -checking version of /usr/libexec/gcc/darwin/ppc/as...
32.14 -<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
32.15 -
32.16 ---- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
32.17 -+++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
32.18 -@@ -4039,7 +4039,7 @@
32.19 - # Found it, now check the version.
32.20 - echo "$as_me:$LINENO: checking version of $AS" >&5
32.21 - echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
32.22 -- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
32.23 -+ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
32.24 - case $ac_prog_version in
32.25 - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
32.26 - 2.1[3-9]*)
32.27 -
32.28 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
33.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
33.2 +++ b/patches/glibc/2.5.1/150-fix-pr631.patch Mon Jul 28 20:10:34 2008 +0000
33.3 @@ -0,0 +1,45 @@
33.4 +From dank@kegel.com
33.5 +Wed Jun 15 09:12:43 PDT 2005
33.6 +
33.7 +Fixes
33.8 +
33.9 +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
33.10 +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
33.11 +... 53 lines deleted ...
33.12 +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
33.13 +collect2: ld returned 1 exit status
33.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
33.15 +
33.16 +when building glibc with --enable-static-nss.
33.17 +
33.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
33.19 +
33.20 +--- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
33.21 ++++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
33.22 +@@ -510,7 +510,7 @@
33.23 +
33.24 + # The static libraries.
33.25 + ifeq (yes,$(build-static))
33.26 +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
33.27 ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
33.28 + else
33.29 + ifeq (yes,$(build-shared))
33.30 + # We can try to link the programs with lib*_pic.a...
33.31 +--- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
33.32 ++++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
33.33 +@@ -120,6 +120,13 @@
33.34 + install-bin-script = ldd
33.35 + endif
33.36 +
33.37 ++ifeq (yes,$(build-static-nss))
33.38 ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
33.39 ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
33.40 ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
33.41 ++ $(resolvobjdir)/libresolv.a
33.42 ++endif
33.43 ++
33.44 + others = sprof sln
33.45 + install-bin = sprof
33.46 + others-static = sln
33.47 +
33.48 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
34.1 --- a/patches/glibc/2.5.1/150-glibc-2.3.6-fix-pr631.patch Mon Jul 28 11:43:29 2008 +0000
34.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
34.3 @@ -1,45 +0,0 @@
34.4 -From dank@kegel.com
34.5 -Wed Jun 15 09:12:43 PDT 2005
34.6 -
34.7 -Fixes
34.8 -
34.9 -build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
34.10 -build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
34.11 -... 53 lines deleted ...
34.12 -build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
34.13 -collect2: ld returned 1 exit status
34.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
34.15 -
34.16 -when building glibc with --enable-static-nss.
34.17 -
34.18 -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
34.19 -
34.20 ---- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
34.21 -+++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
34.22 -@@ -510,7 +510,7 @@
34.23 -
34.24 - # The static libraries.
34.25 - ifeq (yes,$(build-static))
34.26 --link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
34.27 -+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
34.28 - else
34.29 - ifeq (yes,$(build-shared))
34.30 - # We can try to link the programs with lib*_pic.a...
34.31 ---- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
34.32 -+++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
34.33 -@@ -120,6 +120,13 @@
34.34 - install-bin-script = ldd
34.35 - endif
34.36 -
34.37 -+ifeq (yes,$(build-static-nss))
34.38 -+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
34.39 -+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
34.40 -+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
34.41 -+ $(resolvobjdir)/libresolv.a
34.42 -+endif
34.43 -+
34.44 - others = sprof sln
34.45 - install-bin = sprof
34.46 - others-static = sln
34.47 -
34.48 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
35.1 --- a/patches/glibc/2.5.1/160-glibc-2.4-i686-assembler.patch Mon Jul 28 11:43:29 2008 +0000
35.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
35.3 @@ -1,38 +0,0 @@
35.4 -2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
35.5 -
35.6 - * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
35.7 - * nptl/sysdeps/pthread/pt-initfini.c: Ditto.
35.8 -
35.9 -
35.10 -
35.11 -Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
35.12 -===================================================================
35.13 ---- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
35.14 -+++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
35.15 -@@ -29,6 +29,10 @@
35.16 - #include <dl-sysdep.h>
35.17 - #include <tls.h>
35.18 -
35.19 -+#if defined __i686 && defined __ASSEMBLER__
35.20 -+#undef __i686
35.21 -+#define __i686 __i686
35.22 -+#endif
35.23 -
35.24 - /* For Linux we can use the system call table in the header file
35.25 - /usr/include/asm/unistd.h
35.26 -Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
35.27 -===================================================================
35.28 ---- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
35.29 -+++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy)
35.30 -@@ -45,6 +45,11 @@
35.31 - /* Embed an #include to pull in the alignment and .end directives. */
35.32 - asm ("\n#include \"defs.h\"");
35.33 -
35.34 -+asm ("\n#if defined __i686 && defined __ASSEMBLER__");
35.35 -+asm ("\n#undef __i686");
35.36 -+asm ("\n#define __i686 __i686");
35.37 -+asm ("\n#endif");
35.38 -+
35.39 - /* The initial common code ends here. */
35.40 - asm ("\n/*@HEADER_ENDS*/");
35.41 -
36.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
36.2 +++ b/patches/glibc/2.5.1/160-i686-assembler.patch Mon Jul 28 20:10:34 2008 +0000
36.3 @@ -0,0 +1,38 @@
36.4 +2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
36.5 +
36.6 + * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
36.7 + * nptl/sysdeps/pthread/pt-initfini.c: Ditto.
36.8 +
36.9 +
36.10 +
36.11 +Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
36.12 +===================================================================
36.13 +--- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
36.14 ++++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
36.15 +@@ -29,6 +29,10 @@
36.16 + #include <dl-sysdep.h>
36.17 + #include <tls.h>
36.18 +
36.19 ++#if defined __i686 && defined __ASSEMBLER__
36.20 ++#undef __i686
36.21 ++#define __i686 __i686
36.22 ++#endif
36.23 +
36.24 + /* For Linux we can use the system call table in the header file
36.25 + /usr/include/asm/unistd.h
36.26 +Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
36.27 +===================================================================
36.28 +--- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
36.29 ++++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy)
36.30 +@@ -45,6 +45,11 @@
36.31 + /* Embed an #include to pull in the alignment and .end directives. */
36.32 + asm ("\n#include \"defs.h\"");
36.33 +
36.34 ++asm ("\n#if defined __i686 && defined __ASSEMBLER__");
36.35 ++asm ("\n#undef __i686");
36.36 ++asm ("\n#define __i686 __i686");
36.37 ++asm ("\n#endif");
36.38 ++
36.39 + /* The initial common code ends here. */
36.40 + asm ("\n/*@HEADER_ENDS*/");
36.41 +
37.1 --- a/patches/glibc/2.5.1/170-glibc-i386-preferred-stack-boundary.patch Mon Jul 28 11:43:29 2008 +0000
37.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
37.3 @@ -1,18 +0,0 @@
37.4 -(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
37.5 -License: LGPL v2.1
37.6 -
37.7 -Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
37.8 -and 2 is not.
37.9 -
37.10 -diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
37.11 ---- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100
37.12 -+++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200
37.13 -@@ -36,7 +36,7 @@
37.14 - ifeq ($(subdir),csu)
37.15 - sysdep-CFLAGS += -mpreferred-stack-boundary=4
37.16 - else
37.17 --sysdep-CFLAGS += -mpreferred-stack-boundary=2
37.18 -+sysdep-CFLAGS += -mpreferred-stack-boundary=4
37.19 - # Likewise, any function which calls user callbacks
37.20 - uses-callbacks += -mpreferred-stack-boundary=4
37.21 - # Likewise, any stack alignment tests
38.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
38.2 +++ b/patches/glibc/2.5.1/170-i386-preferred-stack-boundary.patch Mon Jul 28 20:10:34 2008 +0000
38.3 @@ -0,0 +1,18 @@
38.4 +(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
38.5 +License: LGPL v2.1
38.6 +
38.7 +Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
38.8 +and 2 is not.
38.9 +
38.10 +diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
38.11 +--- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100
38.12 ++++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200
38.13 +@@ -36,7 +36,7 @@
38.14 + ifeq ($(subdir),csu)
38.15 + sysdep-CFLAGS += -mpreferred-stack-boundary=4
38.16 + else
38.17 +-sysdep-CFLAGS += -mpreferred-stack-boundary=2
38.18 ++sysdep-CFLAGS += -mpreferred-stack-boundary=4
38.19 + # Likewise, any function which calls user callbacks
38.20 + uses-callbacks += -mpreferred-stack-boundary=4
38.21 + # Likewise, any stack alignment tests
39.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
39.2 +++ b/patches/glibc/2.5.1/270-alpha-cfi.patch Mon Jul 28 20:10:34 2008 +0000
39.3 @@ -0,0 +1,25 @@
39.4 +--- libc/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2006/10/29 21:48:06 1.6
39.5 ++++ libc/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2007/03/13 21:28:03 1.7
39.6 +@@ -55,6 +55,7 @@
39.7 + bne a3, SYSCALL_ERROR_LABEL; \
39.8 + __LABEL($pseudo_ret) \
39.9 + .subsection 2; \
39.10 ++ cfi_startproc; \
39.11 + __LABEL($pseudo_cancel) \
39.12 + subq sp, 64, sp; \
39.13 + cfi_def_cfa_offset(64); \
39.14 +@@ -90,12 +91,13 @@
39.15 + cfi_def_cfa_offset(0); \
39.16 + __LABEL($syscall_error) \
39.17 + SYSCALL_ERROR_HANDLER; \
39.18 ++ cfi_endproc; \
39.19 + .previous
39.20 +
39.21 + # undef PSEUDO_END
39.22 + # define PSEUDO_END(sym) \
39.23 +- .subsection 2; \
39.24 + cfi_endproc; \
39.25 ++ .subsection 2; \
39.26 + .size sym, .-sym
39.27 +
39.28 + # define SAVE_ARGS_0 /* Nothing. */
40.1 --- a/patches/glibc/2.5.1/270-glibc-alpha-cfi.patch Mon Jul 28 11:43:29 2008 +0000
40.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
40.3 @@ -1,25 +0,0 @@
40.4 ---- libc/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2006/10/29 21:48:06 1.6
40.5 -+++ libc/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2007/03/13 21:28:03 1.7
40.6 -@@ -55,6 +55,7 @@
40.7 - bne a3, SYSCALL_ERROR_LABEL; \
40.8 - __LABEL($pseudo_ret) \
40.9 - .subsection 2; \
40.10 -+ cfi_startproc; \
40.11 - __LABEL($pseudo_cancel) \
40.12 - subq sp, 64, sp; \
40.13 - cfi_def_cfa_offset(64); \
40.14 -@@ -90,12 +91,13 @@
40.15 - cfi_def_cfa_offset(0); \
40.16 - __LABEL($syscall_error) \
40.17 - SYSCALL_ERROR_HANDLER; \
40.18 -+ cfi_endproc; \
40.19 - .previous
40.20 -
40.21 - # undef PSEUDO_END
40.22 - # define PSEUDO_END(sym) \
40.23 -- .subsection 2; \
40.24 - cfi_endproc; \
40.25 -+ .subsection 2; \
40.26 - .size sym, .-sym
40.27 -
40.28 - # define SAVE_ARGS_0 /* Nothing. */
41.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
41.2 +++ b/patches/glibc/2.5.1/280-alpha-sigsuspend.patch Mon Jul 28 20:10:34 2008 +0000
41.3 @@ -0,0 +1,24 @@
41.4 +--- glibc-2.5/sysdeps/unix/sysv/linux/alpha/sigsuspend.S.orig 2006-10-22 22:17:01.000000000 +0200
41.5 ++++ glibc-2.5/sysdeps/unix/sysv/linux/alpha/sigsuspend.S 2006-10-22 22:18:05.000000000 +0200
41.6 +@@ -31,3 +31,21 @@
41.7 + libc_hidden_def (__sigsuspend)
41.8 + weak_alias (__sigsuspend, sigsuspend)
41.9 + strong_alias (__sigsuspend, __libc_sigsuspend)
41.10 ++
41.11 ++#ifndef NO_CANCELLATION
41.12 ++ .globl __sigsuspend_nocancel;
41.13 ++ .align 4;
41.14 ++ .type __sigsuspend_nocancel, @function;
41.15 ++ .usepv __sigsuspend_nocancel, std;
41.16 ++ cfi_startproc;
41.17 ++__LABEL(__sigsuspend_nocancel)
41.18 ++ ldgp gp, 0(pv);
41.19 ++ PSEUDO_PROF;
41.20 ++ PSEUDO_PREPARE_ARGS
41.21 ++ lda v0, SYS_ify(sigsuspend);
41.22 ++ call_pal PAL_callsys;
41.23 ++ bne a3, SYSCALL_ERROR_LABEL;
41.24 ++ ret;
41.25 ++ cfi_endproc;
41.26 ++ .size __sigsuspend_nocancel, .-__sigsuspend_nocancel
41.27 ++#endif
42.1 --- a/patches/glibc/2.5.1/280-glibc-alpha-sigsuspend.patch Mon Jul 28 11:43:29 2008 +0000
42.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
42.3 @@ -1,24 +0,0 @@
42.4 ---- glibc-2.5/sysdeps/unix/sysv/linux/alpha/sigsuspend.S.orig 2006-10-22 22:17:01.000000000 +0200
42.5 -+++ glibc-2.5/sysdeps/unix/sysv/linux/alpha/sigsuspend.S 2006-10-22 22:18:05.000000000 +0200
42.6 -@@ -31,3 +31,21 @@
42.7 - libc_hidden_def (__sigsuspend)
42.8 - weak_alias (__sigsuspend, sigsuspend)
42.9 - strong_alias (__sigsuspend, __libc_sigsuspend)
42.10 -+
42.11 -+#ifndef NO_CANCELLATION
42.12 -+ .globl __sigsuspend_nocancel;
42.13 -+ .align 4;
42.14 -+ .type __sigsuspend_nocancel, @function;
42.15 -+ .usepv __sigsuspend_nocancel, std;
42.16 -+ cfi_startproc;
42.17 -+__LABEL(__sigsuspend_nocancel)
42.18 -+ ldgp gp, 0(pv);
42.19 -+ PSEUDO_PROF;
42.20 -+ PSEUDO_PREPARE_ARGS
42.21 -+ lda v0, SYS_ify(sigsuspend);
42.22 -+ call_pal PAL_callsys;
42.23 -+ bne a3, SYSCALL_ERROR_LABEL;
42.24 -+ ret;
42.25 -+ cfi_endproc;
42.26 -+ .size __sigsuspend_nocancel, .-__sigsuspend_nocancel
42.27 -+#endif
43.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
43.2 +++ b/patches/glibc/2.5/120-cygwin.patch Mon Jul 28 20:10:34 2008 +0000
43.3 @@ -0,0 +1,187 @@
43.4 +Fixes
43.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
43.6 +...
43.7 +when building glibc-2.3.x on cygwin
43.8 +
43.9 +Idea from
43.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
43.11 +Basically, make glibc use .oST as suffix for 'object static'
43.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
43.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
43.14 +
43.15 +glibc-linuxthreads-2.3.5 also requires a patch, see
43.16 +../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
43.17 +
43.18 +[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
43.19 +
43.20 +Message-ID: <4282FCBA.3040000@unicontrols.cz>
43.21 +Date: Thu, 12 May 2005 08:50:34 +0200
43.22 +From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
43.23 +To: Dan Kegel <dank@kegel.com>
43.24 +CC: crossgcc@sources.redhat.com
43.25 +Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
43.26 +
43.27 +Hi Dan,
43.28 +following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
43.29 +on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
43.30 +
43.31 +--
43.32 + Petr Cvachoucek
43.33 + Unicontrols a.s.
43.34 + http://www.unicontrols.cz
43.35 +]
43.36 +
43.37 +diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
43.38 +--- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
43.39 ++++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
43.40 +@@ -472,7 +472,7 @@
43.41 + # run the linked programs.
43.42 + link-libc = -Wl,-rpath-link=$(rpath-link) \
43.43 + $(common-objpfx)libc.so$(libc.so-version) \
43.44 +- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
43.45 ++ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
43.46 + # This is how to find at build-time things that will be installed there.
43.47 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
43.48 + endif
43.49 +@@ -693,7 +693,7 @@
43.50 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
43.51 + # to pass different flags for each flavor.
43.52 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
43.53 +-all-object-suffixes := .o .os .op .og .ob .oS
43.54 ++all-object-suffixes := .o .os .op .og .ob .oST
43.55 + object-suffixes :=
43.56 + CPPFLAGS-.o = $(pic-default)
43.57 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
43.58 +@@ -749,14 +749,14 @@
43.59 +
43.60 + ifeq (yes,$(build-shared))
43.61 + # Build special library that contains the static-only routines for libc.
43.62 +-object-suffixes-for-libc += .oS
43.63 ++object-suffixes-for-libc += .oST
43.64 +
43.65 + # Must build the routines as PIC, though, because they can end up in (users')
43.66 + # shared objects. We don't want to use CFLAGS-os because users may, for
43.67 + # example, make that processor-specific.
43.68 +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
43.69 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
43.70 +-libtype.oS = lib%_nonshared.a
43.71 ++CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
43.72 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
43.73 ++libtype.oST = lib%_nonshared.a
43.74 + endif
43.75 +
43.76 + # The assembler can generate debug information too.
43.77 +diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
43.78 +--- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
43.79 ++++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
43.80 +@@ -417,7 +417,7 @@
43.81 + # Bounded pointer thunks are only built for *.ob
43.82 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
43.83 +
43.84 +-elide-routines.oS += $(filter-out $(static-only-routines),\
43.85 ++elide-routines.oST += $(filter-out $(static-only-routines),\
43.86 + $(routines) $(aux) $(sysdep_routines)) \
43.87 + $(elide-bp-thunks)
43.88 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
43.89 +@@ -981,7 +981,7 @@
43.90 + install: $(inst_libdir)/libc.so
43.91 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
43.92 + $(common-objpfx)libc.so$(libc.so-version) \
43.93 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
43.94 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
43.95 + $(libprefix)$(libc-name)) \
43.96 + $(+force)
43.97 + (echo '/* GNU ld script';\
43.98 +@@ -989,7 +989,7 @@
43.99 + echo ' the static library, so try that secondarily. */';\
43.100 + cat $<; \
43.101 + echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
43.102 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
43.103 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
43.104 + ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
43.105 + ) > $@.new
43.106 + mv -f $@.new $@
43.107 +diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
43.108 +--- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
43.109 ++++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
43.110 +@@ -13,7 +13,7 @@
43.111 +
43.112 + ifneq (,$($(lib)-static-only-routines))
43.113 + ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
43.114 +-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
43.115 ++object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
43.116 + endif
43.117 + endif
43.118 +
43.119 +@@ -29,7 +29,7 @@
43.120 +
43.121 + # Add each flavor of library to the lists of things to build and install.
43.122 + install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
43.123 +-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
43.124 ++extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
43.125 + $(patsubst %,%$o,$(filter-out \
43.126 + $($(lib)-shared-only-routines),\
43.127 + $(all-$(lib)-routines))))
43.128 +@@ -57,7 +57,7 @@
43.129 +
43.130 +
43.131 + # Use o-iterator.mk to generate a rule for each flavor of library.
43.132 +-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
43.133 ++ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
43.134 + define o-iterator-doit
43.135 + $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
43.136 + $(patsubst %,$(objpfx)%$o,\
43.137 +@@ -65,7 +65,7 @@
43.138 + $(all-$(lib)-routines))); \
43.139 + $$(build-extra-lib)
43.140 + endef
43.141 +-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
43.142 ++object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
43.143 + include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
43.144 + endif
43.145 +
43.146 +@@ -77,9 +77,9 @@
43.147 + $(build-extra-lib)
43.148 + endif
43.149 +
43.150 +-ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
43.151 +-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
43.152 +- $(patsubst %,$(objpfx)%.oS,\
43.153 ++ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
43.154 ++$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
43.155 ++ $(patsubst %,$(objpfx)%.oST,\
43.156 + $(filter $($(lib)-static-only-routines),\
43.157 + $(all-$(lib)-routines)))
43.158 + $(build-extra-lib)
43.159 +diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
43.160 +--- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
43.161 ++++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
43.162 +@@ -375,7 +375,7 @@
43.163 +
43.164 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
43.165 + $(objpfx)libpthread.so$(libpthread.so-version) \
43.166 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
43.167 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
43.168 + $(libprefix)pthread) \
43.169 + $(+force)
43.170 + (echo '/* GNU ld script';\
43.171 +@@ -383,7 +383,7 @@
43.172 + echo ' the static library, so try that secondarily. */';\
43.173 + cat $<; \
43.174 + echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
43.175 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
43.176 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
43.177 + ')' \
43.178 + ) > $@.new
43.179 + mv -f $@.new $@
43.180 +diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
43.181 +--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
43.182 ++++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
43.183 +@@ -10,4 +10,4 @@
43.184 + ASFLAGS-.op += -Wa,-Av9a
43.185 + ASFLAGS-.og += -Wa,-Av9a
43.186 + ASFLAGS-.ob += -Wa,-Av9a
43.187 +-ASFLAGS-.oS += -Wa,-Av9a
43.188 ++ASFLAGS-.oST += -Wa,-Av9a
43.189 +
43.190 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
44.1 --- a/patches/glibc/2.5/120-glibc-2.3.5-cygwin.patch Mon Jul 28 11:43:29 2008 +0000
44.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
44.3 @@ -1,187 +0,0 @@
44.4 -Fixes
44.5 -elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
44.6 -...
44.7 -when building glibc-2.3.x on cygwin
44.8 -
44.9 -Idea from
44.10 -http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
44.11 -Basically, make glibc use .oST as suffix for 'object static'
44.12 -instead of .oS, since cygwin has trouble distinguishing .os from .oS
44.13 -(Original patch had .on, but .oST is more mnemonic for 'object static')
44.14 -
44.15 -glibc-linuxthreads-2.3.5 also requires a patch, see
44.16 -../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
44.17 -
44.18 -[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
44.19 -
44.20 -Message-ID: <4282FCBA.3040000@unicontrols.cz>
44.21 -Date: Thu, 12 May 2005 08:50:34 +0200
44.22 -From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
44.23 -To: Dan Kegel <dank@kegel.com>
44.24 -CC: crossgcc@sources.redhat.com
44.25 -Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
44.26 -
44.27 -Hi Dan,
44.28 -following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
44.29 -on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
44.30 -
44.31 ---
44.32 - Petr Cvachoucek
44.33 - Unicontrols a.s.
44.34 - http://www.unicontrols.cz
44.35 -]
44.36 -
44.37 -diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
44.38 ---- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
44.39 -+++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
44.40 -@@ -472,7 +472,7 @@
44.41 - # run the linked programs.
44.42 - link-libc = -Wl,-rpath-link=$(rpath-link) \
44.43 - $(common-objpfx)libc.so$(libc.so-version) \
44.44 -- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
44.45 -+ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
44.46 - # This is how to find at build-time things that will be installed there.
44.47 - rpath-dirs = math elf dlfcn nss nis rt resolv crypt
44.48 - endif
44.49 -@@ -693,7 +693,7 @@
44.50 - # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
44.51 - # to pass different flags for each flavor.
44.52 - libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
44.53 --all-object-suffixes := .o .os .op .og .ob .oS
44.54 -+all-object-suffixes := .o .os .op .og .ob .oST
44.55 - object-suffixes :=
44.56 - CPPFLAGS-.o = $(pic-default)
44.57 - CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
44.58 -@@ -749,14 +749,14 @@
44.59 -
44.60 - ifeq (yes,$(build-shared))
44.61 - # Build special library that contains the static-only routines for libc.
44.62 --object-suffixes-for-libc += .oS
44.63 -+object-suffixes-for-libc += .oST
44.64 -
44.65 - # Must build the routines as PIC, though, because they can end up in (users')
44.66 - # shared objects. We don't want to use CFLAGS-os because users may, for
44.67 - # example, make that processor-specific.
44.68 --CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
44.69 --CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
44.70 --libtype.oS = lib%_nonshared.a
44.71 -+CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
44.72 -+CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
44.73 -+libtype.oST = lib%_nonshared.a
44.74 - endif
44.75 -
44.76 - # The assembler can generate debug information too.
44.77 -diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
44.78 ---- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
44.79 -+++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
44.80 -@@ -417,7 +417,7 @@
44.81 - # Bounded pointer thunks are only built for *.ob
44.82 - elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
44.83 -
44.84 --elide-routines.oS += $(filter-out $(static-only-routines),\
44.85 -+elide-routines.oST += $(filter-out $(static-only-routines),\
44.86 - $(routines) $(aux) $(sysdep_routines)) \
44.87 - $(elide-bp-thunks)
44.88 - elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
44.89 -@@ -981,7 +981,7 @@
44.90 - install: $(inst_libdir)/libc.so
44.91 - $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
44.92 - $(common-objpfx)libc.so$(libc.so-version) \
44.93 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
44.94 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
44.95 - $(libprefix)$(libc-name)) \
44.96 - $(+force)
44.97 - (echo '/* GNU ld script';\
44.98 -@@ -989,7 +989,7 @@
44.99 - echo ' the static library, so try that secondarily. */';\
44.100 - cat $<; \
44.101 - echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
44.102 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
44.103 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
44.104 - ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
44.105 - ) > $@.new
44.106 - mv -f $@.new $@
44.107 -diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
44.108 ---- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
44.109 -+++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
44.110 -@@ -13,7 +13,7 @@
44.111 -
44.112 - ifneq (,$($(lib)-static-only-routines))
44.113 - ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
44.114 --object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
44.115 -+object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
44.116 - endif
44.117 - endif
44.118 -
44.119 -@@ -29,7 +29,7 @@
44.120 -
44.121 - # Add each flavor of library to the lists of things to build and install.
44.122 - install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
44.123 --extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
44.124 -+extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
44.125 - $(patsubst %,%$o,$(filter-out \
44.126 - $($(lib)-shared-only-routines),\
44.127 - $(all-$(lib)-routines))))
44.128 -@@ -57,7 +57,7 @@
44.129 -
44.130 -
44.131 - # Use o-iterator.mk to generate a rule for each flavor of library.
44.132 --ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
44.133 -+ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
44.134 - define o-iterator-doit
44.135 - $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
44.136 - $(patsubst %,$(objpfx)%$o,\
44.137 -@@ -65,7 +65,7 @@
44.138 - $(all-$(lib)-routines))); \
44.139 - $$(build-extra-lib)
44.140 - endef
44.141 --object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
44.142 -+object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
44.143 - include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
44.144 - endif
44.145 -
44.146 -@@ -77,9 +77,9 @@
44.147 - $(build-extra-lib)
44.148 - endif
44.149 -
44.150 --ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
44.151 --$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
44.152 -- $(patsubst %,$(objpfx)%.oS,\
44.153 -+ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
44.154 -+$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
44.155 -+ $(patsubst %,$(objpfx)%.oST,\
44.156 - $(filter $($(lib)-static-only-routines),\
44.157 - $(all-$(lib)-routines)))
44.158 - $(build-extra-lib)
44.159 -diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
44.160 ---- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
44.161 -+++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
44.162 -@@ -375,7 +375,7 @@
44.163 -
44.164 - $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
44.165 - $(objpfx)libpthread.so$(libpthread.so-version) \
44.166 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
44.167 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
44.168 - $(libprefix)pthread) \
44.169 - $(+force)
44.170 - (echo '/* GNU ld script';\
44.171 -@@ -383,7 +383,7 @@
44.172 - echo ' the static library, so try that secondarily. */';\
44.173 - cat $<; \
44.174 - echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
44.175 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
44.176 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
44.177 - ')' \
44.178 - ) > $@.new
44.179 - mv -f $@.new $@
44.180 -diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
44.181 ---- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
44.182 -+++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
44.183 -@@ -10,4 +10,4 @@
44.184 - ASFLAGS-.op += -Wa,-Av9a
44.185 - ASFLAGS-.og += -Wa,-Av9a
44.186 - ASFLAGS-.ob += -Wa,-Av9a
44.187 --ASFLAGS-.oS += -Wa,-Av9a
44.188 -+ASFLAGS-.oST += -Wa,-Av9a
44.189 -
44.190 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
45.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
45.2 +++ b/patches/glibc/2.5/140-configure-apple-as.patch Mon Jul 28 20:10:34 2008 +0000
45.3 @@ -0,0 +1,25 @@
45.4 +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
45.5 +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
45.6 +
45.7 +The following makes it possible to configure glibc-2.3.2 on Mac OS X,
45.8 +where the assembler but doesn't understand the --version flag.
45.9 +
45.10 +Fixes the symptom
45.11 +checking whether ld is GNU ld... no
45.12 +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
45.13 +checking version of /usr/libexec/gcc/darwin/ppc/as...
45.14 +<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
45.15 +
45.16 +--- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
45.17 ++++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
45.18 +@@ -4039,7 +4039,7 @@
45.19 + # Found it, now check the version.
45.20 + echo "$as_me:$LINENO: checking version of $AS" >&5
45.21 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
45.22 +- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
45.23 ++ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
45.24 + case $ac_prog_version in
45.25 + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
45.26 + 2.1[3-9]*)
45.27 +
45.28 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
46.1 --- a/patches/glibc/2.5/140-glibc-2.3.6-configure-apple-as.patch Mon Jul 28 11:43:29 2008 +0000
46.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
46.3 @@ -1,25 +0,0 @@
46.4 -http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
46.5 -http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
46.6 -
46.7 -The following makes it possible to configure glibc-2.3.2 on Mac OS X,
46.8 -where the assembler but doesn't understand the --version flag.
46.9 -
46.10 -Fixes the symptom
46.11 -checking whether ld is GNU ld... no
46.12 -checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
46.13 -checking version of /usr/libexec/gcc/darwin/ppc/as...
46.14 -<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
46.15 -
46.16 ---- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
46.17 -+++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
46.18 -@@ -4039,7 +4039,7 @@
46.19 - # Found it, now check the version.
46.20 - echo "$as_me:$LINENO: checking version of $AS" >&5
46.21 - echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
46.22 -- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
46.23 -+ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
46.24 - case $ac_prog_version in
46.25 - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
46.26 - 2.1[3-9]*)
46.27 -
46.28 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
47.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
47.2 +++ b/patches/glibc/2.5/150-fix-pr631.patch Mon Jul 28 20:10:34 2008 +0000
47.3 @@ -0,0 +1,45 @@
47.4 +From dank@kegel.com
47.5 +Wed Jun 15 09:12:43 PDT 2005
47.6 +
47.7 +Fixes
47.8 +
47.9 +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
47.10 +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
47.11 +... 53 lines deleted ...
47.12 +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
47.13 +collect2: ld returned 1 exit status
47.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
47.15 +
47.16 +when building glibc with --enable-static-nss.
47.17 +
47.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
47.19 +
47.20 +--- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
47.21 ++++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
47.22 +@@ -510,7 +510,7 @@
47.23 +
47.24 + # The static libraries.
47.25 + ifeq (yes,$(build-static))
47.26 +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
47.27 ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
47.28 + else
47.29 + ifeq (yes,$(build-shared))
47.30 + # We can try to link the programs with lib*_pic.a...
47.31 +--- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
47.32 ++++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
47.33 +@@ -120,6 +120,13 @@
47.34 + install-bin-script = ldd
47.35 + endif
47.36 +
47.37 ++ifeq (yes,$(build-static-nss))
47.38 ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
47.39 ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
47.40 ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
47.41 ++ $(resolvobjdir)/libresolv.a
47.42 ++endif
47.43 ++
47.44 + others = sprof sln
47.45 + install-bin = sprof
47.46 + others-static = sln
47.47 +
47.48 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
48.1 --- a/patches/glibc/2.5/150-glibc-2.3.6-fix-pr631.patch Mon Jul 28 11:43:29 2008 +0000
48.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
48.3 @@ -1,45 +0,0 @@
48.4 -From dank@kegel.com
48.5 -Wed Jun 15 09:12:43 PDT 2005
48.6 -
48.7 -Fixes
48.8 -
48.9 -build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
48.10 -build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
48.11 -... 53 lines deleted ...
48.12 -build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
48.13 -collect2: ld returned 1 exit status
48.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
48.15 -
48.16 -when building glibc with --enable-static-nss.
48.17 -
48.18 -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
48.19 -
48.20 ---- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
48.21 -+++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
48.22 -@@ -510,7 +510,7 @@
48.23 -
48.24 - # The static libraries.
48.25 - ifeq (yes,$(build-static))
48.26 --link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
48.27 -+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
48.28 - else
48.29 - ifeq (yes,$(build-shared))
48.30 - # We can try to link the programs with lib*_pic.a...
48.31 ---- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
48.32 -+++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
48.33 -@@ -120,6 +120,13 @@
48.34 - install-bin-script = ldd
48.35 - endif
48.36 -
48.37 -+ifeq (yes,$(build-static-nss))
48.38 -+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
48.39 -+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
48.40 -+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
48.41 -+ $(resolvobjdir)/libresolv.a
48.42 -+endif
48.43 -+
48.44 - others = sprof sln
48.45 - install-bin = sprof
48.46 - others-static = sln
48.47 -
48.48 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
49.1 --- a/patches/glibc/2.5/160-glibc-2.4-i686-assembler.patch Mon Jul 28 11:43:29 2008 +0000
49.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
49.3 @@ -1,38 +0,0 @@
49.4 -2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
49.5 -
49.6 - * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
49.7 - * nptl/sysdeps/pthread/pt-initfini.c: Ditto.
49.8 -
49.9 -
49.10 -
49.11 -Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
49.12 -===================================================================
49.13 ---- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
49.14 -+++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
49.15 -@@ -29,6 +29,10 @@
49.16 - #include <dl-sysdep.h>
49.17 - #include <tls.h>
49.18 -
49.19 -+#if defined __i686 && defined __ASSEMBLER__
49.20 -+#undef __i686
49.21 -+#define __i686 __i686
49.22 -+#endif
49.23 -
49.24 - /* For Linux we can use the system call table in the header file
49.25 - /usr/include/asm/unistd.h
49.26 -Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
49.27 -===================================================================
49.28 ---- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
49.29 -+++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy)
49.30 -@@ -45,6 +45,11 @@
49.31 - /* Embed an #include to pull in the alignment and .end directives. */
49.32 - asm ("\n#include \"defs.h\"");
49.33 -
49.34 -+asm ("\n#if defined __i686 && defined __ASSEMBLER__");
49.35 -+asm ("\n#undef __i686");
49.36 -+asm ("\n#define __i686 __i686");
49.37 -+asm ("\n#endif");
49.38 -+
49.39 - /* The initial common code ends here. */
49.40 - asm ("\n/*@HEADER_ENDS*/");
49.41 -
50.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
50.2 +++ b/patches/glibc/2.5/160-i686-assembler.patch Mon Jul 28 20:10:34 2008 +0000
50.3 @@ -0,0 +1,38 @@
50.4 +2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
50.5 +
50.6 + * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
50.7 + * nptl/sysdeps/pthread/pt-initfini.c: Ditto.
50.8 +
50.9 +
50.10 +
50.11 +Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
50.12 +===================================================================
50.13 +--- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
50.14 ++++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
50.15 +@@ -29,6 +29,10 @@
50.16 + #include <dl-sysdep.h>
50.17 + #include <tls.h>
50.18 +
50.19 ++#if defined __i686 && defined __ASSEMBLER__
50.20 ++#undef __i686
50.21 ++#define __i686 __i686
50.22 ++#endif
50.23 +
50.24 + /* For Linux we can use the system call table in the header file
50.25 + /usr/include/asm/unistd.h
50.26 +Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
50.27 +===================================================================
50.28 +--- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
50.29 ++++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy)
50.30 +@@ -45,6 +45,11 @@
50.31 + /* Embed an #include to pull in the alignment and .end directives. */
50.32 + asm ("\n#include \"defs.h\"");
50.33 +
50.34 ++asm ("\n#if defined __i686 && defined __ASSEMBLER__");
50.35 ++asm ("\n#undef __i686");
50.36 ++asm ("\n#define __i686 __i686");
50.37 ++asm ("\n#endif");
50.38 ++
50.39 + /* The initial common code ends here. */
50.40 + asm ("\n/*@HEADER_ENDS*/");
50.41 +
51.1 --- a/patches/glibc/2.5/170-glibc-i386-preferred-stack-boundary.patch Mon Jul 28 11:43:29 2008 +0000
51.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
51.3 @@ -1,18 +0,0 @@
51.4 -(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
51.5 -License: LGPL v2.1
51.6 -
51.7 -Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
51.8 -and 2 is not.
51.9 -
51.10 -diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
51.11 ---- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100
51.12 -+++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200
51.13 -@@ -36,7 +36,7 @@
51.14 - ifeq ($(subdir),csu)
51.15 - sysdep-CFLAGS += -mpreferred-stack-boundary=4
51.16 - else
51.17 --sysdep-CFLAGS += -mpreferred-stack-boundary=2
51.18 -+sysdep-CFLAGS += -mpreferred-stack-boundary=4
51.19 - # Likewise, any function which calls user callbacks
51.20 - uses-callbacks += -mpreferred-stack-boundary=4
51.21 - # Likewise, any stack alignment tests
52.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
52.2 +++ b/patches/glibc/2.5/170-i386-preferred-stack-boundary.patch Mon Jul 28 20:10:34 2008 +0000
52.3 @@ -0,0 +1,18 @@
52.4 +(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
52.5 +License: LGPL v2.1
52.6 +
52.7 +Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
52.8 +and 2 is not.
52.9 +
52.10 +diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
52.11 +--- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100
52.12 ++++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200
52.13 +@@ -36,7 +36,7 @@
52.14 + ifeq ($(subdir),csu)
52.15 + sysdep-CFLAGS += -mpreferred-stack-boundary=4
52.16 + else
52.17 +-sysdep-CFLAGS += -mpreferred-stack-boundary=2
52.18 ++sysdep-CFLAGS += -mpreferred-stack-boundary=4
52.19 + # Likewise, any function which calls user callbacks
52.20 + uses-callbacks += -mpreferred-stack-boundary=4
52.21 + # Likewise, any stack alignment tests
53.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
53.2 +++ b/patches/glibc/2.5/270-alpha-cfi.patch Mon Jul 28 20:10:34 2008 +0000
53.3 @@ -0,0 +1,25 @@
53.4 +--- libc/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2006/10/29 21:48:06 1.6
53.5 ++++ libc/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2007/03/13 21:28:03 1.7
53.6 +@@ -55,6 +55,7 @@
53.7 + bne a3, SYSCALL_ERROR_LABEL; \
53.8 + __LABEL($pseudo_ret) \
53.9 + .subsection 2; \
53.10 ++ cfi_startproc; \
53.11 + __LABEL($pseudo_cancel) \
53.12 + subq sp, 64, sp; \
53.13 + cfi_def_cfa_offset(64); \
53.14 +@@ -90,12 +91,13 @@
53.15 + cfi_def_cfa_offset(0); \
53.16 + __LABEL($syscall_error) \
53.17 + SYSCALL_ERROR_HANDLER; \
53.18 ++ cfi_endproc; \
53.19 + .previous
53.20 +
53.21 + # undef PSEUDO_END
53.22 + # define PSEUDO_END(sym) \
53.23 +- .subsection 2; \
53.24 + cfi_endproc; \
53.25 ++ .subsection 2; \
53.26 + .size sym, .-sym
53.27 +
53.28 + # define SAVE_ARGS_0 /* Nothing. */
54.1 --- a/patches/glibc/2.5/270-glibc-alpha-cfi.patch Mon Jul 28 11:43:29 2008 +0000
54.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
54.3 @@ -1,25 +0,0 @@
54.4 ---- libc/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2006/10/29 21:48:06 1.6
54.5 -+++ libc/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2007/03/13 21:28:03 1.7
54.6 -@@ -55,6 +55,7 @@
54.7 - bne a3, SYSCALL_ERROR_LABEL; \
54.8 - __LABEL($pseudo_ret) \
54.9 - .subsection 2; \
54.10 -+ cfi_startproc; \
54.11 - __LABEL($pseudo_cancel) \
54.12 - subq sp, 64, sp; \
54.13 - cfi_def_cfa_offset(64); \
54.14 -@@ -90,12 +91,13 @@
54.15 - cfi_def_cfa_offset(0); \
54.16 - __LABEL($syscall_error) \
54.17 - SYSCALL_ERROR_HANDLER; \
54.18 -+ cfi_endproc; \
54.19 - .previous
54.20 -
54.21 - # undef PSEUDO_END
54.22 - # define PSEUDO_END(sym) \
54.23 -- .subsection 2; \
54.24 - cfi_endproc; \
54.25 -+ .subsection 2; \
54.26 - .size sym, .-sym
54.27 -
54.28 - # define SAVE_ARGS_0 /* Nothing. */
55.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
55.2 +++ b/patches/glibc/2.5/280-alpha-sigsuspend.patch Mon Jul 28 20:10:34 2008 +0000
55.3 @@ -0,0 +1,24 @@
55.4 +--- glibc-2.5/sysdeps/unix/sysv/linux/alpha/sigsuspend.S.orig 2006-10-22 22:17:01.000000000 +0200
55.5 ++++ glibc-2.5/sysdeps/unix/sysv/linux/alpha/sigsuspend.S 2006-10-22 22:18:05.000000000 +0200
55.6 +@@ -31,3 +31,21 @@
55.7 + libc_hidden_def (__sigsuspend)
55.8 + weak_alias (__sigsuspend, sigsuspend)
55.9 + strong_alias (__sigsuspend, __libc_sigsuspend)
55.10 ++
55.11 ++#ifndef NO_CANCELLATION
55.12 ++ .globl __sigsuspend_nocancel;
55.13 ++ .align 4;
55.14 ++ .type __sigsuspend_nocancel, @function;
55.15 ++ .usepv __sigsuspend_nocancel, std;
55.16 ++ cfi_startproc;
55.17 ++__LABEL(__sigsuspend_nocancel)
55.18 ++ ldgp gp, 0(pv);
55.19 ++ PSEUDO_PROF;
55.20 ++ PSEUDO_PREPARE_ARGS
55.21 ++ lda v0, SYS_ify(sigsuspend);
55.22 ++ call_pal PAL_callsys;
55.23 ++ bne a3, SYSCALL_ERROR_LABEL;
55.24 ++ ret;
55.25 ++ cfi_endproc;
55.26 ++ .size __sigsuspend_nocancel, .-__sigsuspend_nocancel
55.27 ++#endif
56.1 --- a/patches/glibc/2.5/280-glibc-alpha-sigsuspend.patch Mon Jul 28 11:43:29 2008 +0000
56.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
56.3 @@ -1,24 +0,0 @@
56.4 ---- glibc-2.5/sysdeps/unix/sysv/linux/alpha/sigsuspend.S.orig 2006-10-22 22:17:01.000000000 +0200
56.5 -+++ glibc-2.5/sysdeps/unix/sysv/linux/alpha/sigsuspend.S 2006-10-22 22:18:05.000000000 +0200
56.6 -@@ -31,3 +31,21 @@
56.7 - libc_hidden_def (__sigsuspend)
56.8 - weak_alias (__sigsuspend, sigsuspend)
56.9 - strong_alias (__sigsuspend, __libc_sigsuspend)
56.10 -+
56.11 -+#ifndef NO_CANCELLATION
56.12 -+ .globl __sigsuspend_nocancel;
56.13 -+ .align 4;
56.14 -+ .type __sigsuspend_nocancel, @function;
56.15 -+ .usepv __sigsuspend_nocancel, std;
56.16 -+ cfi_startproc;
56.17 -+__LABEL(__sigsuspend_nocancel)
56.18 -+ ldgp gp, 0(pv);
56.19 -+ PSEUDO_PROF;
56.20 -+ PSEUDO_PREPARE_ARGS
56.21 -+ lda v0, SYS_ify(sigsuspend);
56.22 -+ call_pal PAL_callsys;
56.23 -+ bne a3, SYSCALL_ERROR_LABEL;
56.24 -+ ret;
56.25 -+ cfi_endproc;
56.26 -+ .size __sigsuspend_nocancel, .-__sigsuspend_nocancel
56.27 -+#endif
57.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
57.2 +++ b/patches/glibc/2.6.1/120-cygwin.patch Mon Jul 28 20:10:34 2008 +0000
57.3 @@ -0,0 +1,187 @@
57.4 +Fixes
57.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
57.6 +...
57.7 +when building glibc-2.3.x on cygwin
57.8 +
57.9 +Idea from
57.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
57.11 +Basically, make glibc use .oST as suffix for 'object static'
57.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
57.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
57.14 +
57.15 +glibc-linuxthreads-2.3.5 also requires a patch, see
57.16 +../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
57.17 +
57.18 +[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
57.19 +
57.20 +Message-ID: <4282FCBA.3040000@unicontrols.cz>
57.21 +Date: Thu, 12 May 2005 08:50:34 +0200
57.22 +From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
57.23 +To: Dan Kegel <dank@kegel.com>
57.24 +CC: crossgcc@sources.redhat.com
57.25 +Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
57.26 +
57.27 +Hi Dan,
57.28 +following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
57.29 +on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
57.30 +
57.31 +--
57.32 + Petr Cvachoucek
57.33 + Unicontrols a.s.
57.34 + http://www.unicontrols.cz
57.35 +]
57.36 +
57.37 +diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
57.38 +--- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
57.39 ++++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
57.40 +@@ -472,7 +472,7 @@
57.41 + # run the linked programs.
57.42 + link-libc = -Wl,-rpath-link=$(rpath-link) \
57.43 + $(common-objpfx)libc.so$(libc.so-version) \
57.44 +- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
57.45 ++ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
57.46 + # This is how to find at build-time things that will be installed there.
57.47 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
57.48 + endif
57.49 +@@ -693,7 +693,7 @@
57.50 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
57.51 + # to pass different flags for each flavor.
57.52 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
57.53 +-all-object-suffixes := .o .os .op .og .ob .oS
57.54 ++all-object-suffixes := .o .os .op .og .ob .oST
57.55 + object-suffixes :=
57.56 + CPPFLAGS-.o = $(pic-default)
57.57 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
57.58 +@@ -749,14 +749,14 @@
57.59 +
57.60 + ifeq (yes,$(build-shared))
57.61 + # Build special library that contains the static-only routines for libc.
57.62 +-object-suffixes-for-libc += .oS
57.63 ++object-suffixes-for-libc += .oST
57.64 +
57.65 + # Must build the routines as PIC, though, because they can end up in (users')
57.66 + # shared objects. We don't want to use CFLAGS-os because users may, for
57.67 + # example, make that processor-specific.
57.68 +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
57.69 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
57.70 +-libtype.oS = lib%_nonshared.a
57.71 ++CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
57.72 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
57.73 ++libtype.oST = lib%_nonshared.a
57.74 + endif
57.75 +
57.76 + # The assembler can generate debug information too.
57.77 +diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
57.78 +--- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
57.79 ++++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
57.80 +@@ -417,7 +417,7 @@
57.81 + # Bounded pointer thunks are only built for *.ob
57.82 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
57.83 +
57.84 +-elide-routines.oS += $(filter-out $(static-only-routines),\
57.85 ++elide-routines.oST += $(filter-out $(static-only-routines),\
57.86 + $(routines) $(aux) $(sysdep_routines)) \
57.87 + $(elide-bp-thunks)
57.88 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
57.89 +@@ -981,7 +981,7 @@
57.90 + install: $(inst_libdir)/libc.so
57.91 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
57.92 + $(common-objpfx)libc.so$(libc.so-version) \
57.93 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
57.94 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
57.95 + $(libprefix)$(libc-name)) \
57.96 + $(+force)
57.97 + (echo '/* GNU ld script';\
57.98 +@@ -989,7 +989,7 @@
57.99 + echo ' the static library, so try that secondarily. */';\
57.100 + cat $<; \
57.101 + echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
57.102 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
57.103 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
57.104 + ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
57.105 + ) > $@.new
57.106 + mv -f $@.new $@
57.107 +diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
57.108 +--- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
57.109 ++++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
57.110 +@@ -13,7 +13,7 @@
57.111 +
57.112 + ifneq (,$($(lib)-static-only-routines))
57.113 + ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
57.114 +-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
57.115 ++object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
57.116 + endif
57.117 + endif
57.118 +
57.119 +@@ -29,7 +29,7 @@
57.120 +
57.121 + # Add each flavor of library to the lists of things to build and install.
57.122 + install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
57.123 +-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
57.124 ++extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
57.125 + $(patsubst %,%$o,$(filter-out \
57.126 + $($(lib)-shared-only-routines),\
57.127 + $(all-$(lib)-routines))))
57.128 +@@ -57,7 +57,7 @@
57.129 +
57.130 +
57.131 + # Use o-iterator.mk to generate a rule for each flavor of library.
57.132 +-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
57.133 ++ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
57.134 + define o-iterator-doit
57.135 + $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
57.136 + $(patsubst %,$(objpfx)%$o,\
57.137 +@@ -65,7 +65,7 @@
57.138 + $(all-$(lib)-routines))); \
57.139 + $$(build-extra-lib)
57.140 + endef
57.141 +-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
57.142 ++object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
57.143 + include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
57.144 + endif
57.145 +
57.146 +@@ -77,9 +77,9 @@
57.147 + $(build-extra-lib)
57.148 + endif
57.149 +
57.150 +-ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
57.151 +-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
57.152 +- $(patsubst %,$(objpfx)%.oS,\
57.153 ++ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
57.154 ++$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
57.155 ++ $(patsubst %,$(objpfx)%.oST,\
57.156 + $(filter $($(lib)-static-only-routines),\
57.157 + $(all-$(lib)-routines)))
57.158 + $(build-extra-lib)
57.159 +diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
57.160 +--- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
57.161 ++++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
57.162 +@@ -375,7 +375,7 @@
57.163 +
57.164 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
57.165 + $(objpfx)libpthread.so$(libpthread.so-version) \
57.166 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
57.167 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
57.168 + $(libprefix)pthread) \
57.169 + $(+force)
57.170 + (echo '/* GNU ld script';\
57.171 +@@ -383,7 +383,7 @@
57.172 + echo ' the static library, so try that secondarily. */';\
57.173 + cat $<; \
57.174 + echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
57.175 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
57.176 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
57.177 + ')' \
57.178 + ) > $@.new
57.179 + mv -f $@.new $@
57.180 +diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
57.181 +--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
57.182 ++++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
57.183 +@@ -10,4 +10,4 @@
57.184 + ASFLAGS-.op += -Wa,-Av9a
57.185 + ASFLAGS-.og += -Wa,-Av9a
57.186 + ASFLAGS-.ob += -Wa,-Av9a
57.187 +-ASFLAGS-.oS += -Wa,-Av9a
57.188 ++ASFLAGS-.oST += -Wa,-Av9a
57.189 +
57.190 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
58.1 --- a/patches/glibc/2.6.1/120-glibc-2.3.5-cygwin.patch Mon Jul 28 11:43:29 2008 +0000
58.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
58.3 @@ -1,187 +0,0 @@
58.4 -Fixes
58.5 -elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
58.6 -...
58.7 -when building glibc-2.3.x on cygwin
58.8 -
58.9 -Idea from
58.10 -http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
58.11 -Basically, make glibc use .oST as suffix for 'object static'
58.12 -instead of .oS, since cygwin has trouble distinguishing .os from .oS
58.13 -(Original patch had .on, but .oST is more mnemonic for 'object static')
58.14 -
58.15 -glibc-linuxthreads-2.3.5 also requires a patch, see
58.16 -../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
58.17 -
58.18 -[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
58.19 -
58.20 -Message-ID: <4282FCBA.3040000@unicontrols.cz>
58.21 -Date: Thu, 12 May 2005 08:50:34 +0200
58.22 -From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
58.23 -To: Dan Kegel <dank@kegel.com>
58.24 -CC: crossgcc@sources.redhat.com
58.25 -Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
58.26 -
58.27 -Hi Dan,
58.28 -following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
58.29 -on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
58.30 -
58.31 ---
58.32 - Petr Cvachoucek
58.33 - Unicontrols a.s.
58.34 - http://www.unicontrols.cz
58.35 -]
58.36 -
58.37 -diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
58.38 ---- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
58.39 -+++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
58.40 -@@ -472,7 +472,7 @@
58.41 - # run the linked programs.
58.42 - link-libc = -Wl,-rpath-link=$(rpath-link) \
58.43 - $(common-objpfx)libc.so$(libc.so-version) \
58.44 -- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
58.45 -+ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
58.46 - # This is how to find at build-time things that will be installed there.
58.47 - rpath-dirs = math elf dlfcn nss nis rt resolv crypt
58.48 - endif
58.49 -@@ -693,7 +693,7 @@
58.50 - # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
58.51 - # to pass different flags for each flavor.
58.52 - libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
58.53 --all-object-suffixes := .o .os .op .og .ob .oS
58.54 -+all-object-suffixes := .o .os .op .og .ob .oST
58.55 - object-suffixes :=
58.56 - CPPFLAGS-.o = $(pic-default)
58.57 - CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
58.58 -@@ -749,14 +749,14 @@
58.59 -
58.60 - ifeq (yes,$(build-shared))
58.61 - # Build special library that contains the static-only routines for libc.
58.62 --object-suffixes-for-libc += .oS
58.63 -+object-suffixes-for-libc += .oST
58.64 -
58.65 - # Must build the routines as PIC, though, because they can end up in (users')
58.66 - # shared objects. We don't want to use CFLAGS-os because users may, for
58.67 - # example, make that processor-specific.
58.68 --CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
58.69 --CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
58.70 --libtype.oS = lib%_nonshared.a
58.71 -+CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
58.72 -+CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
58.73 -+libtype.oST = lib%_nonshared.a
58.74 - endif
58.75 -
58.76 - # The assembler can generate debug information too.
58.77 -diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
58.78 ---- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
58.79 -+++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
58.80 -@@ -417,7 +417,7 @@
58.81 - # Bounded pointer thunks are only built for *.ob
58.82 - elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
58.83 -
58.84 --elide-routines.oS += $(filter-out $(static-only-routines),\
58.85 -+elide-routines.oST += $(filter-out $(static-only-routines),\
58.86 - $(routines) $(aux) $(sysdep_routines)) \
58.87 - $(elide-bp-thunks)
58.88 - elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
58.89 -@@ -981,7 +981,7 @@
58.90 - install: $(inst_libdir)/libc.so
58.91 - $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
58.92 - $(common-objpfx)libc.so$(libc.so-version) \
58.93 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
58.94 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
58.95 - $(libprefix)$(libc-name)) \
58.96 - $(+force)
58.97 - (echo '/* GNU ld script';\
58.98 -@@ -989,7 +989,7 @@
58.99 - echo ' the static library, so try that secondarily. */';\
58.100 - cat $<; \
58.101 - echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
58.102 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
58.103 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
58.104 - ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
58.105 - ) > $@.new
58.106 - mv -f $@.new $@
58.107 -diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
58.108 ---- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
58.109 -+++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
58.110 -@@ -13,7 +13,7 @@
58.111 -
58.112 - ifneq (,$($(lib)-static-only-routines))
58.113 - ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
58.114 --object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
58.115 -+object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
58.116 - endif
58.117 - endif
58.118 -
58.119 -@@ -29,7 +29,7 @@
58.120 -
58.121 - # Add each flavor of library to the lists of things to build and install.
58.122 - install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
58.123 --extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
58.124 -+extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
58.125 - $(patsubst %,%$o,$(filter-out \
58.126 - $($(lib)-shared-only-routines),\
58.127 - $(all-$(lib)-routines))))
58.128 -@@ -57,7 +57,7 @@
58.129 -
58.130 -
58.131 - # Use o-iterator.mk to generate a rule for each flavor of library.
58.132 --ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
58.133 -+ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
58.134 - define o-iterator-doit
58.135 - $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
58.136 - $(patsubst %,$(objpfx)%$o,\
58.137 -@@ -65,7 +65,7 @@
58.138 - $(all-$(lib)-routines))); \
58.139 - $$(build-extra-lib)
58.140 - endef
58.141 --object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
58.142 -+object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
58.143 - include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
58.144 - endif
58.145 -
58.146 -@@ -77,9 +77,9 @@
58.147 - $(build-extra-lib)
58.148 - endif
58.149 -
58.150 --ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
58.151 --$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
58.152 -- $(patsubst %,$(objpfx)%.oS,\
58.153 -+ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
58.154 -+$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
58.155 -+ $(patsubst %,$(objpfx)%.oST,\
58.156 - $(filter $($(lib)-static-only-routines),\
58.157 - $(all-$(lib)-routines)))
58.158 - $(build-extra-lib)
58.159 -diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
58.160 ---- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
58.161 -+++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
58.162 -@@ -375,7 +375,7 @@
58.163 -
58.164 - $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
58.165 - $(objpfx)libpthread.so$(libpthread.so-version) \
58.166 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
58.167 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
58.168 - $(libprefix)pthread) \
58.169 - $(+force)
58.170 - (echo '/* GNU ld script';\
58.171 -@@ -383,7 +383,7 @@
58.172 - echo ' the static library, so try that secondarily. */';\
58.173 - cat $<; \
58.174 - echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
58.175 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
58.176 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
58.177 - ')' \
58.178 - ) > $@.new
58.179 - mv -f $@.new $@
58.180 -diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
58.181 ---- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
58.182 -+++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
58.183 -@@ -10,4 +10,4 @@
58.184 - ASFLAGS-.op += -Wa,-Av9a
58.185 - ASFLAGS-.og += -Wa,-Av9a
58.186 - ASFLAGS-.ob += -Wa,-Av9a
58.187 --ASFLAGS-.oS += -Wa,-Av9a
58.188 -+ASFLAGS-.oST += -Wa,-Av9a
58.189 -
58.190 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
59.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
59.2 +++ b/patches/glibc/2.6.1/140-configure-apple-as.patch Mon Jul 28 20:10:34 2008 +0000
59.3 @@ -0,0 +1,25 @@
59.4 +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
59.5 +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
59.6 +
59.7 +The following makes it possible to configure glibc-2.3.2 on Mac OS X,
59.8 +where the assembler but doesn't understand the --version flag.
59.9 +
59.10 +Fixes the symptom
59.11 +checking whether ld is GNU ld... no
59.12 +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
59.13 +checking version of /usr/libexec/gcc/darwin/ppc/as...
59.14 +<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
59.15 +
59.16 +--- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
59.17 ++++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
59.18 +@@ -4039,7 +4039,7 @@
59.19 + # Found it, now check the version.
59.20 + echo "$as_me:$LINENO: checking version of $AS" >&5
59.21 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
59.22 +- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
59.23 ++ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
59.24 + case $ac_prog_version in
59.25 + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
59.26 + 2.1[3-9]*)
59.27 +
59.28 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
60.1 --- a/patches/glibc/2.6.1/140-glibc-2.3.6-configure-apple-as.patch Mon Jul 28 11:43:29 2008 +0000
60.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
60.3 @@ -1,25 +0,0 @@
60.4 -http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
60.5 -http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
60.6 -
60.7 -The following makes it possible to configure glibc-2.3.2 on Mac OS X,
60.8 -where the assembler but doesn't understand the --version flag.
60.9 -
60.10 -Fixes the symptom
60.11 -checking whether ld is GNU ld... no
60.12 -checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
60.13 -checking version of /usr/libexec/gcc/darwin/ppc/as...
60.14 -<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
60.15 -
60.16 ---- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
60.17 -+++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
60.18 -@@ -4039,7 +4039,7 @@
60.19 - # Found it, now check the version.
60.20 - echo "$as_me:$LINENO: checking version of $AS" >&5
60.21 - echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
60.22 -- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
60.23 -+ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
60.24 - case $ac_prog_version in
60.25 - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
60.26 - 2.1[3-9]*)
60.27 -
60.28 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
61.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
61.2 +++ b/patches/glibc/2.6.1/150-fix-pr631.patch Mon Jul 28 20:10:34 2008 +0000
61.3 @@ -0,0 +1,45 @@
61.4 +From dank@kegel.com
61.5 +Wed Jun 15 09:12:43 PDT 2005
61.6 +
61.7 +Fixes
61.8 +
61.9 +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
61.10 +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
61.11 +... 53 lines deleted ...
61.12 +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
61.13 +collect2: ld returned 1 exit status
61.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
61.15 +
61.16 +when building glibc with --enable-static-nss.
61.17 +
61.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
61.19 +
61.20 +--- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
61.21 ++++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
61.22 +@@ -510,7 +510,7 @@
61.23 +
61.24 + # The static libraries.
61.25 + ifeq (yes,$(build-static))
61.26 +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
61.27 ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
61.28 + else
61.29 + ifeq (yes,$(build-shared))
61.30 + # We can try to link the programs with lib*_pic.a...
61.31 +--- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
61.32 ++++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
61.33 +@@ -120,6 +120,13 @@
61.34 + install-bin-script = ldd
61.35 + endif
61.36 +
61.37 ++ifeq (yes,$(build-static-nss))
61.38 ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
61.39 ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
61.40 ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
61.41 ++ $(resolvobjdir)/libresolv.a
61.42 ++endif
61.43 ++
61.44 + others = sprof sln
61.45 + install-bin = sprof
61.46 + others-static = sln
61.47 +
61.48 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
62.1 --- a/patches/glibc/2.6.1/150-glibc-2.3.6-fix-pr631.patch Mon Jul 28 11:43:29 2008 +0000
62.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
62.3 @@ -1,45 +0,0 @@
62.4 -From dank@kegel.com
62.5 -Wed Jun 15 09:12:43 PDT 2005
62.6 -
62.7 -Fixes
62.8 -
62.9 -build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
62.10 -build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
62.11 -... 53 lines deleted ...
62.12 -build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
62.13 -collect2: ld returned 1 exit status
62.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
62.15 -
62.16 -when building glibc with --enable-static-nss.
62.17 -
62.18 -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
62.19 -
62.20 ---- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
62.21 -+++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
62.22 -@@ -510,7 +510,7 @@
62.23 -
62.24 - # The static libraries.
62.25 - ifeq (yes,$(build-static))
62.26 --link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
62.27 -+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
62.28 - else
62.29 - ifeq (yes,$(build-shared))
62.30 - # We can try to link the programs with lib*_pic.a...
62.31 ---- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
62.32 -+++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
62.33 -@@ -120,6 +120,13 @@
62.34 - install-bin-script = ldd
62.35 - endif
62.36 -
62.37 -+ifeq (yes,$(build-static-nss))
62.38 -+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
62.39 -+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
62.40 -+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
62.41 -+ $(resolvobjdir)/libresolv.a
62.42 -+endif
62.43 -+
62.44 - others = sprof sln
62.45 - install-bin = sprof
62.46 - others-static = sln
62.47 -
62.48 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
63.1 --- a/patches/glibc/2.6.1/160-glibc-2.4-i686-assembler.patch Mon Jul 28 11:43:29 2008 +0000
63.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
63.3 @@ -1,38 +0,0 @@
63.4 -2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
63.5 -
63.6 - * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
63.7 - * nptl/sysdeps/pthread/pt-initfini.c: Ditto.
63.8 -
63.9 -
63.10 -
63.11 -Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
63.12 -===================================================================
63.13 ---- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
63.14 -+++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
63.15 -@@ -29,6 +29,10 @@
63.16 - #include <dl-sysdep.h>
63.17 - #include <tls.h>
63.18 -
63.19 -+#if defined __i686 && defined __ASSEMBLER__
63.20 -+#undef __i686
63.21 -+#define __i686 __i686
63.22 -+#endif
63.23 -
63.24 - /* For Linux we can use the system call table in the header file
63.25 - /usr/include/asm/unistd.h
63.26 -Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
63.27 -===================================================================
63.28 ---- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
63.29 -+++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy)
63.30 -@@ -45,6 +45,11 @@
63.31 - /* Embed an #include to pull in the alignment and .end directives. */
63.32 - asm ("\n#include \"defs.h\"");
63.33 -
63.34 -+asm ("\n#if defined __i686 && defined __ASSEMBLER__");
63.35 -+asm ("\n#undef __i686");
63.36 -+asm ("\n#define __i686 __i686");
63.37 -+asm ("\n#endif");
63.38 -+
63.39 - /* The initial common code ends here. */
63.40 - asm ("\n/*@HEADER_ENDS*/");
63.41 -
64.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
64.2 +++ b/patches/glibc/2.6.1/160-i686-assembler.patch Mon Jul 28 20:10:34 2008 +0000
64.3 @@ -0,0 +1,38 @@
64.4 +2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
64.5 +
64.6 + * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
64.7 + * nptl/sysdeps/pthread/pt-initfini.c: Ditto.
64.8 +
64.9 +
64.10 +
64.11 +Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
64.12 +===================================================================
64.13 +--- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
64.14 ++++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
64.15 +@@ -29,6 +29,10 @@
64.16 + #include <dl-sysdep.h>
64.17 + #include <tls.h>
64.18 +
64.19 ++#if defined __i686 && defined __ASSEMBLER__
64.20 ++#undef __i686
64.21 ++#define __i686 __i686
64.22 ++#endif
64.23 +
64.24 + /* For Linux we can use the system call table in the header file
64.25 + /usr/include/asm/unistd.h
64.26 +Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
64.27 +===================================================================
64.28 +--- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
64.29 ++++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy)
64.30 +@@ -45,6 +45,11 @@
64.31 + /* Embed an #include to pull in the alignment and .end directives. */
64.32 + asm ("\n#include \"defs.h\"");
64.33 +
64.34 ++asm ("\n#if defined __i686 && defined __ASSEMBLER__");
64.35 ++asm ("\n#undef __i686");
64.36 ++asm ("\n#define __i686 __i686");
64.37 ++asm ("\n#endif");
64.38 ++
64.39 + /* The initial common code ends here. */
64.40 + asm ("\n/*@HEADER_ENDS*/");
64.41 +
65.1 --- a/patches/glibc/2.6.1/170-glibc-i386-preferred-stack-boundary.patch Mon Jul 28 11:43:29 2008 +0000
65.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
65.3 @@ -1,18 +0,0 @@
65.4 -(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
65.5 -License: LGPL v2.1
65.6 -
65.7 -Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
65.8 -and 2 is not.
65.9 -
65.10 -diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
65.11 ---- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100
65.12 -+++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200
65.13 -@@ -36,7 +36,7 @@
65.14 - ifeq ($(subdir),csu)
65.15 - sysdep-CFLAGS += -mpreferred-stack-boundary=4
65.16 - else
65.17 --sysdep-CFLAGS += -mpreferred-stack-boundary=2
65.18 -+sysdep-CFLAGS += -mpreferred-stack-boundary=4
65.19 - # Likewise, any function which calls user callbacks
65.20 - uses-callbacks += -mpreferred-stack-boundary=4
65.21 - # Likewise, any stack alignment tests
66.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
66.2 +++ b/patches/glibc/2.6.1/170-i386-preferred-stack-boundary.patch Mon Jul 28 20:10:34 2008 +0000
66.3 @@ -0,0 +1,18 @@
66.4 +(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
66.5 +License: LGPL v2.1
66.6 +
66.7 +Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
66.8 +and 2 is not.
66.9 +
66.10 +diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
66.11 +--- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100
66.12 ++++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200
66.13 +@@ -36,7 +36,7 @@
66.14 + ifeq ($(subdir),csu)
66.15 + sysdep-CFLAGS += -mpreferred-stack-boundary=4
66.16 + else
66.17 +-sysdep-CFLAGS += -mpreferred-stack-boundary=2
66.18 ++sysdep-CFLAGS += -mpreferred-stack-boundary=4
66.19 + # Likewise, any function which calls user callbacks
66.20 + uses-callbacks += -mpreferred-stack-boundary=4
66.21 + # Likewise, any stack alignment tests
67.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
67.2 +++ b/patches/glibc/2.6/120-cygwin.patch Mon Jul 28 20:10:34 2008 +0000
67.3 @@ -0,0 +1,187 @@
67.4 +Fixes
67.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
67.6 +...
67.7 +when building glibc-2.3.x on cygwin
67.8 +
67.9 +Idea from
67.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
67.11 +Basically, make glibc use .oST as suffix for 'object static'
67.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
67.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
67.14 +
67.15 +glibc-linuxthreads-2.3.5 also requires a patch, see
67.16 +../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
67.17 +
67.18 +[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
67.19 +
67.20 +Message-ID: <4282FCBA.3040000@unicontrols.cz>
67.21 +Date: Thu, 12 May 2005 08:50:34 +0200
67.22 +From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
67.23 +To: Dan Kegel <dank@kegel.com>
67.24 +CC: crossgcc@sources.redhat.com
67.25 +Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
67.26 +
67.27 +Hi Dan,
67.28 +following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
67.29 +on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
67.30 +
67.31 +--
67.32 + Petr Cvachoucek
67.33 + Unicontrols a.s.
67.34 + http://www.unicontrols.cz
67.35 +]
67.36 +
67.37 +diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
67.38 +--- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
67.39 ++++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
67.40 +@@ -472,7 +472,7 @@
67.41 + # run the linked programs.
67.42 + link-libc = -Wl,-rpath-link=$(rpath-link) \
67.43 + $(common-objpfx)libc.so$(libc.so-version) \
67.44 +- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
67.45 ++ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
67.46 + # This is how to find at build-time things that will be installed there.
67.47 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
67.48 + endif
67.49 +@@ -693,7 +693,7 @@
67.50 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
67.51 + # to pass different flags for each flavor.
67.52 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
67.53 +-all-object-suffixes := .o .os .op .og .ob .oS
67.54 ++all-object-suffixes := .o .os .op .og .ob .oST
67.55 + object-suffixes :=
67.56 + CPPFLAGS-.o = $(pic-default)
67.57 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
67.58 +@@ -749,14 +749,14 @@
67.59 +
67.60 + ifeq (yes,$(build-shared))
67.61 + # Build special library that contains the static-only routines for libc.
67.62 +-object-suffixes-for-libc += .oS
67.63 ++object-suffixes-for-libc += .oST
67.64 +
67.65 + # Must build the routines as PIC, though, because they can end up in (users')
67.66 + # shared objects. We don't want to use CFLAGS-os because users may, for
67.67 + # example, make that processor-specific.
67.68 +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
67.69 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
67.70 +-libtype.oS = lib%_nonshared.a
67.71 ++CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
67.72 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
67.73 ++libtype.oST = lib%_nonshared.a
67.74 + endif
67.75 +
67.76 + # The assembler can generate debug information too.
67.77 +diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
67.78 +--- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
67.79 ++++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
67.80 +@@ -417,7 +417,7 @@
67.81 + # Bounded pointer thunks are only built for *.ob
67.82 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
67.83 +
67.84 +-elide-routines.oS += $(filter-out $(static-only-routines),\
67.85 ++elide-routines.oST += $(filter-out $(static-only-routines),\
67.86 + $(routines) $(aux) $(sysdep_routines)) \
67.87 + $(elide-bp-thunks)
67.88 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
67.89 +@@ -981,7 +981,7 @@
67.90 + install: $(inst_libdir)/libc.so
67.91 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
67.92 + $(common-objpfx)libc.so$(libc.so-version) \
67.93 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
67.94 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
67.95 + $(libprefix)$(libc-name)) \
67.96 + $(+force)
67.97 + (echo '/* GNU ld script';\
67.98 +@@ -989,7 +989,7 @@
67.99 + echo ' the static library, so try that secondarily. */';\
67.100 + cat $<; \
67.101 + echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
67.102 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
67.103 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
67.104 + ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
67.105 + ) > $@.new
67.106 + mv -f $@.new $@
67.107 +diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
67.108 +--- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
67.109 ++++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
67.110 +@@ -13,7 +13,7 @@
67.111 +
67.112 + ifneq (,$($(lib)-static-only-routines))
67.113 + ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
67.114 +-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
67.115 ++object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
67.116 + endif
67.117 + endif
67.118 +
67.119 +@@ -29,7 +29,7 @@
67.120 +
67.121 + # Add each flavor of library to the lists of things to build and install.
67.122 + install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
67.123 +-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
67.124 ++extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
67.125 + $(patsubst %,%$o,$(filter-out \
67.126 + $($(lib)-shared-only-routines),\
67.127 + $(all-$(lib)-routines))))
67.128 +@@ -57,7 +57,7 @@
67.129 +
67.130 +
67.131 + # Use o-iterator.mk to generate a rule for each flavor of library.
67.132 +-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
67.133 ++ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
67.134 + define o-iterator-doit
67.135 + $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
67.136 + $(patsubst %,$(objpfx)%$o,\
67.137 +@@ -65,7 +65,7 @@
67.138 + $(all-$(lib)-routines))); \
67.139 + $$(build-extra-lib)
67.140 + endef
67.141 +-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
67.142 ++object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
67.143 + include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
67.144 + endif
67.145 +
67.146 +@@ -77,9 +77,9 @@
67.147 + $(build-extra-lib)
67.148 + endif
67.149 +
67.150 +-ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
67.151 +-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
67.152 +- $(patsubst %,$(objpfx)%.oS,\
67.153 ++ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
67.154 ++$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
67.155 ++ $(patsubst %,$(objpfx)%.oST,\
67.156 + $(filter $($(lib)-static-only-routines),\
67.157 + $(all-$(lib)-routines)))
67.158 + $(build-extra-lib)
67.159 +diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
67.160 +--- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
67.161 ++++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
67.162 +@@ -375,7 +375,7 @@
67.163 +
67.164 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
67.165 + $(objpfx)libpthread.so$(libpthread.so-version) \
67.166 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
67.167 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
67.168 + $(libprefix)pthread) \
67.169 + $(+force)
67.170 + (echo '/* GNU ld script';\
67.171 +@@ -383,7 +383,7 @@
67.172 + echo ' the static library, so try that secondarily. */';\
67.173 + cat $<; \
67.174 + echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
67.175 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
67.176 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
67.177 + ')' \
67.178 + ) > $@.new
67.179 + mv -f $@.new $@
67.180 +diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
67.181 +--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
67.182 ++++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
67.183 +@@ -10,4 +10,4 @@
67.184 + ASFLAGS-.op += -Wa,-Av9a
67.185 + ASFLAGS-.og += -Wa,-Av9a
67.186 + ASFLAGS-.ob += -Wa,-Av9a
67.187 +-ASFLAGS-.oS += -Wa,-Av9a
67.188 ++ASFLAGS-.oST += -Wa,-Av9a
67.189 +
67.190 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
68.1 --- a/patches/glibc/2.6/120-glibc-2.3.5-cygwin.patch Mon Jul 28 11:43:29 2008 +0000
68.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
68.3 @@ -1,187 +0,0 @@
68.4 -Fixes
68.5 -elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
68.6 -...
68.7 -when building glibc-2.3.x on cygwin
68.8 -
68.9 -Idea from
68.10 -http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
68.11 -Basically, make glibc use .oST as suffix for 'object static'
68.12 -instead of .oS, since cygwin has trouble distinguishing .os from .oS
68.13 -(Original patch had .on, but .oST is more mnemonic for 'object static')
68.14 -
68.15 -glibc-linuxthreads-2.3.5 also requires a patch, see
68.16 -../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
68.17 -
68.18 -[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
68.19 -
68.20 -Message-ID: <4282FCBA.3040000@unicontrols.cz>
68.21 -Date: Thu, 12 May 2005 08:50:34 +0200
68.22 -From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
68.23 -To: Dan Kegel <dank@kegel.com>
68.24 -CC: crossgcc@sources.redhat.com
68.25 -Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
68.26 -
68.27 -Hi Dan,
68.28 -following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
68.29 -on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
68.30 -
68.31 ---
68.32 - Petr Cvachoucek
68.33 - Unicontrols a.s.
68.34 - http://www.unicontrols.cz
68.35 -]
68.36 -
68.37 -diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
68.38 ---- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
68.39 -+++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
68.40 -@@ -472,7 +472,7 @@
68.41 - # run the linked programs.
68.42 - link-libc = -Wl,-rpath-link=$(rpath-link) \
68.43 - $(common-objpfx)libc.so$(libc.so-version) \
68.44 -- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
68.45 -+ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
68.46 - # This is how to find at build-time things that will be installed there.
68.47 - rpath-dirs = math elf dlfcn nss nis rt resolv crypt
68.48 - endif
68.49 -@@ -693,7 +693,7 @@
68.50 - # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
68.51 - # to pass different flags for each flavor.
68.52 - libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
68.53 --all-object-suffixes := .o .os .op .og .ob .oS
68.54 -+all-object-suffixes := .o .os .op .og .ob .oST
68.55 - object-suffixes :=
68.56 - CPPFLAGS-.o = $(pic-default)
68.57 - CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
68.58 -@@ -749,14 +749,14 @@
68.59 -
68.60 - ifeq (yes,$(build-shared))
68.61 - # Build special library that contains the static-only routines for libc.
68.62 --object-suffixes-for-libc += .oS
68.63 -+object-suffixes-for-libc += .oST
68.64 -
68.65 - # Must build the routines as PIC, though, because they can end up in (users')
68.66 - # shared objects. We don't want to use CFLAGS-os because users may, for
68.67 - # example, make that processor-specific.
68.68 --CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
68.69 --CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
68.70 --libtype.oS = lib%_nonshared.a
68.71 -+CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
68.72 -+CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
68.73 -+libtype.oST = lib%_nonshared.a
68.74 - endif
68.75 -
68.76 - # The assembler can generate debug information too.
68.77 -diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
68.78 ---- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
68.79 -+++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
68.80 -@@ -417,7 +417,7 @@
68.81 - # Bounded pointer thunks are only built for *.ob
68.82 - elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
68.83 -
68.84 --elide-routines.oS += $(filter-out $(static-only-routines),\
68.85 -+elide-routines.oST += $(filter-out $(static-only-routines),\
68.86 - $(routines) $(aux) $(sysdep_routines)) \
68.87 - $(elide-bp-thunks)
68.88 - elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
68.89 -@@ -981,7 +981,7 @@
68.90 - install: $(inst_libdir)/libc.so
68.91 - $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
68.92 - $(common-objpfx)libc.so$(libc.so-version) \
68.93 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
68.94 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
68.95 - $(libprefix)$(libc-name)) \
68.96 - $(+force)
68.97 - (echo '/* GNU ld script';\
68.98 -@@ -989,7 +989,7 @@
68.99 - echo ' the static library, so try that secondarily. */';\
68.100 - cat $<; \
68.101 - echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
68.102 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
68.103 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
68.104 - ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
68.105 - ) > $@.new
68.106 - mv -f $@.new $@
68.107 -diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
68.108 ---- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
68.109 -+++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
68.110 -@@ -13,7 +13,7 @@
68.111 -
68.112 - ifneq (,$($(lib)-static-only-routines))
68.113 - ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
68.114 --object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
68.115 -+object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
68.116 - endif
68.117 - endif
68.118 -
68.119 -@@ -29,7 +29,7 @@
68.120 -
68.121 - # Add each flavor of library to the lists of things to build and install.
68.122 - install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
68.123 --extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
68.124 -+extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
68.125 - $(patsubst %,%$o,$(filter-out \
68.126 - $($(lib)-shared-only-routines),\
68.127 - $(all-$(lib)-routines))))
68.128 -@@ -57,7 +57,7 @@
68.129 -
68.130 -
68.131 - # Use o-iterator.mk to generate a rule for each flavor of library.
68.132 --ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
68.133 -+ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
68.134 - define o-iterator-doit
68.135 - $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
68.136 - $(patsubst %,$(objpfx)%$o,\
68.137 -@@ -65,7 +65,7 @@
68.138 - $(all-$(lib)-routines))); \
68.139 - $$(build-extra-lib)
68.140 - endef
68.141 --object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
68.142 -+object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
68.143 - include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
68.144 - endif
68.145 -
68.146 -@@ -77,9 +77,9 @@
68.147 - $(build-extra-lib)
68.148 - endif
68.149 -
68.150 --ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
68.151 --$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
68.152 -- $(patsubst %,$(objpfx)%.oS,\
68.153 -+ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
68.154 -+$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
68.155 -+ $(patsubst %,$(objpfx)%.oST,\
68.156 - $(filter $($(lib)-static-only-routines),\
68.157 - $(all-$(lib)-routines)))
68.158 - $(build-extra-lib)
68.159 -diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
68.160 ---- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
68.161 -+++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
68.162 -@@ -375,7 +375,7 @@
68.163 -
68.164 - $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
68.165 - $(objpfx)libpthread.so$(libpthread.so-version) \
68.166 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
68.167 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
68.168 - $(libprefix)pthread) \
68.169 - $(+force)
68.170 - (echo '/* GNU ld script';\
68.171 -@@ -383,7 +383,7 @@
68.172 - echo ' the static library, so try that secondarily. */';\
68.173 - cat $<; \
68.174 - echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
68.175 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
68.176 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
68.177 - ')' \
68.178 - ) > $@.new
68.179 - mv -f $@.new $@
68.180 -diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
68.181 ---- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
68.182 -+++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
68.183 -@@ -10,4 +10,4 @@
68.184 - ASFLAGS-.op += -Wa,-Av9a
68.185 - ASFLAGS-.og += -Wa,-Av9a
68.186 - ASFLAGS-.ob += -Wa,-Av9a
68.187 --ASFLAGS-.oS += -Wa,-Av9a
68.188 -+ASFLAGS-.oST += -Wa,-Av9a
68.189 -
68.190 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
69.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
69.2 +++ b/patches/glibc/2.6/140-configure-apple-as.patch Mon Jul 28 20:10:34 2008 +0000
69.3 @@ -0,0 +1,25 @@
69.4 +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
69.5 +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
69.6 +
69.7 +The following makes it possible to configure glibc-2.3.2 on Mac OS X,
69.8 +where the assembler but doesn't understand the --version flag.
69.9 +
69.10 +Fixes the symptom
69.11 +checking whether ld is GNU ld... no
69.12 +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
69.13 +checking version of /usr/libexec/gcc/darwin/ppc/as...
69.14 +<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
69.15 +
69.16 +--- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
69.17 ++++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
69.18 +@@ -4039,7 +4039,7 @@
69.19 + # Found it, now check the version.
69.20 + echo "$as_me:$LINENO: checking version of $AS" >&5
69.21 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
69.22 +- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
69.23 ++ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
69.24 + case $ac_prog_version in
69.25 + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
69.26 + 2.1[3-9]*)
69.27 +
69.28 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
70.1 --- a/patches/glibc/2.6/140-glibc-2.3.6-configure-apple-as.patch Mon Jul 28 11:43:29 2008 +0000
70.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
70.3 @@ -1,25 +0,0 @@
70.4 -http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
70.5 -http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
70.6 -
70.7 -The following makes it possible to configure glibc-2.3.2 on Mac OS X,
70.8 -where the assembler but doesn't understand the --version flag.
70.9 -
70.10 -Fixes the symptom
70.11 -checking whether ld is GNU ld... no
70.12 -checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
70.13 -checking version of /usr/libexec/gcc/darwin/ppc/as...
70.14 -<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
70.15 -
70.16 ---- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
70.17 -+++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
70.18 -@@ -4039,7 +4039,7 @@
70.19 - # Found it, now check the version.
70.20 - echo "$as_me:$LINENO: checking version of $AS" >&5
70.21 - echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
70.22 -- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
70.23 -+ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
70.24 - case $ac_prog_version in
70.25 - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
70.26 - 2.1[3-9]*)
70.27 -
70.28 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
71.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
71.2 +++ b/patches/glibc/2.6/150-fix-pr631.patch Mon Jul 28 20:10:34 2008 +0000
71.3 @@ -0,0 +1,45 @@
71.4 +From dank@kegel.com
71.5 +Wed Jun 15 09:12:43 PDT 2005
71.6 +
71.7 +Fixes
71.8 +
71.9 +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
71.10 +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
71.11 +... 53 lines deleted ...
71.12 +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
71.13 +collect2: ld returned 1 exit status
71.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
71.15 +
71.16 +when building glibc with --enable-static-nss.
71.17 +
71.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
71.19 +
71.20 +--- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
71.21 ++++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
71.22 +@@ -510,7 +510,7 @@
71.23 +
71.24 + # The static libraries.
71.25 + ifeq (yes,$(build-static))
71.26 +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
71.27 ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
71.28 + else
71.29 + ifeq (yes,$(build-shared))
71.30 + # We can try to link the programs with lib*_pic.a...
71.31 +--- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
71.32 ++++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
71.33 +@@ -120,6 +120,13 @@
71.34 + install-bin-script = ldd
71.35 + endif
71.36 +
71.37 ++ifeq (yes,$(build-static-nss))
71.38 ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
71.39 ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
71.40 ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
71.41 ++ $(resolvobjdir)/libresolv.a
71.42 ++endif
71.43 ++
71.44 + others = sprof sln
71.45 + install-bin = sprof
71.46 + others-static = sln
71.47 +
71.48 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
72.1 --- a/patches/glibc/2.6/150-glibc-2.3.6-fix-pr631.patch Mon Jul 28 11:43:29 2008 +0000
72.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
72.3 @@ -1,45 +0,0 @@
72.4 -From dank@kegel.com
72.5 -Wed Jun 15 09:12:43 PDT 2005
72.6 -
72.7 -Fixes
72.8 -
72.9 -build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
72.10 -build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
72.11 -... 53 lines deleted ...
72.12 -build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
72.13 -collect2: ld returned 1 exit status
72.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
72.15 -
72.16 -when building glibc with --enable-static-nss.
72.17 -
72.18 -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
72.19 -
72.20 ---- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
72.21 -+++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
72.22 -@@ -510,7 +510,7 @@
72.23 -
72.24 - # The static libraries.
72.25 - ifeq (yes,$(build-static))
72.26 --link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
72.27 -+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
72.28 - else
72.29 - ifeq (yes,$(build-shared))
72.30 - # We can try to link the programs with lib*_pic.a...
72.31 ---- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
72.32 -+++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
72.33 -@@ -120,6 +120,13 @@
72.34 - install-bin-script = ldd
72.35 - endif
72.36 -
72.37 -+ifeq (yes,$(build-static-nss))
72.38 -+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
72.39 -+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
72.40 -+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
72.41 -+ $(resolvobjdir)/libresolv.a
72.42 -+endif
72.43 -+
72.44 - others = sprof sln
72.45 - install-bin = sprof
72.46 - others-static = sln
72.47 -
72.48 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
73.1 --- a/patches/glibc/2.6/160-glibc-2.4-i686-assembler.patch Mon Jul 28 11:43:29 2008 +0000
73.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
73.3 @@ -1,38 +0,0 @@
73.4 -2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
73.5 -
73.6 - * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
73.7 - * nptl/sysdeps/pthread/pt-initfini.c: Ditto.
73.8 -
73.9 -
73.10 -
73.11 -Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
73.12 -===================================================================
73.13 ---- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
73.14 -+++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
73.15 -@@ -29,6 +29,10 @@
73.16 - #include <dl-sysdep.h>
73.17 - #include <tls.h>
73.18 -
73.19 -+#if defined __i686 && defined __ASSEMBLER__
73.20 -+#undef __i686
73.21 -+#define __i686 __i686
73.22 -+#endif
73.23 -
73.24 - /* For Linux we can use the system call table in the header file
73.25 - /usr/include/asm/unistd.h
73.26 -Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
73.27 -===================================================================
73.28 ---- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
73.29 -+++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy)
73.30 -@@ -45,6 +45,11 @@
73.31 - /* Embed an #include to pull in the alignment and .end directives. */
73.32 - asm ("\n#include \"defs.h\"");
73.33 -
73.34 -+asm ("\n#if defined __i686 && defined __ASSEMBLER__");
73.35 -+asm ("\n#undef __i686");
73.36 -+asm ("\n#define __i686 __i686");
73.37 -+asm ("\n#endif");
73.38 -+
73.39 - /* The initial common code ends here. */
73.40 - asm ("\n/*@HEADER_ENDS*/");
73.41 -
74.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
74.2 +++ b/patches/glibc/2.6/160-i686-assembler.patch Mon Jul 28 20:10:34 2008 +0000
74.3 @@ -0,0 +1,38 @@
74.4 +2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
74.5 +
74.6 + * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
74.7 + * nptl/sysdeps/pthread/pt-initfini.c: Ditto.
74.8 +
74.9 +
74.10 +
74.11 +Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
74.12 +===================================================================
74.13 +--- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
74.14 ++++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
74.15 +@@ -29,6 +29,10 @@
74.16 + #include <dl-sysdep.h>
74.17 + #include <tls.h>
74.18 +
74.19 ++#if defined __i686 && defined __ASSEMBLER__
74.20 ++#undef __i686
74.21 ++#define __i686 __i686
74.22 ++#endif
74.23 +
74.24 + /* For Linux we can use the system call table in the header file
74.25 + /usr/include/asm/unistd.h
74.26 +Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
74.27 +===================================================================
74.28 +--- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
74.29 ++++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy)
74.30 +@@ -45,6 +45,11 @@
74.31 + /* Embed an #include to pull in the alignment and .end directives. */
74.32 + asm ("\n#include \"defs.h\"");
74.33 +
74.34 ++asm ("\n#if defined __i686 && defined __ASSEMBLER__");
74.35 ++asm ("\n#undef __i686");
74.36 ++asm ("\n#define __i686 __i686");
74.37 ++asm ("\n#endif");
74.38 ++
74.39 + /* The initial common code ends here. */
74.40 + asm ("\n/*@HEADER_ENDS*/");
74.41 +
75.1 --- a/patches/glibc/2.6/170-glibc-i386-preferred-stack-boundary.patch Mon Jul 28 11:43:29 2008 +0000
75.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
75.3 @@ -1,18 +0,0 @@
75.4 -(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
75.5 -License: LGPL v2.1
75.6 -
75.7 -Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
75.8 -and 2 is not.
75.9 -
75.10 -diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
75.11 ---- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100
75.12 -+++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200
75.13 -@@ -36,7 +36,7 @@
75.14 - ifeq ($(subdir),csu)
75.15 - sysdep-CFLAGS += -mpreferred-stack-boundary=4
75.16 - else
75.17 --sysdep-CFLAGS += -mpreferred-stack-boundary=2
75.18 -+sysdep-CFLAGS += -mpreferred-stack-boundary=4
75.19 - # Likewise, any function which calls user callbacks
75.20 - uses-callbacks += -mpreferred-stack-boundary=4
75.21 - # Likewise, any stack alignment tests
76.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
76.2 +++ b/patches/glibc/2.6/170-i386-preferred-stack-boundary.patch Mon Jul 28 20:10:34 2008 +0000
76.3 @@ -0,0 +1,18 @@
76.4 +(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
76.5 +License: LGPL v2.1
76.6 +
76.7 +Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
76.8 +and 2 is not.
76.9 +
76.10 +diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
76.11 +--- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100
76.12 ++++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200
76.13 +@@ -36,7 +36,7 @@
76.14 + ifeq ($(subdir),csu)
76.15 + sysdep-CFLAGS += -mpreferred-stack-boundary=4
76.16 + else
76.17 +-sysdep-CFLAGS += -mpreferred-stack-boundary=2
76.18 ++sysdep-CFLAGS += -mpreferred-stack-boundary=4
76.19 + # Likewise, any function which calls user callbacks
76.20 + uses-callbacks += -mpreferred-stack-boundary=4
76.21 + # Likewise, any stack alignment tests
77.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
77.2 +++ b/patches/glibc/2.7/120-cygwin.patch Mon Jul 28 20:10:34 2008 +0000
77.3 @@ -0,0 +1,185 @@
77.4 +Fixes
77.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
77.6 +...
77.7 +when building glibc-2.3.x on cygwin
77.8 +
77.9 +Idea from
77.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
77.11 +Basically, make glibc use .oST as suffix for 'object static'
77.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
77.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
77.14 +
77.15 +glibc-linuxthreads-2.3.5 also requires a patch, see
77.16 +../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
77.17 +
77.18 +[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
77.19 +
77.20 +Message-ID: <4282FCBA.3040000@unicontrols.cz>
77.21 +Date: Thu, 12 May 2005 08:50:34 +0200
77.22 +From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
77.23 +To: Dan Kegel <dank@kegel.com>
77.24 +CC: crossgcc@sources.redhat.com
77.25 +Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
77.26 +
77.27 +Hi Dan,
77.28 +following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
77.29 +on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
77.30 +
77.31 +--
77.32 + Petr Cvachoucek
77.33 + Unicontrols a.s.
77.34 + http://www.unicontrols.cz
77.35 +]
77.36 +
77.37 +diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
77.38 +--- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
77.39 ++++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
77.40 +@@ -470,7 +470,7 @@
77.41 + # run the linked programs.
77.42 + link-libc = -Wl,-rpath-link=$(rpath-link) \
77.43 + $(common-objpfx)libc.so$(libc.so-version) \
77.44 +- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
77.45 ++ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
77.46 + # This is how to find at build-time things that will be installed there.
77.47 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
77.48 + endif
77.49 +@@ -691,7 +691,7 @@
77.50 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
77.51 + # to pass different flags for each flavor.
77.52 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
77.53 +-all-object-suffixes := .o .os .op .og .ob .oS
77.54 ++all-object-suffixes := .o .os .op .og .ob .oST
77.55 + object-suffixes :=
77.56 + CPPFLAGS-.o = $(pic-default)
77.57 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
77.58 +@@ -747,14 +747,14 @@
77.59 +
77.60 + ifeq (yes,$(build-shared))
77.61 + # Build special library that contains the static-only routines for libc.
77.62 +-object-suffixes-for-libc += .oS
77.63 ++object-suffixes-for-libc += .oST
77.64 +
77.65 + # Must build the routines as PIC, though, because they can end up in (users')
77.66 + # shared objects. We don't want to use CFLAGS-os because users may, for
77.67 + # example, make that processor-specific.
77.68 +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
77.69 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
77.70 +-libtype.oS = lib%_nonshared.a
77.71 ++CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
77.72 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
77.73 ++libtype.oST = lib%_nonshared.a
77.74 + endif
77.75 +
77.76 + # The assembler can generate debug information too.
77.77 +diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
77.78 +--- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
77.79 ++++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
77.80 +@@ -417,7 +417,7 @@
77.81 + # Bounded pointer thunks are only built for *.ob
77.82 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
77.83 +
77.84 +-elide-routines.oS += $(filter-out $(static-only-routines),\
77.85 ++elide-routines.oST += $(filter-out $(static-only-routines),\
77.86 + $(routines) $(aux) $(sysdep_routines)) \
77.87 + $(elide-bp-thunks)
77.88 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
77.89 +@@ -984,7 +984,7 @@
77.90 + install: $(inst_libdir)/libc.so
77.91 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
77.92 + $(common-objpfx)libc.so$(libc.so-version) \
77.93 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
77.94 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
77.95 + $(libprefix)$(libc-name)) \
77.96 + $(+force)
77.97 + (echo '/* GNU ld script';\
77.98 +@@ -992,7 +992,7 @@
77.99 + echo ' the static library, so try that secondarily. */';\
77.100 + cat $<; \
77.101 + echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
77.102 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
77.103 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
77.104 + ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
77.105 + ) > $@.new
77.106 + mv -f $@.new $@
77.107 +diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
77.108 +--- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
77.109 ++++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
77.110 +@@ -13,7 +13,7 @@
77.111 +
77.112 + ifneq (,$($(lib)-static-only-routines))
77.113 + ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
77.114 +-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
77.115 ++object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
77.116 + endif
77.117 + endif
77.118 +
77.119 +@@ -29,7 +29,7 @@
77.120 +
77.121 + # Add each flavor of library to the lists of things to build and install.
77.122 + install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
77.123 +-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
77.124 ++extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
77.125 + $(patsubst %,%$o,$(filter-out \
77.126 + $($(lib)-shared-only-routines),\
77.127 + $(all-$(lib)-routines))))
77.128 +@@ -57,7 +57,7 @@
77.129 +
77.130 +
77.131 + # Use o-iterator.mk to generate a rule for each flavor of library.
77.132 +-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
77.133 ++ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
77.134 + define o-iterator-doit
77.135 + $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
77.136 + $(patsubst %,$(objpfx)%$o,\
77.137 +@@ -65,7 +65,7 @@
77.138 + $(all-$(lib)-routines))); \
77.139 + $$(build-extra-lib)
77.140 + endef
77.141 +-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
77.142 ++object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
77.143 + include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
77.144 + endif
77.145 +
77.146 +@@ -77,9 +77,9 @@
77.147 + $(build-extra-lib)
77.148 + endif
77.149 +
77.150 +-ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
77.151 +-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
77.152 +- $(patsubst %,$(objpfx)%.oS,\
77.153 ++ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
77.154 ++$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
77.155 ++ $(patsubst %,$(objpfx)%.oST,\
77.156 + $(filter $($(lib)-static-only-routines),\
77.157 + $(all-$(lib)-routines)))
77.158 + $(build-extra-lib)
77.159 +diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
77.160 +--- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
77.161 ++++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
77.162 +@@ -375,7 +375,7 @@
77.163 +
77.164 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
77.165 + $(objpfx)libpthread.so$(libpthread.so-version) \
77.166 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
77.167 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
77.168 + $(libprefix)pthread) \
77.169 + $(+force)
77.170 + (echo '/* GNU ld script';\
77.171 +@@ -383,7 +383,7 @@
77.172 + echo ' the static library, so try that secondarily. */';\
77.173 + cat $<; \
77.174 + echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
77.175 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
77.176 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
77.177 + ')' \
77.178 + ) > $@.new
77.179 + mv -f $@.new $@
77.180 +diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
77.181 +--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
77.182 ++++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
77.183 +@@ -10,4 +10,4 @@
77.184 + ASFLAGS-.op += -Wa,-Av9a
77.185 + ASFLAGS-.og += -Wa,-Av9a
77.186 + ASFLAGS-.ob += -Wa,-Av9a
77.187 +-ASFLAGS-.oS += -Wa,-Av9a
77.188 ++ASFLAGS-.oST += -Wa,-Av9a
78.1 --- a/patches/glibc/2.7/120-glibc-2.7-cygwin.patch Mon Jul 28 11:43:29 2008 +0000
78.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
78.3 @@ -1,185 +0,0 @@
78.4 -Fixes
78.5 -elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
78.6 -...
78.7 -when building glibc-2.3.x on cygwin
78.8 -
78.9 -Idea from
78.10 -http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
78.11 -Basically, make glibc use .oST as suffix for 'object static'
78.12 -instead of .oS, since cygwin has trouble distinguishing .os from .oS
78.13 -(Original patch had .on, but .oST is more mnemonic for 'object static')
78.14 -
78.15 -glibc-linuxthreads-2.3.5 also requires a patch, see
78.16 -../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
78.17 -
78.18 -[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
78.19 -
78.20 -Message-ID: <4282FCBA.3040000@unicontrols.cz>
78.21 -Date: Thu, 12 May 2005 08:50:34 +0200
78.22 -From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
78.23 -To: Dan Kegel <dank@kegel.com>
78.24 -CC: crossgcc@sources.redhat.com
78.25 -Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
78.26 -
78.27 -Hi Dan,
78.28 -following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
78.29 -on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
78.30 -
78.31 ---
78.32 - Petr Cvachoucek
78.33 - Unicontrols a.s.
78.34 - http://www.unicontrols.cz
78.35 -]
78.36 -
78.37 -diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
78.38 ---- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
78.39 -+++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
78.40 -@@ -470,7 +470,7 @@
78.41 - # run the linked programs.
78.42 - link-libc = -Wl,-rpath-link=$(rpath-link) \
78.43 - $(common-objpfx)libc.so$(libc.so-version) \
78.44 -- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
78.45 -+ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
78.46 - # This is how to find at build-time things that will be installed there.
78.47 - rpath-dirs = math elf dlfcn nss nis rt resolv crypt
78.48 - endif
78.49 -@@ -691,7 +691,7 @@
78.50 - # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
78.51 - # to pass different flags for each flavor.
78.52 - libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
78.53 --all-object-suffixes := .o .os .op .og .ob .oS
78.54 -+all-object-suffixes := .o .os .op .og .ob .oST
78.55 - object-suffixes :=
78.56 - CPPFLAGS-.o = $(pic-default)
78.57 - CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
78.58 -@@ -747,14 +747,14 @@
78.59 -
78.60 - ifeq (yes,$(build-shared))
78.61 - # Build special library that contains the static-only routines for libc.
78.62 --object-suffixes-for-libc += .oS
78.63 -+object-suffixes-for-libc += .oST
78.64 -
78.65 - # Must build the routines as PIC, though, because they can end up in (users')
78.66 - # shared objects. We don't want to use CFLAGS-os because users may, for
78.67 - # example, make that processor-specific.
78.68 --CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
78.69 --CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
78.70 --libtype.oS = lib%_nonshared.a
78.71 -+CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
78.72 -+CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
78.73 -+libtype.oST = lib%_nonshared.a
78.74 - endif
78.75 -
78.76 - # The assembler can generate debug information too.
78.77 -diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
78.78 ---- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
78.79 -+++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
78.80 -@@ -417,7 +417,7 @@
78.81 - # Bounded pointer thunks are only built for *.ob
78.82 - elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
78.83 -
78.84 --elide-routines.oS += $(filter-out $(static-only-routines),\
78.85 -+elide-routines.oST += $(filter-out $(static-only-routines),\
78.86 - $(routines) $(aux) $(sysdep_routines)) \
78.87 - $(elide-bp-thunks)
78.88 - elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
78.89 -@@ -984,7 +984,7 @@
78.90 - install: $(inst_libdir)/libc.so
78.91 - $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
78.92 - $(common-objpfx)libc.so$(libc.so-version) \
78.93 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
78.94 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
78.95 - $(libprefix)$(libc-name)) \
78.96 - $(+force)
78.97 - (echo '/* GNU ld script';\
78.98 -@@ -992,7 +992,7 @@
78.99 - echo ' the static library, so try that secondarily. */';\
78.100 - cat $<; \
78.101 - echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
78.102 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
78.103 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
78.104 - ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
78.105 - ) > $@.new
78.106 - mv -f $@.new $@
78.107 -diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
78.108 ---- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
78.109 -+++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
78.110 -@@ -13,7 +13,7 @@
78.111 -
78.112 - ifneq (,$($(lib)-static-only-routines))
78.113 - ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
78.114 --object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
78.115 -+object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
78.116 - endif
78.117 - endif
78.118 -
78.119 -@@ -29,7 +29,7 @@
78.120 -
78.121 - # Add each flavor of library to the lists of things to build and install.
78.122 - install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
78.123 --extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
78.124 -+extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
78.125 - $(patsubst %,%$o,$(filter-out \
78.126 - $($(lib)-shared-only-routines),\
78.127 - $(all-$(lib)-routines))))
78.128 -@@ -57,7 +57,7 @@
78.129 -
78.130 -
78.131 - # Use o-iterator.mk to generate a rule for each flavor of library.
78.132 --ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
78.133 -+ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
78.134 - define o-iterator-doit
78.135 - $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
78.136 - $(patsubst %,$(objpfx)%$o,\
78.137 -@@ -65,7 +65,7 @@
78.138 - $(all-$(lib)-routines))); \
78.139 - $$(build-extra-lib)
78.140 - endef
78.141 --object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
78.142 -+object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
78.143 - include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
78.144 - endif
78.145 -
78.146 -@@ -77,9 +77,9 @@
78.147 - $(build-extra-lib)
78.148 - endif
78.149 -
78.150 --ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
78.151 --$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
78.152 -- $(patsubst %,$(objpfx)%.oS,\
78.153 -+ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
78.154 -+$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
78.155 -+ $(patsubst %,$(objpfx)%.oST,\
78.156 - $(filter $($(lib)-static-only-routines),\
78.157 - $(all-$(lib)-routines)))
78.158 - $(build-extra-lib)
78.159 -diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
78.160 ---- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
78.161 -+++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
78.162 -@@ -375,7 +375,7 @@
78.163 -
78.164 - $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
78.165 - $(objpfx)libpthread.so$(libpthread.so-version) \
78.166 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
78.167 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
78.168 - $(libprefix)pthread) \
78.169 - $(+force)
78.170 - (echo '/* GNU ld script';\
78.171 -@@ -383,7 +383,7 @@
78.172 - echo ' the static library, so try that secondarily. */';\
78.173 - cat $<; \
78.174 - echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
78.175 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
78.176 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
78.177 - ')' \
78.178 - ) > $@.new
78.179 - mv -f $@.new $@
78.180 -diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
78.181 ---- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
78.182 -+++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
78.183 -@@ -10,4 +10,4 @@
78.184 - ASFLAGS-.op += -Wa,-Av9a
78.185 - ASFLAGS-.og += -Wa,-Av9a
78.186 - ASFLAGS-.ob += -Wa,-Av9a
78.187 --ASFLAGS-.oS += -Wa,-Av9a
78.188 -+ASFLAGS-.oST += -Wa,-Av9a
79.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
79.2 +++ b/patches/glibc/2.7/140-configure-apple-as.patch Mon Jul 28 20:10:34 2008 +0000
79.3 @@ -0,0 +1,26 @@
79.4 +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
79.5 +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
79.6 +
79.7 +The following makes it possible to configure glibc-2.3.2 on Mac OS X,
79.8 +where the assembler but doesn't understand the --version flag.
79.9 +
79.10 +Fixes the symptom
79.11 +checking whether ld is GNU ld... no
79.12 +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
79.13 +checking version of /usr/libexec/gcc/darwin/ppc/as...
79.14 +<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
79.15 +
79.16 +NOTE: This patch should apparently be pushed upstream so we don't need to
79.17 +keep adding it here.
79.18 +
79.19 +--- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
79.20 ++++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
79.21 +@@ -4524,7 +4524,7 @@
79.22 + # Found it, now check the version.
79.23 + { echo "$as_me:$LINENO: checking version of $AS" >&5
79.24 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6; }
79.25 +- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
79.26 ++ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
79.27 + case $ac_prog_version in
79.28 + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
79.29 + 2.1[3-9]*)
80.1 --- a/patches/glibc/2.7/140-glibc-2.7-configure-apple-as.patch Mon Jul 28 11:43:29 2008 +0000
80.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
80.3 @@ -1,26 +0,0 @@
80.4 -http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
80.5 -http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
80.6 -
80.7 -The following makes it possible to configure glibc-2.3.2 on Mac OS X,
80.8 -where the assembler but doesn't understand the --version flag.
80.9 -
80.10 -Fixes the symptom
80.11 -checking whether ld is GNU ld... no
80.12 -checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
80.13 -checking version of /usr/libexec/gcc/darwin/ppc/as...
80.14 -<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
80.15 -
80.16 -NOTE: This patch should apparently be pushed upstream so we don't need to
80.17 -keep adding it here.
80.18 -
80.19 ---- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
80.20 -+++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
80.21 -@@ -4524,7 +4524,7 @@
80.22 - # Found it, now check the version.
80.23 - { echo "$as_me:$LINENO: checking version of $AS" >&5
80.24 - echo $ECHO_N "checking version of $AS... $ECHO_C" >&6; }
80.25 -- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
80.26 -+ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
80.27 - case $ac_prog_version in
80.28 - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
80.29 - 2.1[3-9]*)
81.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
81.2 +++ b/patches/glibc/2.7/150-fix-pr631.patch Mon Jul 28 20:10:34 2008 +0000
81.3 @@ -0,0 +1,43 @@
81.4 +From dank@kegel.com
81.5 +Wed Jun 15 09:12:43 PDT 2005
81.6 +
81.7 +Fixes
81.8 +
81.9 +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
81.10 +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
81.11 +... 53 lines deleted ...
81.12 +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
81.13 +collect2: ld returned 1 exit status
81.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
81.15 +
81.16 +when building glibc with --enable-static-nss.
81.17 +
81.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
81.19 +
81.20 +--- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
81.21 ++++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
81.22 +@@ -508,7 +508,7 @@
81.23 +
81.24 + # The static libraries.
81.25 + ifeq (yes,$(build-static))
81.26 +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
81.27 ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
81.28 + else
81.29 + ifeq (yes,$(build-shared))
81.30 + # We can try to link the programs with lib*_pic.a...
81.31 +--- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
81.32 ++++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
81.33 +@@ -120,6 +120,13 @@
81.34 + install-bin-script = ldd
81.35 + endif
81.36 +
81.37 ++ifeq (yes,$(build-static-nss))
81.38 ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
81.39 ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
81.40 ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
81.41 ++ $(resolvobjdir)/libresolv.a
81.42 ++endif
81.43 ++
81.44 + others = sprof sln
81.45 + install-bin = sprof
81.46 + others-static = sln
82.1 --- a/patches/glibc/2.7/150-glibc-2.7-fix-pr631.patch Mon Jul 28 11:43:29 2008 +0000
82.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
82.3 @@ -1,43 +0,0 @@
82.4 -From dank@kegel.com
82.5 -Wed Jun 15 09:12:43 PDT 2005
82.6 -
82.7 -Fixes
82.8 -
82.9 -build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
82.10 -build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
82.11 -... 53 lines deleted ...
82.12 -build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
82.13 -collect2: ld returned 1 exit status
82.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
82.15 -
82.16 -when building glibc with --enable-static-nss.
82.17 -
82.18 -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
82.19 -
82.20 ---- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
82.21 -+++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
82.22 -@@ -508,7 +508,7 @@
82.23 -
82.24 - # The static libraries.
82.25 - ifeq (yes,$(build-static))
82.26 --link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
82.27 -+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
82.28 - else
82.29 - ifeq (yes,$(build-shared))
82.30 - # We can try to link the programs with lib*_pic.a...
82.31 ---- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
82.32 -+++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
82.33 -@@ -120,6 +120,13 @@
82.34 - install-bin-script = ldd
82.35 - endif
82.36 -
82.37 -+ifeq (yes,$(build-static-nss))
82.38 -+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
82.39 -+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
82.40 -+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
82.41 -+ $(resolvobjdir)/libresolv.a
82.42 -+endif
82.43 -+
82.44 - others = sprof sln
82.45 - install-bin = sprof
82.46 - others-static = sln
83.1 --- a/patches/glibc/2.7/160-glibc-2.7-i686-assembler.patch Mon Jul 28 11:43:29 2008 +0000
83.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
83.3 @@ -1,43 +0,0 @@
83.4 -If gcc is configured to generate i686 code or better by default (like
83.5 -when using the --with-arch=pentium3 configure option), then the __i686
83.6 -macro will always be defined automatically and thus screw up the
83.7 -compilation of some .S files.
83.8 -
83.9 -http://bugs.gentoo.org/131108
83.10 -http://sourceware.org/ml/libc-alpha/2006-04/msg00090.html
83.11 -
83.12 -2006-04-25 Mike Frysinger <vapier@gentoo.org>
83.13 -
83.14 - * sysdeps/i386/sysdep.h (__i686): Undefine.
83.15 -
83.16 -Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
83.17 -===================================================================
83.18 ---- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
83.19 -+++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
83.20 -@@ -29,6 +29,10 @@
83.21 - #include <dl-sysdep.h>
83.22 - #include <tls.h>
83.23 -
83.24 -+#if defined __i686 && defined __ASSEMBLER__
83.25 -+#undef __i686
83.26 -+#define __i686 __i686
83.27 -+#endif
83.28 -
83.29 - /* For Linux we can use the system call table in the header file
83.30 - /usr/include/asm/unistd.h
83.31 -Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
83.32 -===================================================================
83.33 ---- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
83.34 -+++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy)
83.35 -@@ -45,6 +45,11 @@
83.36 - /* Embed an #include to pull in the alignment and .end directives. */
83.37 - asm ("\n#include \"defs.h\"");
83.38 -
83.39 -+asm ("\n#if defined __i686 && defined __ASSEMBLER__");
83.40 -+asm ("\n#undef __i686");
83.41 -+asm ("\n#define __i686 __i686");
83.42 -+asm ("\n#endif");
83.43 -+
83.44 - /* The initial common code ends here. */
83.45 - asm ("\n/*@HEADER_ENDS*/");
83.46 -
84.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
84.2 +++ b/patches/glibc/2.7/160-i686-assembler.patch Mon Jul 28 20:10:34 2008 +0000
84.3 @@ -0,0 +1,43 @@
84.4 +If gcc is configured to generate i686 code or better by default (like
84.5 +when using the --with-arch=pentium3 configure option), then the __i686
84.6 +macro will always be defined automatically and thus screw up the
84.7 +compilation of some .S files.
84.8 +
84.9 +http://bugs.gentoo.org/131108
84.10 +http://sourceware.org/ml/libc-alpha/2006-04/msg00090.html
84.11 +
84.12 +2006-04-25 Mike Frysinger <vapier@gentoo.org>
84.13 +
84.14 + * sysdeps/i386/sysdep.h (__i686): Undefine.
84.15 +
84.16 +Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
84.17 +===================================================================
84.18 +--- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
84.19 ++++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
84.20 +@@ -29,6 +29,10 @@
84.21 + #include <dl-sysdep.h>
84.22 + #include <tls.h>
84.23 +
84.24 ++#if defined __i686 && defined __ASSEMBLER__
84.25 ++#undef __i686
84.26 ++#define __i686 __i686
84.27 ++#endif
84.28 +
84.29 + /* For Linux we can use the system call table in the header file
84.30 + /usr/include/asm/unistd.h
84.31 +Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
84.32 +===================================================================
84.33 +--- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
84.34 ++++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy)
84.35 +@@ -45,6 +45,11 @@
84.36 + /* Embed an #include to pull in the alignment and .end directives. */
84.37 + asm ("\n#include \"defs.h\"");
84.38 +
84.39 ++asm ("\n#if defined __i686 && defined __ASSEMBLER__");
84.40 ++asm ("\n#undef __i686");
84.41 ++asm ("\n#define __i686 __i686");
84.42 ++asm ("\n#endif");
84.43 ++
84.44 + /* The initial common code ends here. */
84.45 + asm ("\n/*@HEADER_ENDS*/");
84.46 +
85.1 --- a/patches/glibc/2.7/170-glibc-i386-preferred-stack-boundary.patch Mon Jul 28 11:43:29 2008 +0000
85.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
85.3 @@ -1,18 +0,0 @@
85.4 -(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
85.5 -License: LGPL v2.1
85.6 -
85.7 -Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
85.8 -and 2 is not.
85.9 -
85.10 -diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
85.11 ---- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100
85.12 -+++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200
85.13 -@@ -36,7 +36,7 @@
85.14 - ifeq ($(subdir),csu)
85.15 - sysdep-CFLAGS += -mpreferred-stack-boundary=4
85.16 - else
85.17 --sysdep-CFLAGS += -mpreferred-stack-boundary=2
85.18 -+sysdep-CFLAGS += -mpreferred-stack-boundary=4
85.19 - # Likewise, any function which calls user callbacks
85.20 - uses-callbacks += -mpreferred-stack-boundary=4
85.21 - # Likewise, any stack alignment tests
86.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
86.2 +++ b/patches/glibc/2.7/170-i386-preferred-stack-boundary.patch Mon Jul 28 20:10:34 2008 +0000
86.3 @@ -0,0 +1,18 @@
86.4 +(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
86.5 +License: LGPL v2.1
86.6 +
86.7 +Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
86.8 +and 2 is not.
86.9 +
86.10 +diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
86.11 +--- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100
86.12 ++++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200
86.13 +@@ -36,7 +36,7 @@
86.14 + ifeq ($(subdir),csu)
86.15 + sysdep-CFLAGS += -mpreferred-stack-boundary=4
86.16 + else
86.17 +-sysdep-CFLAGS += -mpreferred-stack-boundary=2
86.18 ++sysdep-CFLAGS += -mpreferred-stack-boundary=4
86.19 + # Likewise, any function which calls user callbacks
86.20 + uses-callbacks += -mpreferred-stack-boundary=4
86.21 + # Likewise, any stack alignment tests
87.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
87.2 +++ b/patches/glibc/2.7/190-build_wcs_upper_buffer.patch Mon Jul 28 20:10:34 2008 +0000
87.3 @@ -0,0 +1,22 @@
87.4 +Matthias Kaehlcke <matthias at kaehlcke dot net> writes:
87.5 +
87.6 +A compilation of an ARM toolchain with glibc 2.7 using crosstool-ng
87.7 +failed with a gcc error in glibc-2.7/posix/regex_internal.c, more
87.8 +concretly in the function build_wcs_upper_buffer(). The return type of
87.9 +the function prototype in regex_internal.h doesn't correspond with the
87.10 +return type of this function in regex_internal.c.
87.11 +
87.12 +The attached patch corrects the return type of the function prototype
87.13 +in regex_internal.h
87.14 +
87.15 +--- glibc-2.7/posix/regex_internal.h.org 2008-05-30 11:16:01.000000000 +0200
87.16 ++++ glibc-2.7/posix/regex_internal.h 2008-05-30 11:16:35.000000000 +0200
87.17 +@@ -391,7 +391,7 @@
87.18 + internal_function;
87.19 + # ifdef RE_ENABLE_I18N
87.20 + static void build_wcs_buffer (re_string_t *pstr) internal_function;
87.21 +-static int build_wcs_upper_buffer (re_string_t *pstr) internal_function;
87.22 ++static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr) internal_function;
87.23 + # endif /* RE_ENABLE_I18N */
87.24 + static void build_upper_buffer (re_string_t *pstr) internal_function;
87.25 + static void re_string_translate_buffer (re_string_t *pstr) internal_function;
88.1 --- a/patches/glibc/2.7/190-glibc-2.7-build_wcs_upper_buffer.patch Mon Jul 28 11:43:29 2008 +0000
88.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
88.3 @@ -1,22 +0,0 @@
88.4 -Matthias Kaehlcke <matthias at kaehlcke dot net> writes:
88.5 -
88.6 -A compilation of an ARM toolchain with glibc 2.7 using crosstool-ng
88.7 -failed with a gcc error in glibc-2.7/posix/regex_internal.c, more
88.8 -concretly in the function build_wcs_upper_buffer(). The return type of
88.9 -the function prototype in regex_internal.h doesn't correspond with the
88.10 -return type of this function in regex_internal.c.
88.11 -
88.12 -The attached patch corrects the return type of the function prototype
88.13 -in regex_internal.h
88.14 -
88.15 ---- glibc-2.7/posix/regex_internal.h.org 2008-05-30 11:16:01.000000000 +0200
88.16 -+++ glibc-2.7/posix/regex_internal.h 2008-05-30 11:16:35.000000000 +0200
88.17 -@@ -391,7 +391,7 @@
88.18 - internal_function;
88.19 - # ifdef RE_ENABLE_I18N
88.20 - static void build_wcs_buffer (re_string_t *pstr) internal_function;
88.21 --static int build_wcs_upper_buffer (re_string_t *pstr) internal_function;
88.22 -+static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr) internal_function;
88.23 - # endif /* RE_ENABLE_I18N */
88.24 - static void build_upper_buffer (re_string_t *pstr) internal_function;
88.25 - static void re_string_translate_buffer (re_string_t *pstr) internal_function;
89.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
89.2 +++ b/patches/glibc/2.7/230-alpha-atfcts.patch Mon Jul 28 20:10:34 2008 +0000
89.3 @@ -0,0 +1,12 @@
89.4 +--- glibc-2.7/sysdeps/unix/sysv/linux/kernel-features.h 2007-08-14 06:21:09.000000000 +0300
89.5 ++++ glibc-2.7/sysdeps/unix/sysv/linux/kernel-features.h.new 2008-07-23 07:05:20.000000000 +0300
89.6 +@@ -449,8 +449,7 @@
89.7 + and on Alpha just after 2.6.22-rc1. */
89.8 + #if __LINUX_KERNEL_VERSION >= 0x020611 \
89.9 + && ((!defined __sh__ && !defined __alpha__) \
89.10 +- || (__LINUX_KERNEL_VERSION >= 0x020613 && defined __sh__) \
89.11 +- || (__LINUX_KERNEL_VERSION >= 0x020617 && defined __alpha__))
89.12 ++ || (__LINUX_KERNEL_VERSION >= 0x020613 && defined __sh__))
89.13 + # define __ASSUME_ATFCTS 1
89.14 + #endif
89.15 +
90.1 --- a/patches/glibc/2.7/230-glibc-2.7-alpha-atfcts.patch Mon Jul 28 11:43:29 2008 +0000
90.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
90.3 @@ -1,12 +0,0 @@
90.4 ---- glibc-2.7/sysdeps/unix/sysv/linux/kernel-features.h 2007-08-14 06:21:09.000000000 +0300
90.5 -+++ glibc-2.7/sysdeps/unix/sysv/linux/kernel-features.h.new 2008-07-23 07:05:20.000000000 +0300
90.6 -@@ -449,8 +449,7 @@
90.7 - and on Alpha just after 2.6.22-rc1. */
90.8 - #if __LINUX_KERNEL_VERSION >= 0x020611 \
90.9 - && ((!defined __sh__ && !defined __alpha__) \
90.10 -- || (__LINUX_KERNEL_VERSION >= 0x020613 && defined __sh__) \
90.11 -- || (__LINUX_KERNEL_VERSION >= 0x020617 && defined __alpha__))
90.12 -+ || (__LINUX_KERNEL_VERSION >= 0x020613 && defined __sh__))
90.13 - # define __ASSUME_ATFCTS 1
90.14 - #endif
90.15 -
91.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
91.2 +++ b/patches/glibc/2.7/240-alpha-ptr_mangle.patch Mon Jul 28 20:10:34 2008 +0000
91.3 @@ -0,0 +1,94 @@
91.4 +--- glibc-2.7.orig/sysdeps/unix/alpha/sysdep.h
91.5 ++++ glibc-2.7/sysdeps/unix/alpha/sysdep.h
91.6 +@@ -397,42 +397,4 @@
91.7 + _sc_ret = _sc_0, _sc_err = _sc_19; \
91.8 + }
91.9 +
91.10 +-/* Pointer mangling support. Note that tls access is slow enough that
91.11 +- we don't deoptimize things by placing the pointer check value there. */
91.12 +-
91.13 +-#include <stdint.h>
91.14 +-
91.15 +-#if defined NOT_IN_libc && defined IS_IN_rtld
91.16 +-# ifdef __ASSEMBLER__
91.17 +-# define PTR_MANGLE(dst, src, tmp) \
91.18 +- ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \
91.19 +- ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \
91.20 +- xor src, tmp, dst
91.21 +-# define PTR_MANGLE2(dst, src, tmp) \
91.22 +- xor src, tmp, dst
91.23 +-# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
91.24 +-# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
91.25 +-# else
91.26 +-extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
91.27 +-# define PTR_MANGLE(var) \
91.28 +- (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
91.29 +-# define PTR_DEMANGLE(var) PTR_MANGLE(var)
91.30 +-# endif
91.31 +-#elif defined PIC
91.32 +-# ifdef __ASSEMBLER__
91.33 +-# define PTR_MANGLE(dst, src, tmp) \
91.34 +- ldq tmp, __pointer_chk_guard; \
91.35 +- xor src, tmp, dst
91.36 +-# define PTR_MANGLE2(dst, src, tmp) \
91.37 +- xor src, tmp, dst
91.38 +-# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
91.39 +-# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
91.40 +-# else
91.41 +-extern uintptr_t __pointer_chk_guard attribute_relro;
91.42 +-# define PTR_MANGLE(var) \
91.43 +- (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
91.44 +-# define PTR_DEMANGLE(var) PTR_MANGLE(var)
91.45 +-# endif
91.46 +-#endif
91.47 +-
91.48 + #endif /* ASSEMBLER */
91.49 +--- glibc-2.7.orig/sysdeps/unix/sysv/linux/alpha/sysdep.h
91.50 ++++ glibc-2.7/sysdeps/unix/sysv/linux/alpha/sysdep.h
91.51 +@@ -98,4 +98,46 @@
91.52 + INTERNAL_SYSCALL1(name, err_out, nr, args); \
91.53 + })
91.54 +
91.55 ++/* Pointer mangling support. Note that tls access is slow enough that
91.56 ++ we don't deoptimize things by placing the pointer check value there. */
91.57 ++
91.58 ++#if defined NOT_IN_libc && defined IS_IN_rtld
91.59 ++# ifdef __ASSEMBLER__
91.60 ++# define PTR_MANGLE(dst, src, tmp) \
91.61 ++ ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \
91.62 ++ ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \
91.63 ++ xor src, tmp, dst
91.64 ++# define PTR_MANGLE2(dst, src, tmp) \
91.65 ++ xor src, tmp, dst
91.66 ++# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
91.67 ++# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
91.68 ++# else
91.69 ++extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
91.70 ++# define PTR_MANGLE(var) \
91.71 ++ (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
91.72 ++# define PTR_DEMANGLE(var) PTR_MANGLE(var)
91.73 ++# endif
91.74 ++#elif defined PIC
91.75 ++# ifdef __ASSEMBLER__
91.76 ++# define PTR_MANGLE(dst, src, tmp) \
91.77 ++ ldq tmp, __pointer_chk_guard; \
91.78 ++ xor src, tmp, dst
91.79 ++# define PTR_MANGLE2(dst, src, tmp) \
91.80 ++ xor src, tmp, dst
91.81 ++# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
91.82 ++# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
91.83 ++# else
91.84 ++extern uintptr_t __pointer_chk_guard attribute_relro;
91.85 ++# define PTR_MANGLE(var) \
91.86 ++ (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
91.87 ++# define PTR_DEMANGLE(var) PTR_MANGLE(var)
91.88 ++# endif
91.89 ++#else
91.90 ++/* Pointer mangling is not yet supported for static libc on alpha. */
91.91 ++# ifndef __ASSEMBLER__
91.92 ++# define PTR_MANGLE(var) (void) (var)
91.93 ++# define PTR_DEMANGLE(var) (void) (var)
91.94 ++# endif
91.95 ++#endif
91.96 ++
91.97 + #endif /* _LINUX_ALPHA_SYSDEP_H */
92.1 --- a/patches/glibc/2.7/240-glibc-2.7-alpha-ptr_mangle.patch Mon Jul 28 11:43:29 2008 +0000
92.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
92.3 @@ -1,94 +0,0 @@
92.4 ---- glibc-2.7.orig/sysdeps/unix/alpha/sysdep.h
92.5 -+++ glibc-2.7/sysdeps/unix/alpha/sysdep.h
92.6 -@@ -397,42 +397,4 @@
92.7 - _sc_ret = _sc_0, _sc_err = _sc_19; \
92.8 - }
92.9 -
92.10 --/* Pointer mangling support. Note that tls access is slow enough that
92.11 -- we don't deoptimize things by placing the pointer check value there. */
92.12 --
92.13 --#include <stdint.h>
92.14 --
92.15 --#if defined NOT_IN_libc && defined IS_IN_rtld
92.16 --# ifdef __ASSEMBLER__
92.17 --# define PTR_MANGLE(dst, src, tmp) \
92.18 -- ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \
92.19 -- ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \
92.20 -- xor src, tmp, dst
92.21 --# define PTR_MANGLE2(dst, src, tmp) \
92.22 -- xor src, tmp, dst
92.23 --# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
92.24 --# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
92.25 --# else
92.26 --extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
92.27 --# define PTR_MANGLE(var) \
92.28 -- (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
92.29 --# define PTR_DEMANGLE(var) PTR_MANGLE(var)
92.30 --# endif
92.31 --#elif defined PIC
92.32 --# ifdef __ASSEMBLER__
92.33 --# define PTR_MANGLE(dst, src, tmp) \
92.34 -- ldq tmp, __pointer_chk_guard; \
92.35 -- xor src, tmp, dst
92.36 --# define PTR_MANGLE2(dst, src, tmp) \
92.37 -- xor src, tmp, dst
92.38 --# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
92.39 --# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
92.40 --# else
92.41 --extern uintptr_t __pointer_chk_guard attribute_relro;
92.42 --# define PTR_MANGLE(var) \
92.43 -- (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
92.44 --# define PTR_DEMANGLE(var) PTR_MANGLE(var)
92.45 --# endif
92.46 --#endif
92.47 --
92.48 - #endif /* ASSEMBLER */
92.49 ---- glibc-2.7.orig/sysdeps/unix/sysv/linux/alpha/sysdep.h
92.50 -+++ glibc-2.7/sysdeps/unix/sysv/linux/alpha/sysdep.h
92.51 -@@ -98,4 +98,46 @@
92.52 - INTERNAL_SYSCALL1(name, err_out, nr, args); \
92.53 - })
92.54 -
92.55 -+/* Pointer mangling support. Note that tls access is slow enough that
92.56 -+ we don't deoptimize things by placing the pointer check value there. */
92.57 -+
92.58 -+#if defined NOT_IN_libc && defined IS_IN_rtld
92.59 -+# ifdef __ASSEMBLER__
92.60 -+# define PTR_MANGLE(dst, src, tmp) \
92.61 -+ ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \
92.62 -+ ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \
92.63 -+ xor src, tmp, dst
92.64 -+# define PTR_MANGLE2(dst, src, tmp) \
92.65 -+ xor src, tmp, dst
92.66 -+# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
92.67 -+# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
92.68 -+# else
92.69 -+extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
92.70 -+# define PTR_MANGLE(var) \
92.71 -+ (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
92.72 -+# define PTR_DEMANGLE(var) PTR_MANGLE(var)
92.73 -+# endif
92.74 -+#elif defined PIC
92.75 -+# ifdef __ASSEMBLER__
92.76 -+# define PTR_MANGLE(dst, src, tmp) \
92.77 -+ ldq tmp, __pointer_chk_guard; \
92.78 -+ xor src, tmp, dst
92.79 -+# define PTR_MANGLE2(dst, src, tmp) \
92.80 -+ xor src, tmp, dst
92.81 -+# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
92.82 -+# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
92.83 -+# else
92.84 -+extern uintptr_t __pointer_chk_guard attribute_relro;
92.85 -+# define PTR_MANGLE(var) \
92.86 -+ (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
92.87 -+# define PTR_DEMANGLE(var) PTR_MANGLE(var)
92.88 -+# endif
92.89 -+#else
92.90 -+/* Pointer mangling is not yet supported for static libc on alpha. */
92.91 -+# ifndef __ASSEMBLER__
92.92 -+# define PTR_MANGLE(var) (void) (var)
92.93 -+# define PTR_DEMANGLE(var) (void) (var)
92.94 -+# endif
92.95 -+#endif
92.96 -+
92.97 - #endif /* _LINUX_ALPHA_SYSDEP_H */
93.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
93.2 +++ b/patches/glibc/linuxthreads-2.3.6/100-cygwin.patch Mon Jul 28 20:10:34 2008 +0000
93.3 @@ -0,0 +1,37 @@
93.4 +Fixes
93.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
93.6 +...
93.7 +when building glibc-2.3.3 on cygwin
93.8 +
93.9 +Idea from
93.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
93.11 +Basically, make glibc use .oST as suffix for 'object static'
93.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
93.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
93.14 +
93.15 +glibc-linuxthreads-2.3.3 also requires a patch, see
93.16 +../glibc-linuxthreads-2.3.3/glibc-linuxthreads-2.3.3-cygwin.patch
93.17 +
93.18 +[ rediffed against glibc-2.3.5 ]
93.19 +
93.20 +diff -aur glibc-2.3.5/linuxthreads/Makefile glibc-2.3.5-cygwin/linuxthreads/Makefile
93.21 +--- glibc-2.3.5/linuxthreads/Makefile 2005-02-16 12:26:38.000000000 +0100
93.22 ++++ glibc-2.3.5-cygwin/linuxthreads/Makefile 2005-05-11 08:32:50.453125000 +0200
93.23 +@@ -159,7 +159,7 @@
93.24 + install: $(inst_libdir)/libpthread.so
93.25 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
93.26 + $(objpfx)libpthread.so$(libpthread.so-version) \
93.27 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
93.28 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
93.29 + $(libprefix)pthread) \
93.30 + $(+force)
93.31 + (echo '/* GNU ld script';\
93.32 +@@ -167,7 +167,7 @@
93.33 + echo ' the static library, so try that secondarily. */';\
93.34 + cat $<; \
93.35 + echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
93.36 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
93.37 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
93.38 + ')' \
93.39 + ) > $@.new
93.40 + mv -f $@.new $@
94.1 --- a/patches/glibc/linuxthreads-2.3.6/100-glibc-linuxthreads-2.3.5-cygwin.patch Mon Jul 28 11:43:29 2008 +0000
94.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
94.3 @@ -1,37 +0,0 @@
94.4 -Fixes
94.5 -elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
94.6 -...
94.7 -when building glibc-2.3.3 on cygwin
94.8 -
94.9 -Idea from
94.10 -http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
94.11 -Basically, make glibc use .oST as suffix for 'object static'
94.12 -instead of .oS, since cygwin has trouble distinguishing .os from .oS
94.13 -(Original patch had .on, but .oST is more mnemonic for 'object static')
94.14 -
94.15 -glibc-linuxthreads-2.3.3 also requires a patch, see
94.16 -../glibc-linuxthreads-2.3.3/glibc-linuxthreads-2.3.3-cygwin.patch
94.17 -
94.18 -[ rediffed against glibc-2.3.5 ]
94.19 -
94.20 -diff -aur glibc-2.3.5/linuxthreads/Makefile glibc-2.3.5-cygwin/linuxthreads/Makefile
94.21 ---- glibc-2.3.5/linuxthreads/Makefile 2005-02-16 12:26:38.000000000 +0100
94.22 -+++ glibc-2.3.5-cygwin/linuxthreads/Makefile 2005-05-11 08:32:50.453125000 +0200
94.23 -@@ -159,7 +159,7 @@
94.24 - install: $(inst_libdir)/libpthread.so
94.25 - $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
94.26 - $(objpfx)libpthread.so$(libpthread.so-version) \
94.27 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
94.28 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
94.29 - $(libprefix)pthread) \
94.30 - $(+force)
94.31 - (echo '/* GNU ld script';\
94.32 -@@ -167,7 +167,7 @@
94.33 - echo ' the static library, so try that secondarily. */';\
94.34 - cat $<; \
94.35 - echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
94.36 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
94.37 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
94.38 - ')' \
94.39 - ) > $@.new
94.40 - mv -f $@.new $@
95.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
95.2 +++ b/patches/glibc/linuxthreads-2.3.6/270-alpha-cfi.patch Mon Jul 28 20:10:34 2008 +0000
95.3 @@ -0,0 +1,25 @@
95.4 +--- glibc-2.3.6/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h.orig 2008-06-19 15:31:45.000000000 +0300
95.5 ++++ glibc-2.3.6/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2008-06-19 15:36:10.000000000 +0300
95.6 +@@ -54,6 +54,7 @@
95.7 + bne a3, SYSCALL_ERROR_LABEL; \
95.8 + __LABEL($pseudo_ret) \
95.9 + .subsection 2; \
95.10 ++ cfi_startproc; \
95.11 + __LABEL($pseudo_cancel) \
95.12 + subq sp, 64, sp; \
95.13 + cfi_def_cfa_offset(64); \
95.14 +@@ -84,12 +85,13 @@
95.15 + cfi_def_cfa_offset(0); \
95.16 + __LABEL($syscall_error) \
95.17 + SYSCALL_ERROR_HANDLER; \
95.18 ++ cfi_endproc; \
95.19 + .previous
95.20 +
95.21 + # undef PSEUDO_END
95.22 + # define PSEUDO_END(sym) \
95.23 +- .subsection 2; \
95.24 + cfi_endproc; \
95.25 ++ .subsection 2; \
95.26 + .size sym, .-sym
95.27 +
95.28 + # define SAVE_ARGS_0 /* Nothing. */
96.1 --- a/patches/glibc/linuxthreads-2.3.6/270-glibc-linuxthreads-alpha-cfi.patch Mon Jul 28 11:43:29 2008 +0000
96.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
96.3 @@ -1,25 +0,0 @@
96.4 ---- glibc-2.3.6/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h.orig 2008-06-19 15:31:45.000000000 +0300
96.5 -+++ glibc-2.3.6/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2008-06-19 15:36:10.000000000 +0300
96.6 -@@ -54,6 +54,7 @@
96.7 - bne a3, SYSCALL_ERROR_LABEL; \
96.8 - __LABEL($pseudo_ret) \
96.9 - .subsection 2; \
96.10 -+ cfi_startproc; \
96.11 - __LABEL($pseudo_cancel) \
96.12 - subq sp, 64, sp; \
96.13 - cfi_def_cfa_offset(64); \
96.14 -@@ -84,12 +85,13 @@
96.15 - cfi_def_cfa_offset(0); \
96.16 - __LABEL($syscall_error) \
96.17 - SYSCALL_ERROR_HANDLER; \
96.18 -+ cfi_endproc; \
96.19 - .previous
96.20 -
96.21 - # undef PSEUDO_END
96.22 - # define PSEUDO_END(sym) \
96.23 -- .subsection 2; \
96.24 - cfi_endproc; \
96.25 -+ .subsection 2; \
96.26 - .size sym, .-sym
96.27 -
96.28 - # define SAVE_ARGS_0 /* Nothing. */