1.1 --- a/config/libc/glibc.in Mon Jan 03 22:02:06 2011 +0100
1.2 +++ b/config/libc/glibc.in Mon Jan 03 23:40:22 2011 +0100
1.3 @@ -101,11 +101,6 @@
1.4 prompt "2.5 (OBSOLETE)"
1.5 depends on OBSOLETE
1.6
1.7 -config LIBC_GLIBC_V_2_3_6
1.8 - bool
1.9 - prompt "2.3.6 (OBSOLETE)"
1.10 - depends on OBSOLETE
1.11 -
1.12 endchoice
1.13
1.14 config LIBC_VERSION
1.15 @@ -124,4 +119,3 @@
1.16 default "2.6" if LIBC_GLIBC_V_2_6
1.17 default "2.5.1" if LIBC_GLIBC_V_2_5_1
1.18 default "2.5" if LIBC_GLIBC_V_2_5
1.19 - default "2.3.6" if LIBC_GLIBC_V_2_3_6
2.1 --- a/patches/glibc/2.3.6/100-arm-ctl_bus_isa.patch Mon Jan 03 22:02:06 2011 +0100
2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2.3 @@ -1,53 +0,0 @@
2.4 -Applies to both glibc-2.2.5 and glibc-2.3.2, and probably glibc cvs as of Aug 2004.
2.5 -Needed to build glibc with linux kernels 2.4.23 or higher on ARM,
2.6 -Fixes following error:
2.7 -
2.8 -../sysdeps/unix/sysv/linux/arm/ioperm.c: In function `init_iosys':
2.9 -../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: `BUS_ISA' undeclared (first use in this function)
2.10 -../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (Each undeclared identifier is reported only once
2.11 -../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: for each function it appears in.)
2.12 -../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: initializer element is not constant
2.13 -../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (near initialization for `iobase_name[1]')
2.14 -../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: initializer element is not constant
2.15 -../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: (near initialization for `ioshift_name[1]')
2.16 -make[2]: *** [/home/dank/crosstool-0.28/build/arm-softfloat-linux-gnu/gcc-3.3.4-glibc-2.2.5/build-glibc/misc/ioperm.o] Error 1
2.17 -
2.18 -cf. "[SYSCTL] BUS_ISA -> CTL_BUS_ISA", http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html
2.19 -
2.20 ---- glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c.old 2003-02-20 14:22:24.000000000 -0800
2.21 -+++ glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c 2004-01-31 16:01:50.000000000 -0800
2.22 -@@ -47,6 +47,12 @@
2.23 - #include <asm/page.h>
2.24 - #include <sys/sysctl.h>
2.25 -
2.26 -+/* see http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html */
2.27 -+#include <linux/version.h>
2.28 -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23))
2.29 -+#define CTL_BUS_ISA BUS_ISA /* and hope it's not the one from linux/input.h */
2.30 -+#endif
2.31 -+
2.32 - #define PATH_ARM_SYSTYPE "/etc/arm_systype"
2.33 - #define PATH_CPUINFO "/proc/cpuinfo"
2.34 -
2.35 -@@ -80,7 +86,7 @@
2.36 - * Initialize I/O system. There are several ways to get the information
2.37 - * we need. Each is tried in turn until one succeeds.
2.38 - *
2.39 -- * 1. Sysctl (CTL_BUS, BUS_ISA, ISA_*). This is the preferred method
2.40 -+ * 1. Sysctl (CTL_BUS, CTL_BUS_ISA, ISA_*). This is the preferred method
2.41 - * but not all kernels support it.
2.42 - *
2.43 - * 2. Read the value (not the contents) of symlink PATH_ARM_SYSTYPE.
2.44 -@@ -100,8 +106,8 @@
2.45 - {
2.46 - char systype[256];
2.47 - int i, n;
2.48 -- static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
2.49 -- static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
2.50 -+ static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
2.51 -+ static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
2.52 - size_t len = sizeof(io.base);
2.53 -
2.54 - if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
2.55 -
2.56 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
3.1 --- a/patches/glibc/2.3.6/110-fix-pr398.patch Mon Jan 03 22:02:06 2011 +0100
3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
3.3 @@ -1,70 +0,0 @@
3.4 -Fixes error
3.5 -
3.6 -dl-runtime.c:222: error: parse error before "CFI_STARTPROC"
3.7 -make[2]: *** [crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/elf/dl-runtim
3.8 -e.o] Error 1
3.9 -make[2]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
3.10 -822/elf'
3.11 -make[1]: *** [elf/subdir_lib] Error 2
3.12 -make[1]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
3.13 -822'
3.14 -make: *** [all] Error 2
3.15 -
3.16 ------------------
3.17 -
3.18 -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=398
3.19 -http://sources.redhat.com/ml/libc-alpha/2004-07/msg00023.html
3.20 -
3.21 ------------------
3.22 -
3.23 -CVSROOT: /cvs/glibc
3.24 -Module name: libc
3.25 -Branch: glibc-2_3-branch
3.26 -Changes by: roland@sources.redhat.com 2006-02-23 22:36:51
3.27 -
3.28 -Modified files:
3.29 - sysdeps/s390/s390-64: dl-machine.h
3.30 - sysdeps/s390/s390-32: dl-machine.h
3.31 -
3.32 -Log message:
3.33 - 2004-07-10 GOTO Masanori <gotom@debian.or.jp>
3.34 -
3.35 - [BZ #398]
3.36 - * sysdeps/s390/s390-32/dl-machine.h: Include <sysdep.h> for CFI
3.37 - directive.
3.38 - * sysdeps/s390/s390-64/dl-machine.h: Likewise.
3.39 -
3.40 -Patches:
3.41 -http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-64/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.19.4.1&r2=1.19.4.2
3.42 -http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-32/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.20.4.1&r2=1.20.4.2
3.43 -
3.44 -===================================================================
3.45 -RCS file: /cvs/glibc/libc/sysdeps/s390/s390-64/dl-machine.h,v
3.46 -retrieving revision 1.19.4.1
3.47 -retrieving revision 1.19.4.2
3.48 -diff -u -r1.19.4.1 -r1.19.4.2
3.49 ---- libc/sysdeps/s390/s390-64/dl-machine.h 2005/10/17 04:57:27 1.19.4.1
3.50 -+++ libc/sysdeps/s390/s390-64/dl-machine.h 2006/02/23 22:36:51 1.19.4.2
3.51 -@@ -27,6 +27,7 @@
3.52 - #include <sys/param.h>
3.53 - #include <string.h>
3.54 - #include <link.h>
3.55 -+#include <sysdep.h>
3.56 -
3.57 - /* This is an older, now obsolete value. */
3.58 - #define EM_S390_OLD 0xA390
3.59 -===================================================================
3.60 -RCS file: /cvs/glibc/libc/sysdeps/s390/s390-32/dl-machine.h,v
3.61 -retrieving revision 1.20.4.1
3.62 -retrieving revision 1.20.4.2
3.63 -diff -u -r1.20.4.1 -r1.20.4.2
3.64 ---- libc/sysdeps/s390/s390-32/dl-machine.h 2005/10/17 04:57:27 1.20.4.1
3.65 -+++ libc/sysdeps/s390/s390-32/dl-machine.h 2006/02/23 22:36:51 1.20.4.2
3.66 -@@ -27,6 +27,7 @@
3.67 - #include <sys/param.h>
3.68 - #include <string.h>
3.69 - #include <link.h>
3.70 -+#include <sysdep.h>
3.71 -
3.72 - /* This is an older, now obsolete value. */
3.73 - #define EM_S390_OLD 0xA390
4.1 --- a/patches/glibc/2.3.6/120-allow-gcc-4.0-wordexp.patch Mon Jan 03 22:02:06 2011 +0100
4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
4.3 @@ -1,21 +0,0 @@
4.4 -../sysdeps/generic/wordexp.c: In function 'exec_comm':
4.5 -../sysdeps/generic/wordexp.c:815: sorry, unimplemented: inlining failed in call to 'exec_comm_child': function body not available
4.6 -../sysdeps/generic/wordexp.c:900: sorry, unimplemented: called from here
4.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
4.8 -
4.9 -I had to add the keyword 'inline' to get it to compile:
4.10 -
4.11 ---- glibc-2.3-20050307/sysdeps/generic/wordexp.c.old 2005-03-12 08:54:15.709253928 -0800
4.12 -+++ glibc-2.3-20050307/sysdeps/generic/wordexp.c 2005-03-12 08:54:51.242852000 -0800
4.13 -@@ -809,7 +809,7 @@
4.14 - }
4.15 -
4.16 - /* Function called by child process in exec_comm() */
4.17 --static void
4.18 -+static inline void
4.19 - internal_function __attribute__ ((always_inline))
4.20 - exec_comm_child (char *comm, int *fildes, int showerr, int noexec)
4.21 - {
4.22 -
4.23 -
4.24 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
5.1 --- a/patches/glibc/2.3.6/130-allow-gcc4-wcstol_l.patch Mon Jan 03 22:02:06 2011 +0100
5.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
5.3 @@ -1,59 +0,0 @@
5.4 -Fixes
5.5 -../sysdeps/wordsize-64/wcstol_l.c:11: error: '____wcstoll_l_internal' aliased to undefined symbol '____wcstol_l_internal'
5.6 -../sysdeps/wordsize-64/wcstol_l.c:12: error: '__wcstoll_l' aliased to undefined symbol '__wcstol_l'
5.7 -../sysdeps/wordsize-64/wcstol_l.c:13: error: 'wcstoll_l' aliased to undefined symbol '__wcstol_l'
5.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
5.9 -
5.10 -https://www.redhat.com/archives/fedora-cvs-commits/2005-March/msg00408.html
5.11 -%changelog
5.12 -+* Fri Mar 25 2005 Jakub Jelinek <jakub redhat com> 2.3.4-18
5.13 -+- fix build on 64-bit arches with new GCC
5.14 -
5.15 -Revision 1.4.2.1, Fri Mar 25 11:59:01 2005 UTC (3 weeks, 4 days ago) by jakub
5.16 -Branch: fedora-branch
5.17 -CVS Tags: fedora-glibc-2_3_4-18
5.18 -Changes since 1.4: +2 -0 lines
5.19 -Diff to previous 1.4 (colored)
5.20 -
5.21 - * sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
5.22 - * sysdeps/wordsize-64/wcstol_l.c: Likewise.
5.23 -
5.24 -
5.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
5.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
5.27 -
5.28 -===================================================================
5.29 -RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol_l.c,v
5.30 -retrieving revision 1.4
5.31 -retrieving revision 1.4.2.1
5.32 -diff -u -r1.4 -r1.4.2.1
5.33 ---- libc/sysdeps/wordsize-64/strtol_l.c 2003/03/03 09:45:12 1.4
5.34 -+++ libc/sysdeps/wordsize-64/strtol_l.c 2005/03/25 11:59:01 1.4.2.1
5.35 -@@ -8,7 +8,9 @@
5.36 - #undef ____strtoll_l_internal
5.37 - #undef __strtoll_l
5.38 - #undef strtoll_l
5.39 -+#if !UNSIGNED
5.40 - strong_alias (____strtol_l_internal, ____strtoll_l_internal)
5.41 - libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
5.42 - weak_alias (__strtol_l, __strtoll_l)
5.43 - weak_alias (__strtol_l, strtoll_l)
5.44 -+#endif
5.45 -===================================================================
5.46 -RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol_l.c,v
5.47 -retrieving revision 1.4
5.48 -retrieving revision 1.4.2.1
5.49 -diff -u -r1.4 -r1.4.2.1
5.50 ---- libc/sysdeps/wordsize-64/wcstol_l.c 2002/08/08 11:44:51 1.4
5.51 -+++ libc/sysdeps/wordsize-64/wcstol_l.c 2005/03/25 11:59:01 1.4.2.1
5.52 -@@ -8,6 +8,8 @@
5.53 - #undef ____wcstoll_l_internal
5.54 - #undef __wcstoll_l
5.55 - #undef wcstoll_l
5.56 -+#if !UNSIGNED
5.57 - strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
5.58 - weak_alias (__wcstol_l, __wcstoll_l)
5.59 - weak_alias (__wcstol_l, wcstoll_l)
5.60 -+#endif
5.61 -
5.62 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
6.1 --- a/patches/glibc/2.3.6/140-cygwin.patch Mon Jan 03 22:02:06 2011 +0100
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-sh-lowlevellock.patch Mon Jan 03 22:02:06 2011 +0100
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 --- a/patches/glibc/2.3.6/160-sh-memset.patch Mon Jan 03 22:02:06 2011 +0100
8.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
8.3 @@ -1,30 +0,0 @@
8.4 -From:
8.5 - http://sources.redhat.com/ml/libc-alpha/2005-07/msg00051.html
8.6 - http://sources.redhat.com/ml/crossgcc/2005-10/msg00035.html
8.7 -
8.8 -Message-ID: <434576E1.6020305@sscd.de>
8.9 -Date: Thu, 06 Oct 2005 21:11:29 +0200
8.10 -From: Alexander Sieb <sieb at sscd dot de>
8.11 -To: crossgcc at sourceware dot org
8.12 -Subject: Crosstool sh4-linux-gcc-4.0.2-glibc-2.3.5 patches
8.13 -
8.14 -On sh[34]-linux, memset function does not work if 2nd argument is negative
8.15 -and 3rd argument is greater than 12.
8.16 -for example, memset(ptr, "\xda", 20) sets 0xff instead of 0xda.
8.17 -
8.18 -Attached patch fixes this problem.
8.19 -
8.20 - * sysdeps/sh/memset.S (memset): Correct 2nd argument handling.
8.21 -
8.22 ---- glibc-2.3.5.old/sysdeps/sh/memset.S 29 Apr 2003 22:47:18 -0000 1.4
8.23 -+++ glibc-2.3.5/sysdeps/sh/memset.S 23 Jul 2005 08:37:21 -0000
8.24 -@@ -28,6 +28,7 @@ ENTRY(memset)
8.25 - bt.s L_byte_loop_init
8.26 - mov r4,r7
8.27 -
8.28 -+ extu.b r5,r5
8.29 - swap.b r5,r1
8.30 - or r1,r5
8.31 - swap.w r5,r1
8.32 -
8.33 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
9.1 --- a/patches/glibc/2.3.6/170-allow-gcc-4.0-arm.patch Mon Jan 03 22:02:06 2011 +0100
9.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
9.3 @@ -1,35 +0,0 @@
9.4 -Fixes
9.5 -In file included from dynamic-link.h:22,
9.6 - from dl-reloc.c:265:
9.7 -../sysdeps/arm/dl-machine.h: In function '_dl_relocate_object':
9.8 -../sysdeps/arm/dl-machine.h:371: error: invalid storage class for function 'fix_bad_pc24'
9.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'
9.10 -
9.11 -when building glibc-2.3.6 with gcc-4.0
9.12 -
9.13 -Like
9.14 -http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/arm/dl-machine.h.diff?r1=1.51&r2=1.52&cvsroot=glibc
9.15 -but fixes fix_bad_pc24.
9.16 -
9.17 -
9.18 ---- glibc-2.3.6-orig/sysdeps/arm/dl-machine.h Sun Mar 20 17:54:37 2005
9.19 -+++ glibc-2.3.6/sysdeps/arm/dl-machine.h Sun Mar 20 17:57:32 2005
9.20 -@@ -357,7 +357,14 @@
9.21 - #ifdef RESOLVE
9.22 -
9.23 - /* Deal with an out-of-range PC24 reloc. */
9.24 --static Elf32_Addr
9.25 -+#if __GNUC__ >= 4
9.26 -+ auto inline Elf32_Addr
9.27 -+#else
9.28 -+ static inline Elf32_Addr
9.29 -+#endif
9.30 -+#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
9.31 -+ __attribute ((always_inline))
9.32 -+#endif
9.33 - fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value)
9.34 - {
9.35 - static void *fix_page;
9.36 -
9.37 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
9.38 -with a little editing by dank@kegel.com
10.1 --- a/patches/glibc/2.3.6/180-allow-gcc-4.0-elf.patch Mon Jan 03 22:02:06 2011 +0100
10.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
10.3 @@ -1,67 +0,0 @@
10.4 -From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
10.5 -Fixes
10.6 - rtld.c: In function '_dl_start':
10.7 - dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
10.8 - dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
10.9 -when compiling glibc-2.3.4 with gcc-4.0
10.10 -
10.11 -But see also
10.12 -http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
10.13 -and
10.14 -http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
10.15 -which seem to propose less radical fixes?
10.16 -
10.17 -Aha. See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
10.18 -
10.19 ---- glibc-2.3.6.orig/elf/dynamic-link.h 2005-03-12 18:12:37.000000000 -0800
10.20 -+++ glibc-2.3.6/elf/dynamic-link.h 2005-03-12 18:12:59.777820848 -0800
10.21 -@@ -19,47 +19,6 @@
10.22 -
10.23 - #include <elf.h>
10.24 - #include <assert.h>
10.25 --
10.26 --#ifdef RESOLVE
10.27 --/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
10.28 -- ElfW(Addr), because not all architectures can assume that the
10.29 -- relocated address is properly aligned, whereas the compiler is
10.30 -- entitled to assume that a pointer to a type is properly aligned for
10.31 -- the type. Even if we cast the pointer back to some other type with
10.32 -- less strict alignment requirements, the compiler might still
10.33 -- remember that the pointer was originally more aligned, thereby
10.34 -- optimizing away alignment tests or using word instructions for
10.35 -- copying memory, breaking the very code written to handle the
10.36 -- unaligned cases. */
10.37 --# if ! ELF_MACHINE_NO_REL
10.38 --auto inline void __attribute__((always_inline))
10.39 --elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
10.40 -- const ElfW(Sym) *sym, const struct r_found_version *version,
10.41 -- void *const reloc_addr);
10.42 --auto inline void __attribute__((always_inline))
10.43 --elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
10.44 -- void *const reloc_addr);
10.45 --# endif
10.46 --# if ! ELF_MACHINE_NO_RELA
10.47 --auto inline void __attribute__((always_inline))
10.48 --elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
10.49 -- const ElfW(Sym) *sym, const struct r_found_version *version,
10.50 -- void *const reloc_addr);
10.51 --auto inline void __attribute__((always_inline))
10.52 --elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
10.53 -- void *const reloc_addr);
10.54 --# endif
10.55 --# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
10.56 --auto inline void __attribute__((always_inline))
10.57 --elf_machine_lazy_rel (struct link_map *map,
10.58 -- ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
10.59 --# else
10.60 --auto inline void __attribute__((always_inline))
10.61 --elf_machine_lazy_rel (struct link_map *map,
10.62 -- ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
10.63 --# endif
10.64 --#endif
10.65 --
10.66 - #include <dl-machine.h>
10.67 -
10.68 - #ifndef VERSYMIDX
10.69 -
10.70 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
11.1 --- a/patches/glibc/2.3.6/190-configure-apple-as.patch Mon Jan 03 22:02:06 2011 +0100
11.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
11.3 @@ -1,25 +0,0 @@
11.4 -http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
11.5 -http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
11.6 -
11.7 -The following makes it possible to configure glibc-2.3.2 on Mac OS X,
11.8 -where the assembler but doesn't understand the --version flag.
11.9 -
11.10 -Fixes the symptom
11.11 -checking whether ld is GNU ld... no
11.12 -checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
11.13 -checking version of /usr/libexec/gcc/darwin/ppc/as...
11.14 -<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
11.15 -
11.16 ---- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
11.17 -+++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
11.18 -@@ -3914,7 +3914,7 @@
11.19 - # Found it, now check the version.
11.20 - echo "$as_me:$LINENO: checking version of $AS" >&5
11.21 - echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
11.22 -- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
11.23 -+ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
11.24 - case $ac_prog_version in
11.25 - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
11.26 - 2.1[3-9]*)
11.27 -
11.28 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
12.1 --- a/patches/glibc/2.3.6/200-use_short_for_fnstsw.patch Mon Jan 03 22:02:06 2011 +0100
12.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
12.3 @@ -1,18 +0,0 @@
12.4 -Original patch from H.J. Lu, as reported there:
12.5 -http://www.nabble.com/PATCH:-Use-short-for-fnstsw-td14775171.html
12.6 -
12.7 -fnstsw stores 16bit into %ax. The upper 16bit of %eax is unchanged.
12.8 -The new assembler (binutils-2.18.50.0.4 and up) will disallow "fnstsw %eax".
12.9 -
12.10 -diff -dur glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c
12.11 ---- glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c 2004-03-05 11:14:48.000000000 +0100
12.12 -+++ glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c 2008-06-24 10:56:14.000000000 +0200
12.13 -@@ -26,7 +26,7 @@
12.14 - int
12.15 - fetestexcept (int excepts)
12.16 - {
12.17 -- int temp;
12.18 -+ short temp;
12.19 - int xtemp = 0;
12.20 -
12.21 - /* Get current exceptions. */
13.1 --- a/patches/glibc/2.3.6/210-fix-pr631.patch Mon Jan 03 22:02:06 2011 +0100
13.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
13.3 @@ -1,45 +0,0 @@
13.4 -From dank@kegel.com
13.5 -Wed Jun 15 09:12:43 PDT 2005
13.6 -
13.7 -Fixes
13.8 -
13.9 -build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
13.10 -build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
13.11 -... 53 lines deleted ...
13.12 -build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
13.13 -collect2: ld returned 1 exit status
13.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
13.15 -
13.16 -when building glibc with --enable-static-nss.
13.17 -
13.18 -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
13.19 -
13.20 ---- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
13.21 -+++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
13.22 -@@ -487,7 +487,7 @@
13.23 -
13.24 - # The static libraries.
13.25 - ifeq (yes,$(build-static))
13.26 --link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
13.27 -+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
13.28 - else
13.29 - ifeq (yes,$(build-shared))
13.30 - # We can try to link the programs with lib*_pic.a...
13.31 ---- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
13.32 -+++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
13.33 -@@ -115,6 +115,13 @@
13.34 - install-bin-script = ldd
13.35 - endif
13.36 -
13.37 -+ifeq (yes,$(build-static-nss))
13.38 -+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
13.39 -+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
13.40 -+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
13.41 -+ $(resolvobjdir)/libresolv.a
13.42 -+endif
13.43 -+
13.44 - others = sprof sln
13.45 - install-bin = sprof
13.46 - others-static = sln
13.47 -
13.48 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
14.1 --- a/patches/glibc/2.3.6/220-fp-byteorder.patch Mon Jan 03 22:02:06 2011 +0100
14.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
14.3 @@ -1,205 +0,0 @@
14.4 -Taken from http://sources.redhat.com/ml/crossgcc/2004-02/msg00104.html
14.5 -Author: addsub@eyou.com
14.6 -Target: ARM
14.7 -
14.8 -Fixes http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/920501-8.c
14.9 -and makes printf("%f", 1.0) work.
14.10 -
14.11 -Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00115.html :
14.12 - It ... fixes the 'printf("%f\n", 0.5); prints 0.000000' and general 'floating point
14.13 - is broken' on my big-endian hardfloat FPA ARM platform. ...
14.14 - It's definitely needed for hardfloat. So I'd think it's needed for
14.15 - big-endian systems in any case, and for VFP on little-endian systems
14.16 - too. Someone would have to verify that though.
14.17 -
14.18 -Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00123.html
14.19 - I just had a look at glibc-20040830, and [this patch] is still needed and useful
14.20 - for this version. glibc-20040830 out-of-the-box still contains the
14.21 - following wrong assumptions:
14.22 - - sysdeps/arm/bits/endian.h: float word order is big endian (which it is
14.23 - not on vfp systems)
14.24 - - sysdeps/arm/gmp-mparam.h: IEEE doubles are mixed endian (which they
14.25 - are not on big endian systems, neither on vfp systems)
14.26 - - sysdeps/arm/ieee754.h: IEEE doubles are in little endian byte order
14.27 - (which they are not on big endian systems)
14.28 - [This patch] seems the right solution for all of these issues.
14.29 -
14.30 -Dimitry Andric wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00132.html :
14.31 - It's even needed for glibc CVS, AFAICS.
14.32 - The patch hunk which modifies glibc.new/sysdeps/arm/bits/endian.h
14.33 - (currently at version 1.4) is only needed for proper VFP operation.
14.34 - But the hunk which modifies sysdeps/arm/gmp-mparam.h, and the hunk
14.35 - that deletes sysdeps/arm/ieee754.h (yes, this IS correct), are needed
14.36 - for proper operation of *any* FP model on big endian ARM.
14.37 -
14.38 -See also discussion in followups to
14.39 -http://sources.redhat.com/ml/crossgcc/2004-05/msg00245.html)
14.40 -
14.41 -Message-ID: <276985760.37584@eyou.com>
14.42 -Received: from unknown (HELO eyou.com) (172.16.2.2)
14.43 - by 0.0.0.0 with SMTP; Tue, 17 Feb 2004 10:42:40 +0800
14.44 -Received: (qmail 8238 invoked by uid 65534); 17 Feb 2004 10:42:38 +0800
14.45 -Date: 17 Feb 2004 10:42:38 +0800
14.46 -Message-ID: <20040217104238.8237.qmail@eyou.com>
14.47 -From: "add" <addsub@eyou.com>
14.48 -To: dank@kegel.com
14.49 -Reply-To: "add" <addsub@eyou.com>
14.50 -Subject: Re: problem while building arm vfp softfloat gcc `
14.51 -
14.52 -Hi, Dan, This is a patch I applied to my glibc-2.3.2, then my softfloat
14.53 -toolchain can printf("%f\n",1.0). So you may have a try of this
14.54 -
14.55 -
14.56 -diff -uNrp glibc.old/sysdeps/arm/bits/endian.h glibc.new/sysdeps/arm/bits/endian.h
14.57 ---- glibc.old/sysdeps/arm/bits/endian.h 1999-04-12 11:59:13.000000000 -0400
14.58 -+++ glibc.new/sysdeps/arm/bits/endian.h 2004-02-12 09:15:13.000000000 -0500
14.59 -@@ -9,4 +9,9 @@
14.60 - #else
14.61 - #define __BYTE_ORDER __LITTLE_ENDIAN
14.62 - #endif
14.63 -+
14.64 -+#ifdef __VFP_FP__
14.65 -+#define __FLOAT_WORD_ORDER __BYTE_ORDER
14.66 -+#else
14.67 - #define __FLOAT_WORD_ORDER __BIG_ENDIAN
14.68 -+#endif
14.69 -diff -uNrp glibc.old/sysdeps/arm/gmp-mparam.h glibc.new/sysdeps/arm/gmp-mparam.h
14.70 ---- glibc.old/sysdeps/arm/gmp-mparam.h 2001-07-07 15:21:19.000000000 -0400
14.71 -+++ glibc.new/sysdeps/arm/gmp-mparam.h 2004-02-12 09:15:13.000000000 -0500
14.72 -@@ -26,5 +26,13 @@ MA 02111-1307, USA. */
14.73 - #define BITS_PER_SHORTINT 16
14.74 - #define BITS_PER_CHAR 8
14.75 -
14.76 --#define IEEE_DOUBLE_BIG_ENDIAN 0
14.77 --#define IEEE_DOUBLE_MIXED_ENDIAN 1
14.78 -+#if defined(__ARMEB__)
14.79 -+# define IEEE_DOUBLE_MIXED_ENDIAN 0
14.80 -+# define IEEE_DOUBLE_BIG_ENDIAN 1
14.81 -+#elif defined(__VFP_FP__)
14.82 -+# define IEEE_DOUBLE_MIXED_ENDIAN 0
14.83 -+# define IEEE_DOUBLE_BIG_ENDIAN 0
14.84 -+#else
14.85 -+# define IEEE_DOUBLE_BIG_ENDIAN 0
14.86 -+# define IEEE_DOUBLE_MIXED_ENDIAN 1
14.87 -+#endif
14.88 -diff -uNrp glibc.old/sysdeps/arm/ieee754.h glibc.new/sysdeps/arm/ieee754.h
14.89 ---- glibc.old/sysdeps/arm/ieee754.h 2001-07-07 15:21:19.000000000 -0400
14.90 -+++ glibc.new/sysdeps/arm/ieee754.h 1969-12-31 19:00:00.000000000 -0500
14.91 -@@ -1,115 +0,0 @@
14.92 --/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
14.93 -- This file is part of the GNU C Library.
14.94 --
14.95 -- The GNU C Library is free software; you can redistribute it and/or
14.96 -- modify it under the terms of the GNU Lesser General Public
14.97 -- License as published by the Free Software Foundation; either
14.98 -- version 2.1 of the License, or (at your option) any later version.
14.99 --
14.100 -- The GNU C Library is distributed in the hope that it will be useful,
14.101 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
14.102 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14.103 -- Lesser General Public License for more details.
14.104 --
14.105 -- You should have received a copy of the GNU Lesser General Public
14.106 -- License along with the GNU C Library; if not, write to the Free
14.107 -- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
14.108 -- 02111-1307 USA. */
14.109 --
14.110 --#ifndef _IEEE754_H
14.111 --
14.112 --#define _IEEE754_H 1
14.113 --#include <features.h>
14.114 --
14.115 --#include <endian.h>
14.116 --
14.117 --__BEGIN_DECLS
14.118 --
14.119 --union ieee754_float
14.120 -- {
14.121 -- float f;
14.122 --
14.123 -- /* This is the IEEE 754 single-precision format. */
14.124 -- struct
14.125 -- {
14.126 -- unsigned int mantissa:23;
14.127 -- unsigned int exponent:8;
14.128 -- unsigned int negative:1;
14.129 -- } ieee;
14.130 --
14.131 -- /* This format makes it easier to see if a NaN is a signalling NaN. */
14.132 -- struct
14.133 -- {
14.134 -- unsigned int mantissa:22;
14.135 -- unsigned int quiet_nan:1;
14.136 -- unsigned int exponent:8;
14.137 -- unsigned int negative:1;
14.138 -- } ieee_nan;
14.139 -- };
14.140 --
14.141 --#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
14.142 --
14.143 --
14.144 --union ieee754_double
14.145 -- {
14.146 -- double d;
14.147 --
14.148 -- /* This is the IEEE 754 double-precision format. */
14.149 -- struct
14.150 -- {
14.151 -- unsigned int mantissa0:20;
14.152 -- unsigned int exponent:11;
14.153 -- unsigned int negative:1;
14.154 -- unsigned int mantissa1:32;
14.155 -- } ieee;
14.156 --
14.157 -- /* This format makes it easier to see if a NaN is a signalling NaN. */
14.158 -- struct
14.159 -- {
14.160 -- unsigned int mantissa0:19;
14.161 -- unsigned int quiet_nan:1;
14.162 -- unsigned int exponent:11;
14.163 -- unsigned int negative:1;
14.164 -- unsigned int mantissa1:32;
14.165 -- } ieee_nan;
14.166 -- };
14.167 --
14.168 --#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
14.169 --
14.170 --
14.171 --/* The following two structures are correct for `new' floating point systems but
14.172 -- wrong for the old FPPC. The only solution seems to be to avoid their use on
14.173 -- old hardware. */
14.174 --
14.175 --union ieee854_long_double
14.176 -- {
14.177 -- long double d;
14.178 --
14.179 -- /* This is the IEEE 854 double-extended-precision format. */
14.180 -- struct
14.181 -- {
14.182 -- unsigned int exponent:15;
14.183 -- unsigned int empty:16;
14.184 -- unsigned int negative:1;
14.185 -- unsigned int mantissa1:32;
14.186 -- unsigned int mantissa0:32;
14.187 -- } ieee;
14.188 --
14.189 -- /* This is for NaNs in the IEEE 854 double-extended-precision format. */
14.190 -- struct
14.191 -- {
14.192 -- unsigned int exponent:15;
14.193 -- unsigned int empty:16;
14.194 -- unsigned int negative:1;
14.195 -- unsigned int mantissa1:32;
14.196 -- unsigned int mantissa0:30;
14.197 -- unsigned int quiet_nan:1;
14.198 -- unsigned int one:1;
14.199 -- } ieee_nan;
14.200 -- };
14.201 --
14.202 --#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
14.203 --
14.204 --__END_DECLS
14.205 --
14.206 --#endif /* ieee754.h */
14.207 -
14.208 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
15.1 --- a/patches/glibc/2.3.6/230-mips-bootstrap-gcc-header-install.patch Mon Jan 03 22:02:06 2011 +0100
15.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
15.3 @@ -1,37 +0,0 @@
15.4 -http://sourceware.org/ml/crossgcc/2005-05/msg00165.html
15.5 -Fixes a MIPS build problem (unrelated to NPTL)
15.6 -
15.7 -Message-ID: <428E8B24.1000201@realitydiluted.com>
15.8 -Date: Fri, 20 May 2005 20:13:08 -0500
15.9 -From: "Steven J dot Hill" <sjhill at realitydiluted dot com>
15.10 -To: crossgcc at sources dot redhat dot com, toolchain at gentoo dot org,
15.11 - Shay_Gal-On at pmc-sierra dot com, TheNop at gmx dot net
15.12 -Subject: New NPTL patches for crosstools and MIPS NPTL patches....
15.13 -
15.14 -Greetings.
15.15 -
15.16 -I have uploaded the latest NPTL patch for crosstool-0.34. I have also
15.17 -uploaded a tarball of the patches necessary to build a MIPS NPTL
15.18 -cross toolchain. To build a MIPS NPTL toolchain you will need the
15.19 -released version of binutils-2.16 and the absolute latest GCC and
15.20 -glibc code from the HEAD of cvs. Use the 'demo-mips-nptl.sh' script
15.21 -to build the toolchain. Please report bugs or issues to the crossgcc
15.22 -mailing list. Here is the link off of my FTP site:
15.23 -
15.24 - ftp://ftp.realitydiluted.com/crosstools/crosstool-0.34/
15.25 -
15.26 -[Note: BOOTSTRAP_GCC is set by crosstool.sh when invoking make install-headers]
15.27 -
15.28 -diff -ur glibc-2.4.0-20050406/sysdeps/mips/mips32/Makefile glibc-2.4.0-20050406-patched/sysdeps/mips/mips32/Makefile
15.29 ---- glibc-2.4.0-20050406/sysdeps/mips/mips32/Makefile 2003-03-29 02:15:28.000000000 -0600
15.30 -+++ glibc-2.4.0-20050406-patched/sysdeps/mips/mips32/Makefile 2005-04-12 21:36:51.318837655 -0500
15.31 -@@ -1,3 +1,7 @@
15.32 -+ifeq ($(filter -DBOOTSTRAP_GCC,$(CFLAGS)),)
15.33 - ifeq ($(filter -mabi=32,$(CC)),)
15.34 - CC += -mabi=32
15.35 - endif
15.36 -+else
15.37 -+CC += -D"_MIPS_SZPTR=32"
15.38 -+endif
15.39 -
15.40 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
16.1 --- a/patches/glibc/2.3.6/240-make-install-lib-all.patch Mon Jan 03 22:02:06 2011 +0100
16.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
16.3 @@ -1,26 +0,0 @@
16.4 -From http://svn.exactcode.de/t2/trunk/package/base/glibc32/make-install-lib-all.patch
16.5 -Rule to install all needed libraries, not just the ones installed by install-lib,
16.6 -yet not install programs.
16.7 -Needed because we can't use the main install target, as we can't build programs before
16.8 -we have the final gcc installed; linking fails because libeh.a is not present,
16.9 -and glibc insists on linking programs with that library.
16.10 -
16.11 -diff -Naur glibc-2.3.4.orig/Makerules glibc-2.3.4/Makerules
16.12 ---- glibc-2.3.4.orig/Makerules 2004-12-15 20:52:39.000000000 +0200
16.13 -+++ glibc-2.3.4/Makerules 2005-02-19 15:16:31.415125176 +0200
16.14 -@@ -844,6 +844,13 @@
16.15 - installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
16.16 - $(inst_libdir)/$(patsubst %,$(libtype$o),\
16.17 - $(libprefix)$(libc-name)))
16.18 -+
16.19 -+install-lib-all: $(inst_slibdir)/libc.so$(libc.so-version) \
16.20 -+ $(inst_slibdir)/libc-$(version).so \
16.21 -+ $(inst_libdir)/libc.so \
16.22 -+ $(inst_libdir)/libc.a \
16.23 -+ install-lib
16.24 -+
16.25 - install: $(installed-libcs)
16.26 - $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
16.27 - $(make-target-directory)
16.28 -
16.29 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
17.1 --- a/patches/glibc/2.3.6/250-weakalias.patch Mon Jan 03 22:02:06 2011 +0100
17.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
17.3 @@ -1,45 +0,0 @@
17.4 -This one was taken from debian.
17.5 -
17.6 -# DP: Description: Fix __bind redefinition problem
17.7 -# DP: Related bugs:
17.8 -# DP: Dpatch author: Phil Blundell
17.9 -# DP: Patch author: Daniel Jacobowitz
17.10 -# DP: Upstream status: In CVS
17.11 -# DP: Status Details:
17.12 -# DP: Date: 2005-12-25
17.13 -
17.14 -Index: sysdeps/unix/sysv/linux/arm/socket.S
17.15 -===================================================================
17.16 -RCS file: /cvs/glibc/ports/sysdeps/unix/sysv/linux/arm/socket.S,v
17.17 -retrieving revision 1.12
17.18 -retrieving revision 1.13
17.19 -diff -u -r1.12 -r1.13
17.20 ---- glibc-2.3.6.ds1.orig/sysdeps/unix/sysv/linux/arm/socket.S 4 Dec 2004 21:20:16 -0000 1.12
17.21 -+++ glibc-2.3.6.ds1/sysdeps/unix/sysv/linux/arm/socket.S 27 Oct 2005 18:50:12 -0000 1.13
17.22 -@@ -1,4 +1,6 @@
17.23 --/* Copyright (C) 1995, 1996, 1997, 1998, 2003 Free Software Foundation, Inc.
17.24 -+/* Copyright (C) 1995, 1996, 1997, 1998, 2003, 2004, 2005
17.25 -+ Free Software Foundation, Inc.
17.26 -+
17.27 - This file is part of the GNU C Library.
17.28 -
17.29 - The GNU C Library is free software; you can redistribute it and/or
17.30 -@@ -32,7 +34,11 @@
17.31 - The .S files for the other calls just #define socket and #include this. */
17.32 -
17.33 - #ifndef __socket
17.34 -+#ifndef NO_WEAK_ALIAS
17.35 - #define __socket P(__,socket)
17.36 -+#else
17.37 -+#define __socket socket
17.38 -+#endif
17.39 - #endif
17.40 -
17.41 - #define PUSHARGS_1 str a1, [sp, $-4]!
17.42 -@@ -120,4 +126,6 @@
17.43 -
17.44 - PSEUDO_END (__socket)
17.45 -
17.46 -+#ifndef NO_WEAK_ALIAS
17.47 - weak_alias (__socket, socket)
17.48 -+#endif
18.1 --- a/patches/glibc/2.3.6/260-csu-Makefile.patch Mon Jan 03 22:02:06 2011 +0100
18.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
18.3 @@ -1,39 +0,0 @@
18.4 -Use printf instead of echo for some shells.
18.5 -
18.6 -http://www.cygwin.com/ml/libc-alpha/2005-02/msg00123.html
18.7 -
18.8 -This patch does not generate invalid csu/version-info.h which has
18.9 -unterminating " line because some /bin/sh cannot parse correctly. The
18.10 -previous discussion was:
18.11 -
18.12 - http://sources.redhat.com/ml/libc-alpha/2004-08/msg00129.html
18.13 - http://sources.redhat.com/ml/libc-alpha/2004-08/msg00145.html
18.14 -
18.15 -This patch gets rid of all this issue because the conclusion of the
18.16 -discussion was to use printf instead of echo. Roland, could you look
18.17 -at it again?
18.18 -
18.19 -Regards,
18.20 --- gotom
18.21 -
18.22 -2005-02-26 GOTO Masanori <gotom@debian.or.jp>
18.23 -
18.24 - * csu/Makefile: Use printf instead of echo for some shells.
18.25 -
18.26 -Index: csu/Makefile
18.27 -===================================================================
18.28 -RCS file: /cvs/glibc/libc/csu/Makefile,v
18.29 -retrieving revision 1.75
18.30 -diff -u -p -r1.75 Makefile
18.31 ---- glibc/csu/Makefile 3 Jan 2005 17:57:14 -0000 1.75
18.32 -+++ glibc.new/csu/Makefile 27 Feb 2005 01:17:49 -0000
18.33 -@@ -241,7 +241,7 @@ $(objpfx)version-info.h: $(common-objpfx
18.34 - esac; \
18.35 - files="$(all-Banner-files)"; \
18.36 - if test -n "$$files"; then \
18.37 -- echo "\"Available extensions:\\n\""; \
18.38 -+ printf '"Available extensions:\\n"\n'; \
18.39 - sed -e '/^#/d' -e 's/^[[:space:]]*/ /' \
18.40 - -e 's/^\(.*\)$$/\"\1\\n\"/' $$files; \
18.41 - fi) > $@T
18.42 -
19.1 --- a/patches/glibc/2.3.6/270-alpha-asm_page.patch Mon Jan 03 22:02:06 2011 +0100
19.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
19.3 @@ -1,26 +0,0 @@
19.4 -2008-06-07 Mike Frysinger <vapier@gentoo.org>
19.5 -
19.6 - * sysdeps/unix/sysv/linux/alpha/sys/user.h: Copy page.h definitions
19.7 - from the kernel header to sys/user.h and remove the #include of
19.8 - sys/user.h.
19.9 -
19.10 ---- a/sysdeps/unix/sysv/linux/alpha/sys/user.h
19.11 -+++ b/sysdeps/unix/sysv/linux/alpha/sys/user.h
19.12 -@@ -23,7 +23,6 @@
19.13 - only. Don't read too much into it. Don't use it for anything other
19.14 - than gdb/strace unless you know what you are doing. */
19.15 -
19.16 --#include <asm/page.h>
19.17 - #include <asm/reg.h>
19.18 -
19.19 - struct user
19.20 -@@ -41,6 +40,9 @@ struct user
19.21 - char u_comm[32]; /* user command name */
19.22 - };
19.23 -
19.24 -+#define PAGE_SHIFT 13
19.25 -+#define PAGE_SIZE (1 << PAGE_SHIFT)
19.26 -+#define PAGE_MASK (~(PAGE_SIZE-1))
19.27 - #define NBPG PAGE_SIZE
19.28 - #define UPAGES 1
19.29 - #define HOST_TEXT_START_ADDR (u.start_code)
20.1 --- a/patches/glibc/2.3.6/280-alpha-asm_elf.patch Mon Jan 03 22:02:06 2011 +0100
20.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
20.3 @@ -1,194 +0,0 @@
20.4 -since the kernel no longer provides asm/elf.h, the sys/procfs.h from the
20.5 -common code, alpha, and sh fail when used. this should things up.
20.6 --mike
20.7 -
20.8 -2008-06-07 Mike Frysinger <vapier@gentoo.org>
20.9 -
20.10 - * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub.
20.11 - * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h
20.12 - definitions from the kernel header to sys/procfs.h and remove the
20.13 - #include of asm/elf.h.
20.14 - * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise.
20.15 -
20.16 -*Attachment: signature.asc <msg00012/signature.asc>*
20.17 -/Description:/ This is a digitally signed message part.
20.18 -
20.19 -2008-06-07 Mike Frysinger <vapier@gentoo.org>
20.20 -
20.21 - * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub.
20.22 - * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h
20.23 - definitions from the kernel header to sys/procfs.h and remove the
20.24 - #include of asm/elf.h.
20.25 - * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise.
20.26 -
20.27 ---- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
20.28 -+++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
20.29 -@@ -29,10 +29,23 @@
20.30 - #include <sys/types.h>
20.31 - #include <sys/ucontext.h>
20.32 - #include <sys/user.h>
20.33 --#include <asm/elf.h>
20.34 -
20.35 - __BEGIN_DECLS
20.36 -
20.37 -+/*
20.38 -+ * The OSF/1 version of <sys/procfs.h> makes gregset_t 46 entries long.
20.39 -+ * I have no idea why that is so. For now, we just leave it at 33
20.40 -+ * (32 general regs + processor status word).
20.41 -+ */
20.42 -+#define ELF_NGREG 33
20.43 -+#define ELF_NFPREG 32
20.44 -+
20.45 -+typedef unsigned long elf_greg_t;
20.46 -+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
20.47 -+
20.48 -+typedef double elf_fpreg_t;
20.49 -+typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
20.50 -+
20.51 - struct elf_siginfo
20.52 - {
20.53 - int si_signo; /* Signal number. */
20.54 ---- a/sysdeps/unix/sysv/linux/sh/sys/procfs.h
20.55 -+++ b/sysdeps/unix/sysv/linux/sh/sys/procfs.h
20.56 -@@ -29,10 +29,19 @@
20.57 - #include <sys/types.h>
20.58 - #include <sys/ucontext.h>
20.59 - #include <sys/user.h>
20.60 --#include <asm/elf.h>
20.61 -
20.62 - __BEGIN_DECLS
20.63 -
20.64 -+/*
20.65 -+ * ELF register definitions...
20.66 -+ */
20.67 -+typedef unsigned long elf_greg_t;
20.68 -+
20.69 -+#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))
20.70 -+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
20.71 -+
20.72 -+typedef struct user_fpu_struct elf_fpregset_t;
20.73 -+
20.74 - struct elf_siginfo
20.75 - {
20.76 - int si_signo; /* Signal number. */
20.77 ---- a/sysdeps/unix/sysv/linux/sys/procfs.h
20.78 -+++ b/sysdeps/unix/sysv/linux/sys/procfs.h
20.79 -@@ -1,115 +1,2 @@
20.80 --/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
20.81 -- This file is part of the GNU C Library.
20.82 --
20.83 -- The GNU C Library is free software; you can redistribute it and/or
20.84 -- modify it under the terms of the GNU Lesser General Public
20.85 -- License as published by the Free Software Foundation; either
20.86 -- version 2.1 of the License, or (at your option) any later version.
20.87 --
20.88 -- The GNU C Library is distributed in the hope that it will be useful,
20.89 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
20.90 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20.91 -- Lesser General Public License for more details.
20.92 --
20.93 -- You should have received a copy of the GNU Lesser General Public
20.94 -- License along with the GNU C Library; if not, write to the Free
20.95 -- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20.96 -- 02111-1307 USA. */
20.97 --
20.98 --#ifndef _SYS_PROCFS_H
20.99 --#define _SYS_PROCFS_H 1
20.100 --
20.101 --/* This is somehow modelled after the file of the same name on SysVr4
20.102 -- systems. It provides a definition of the core file format for ELF
20.103 -- used on Linux. */
20.104 --
20.105 --#include <features.h>
20.106 --#include <signal.h>
20.107 --#include <sys/time.h>
20.108 --#include <sys/types.h>
20.109 --#include <sys/ucontext.h>
20.110 --#include <sys/user.h>
20.111 --#include <asm/elf.h>
20.112 --
20.113 --__BEGIN_DECLS
20.114 --
20.115 --struct elf_siginfo
20.116 -- {
20.117 -- int si_signo; /* Signal number. */
20.118 -- int si_code; /* Extra code. */
20.119 -- int si_errno; /* Errno. */
20.120 -- };
20.121 --
20.122 --/* Definitions to generate Intel SVR4-like core files. These mostly
20.123 -- have the same names as the SVR4 types with "elf_" tacked on the
20.124 -- front to prevent clashes with linux definitions, and the typedef
20.125 -- forms have been avoided. This is mostly like the SVR4 structure,
20.126 -- but more Linuxy, with things that Linux does not support and which
20.127 -- gdb doesn't really use excluded. Fields present but not used are
20.128 -- marked with "XXX". */
20.129 --struct elf_prstatus
20.130 -- {
20.131 --#if 0
20.132 -- long int pr_flags; /* XXX Process flags. */
20.133 -- short int pr_why; /* XXX Reason for process halt. */
20.134 -- short int pr_what; /* XXX More detailed reason. */
20.135 --#endif
20.136 -- struct elf_siginfo pr_info; /* Info associated with signal. */
20.137 -- short int pr_cursig; /* Current signal. */
20.138 -- unsigned long int pr_sigpend; /* Set of pending signals. */
20.139 -- unsigned long int pr_sighold; /* Set of held signals. */
20.140 --#if 0
20.141 -- struct sigaltstack pr_altstack; /* Alternate stack info. */
20.142 -- struct sigaction pr_action; /* Signal action for current sig. */
20.143 --#endif
20.144 -- __pid_t pr_pid;
20.145 -- __pid_t pr_ppid;
20.146 -- __pid_t pr_pgrp;
20.147 -- __pid_t pr_sid;
20.148 -- struct timeval pr_utime; /* User time. */
20.149 -- struct timeval pr_stime; /* System time. */
20.150 -- struct timeval pr_cutime; /* Cumulative user time. */
20.151 -- struct timeval pr_cstime; /* Cumulative system time. */
20.152 --#if 0
20.153 -- long int pr_instr; /* Current instruction. */
20.154 --#endif
20.155 -- elf_gregset_t pr_reg; /* GP registers. */
20.156 -- int pr_fpvalid; /* True if math copro being used. */
20.157 -- };
20.158 --
20.159 --
20.160 --#define ELF_PRARGSZ (80) /* Number of chars for args */
20.161 --
20.162 --struct elf_prpsinfo
20.163 -- {
20.164 -- char pr_state; /* Numeric process state. */
20.165 -- char pr_sname; /* Char for pr_state. */
20.166 -- char pr_zomb; /* Zombie. */
20.167 -- char pr_nice; /* Nice val. */
20.168 -- unsigned long int pr_flag; /* Flags. */
20.169 -- unsigned short int pr_uid;
20.170 -- unsigned short int pr_gid;
20.171 -- int pr_pid, pr_ppid, pr_pgrp, pr_sid;
20.172 -- /* Lots missing */
20.173 -- char pr_fname[16]; /* Filename of executable. */
20.174 -- char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
20.175 -- };
20.176 --
20.177 --/* Addresses. */
20.178 --typedef void *psaddr_t;
20.179 --
20.180 --/* Register sets. Linux has different names. */
20.181 --typedef gregset_t prgregset_t;
20.182 --typedef fpregset_t prfpregset_t;
20.183 --
20.184 --/* We don't have any differences between processes and threads,
20.185 -- therefore habe only ine PID type. */
20.186 --typedef __pid_t lwpid_t;
20.187 --
20.188 --
20.189 --typedef struct elf_prstatus prstatus_t;
20.190 --typedef struct elf_prpsinfo prpsinfo_t;
20.191 --
20.192 --__END_DECLS
20.193 --
20.194 --#endif /* sys/procfs.h */
20.195 -+/* sys/procfs.h is architecture specific. */
20.196 -+#error "This file must be supplied by every Linux architecture."
20.197 -
21.1 --- a/patches/glibc/2.3.6/290-gcc-4.3-include.patch Mon Jan 03 22:02:06 2011 +0100
21.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
21.3 @@ -1,40 +0,0 @@
21.4 -GCC trunk now has multiple internal headers directories, one
21.5 -containing the self-contained GCC-provided headers and one containing
21.6 -the <limits.h> (not self-contained but including libc's <limits.h> or
21.7 -a fixed version thereof) and the fixed headers; more such directories
21.8 -may be added in future.
21.9 -
21.10 -When glibc uses -nostdinc, it needs to use -isystem options for all
21.11 -these internal directories. This patch teaches it about the
21.12 -include-fixed directory (and is harmless with old GCC versions without
21.13 -that directory).
21.14 -
21.15 -2007-03-18 Joseph Myers <joseph@codesourcery.com>
21.16 -
21.17 - * configure.in: Also pass -isystem option for GCC's include-fixed
21.18 - directory.
21.19 - * configure: Regenerate.
21.20 -
21.21 -
21.22 ---- glibc-2.3.6.ori/configure.in 2008-10-22 14:55:58.000000000 +0200
21.23 -+++ glibc-2.3.6/configure.in 2008-10-22 14:56:15.000000000 +0200
21.24 -@@ -804,7 +804,7 @@
21.25 - # thing on a system that doesn't need fixincludes. (Not presently a problem.)
21.26 - if test -n "$sysheaders"; then
21.27 - ccheaders=`$CC -print-file-name=include`
21.28 -- SYSINCLUDES="-nostdinc -isystem $ccheaders \
21.29 -+ SYSINCLUDES="-nostdinc -isystem $ccheaders -isystem $ccheaders-fixed \
21.30 - -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
21.31 - fi
21.32 - AC_SUBST(SYSINCLUDES)
21.33 ---- glibc-2.3.6.ori/configure 2008-10-22 15:11:37.000000000 +0200
21.34 -+++ glibc-2.3.6/configure 2008-10-22 15:11:54.000000000 +0200
21.35 -@@ -4438,7 +4438,7 @@
21.36 - # thing on a system that doesn't need fixincludes. (Not presently a problem.)
21.37 - if test -n "$sysheaders"; then
21.38 - ccheaders=`$CC -print-file-name=include`
21.39 -- SYSINCLUDES="-nostdinc -isystem $ccheaders \
21.40 -+ SYSINCLUDES="-nostdinc -isystem $ccheaders -isystem $ccheaders-fixed \
21.41 - -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
21.42 - fi
21.43 -
22.1 --- a/patches/glibc/2.3.6/300-fix-binutils-version-check.patch Mon Jan 03 22:02:06 2011 +0100
22.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
22.3 @@ -1,20 +0,0 @@
22.4 ---- glibc-2.3.6.orig/configure 2010-03-08 23:10:00.000000000 +0100
22.5 -+++ glibc-2.3.6/configure 2010-03-08 23:12:00.000000000 +0100
22.6 -@@ -3917,7 +3917,7 @@
22.7 - ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
22.8 - case $ac_prog_version in
22.9 - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
22.10 -- 2.1[3-9]*)
22.11 -+ 2.1[3-9]*|2.[2-9]*|[3-9].*|1[0-9].*)
22.12 - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
22.13 - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
22.14 -
22.15 -@@ -3978,7 +3978,7 @@
22.16 - ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
22.17 - case $ac_prog_version in
22.18 - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
22.19 -- 2.1[3-9]*)
22.20 -+ 2.1[3-9]*|2.[2-9]*|[3-9].*|1[0-9].*)
22.21 - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
22.22 - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
22.23 -
23.1 --- a/patches/glibc/2.3.6/310-_begin-missing.patch Mon Jan 03 22:02:06 2011 +0100
23.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
23.3 @@ -1,12 +0,0 @@
23.4 -diff -ru glibc-2.3.6/elf/Makefile glibc-2.3.6.patched/elf/Makefile
23.5 ---- glibc-2.3.6/elf/Makefile 2010-05-02 18:58:38.000000000 -0400
23.6 -+++ glibc-2.3.6.patched/elf/Makefile 2010-05-02 18:54:54.000000000 -0400
23.7 -@@ -292,7 +292,7 @@
23.8 - $(LDFLAGS-rtld) -Wl,-z,defs -Wl,--verbose 2>&1 | \
23.9 - LC_ALL=C \
23.10 - sed -e '/^=========/,/^=========/!d;/^=========/d' \
23.11 -- -e 's/\. = 0 + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
23.12 -+ -e 's/\. = .* + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
23.13 - > $@.lds
23.14 - $(LINK.o) -nostdlib -nostartfiles -shared -o $@ \
23.15 - $(LDFLAGS-rtld) -Wl,-z,defs $(z-now-$(bind-now)) \
24.1 --- a/patches/glibc/2.3.6/maybe/100-allow-gcc-4.0-powerpc32.patch Mon Jan 03 22:02:06 2011 +0100
24.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
24.3 @@ -1,45 +0,0 @@
24.4 -Fixes
24.5 -
24.6 -../sysdeps/powerpc/powerpc32/dl-machine.h: In function '_dl_relocate_object':
24.7 -../sysdeps/powerpc/powerpc32/dl-machine.h:461: error: invalid storage class for function 'elf_machine_rela_relative'
24.8 -../sysdeps/powerpc/powerpc32/dl-machine.h:469: error: invalid storage class for function 'elf_machine_lazy_rel'
24.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
24.10 -
24.11 ---- glibc-2.3.6.orig/sysdeps/powerpc/powerpc32/dl-machine.h Wed Jul 30 23:33:52 2003
24.12 -+++ glibc-2.3.6/sysdeps/powerpc/powerpc32/dl-machine.h Thu Mar 17 13:19:16 2005
24.13 -@@ -455,8 +455,14 @@
24.14 - }
24.15 - }
24.16 -
24.17 --auto inline void
24.18 --__attribute__ ((always_inline))
24.19 -+#if __GNUC__ >= 4
24.20 -+ auto inline void
24.21 -+#else
24.22 -+ static inline void
24.23 -+#endif
24.24 -+#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
24.25 -+ __attribute ((always_inline))
24.26 -+#endif
24.27 - elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
24.28 - void *const reloc_addr_arg)
24.29 - {
24.30 -@@ -464,8 +470,14 @@
24.31 - *reloc_addr = l_addr + reloc->r_addend;
24.32 - }
24.33 -
24.34 --auto inline void
24.35 --__attribute__ ((always_inline))
24.36 -+#if __GNUC__ >= 4
24.37 -+ auto inline void
24.38 -+#else
24.39 -+ static inline void
24.40 -+#endif
24.41 -+#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
24.42 -+ __attribute ((always_inline))
24.43 -+#endif
24.44 - elf_machine_lazy_rel (struct link_map *map,
24.45 - Elf32_Addr l_addr, const Elf32_Rela *reloc)
24.46 - {
24.47 -
24.48 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
25.1 --- a/patches/glibc/2.3.6/maybe/101-allow-gcc-4.0-powerpc64.patch Mon Jan 03 22:02:06 2011 +0100
25.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
25.3 @@ -1,65 +0,0 @@
25.4 -Fixes:
25.5 -
25.6 -In file included from dynamic-link.h:22,
25.7 - from dl-reloc.c:269:
25.8 -../sysdeps/powerpc/powerpc64/dl-machine.h: In function '_dl_relocate_object':
25.9 -../sysdeps/powerpc/powerpc64/dl-machine.h:573: error: invalid storage class for function 'elf_machine_rela_relative'
25.10 -../sysdeps/powerpc/powerpc64/dl-machine.h:607: error: invalid storage class for function 'elf_machine_rela'
25.11 -../sysdeps/powerpc/powerpc64/dl-machine.h:889: error: invalid storage class for function 'elf_machine_lazy_rel'
25.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'
25.13 -
25.14 ---- glibc-2.3.6.orig/sysdeps/powerpc/powerpc64/dl-machine.h Thu Mar 17 13:35:23 2005
25.15 -+++ glibc-2.3.6/sysdeps/powerpc/powerpc64/dl-machine.h Thu Mar 17 13:37:12 2005
25.16 -@@ -567,8 +567,14 @@
25.17 - const Elf64_Sym *refsym)
25.18 - attribute_hidden;
25.19 -
25.20 --auto inline void
25.21 --__attribute__ ((always_inline))
25.22 -+#if __GNUC__ >= 4
25.23 -+ auto inline void
25.24 -+#else
25.25 -+ static inline void
25.26 -+#endif
25.27 -+#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
25.28 -+ __attribute ((always_inline))
25.29 -+#endif
25.30 - elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
25.31 - void *const reloc_addr_arg)
25.32 - {
25.33 -@@ -599,8 +605,14 @@
25.34 -
25.35 - /* Perform the relocation specified by RELOC and SYM (which is fully
25.36 - resolved). MAP is the object containing the reloc. */
25.37 --auto inline void
25.38 --__attribute__ ((always_inline))
25.39 -+#if __GNUC__ >= 4
25.40 -+ auto inline void
25.41 -+#else
25.42 -+ static inline void
25.43 -+#endif
25.44 -+#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
25.45 -+ __attribute ((always_inline))
25.46 -+#endif
25.47 - elf_machine_rela (struct link_map *map,
25.48 - const Elf64_Rela *reloc,
25.49 - const Elf64_Sym *sym,
25.50 -@@ -885,8 +897,14 @@
25.51 - MODIFIED_CODE_NOQUEUE (reloc_addr);
25.52 - }
25.53 -
25.54 --auto inline void
25.55 --__attribute__ ((always_inline))
25.56 -+#if __GNUC__ >= 4
25.57 -+ auto inline void
25.58 -+#else
25.59 -+ static inline void
25.60 -+#endif
25.61 -+#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
25.62 -+ __attribute ((always_inline))
25.63 -+#endif
25.64 - elf_machine_lazy_rel (struct link_map *map,
25.65 - Elf64_Addr l_addr, const Elf64_Rela *reloc)
25.66 - {
25.67 -
25.68 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
26.1 --- a/scripts/build/libc/glibc.sh Mon Jan 03 22:02:06 2011 +0100
26.2 +++ b/scripts/build/libc/glibc.sh Mon Jan 03 23:40:22 2011 +0100
26.3 @@ -144,33 +144,6 @@
26.4
26.5 CT_DoLog EXTRA "Installing C library headers"
26.6
26.7 - if grep -q GLIBC_2.3 "${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}/ChangeLog"; then
26.8 - # glibc-2.3.x passes cross options to $(CC) when generating errlist-compat.c,
26.9 - # which fails without a real cross-compiler.
26.10 - # Fortunately, we don't need errlist-compat.c, since we just need .h
26.11 - # files, so work around this by creating a fake errlist-compat.c and
26.12 - # satisfying its dependencies.
26.13 - # Another workaround might be to tell configure to not use any cross
26.14 - # options to $(CC).
26.15 - # The real fix would be to get install-headers to not generate
26.16 - # errlist-compat.c.
26.17 - # Note: BOOTSTRAP_GCC is used by:
26.18 - # patches/glibc-2.3.5/glibc-mips-bootstrap-gcc-header-install.patch
26.19 -
26.20 - libc_cv_ppc_machine=yes \
26.21 - CT_DoExecLog ALL \
26.22 - make CFLAGS="-O2 -DBOOTSTRAP_GCC" \
26.23 - OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \
26.24 - PARALLELMFLAGS="${PARALLELMFLAGS}" \
26.25 - sysdeps/gnu/errlist.c
26.26 - mkdir -p stdio-common
26.27 -
26.28 - # sleep for 2 seconds for benefit of filesystems with lousy time
26.29 - # resolution, like FAT, so make knows for sure errlist-compat.c doesn't
26.30 - # need generating
26.31 - sleep 2
26.32 - CT_DoExecLog ALL touch stdio-common/errlist-compat.c
26.33 - fi
26.34 # Note: BOOTSTRAP_GCC (see above)
26.35 libc_cv_ppc_machine=yes \
26.36 CT_DoExecLog ALL \
26.37 @@ -464,29 +437,6 @@
26.38 "${extra_config[@]}" \
26.39 ${CT_LIBC_GLIBC_EXTRA_CONFIG}
26.40
26.41 - if grep -l '^install-lib-all:' "${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}/Makerules" > /dev/null; then
26.42 - # nptl-era glibc.
26.43 - # If the install-lib-all target (which is added by our make-install-lib-all.patch)
26.44 - # is present, it means we're building glibc-2.3.3 or later, and we can't
26.45 - # build programs yet, as they require libeh, which won't be installed
26.46 - # until full build of gcc
26.47 - # YEM-FIXME: This comment is misleading: latest glibc-s do not have the
26.48 - # make-install-lib-all.patch applied, so do not pass through this
26.49 - # part of the if statement; nonetheless, they do build, and
26.50 - # the result is useable (maybe the dual-pass core gcc is
26.51 - # responsible for this).
26.52 - GLIBC_INITIAL_BUILD_RULE=lib
26.53 - GLIBC_INITIAL_INSTALL_RULE="install-lib-all install-headers"
26.54 - GLIBC_INSTALL_APPS_LATER=yes
26.55 - else
26.56 - # classic glibc.
26.57 - # We can build and install everything with the bootstrap compiler.
26.58 - # YEM-FIXME: See the above FIXME as well.
26.59 - GLIBC_INITIAL_BUILD_RULE=all
26.60 - GLIBC_INITIAL_INSTALL_RULE=install
26.61 - GLIBC_INSTALL_APPS_LATER=no
26.62 - fi
26.63 -
26.64 # glibc initial build hacks
26.65 # http://sourceware.org/ml/crossgcc/2008-10/msg00068.html
26.66 case "${CT_ARCH},${CT_ARCH_CPU}" in
26.67 @@ -506,14 +456,14 @@
26.68 OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \
26.69 ASFLAGS="${GLIBC_INITIAL_BUILD_ASFLAGS}" \
26.70 PARALLELMFLAGS="${PARALLELMFLAGS}" \
26.71 - ${GLIBC_INITIAL_BUILD_RULE}
26.72 + all
26.73
26.74 CT_DoLog EXTRA "Installing C library"
26.75 CT_DoExecLog ALL make install_root="${CT_SYSROOT_DIR}" \
26.76 ${LIBC_SYSROOT_ARG} \
26.77 OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \
26.78 PARALLELMFLAGS="${PARALLELMFLAGS}" \
26.79 - ${GLIBC_INITIAL_INSTALL_RULE}
26.80 + install
26.81
26.82 # This doesn't seem to work when building a crosscompiler,
26.83 # as it tries to execute localedef using the just-built ld.so!?
26.84 @@ -544,34 +494,7 @@
26.85
26.86 # This function finishes the glibc install
26.87 do_libc_finish() {
26.88 - # Finally, build and install glibc programs, now that libeh (if any) is installed
26.89 - # Don't do this unless needed, 'cause it causes glibc-2.{1.3,2.2} to fail here with
26.90 - # .../gcc-3.4.1-glibc-2.1.3/build-glibc/libc.so.6: undefined reference to `__deregister_frame_info'
26.91 - # .../gcc-3.4.1-glibc-2.1.3/build-glibc/libc.so.6: undefined reference to `__register_frame_info'
26.92 - [ "${GLIBC_INSTALL_APPS_LATER}" = "yes" ] || return 0
26.93 -
26.94 - CT_DoStep INFO "Finishing C library"
26.95 -
26.96 - cd "${CT_BUILD_DIR}/build-libc"
26.97 -
26.98 - CT_DoLog EXTRA "Re-building C library"
26.99 - CT_DoExecLog ALL make LD=${CT_TARGET}-ld \
26.100 - RANLIB=${CT_TARGET}-ranlib \
26.101 - OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \
26.102 - ASFLAGS="${GLIBC_INITIAL_BUILD_ASFLAGS}" \
26.103 - PARALLELMFLAGS="${PARALLELMFLAGS}"
26.104 -
26.105 - CT_DoLog EXTRA "Installing missing C library components"
26.106 - # note: should do full install and then fix linker scripts, but this is faster
26.107 - for t in bin rootsbin sbin data others; do
26.108 - CT_DoExecLog ALL make install_root="${CT_SYSROOT_DIR}" \
26.109 - ${LIBC_SYSROOT_ARG} \
26.110 - OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \
26.111 - PARALLELMFLAGS="${PARALLELMFLAGS}" \
26.112 - install-${t}
26.113 - done
26.114 -
26.115 - CT_EndStep
26.116 + :
26.117 }
26.118
26.119 # Build up the addons list, separated with $1