diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2007-02-24 11:00:05 (GMT) |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2007-02-24 11:00:05 (GMT) |
commit | 1906cf93f86d8d66f45f90380a8d3da25c087ee5 (patch) | |
tree | 90916c99abe1f1ec26709ee420e6c349eda4670a /patches/glibc/2.3.2 | |
parent | 2609573aede4ce198b3462976725b25eb1637d2e (diff) |
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
Diffstat (limited to 'patches/glibc/2.3.2')
46 files changed, 3157 insertions, 0 deletions
diff --git a/patches/glibc/2.3.2/README-hppa b/patches/glibc/2.3.2/README-hppa new file mode 100644 index 0000000..da24282 --- /dev/null +++ b/patches/glibc/2.3.2/README-hppa @@ -0,0 +1,32 @@ +[See also http://parisc-linux.org/toolchain + One of these days I'll have a look at what they've + got there, and incorporate their patches.] + +------- + +The error + +../linuxthreads/sysdeps/pthread/errno-loc.c: In function `__errno_location': +../linuxthreads/sysdeps/pthread/errno-loc.c:39: `pthread_descr' undeclared (first use in this function) +../linuxthreads/sysdeps/pthread/errno-loc.c:39: (Each undeclared identifier is reported only once +../linuxthreads/sysdeps/pthread/errno-loc.c:39: for each function it appears in.) +../linuxthreads/sysdeps/pthread/errno-loc.c:39: syntax error before "self" +../linuxthreads/sysdeps/pthread/errno-loc.c:40: warning: implicit declaration of function `LIBC_THREAD_GETMEM' +../linuxthreads/sysdeps/pthread/errno-loc.c:40: `self' undeclared (first use in this function) +../linuxthreads/sysdeps/pthread/errno-loc.c:40: `p_errnop' undeclared (first use in this function) +../linuxthreads/sysdeps/pthread/errno-loc.c:40: warning: return makes pointer from integer without a cast +make[2]: *** [/home/gotom/glibc/glibc-2.3.2/build/csu/errno-loc.o] Error 1 +make[2]: Leaving directory `/home/gotom/glibc/glibc-2.3.2/glibc-2.3.2/csu' +make[1]: *** [csu/subdir_lib] Error 2 + +means that hppa does not yet have the proper stuff for linuxthreads. + +See +http://groups.google.com/groups?selm=20030322165012%247208%40gated-at.bofh.it +http://lists.debian.org/debian-glibc/2003/debian-glibc-200303/msg00472.html + +A set of experimental patches is at +http://www.baldric.uwo.ca/~carlos/glibc-2.3.2-patches.tar.gz +but since they touch generic code, I'm not comfortable using them in general yet. +Go ahead and grab them if you want to build for hppa before hppa +support is merged into glibc. diff --git a/patches/glibc/2.3.2/arm-asm-clobber.patch b/patches/glibc/2.3.2/arm-asm-clobber.patch new file mode 100644 index 0000000..eca01c3 --- /dev/null +++ b/patches/glibc/2.3.2/arm-asm-clobber.patch @@ -0,0 +1,26 @@ +http://gcc.gnu.org/PR11103 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/arm/sysdep.h.diff?r1=1.22&r2=1.23&cvsroot=glibc +http://lists.arm.linux.org.uk/pipermail/linux-arm/2003-July/005826.html + +Error: +../sysdeps/unix/sysv/linux/arm/sigaction.c: In function `__libc_sigaction': +../sysdeps/unix/sysv/linux/arm/sigaction.c:100: error: asm-specifier for variable `_a1' conflicts with asm clobber list +../sysdeps/unix/sysv/linux/arm/sigaction.c:139: error: asm-specifier for variable `_a1' conflicts with asm clobber list +make[2]: *** [build-glibc/signal/sigaction.o] Error 1 + +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/arm/sysdep.h,v +retrieving revision 1.22 +retrieving revision 1.23 +diff -u -r1.22 -r1.23 +--- libc/sysdeps/unix/sysv/linux/arm/sysdep.h 2003/03/23 19:42:22 1.22 ++++ libc/sysdeps/unix/sysv/linux/arm/sysdep.h 2003/03/24 19:00:28 1.23 +@@ -174,7 +174,7 @@ + asm volatile ("swi %1 @ syscall " #name \ + : "=r" (_a1) \ + : "i" (SYS_ify(name)) ASM_ARGS_##nr \ +- : "a1", "memory"); \ ++ : "memory"); \ + _sys_result = _a1; \ + } \ + (int) _sys_result; }) diff --git a/patches/glibc/2.3.2/arm-ctl_bus_isa.patch b/patches/glibc/2.3.2/arm-ctl_bus_isa.patch new file mode 100644 index 0000000..3422070 --- /dev/null +++ b/patches/glibc/2.3.2/arm-ctl_bus_isa.patch @@ -0,0 +1,51 @@ +Applies to both glibc-2.2.5 and glibc-2.3.2, and probably glibc cvs as of Aug 2004. +Needed to build glibc with linux kernels 2.4.23 or higher on ARM, +Fixes following error: + +../sysdeps/unix/sysv/linux/arm/ioperm.c: In function `init_iosys': +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: `BUS_ISA' undeclared (first use in this function) +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (Each undeclared identifier is reported only once +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: for each function it appears in.) +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: initializer element is not constant +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (near initialization for `iobase_name[1]') +../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: initializer element is not constant +../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: (near initialization for `ioshift_name[1]') +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 + +cf. "[SYSCTL] BUS_ISA -> CTL_BUS_ISA", http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html + +--- glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c.old 2003-02-20 14:22:24.000000000 -0800 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c 2004-01-31 16:01:50.000000000 -0800 +@@ -47,6 +47,12 @@ + #include <asm/page.h> + #include <sys/sysctl.h> + ++/* see http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html */ ++#include <linux/version.h> ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23)) ++#define CTL_BUS_ISA BUS_ISA /* and hope it's not the one from linux/input.h */ ++#endif ++ + #define PATH_ARM_SYSTYPE "/etc/arm_systype" + #define PATH_CPUINFO "/proc/cpuinfo" + +@@ -80,7 +86,7 @@ + * Initialize I/O system. There are several ways to get the information + * we need. Each is tried in turn until one succeeds. + * +- * 1. Sysctl (CTL_BUS, BUS_ISA, ISA_*). This is the preferred method ++ * 1. Sysctl (CTL_BUS, CTL_BUS_ISA, ISA_*). This is the preferred method + * but not all kernels support it. + * + * 2. Read the value (not the contents) of symlink PATH_ARM_SYSTYPE. +@@ -100,8 +106,8 @@ + { + char systype[256]; + int i, n; +- static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE }; +- static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT }; ++ static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE }; ++ static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT }; + size_t len = sizeof(io.base); + + if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0) diff --git a/patches/glibc/2.3.2/arm-mcount_internal.patch b/patches/glibc/2.3.2/arm-mcount_internal.patch new file mode 100644 index 0000000..9e195ba --- /dev/null +++ b/patches/glibc/2.3.2/arm-mcount_internal.patch @@ -0,0 +1,30 @@ +# +# Submitted: +# +# Robert Schwebel, 2003-12-22 +# +# Error: +# +# ... undefined reference to mcount_internal ... +# +# Description: +# +# State: +# +# unknown +# + +--- glibc-2.3.2/sysdeps/arm/machine-gmon.h 2001-07-07 21:21:19.000000000 +0200 ++++ glibc-2.3.2-ptx/sysdeps/arm/machine-gmon.h 2003-12-21 23:58:26.000000000 +0100 +@@ -32,10 +32,8 @@ + weak_alias (_mcount, mcount) + #endif + +-static void mcount_internal (u_long frompc, u_long selfpc); +- + #define _MCOUNT_DECL(frompc, selfpc) \ +-static void mcount_internal (u_long frompc, u_long selfpc) ++void mcount_internal (u_long frompc, u_long selfpc) + + /* This macro/func MUST save r0, r1 because the compiler inserts + blind calls to _mount(), ignoring the fact that _mcount may diff --git a/patches/glibc/2.3.2/epoll-epollet.patch b/patches/glibc/2.3.2/epoll-epollet.patch new file mode 100644 index 0000000..c73b36f --- /dev/null +++ b/patches/glibc/2.3.2/epoll-epollet.patch @@ -0,0 +1,28 @@ +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/sys/epoll.h.diff?r1=1.1&r2=1.2&cvsroot=glibc +Needed for modern sys_epoll. + +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/sys/epoll.h,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -u -r1.1 -r1.2 +--- libc/sysdeps/unix/sysv/linux/sys/epoll.h 2002/12/16 23:35:27 1.1 ++++ libc/sysdeps/unix/sysv/linux/sys/epoll.h 2003/03/24 23:50:25 1.2 +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2002 Free Software Foundation, Inc. ++/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -42,8 +42,10 @@ + #define EPOLLMSG EPOLLMSG + EPOLLERR = 0x008, + #define EPOLLERR EPOLLERR +- EPOLLHUP = 0x010 ++ EPOLLHUP = 0x010, + #define EPOLLHUP EPOLLHUP ++ EPOLLET = (1 << 31) ++#define EPOLLET EPOLLET + }; + + diff --git a/patches/glibc/2.3.2/epoll-stdint.patch b/patches/glibc/2.3.2/epoll-stdint.patch new file mode 100644 index 0000000..b810e96 --- /dev/null +++ b/patches/glibc/2.3.2/epoll-stdint.patch @@ -0,0 +1,22 @@ +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/sys/epoll.h.diff?r1=1.2&r2=1.3&cvsroot=glibc +Include <stdint.h>. + +Fixes error +/foo/gcc-3.3.2-glibc-2.3.2/powerpc-750-linux-gnu/sys-include/sys/epoll.h:60: error: parse error before "uint32_t" +/foo/gcc-3.3.2-glibc-2.3.2/powerpc-750-linux-gnu/sys-include/sys/epoll.h:66: error: parse error before "uint32_t" + +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/sys/epoll.h,v +retrieving revision 1.2 +retrieving revision 1.3 +diff -u -r1.2 -r1.3 +--- libc/sysdeps/unix/sysv/linux/sys/epoll.h 2003/03/24 23:50:25 1.2 ++++ libc/sysdeps/unix/sysv/linux/sys/epoll.h 2003/06/13 19:49:50 1.3 +@@ -19,6 +19,7 @@ + #ifndef _SYS_EPOLL_H + #define _SYS_EPOLL_H 1 + ++#include <stdint.h> + #include <sys/types.h> + + diff --git a/patches/glibc/2.3.2/errlist-awk.patch b/patches/glibc/2.3.2/errlist-awk.patch new file mode 100644 index 0000000..6a40253 --- /dev/null +++ b/patches/glibc/2.3.2/errlist-awk.patch @@ -0,0 +1,11 @@ +--- glibc-2.3.2/sysdeps/gnu/errlist.awk.old Tue May 27 18:10:37 2003 ++++ glibc-2.3.2/sysdeps/gnu/errlist.awk Tue May 27 18:10:47 2003 +@@ -39,7 +39,7 @@ + + print "/* This file is generated from errno.texi by errlist.awk. */" + print ""; +- print "#include <errno.h>"; ++ print "#include <stdlib/errno.h>"; + print "#include <libintl.h>"; + print ""; + print "#ifndef ERR_REMAP"; diff --git a/patches/glibc/2.3.2/fixup.patch b/patches/glibc/2.3.2/fixup.patch new file mode 100644 index 0000000..5f1e8a4 --- /dev/null +++ b/patches/glibc/2.3.2/fixup.patch @@ -0,0 +1,74 @@ +Fixes +dl-runtime.c:56: error: conflicting types for 'fixup' +../sysdeps/i386/dl-machine.h:158: error: previous declaration of 'fixup' was here +when building with gcc-3.4.0 + +First hunk: +Define ARCH_FIXUP_ATTRIBUTE and use it in the fixup function declarations. +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/dl-machine.h.diff?r1=1.124&r2=1.125&cvsroot=glibc + +Second hunk: +If ARCH_FIXUP_ATTRIBUTE is not defined, provide dummy definition. +Use macro in fixup function definitions. +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/elf/dl-runtime.c.diff?r1=1.64&r2=1.65&cvsroot=glibc +[rediffed against glibc-2.3.2] + +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/i386/dl-machine.h,v +retrieving revision 1.124 +retrieving revision 1.125 +diff -u -r1.124 -r1.125 +--- libc/sysdeps/i386/dl-machine.h 2004/03/05 10:14:49 1.124 ++++ libc/sysdeps/i386/dl-machine.h 2004/03/09 07:42:29 1.125 +@@ -154,11 +154,14 @@ + destroys the passed register information. */ + /* GKM FIXME: Fix trampoline to pass bounds so we can do + without the `__unbounded' qualifier. */ +-static ElfW(Addr) fixup (struct link_map *__unbounded l, ElfW(Word) reloc_offset) +- __attribute__ ((regparm (2), unused)); ++#define ARCH_FIXUP_ATTRIBUTE __attribute__ ((regparm (3), unused)) ++ ++static ElfW(Addr) fixup (struct link_map *__unbounded l, ++ ElfW(Word) reloc_offset) ++ ARCH_FIXUP_ATTRIBUTE; + static ElfW(Addr) profile_fixup (struct link_map *l, ElfW(Word) reloc_offset, + ElfW(Addr) retaddr) +- __attribute__ ((regparm (3), unused)); ++ ARCH_FIXUP_ATTRIBUTE; + # endif + + /* This code is used in dl-runtime.c to call the `fixup' function +=================================================================== +--- /home/dank/downloads/glibc-2.3.2/elf/dl-runtime.c Fri Feb 7 11:41:12 2003 ++++ glibc-2.3.2/elf/dl-runtime.c Thu Apr 8 22:24:26 2004 +@@ -36,6 +36,12 @@ + # define VERSYMIDX(sym) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym)) + #endif + ++/* The fixup functions might have need special attributes. If none ++ are provided define the macro as empty. */ ++#ifndef ARCH_FIXUP_ATTRIBUTE ++# define ARCH_FIXUP_ATTRIBUTE ++#endif ++ + + /* This function is called through a special trampoline from the PLT the + first time each PLT entry is called. We must perform the relocation +@@ -45,7 +51,7 @@ + function. */ + + #ifndef ELF_MACHINE_NO_PLT +-static ElfW(Addr) __attribute_used__ ++static ElfW(Addr) __attribute_used__ ARCH_FIXUP_ATTRIBUTE + fixup ( + # ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS + ELF_MACHINE_RUNTIME_FIXUP_ARGS, +@@ -132,7 +138,7 @@ + + #if !defined PROF && !defined ELF_MACHINE_NO_PLT && !__BOUNDED_POINTERS__ + +-static ElfW(Addr) __attribute_used__ ++static ElfW(Addr) __attribute_used__ ARCH_FIXUP_ATTRIBUTE + profile_fixup ( + #ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS + ELF_MACHINE_RUNTIME_FIXUP_ARGS, diff --git a/patches/glibc/2.3.2/gcc-pr-9552-workaround.patch b/patches/glibc/2.3.2/gcc-pr-9552-workaround.patch new file mode 100644 index 0000000..325c474 --- /dev/null +++ b/patches/glibc/2.3.2/gcc-pr-9552-workaround.patch @@ -0,0 +1,20 @@ +See http://gcc.gnu.org/PR9552 + +Works around gcc error + "soinit.c:25: internal compiler error: in named_section_flags, at varasm.c:412" +by fixing slightly incorrect code in glibc (the .eh_frame section used to +be read-write, but it's now readonly according to discussion in +http://sources.redhat.com/ml/binutils/2002-11/msg00592.html, +so it's arguably incorrect to continue to put variables in there that aren't const). + +--- glibc-2.3.2/elf/soinit.c 2001-11-16 00:09:20.000000000 +0100 ++++ glibc-2.3.2/elf/soinit.c 2003-08-12 09:13:34.000000000 +0200 +@@ -25,7 +25,7 @@ + } + + #ifdef HAVE_DWARF2_UNWIND_INFO +-static char __EH_FRAME_BEGIN__[] ++const static char __EH_FRAME_BEGIN__[] + __attribute__ ((section (".eh_frame"))) + = { }; + # ifdef HAVE_DWARF2_UNWIND_INFO_STATIC diff --git a/patches/glibc/2.3.2/glibc-2.2.5-crosstest.patch b/patches/glibc/2.3.2/glibc-2.2.5-crosstest.patch new file mode 100644 index 0000000..c9f3701 --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.2.5-crosstest.patch @@ -0,0 +1,27 @@ +Fixes errors like + /build-glibc/dlfcn/glrefmain: cannot load `glreflib1.so' +in glibc regression test + +--- glibc-2.2.5/dlfcn/Makefile.old Thu Jul 24 16:30:20 2003 ++++ glibc-2.2.5/dlfcn/Makefile Thu Jul 24 17:25:01 2003 +@@ -60,6 +60,8 @@ + test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(modules-names))) + $(test-modules): $(objpfx)%.so: $(objpfx)%.os + $(build-module) ++# without following rule, test-modules don't get built when cross-compiling ++tests: $(test-modules) + + $(objpfx)glrefmain: $(libdl) + $(objpfx)glrefmain.out: $(objpfx)glrefmain \ +--- glibc-2.2.5/elf/Makefile.old Thu Jul 24 18:17:12 2003 ++++ glibc-2.2.5/elf/Makefile Thu Jul 24 18:18:58 2003 +@@ -263,6 +263,9 @@ + test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names)))) + generated += $(addsuffix .so,$(strip $(modules-names))) + ++# without following rule, test-modules don't get built when cross-compiling ++tests: $(test-modules) ++ + ifeq (yes,$(build-shared)) + ifeq ($(cross-compiling),no) + tests: $(objpfx)tst-pathopt.out diff --git a/patches/glibc/2.3.2/glibc-2.2.5-mips-clone-local-label.patch b/patches/glibc/2.3.2/glibc-2.2.5-mips-clone-local-label.patch new file mode 100644 index 0000000..66fee29 --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.2.5-mips-clone-local-label.patch @@ -0,0 +1,47 @@ +This is a workaround for + +mipsel-unknown-linux-gnu-gcc ../sysdeps/unix/sysv/linux/mips/clone.S -c -I../include -I. -I/home3/dank/crosstool-0.7/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/misc -I.. -I../libio -I/home3/dank/crosstool-0.7/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc -I../sysdeps/mips/elf -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/mips -I../sysdeps/unix/sysv/linux/mips -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/mips -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/mips/mipsel -I../sysdeps/mips/fpu -I../sysdeps/mips -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc -isystem /home3/dank/crosstool-0.7/result/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/lib/gcc-lib/mipsel-unknown-linux-gnu/3.2.3/include -isystem /home3/dank/crosstool-0.7/result/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/mipsel-unknown-linux-gnu/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DASSEMBLER -o /home3/dank/crosstool-0.7/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/misc/clone.o +../sysdeps/unix/sysv/linux/mips/clone.S: Assembler messages: +../sysdeps/unix/sysv/linux/mips/clone.S:66: Error: Can not represent BFD_RELOC_16_PCREL_S2 relocation in this object file format +make[2]: *** [/home3/dank/crosstool-0.7/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/misc/clone.o] Error 1 + +which was using h.j.lu's binutils-2.13.90.0.18. + + +But see http://lists.debian.org/debian-mips/2003/debian-mips-200305/msg00011.html +which says +"A newer version of binutils (CVS post 2003-03-12) fixes it without +the need of changing perfectly legal code." +So presumably this can be ditched sooner or later. + +From http://honk.physik.uni-konstanz.de/~agx/linux-mips/glibc/patches/applied/clone-local-label.diff + +2003-03-13 Guido Guenther <agx@sigxcpu.org> + + * sysdeps/unix/sysv/linux/mips/clone.S: introduce and use local label + .Lthread_start since current binutils don't allow branches to globally + visible symbols. + +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/clone.S,v +retrieving revision 1.10 +diff -u -r1.10 clone.S +--- glibc-2.2.5/sysdeps/unix/sysv/linux/mips/clone.S 12 Mar 2003 01:04:51 -0000 1.10 ++++ glibc-2.2.5/sysdeps/unix/sysv/linux/mips/clone.S 12 Mar 2003 19:04:39 -0000 +@@ -63,7 +63,7 @@ + syscall + + bnez a3,error +- beqz v0,__thread_start ++ beqz v0,.Lthread_start + + /* Successful return from the parent */ + addiu sp,32 +@@ -85,6 +85,7 @@ + debug info. */ + + ENTRY(__thread_start) ++.Lthread_start: + /* cp is already loaded. */ + .cprestore 16 + /* The stackframe has been created on entry of clone(). */ diff --git a/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.4-inline.patch b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.4-inline.patch new file mode 100644 index 0000000..cdcd7ba --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.4-inline.patch @@ -0,0 +1,23 @@ +Fixes +cc1: error: invalid parameter `max-inline-insns' +make[2]: *** [/home/dank/wk/crosstool-0.28-rc6/build/powerpc64-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/elf/dl-load.o] Error 1 +when building with gcc-3.4.0, which no longer has a single +--max-inline-insns parameter. + +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/powerpc/powerpc64/Makefile.diff?r1=1.3&r2=1.4&cvsroot=glibc + +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/powerpc/powerpc64/Makefile,v +retrieving revision 1.3 +retrieving revision 1.4 +diff -u -r1.3 -r1.4 +--- libc/sysdeps/powerpc/powerpc64/Makefile 2003/10/22 21:30:03 1.3 ++++ libc/sysdeps/powerpc/powerpc64/Makefile 2004/02/20 05:43:52 1.4 +@@ -20,5 +20,5 @@ + + ifeq ($(subdir),elf) + # help gcc inline asm code from dl-machine.h +-+cflags += --param max-inline-insns=2000 +++cflags += -finline-limit=2000 + endif + diff --git a/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.4-nounit.patch b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.4-nounit.patch new file mode 100644 index 0000000..17f10da --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.4-nounit.patch @@ -0,0 +1,137 @@ +Fixes errors like + +# gcc-3.4.0-glibc-2.3.2/build-glibc/csu/crtn.o(.text+0x0):mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/csu/crtn.S:20: multiple definition of `dummy' +# gcc-3.4.0-glibc-2.3.2/build-glibc/csu/crti.o(.text+0x0):mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/csu/crti.S:42: first defined here +# /gcc-3.4.0-glibc-2.3.2/build-glibc/csu/crti.o(.init+0x28):mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/csu/crti.S:58: undefined reference to `i_am_not_a_leaf' + +CVSROOT: /cvs/glibc +Module name: libc +Changes by: aj@sourceware.org 2003-12-02 07:37:29 + +Modified files: + . : configure.in configure config.make.in + csu : Makefile + locale : Makefile + linuxthreads : Makefile + linuxthreads/sysdeps/unix/sysv/linux/x86_64: Makefile + nptl : Makefile + nptl/sysdeps/unix/sysv/linux/x86_64: Makefile + +Log message: + * config.make.in (fno-unit-at-a-time): Define. + + * configure.in: Add test for -fno-unit-at-a-time. + Fix text for -fpie. + + * csu/Makefile (CFLAGS-initfini.s): Add $(fno_unit_at_a_time). + * locale/Makefile (CFLAGS-loadlocale.c): Likewise. + + For linuxthreads: + * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time). + * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s): + Likewise. + + For nptl: + * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time). + * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s): + Likewise. + +Main glibc change retrieved with +wget -O foo.patch 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/config.make.in.diff?r1=1.98&r2=1.99&cvsroot=glibc' \ +'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/configure.diff?r1=1.393&r2=1.394&cvsroot=glibc' \ +'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/csu/Makefile.diff?r1=1.71&r2=1.72&cvsroot=glibc' \ +'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/locale/Makefile.diff?r1=1.71&r2=1.72&cvsroot=glibc' + +and then rediffed against glibc-2.3.2 +See also ../glibc-linuxthreads-2.3.2/glibc-linuxthreads-2.3.2-allow-3.4.patch + +diff -aur glibc-2.3.2/config.make.in glibc-2.3.2-nounit/config.make.in +--- glibc-2.3.2/config.make.in 2002-11-14 14:53:32.000000000 -0800 ++++ glibc-2.3.2-nounit/config.make.in 2004-05-29 23:19:58.000000000 -0700 +@@ -50,6 +50,7 @@ + old-glibc-headers = @old_glibc_headers@ + unwind-find-fde = @libc_cv_gcc_unwind_find_fde@ + have-initfini-array = @libc_cv_initfinit_array@ ++fno-unit-at-a-time = @fno_unit_at_a_time@ + + static-libgcc = @libc_cv_gcc_static_libgcc@ + +diff -aur glibc-2.3.2/configure glibc-2.3.2-nounit/configure +--- glibc-2.3.2/configure 2003-02-26 01:20:48.000000000 -0800 ++++ glibc-2.3.2-nounit/configure 2004-05-30 06:22:31.000000000 -0700 +@@ -312,7 +312,7 @@ + # include <unistd.h> + #endif" + +-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs oldest_abi subdirs force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os base_machine sysnames INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S PWD_P CC MAKE MSGFMT MAKEINFO SED AUTOCONF CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD CCVERSION SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO OLD_DEBIAN_INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_initfinit_array libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_Bgroup libc_cv_z_combreloc libc_cv_have_initfini no_whole_archive exceptions LIBGD EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir use_ldconfig ldd_rewrite_script gnu_ld gnu_as elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES linux_doors mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS' ++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs oldest_abi subdirs force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os base_machine sysnames INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S PWD_P CC MAKE MSGFMT MAKEINFO SED AUTOCONF CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD CCVERSION SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO OLD_DEBIAN_INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_initfinit_array libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_Bgroup libc_cv_z_combreloc fno_unit_at_a_time libc_cv_have_initfini no_whole_archive exceptions LIBGD EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir use_ldconfig ldd_rewrite_script gnu_ld gnu_as elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES linux_doors mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS' + ac_subst_files='' + + # Initialize some variables set by options. +@@ -4984,6 +4984,35 @@ + fi + + ++echo "$as_me:$LINENO: checking for -fno-unit-at-a-time" >&5 ++echo $ECHO_N "checking for -fno-unit-at-a-time... $ECHO_C" >&6 ++if test "${libc_cv_fno_unit_at_a_time+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat > conftest.c <<EOF ++int foo; ++EOF ++if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -S -fno-unit-at-a-time ++ conftest.c 1>&5' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } ++then ++ libc_cv_fno_unit_at_a_time=yes ++else ++ libc_cv_fno_unit_at_a_time=no ++fi ++rm -f conftest* ++fi ++echo "$as_me:$LINENO: result: $libc_cv_fno_unit_at_a_time" >&5 ++echo "${ECHO_T}$libc_cv_fno_unit_at_a_time" >&6 ++if test $libc_cv_fno_unit_at_a_time = yes; then ++ fno_unit_at_a_time=-fno-unit-at-a-time ++fi ++ ++ + if test $elf != yes; then + echo "$as_me:$LINENO: checking for .init and .fini sections" >&5 + echo $ECHO_N "checking for .init and .fini sections... $ECHO_C" >&6 +@@ -7236,6 +7265,7 @@ + s,@libc_cv_z_initfirst@,$libc_cv_z_initfirst,;t t + s,@libc_cv_Bgroup@,$libc_cv_Bgroup,;t t + s,@libc_cv_z_combreloc@,$libc_cv_z_combreloc,;t t ++s,@fno_unit_at_a_time@,$fno_unit_at_a_time,;t t + s,@libc_cv_have_initfini@,$libc_cv_have_initfini,;t t + s,@no_whole_archive@,$no_whole_archive,;t t + s,@exceptions@,$exceptions,;t t +diff -aur glibc-2.3.2/csu/Makefile glibc-2.3.2-nounit/csu/Makefile +--- glibc-2.3.2/csu/Makefile 2002-12-31 14:24:37.000000000 -0800 ++++ glibc-2.3.2-nounit/csu/Makefile 2004-05-29 23:18:27.000000000 -0700 +@@ -99,7 +99,7 @@ + $(objpfx)crt%.o: $(objpfx)crt%.S $(objpfx)defs.h + $(compile.S) -g0 $(ASFLAGS-.os) -o $@ + +-CFLAGS-initfini.s = -g0 -fPIC -fno-inline-functions ++CFLAGS-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time) + + vpath initfini.c $(full_config_sysdirs) + +diff -aur glibc-2.3.2/locale/Makefile glibc-2.3.2-nounit/locale/Makefile +--- glibc-2.3.2/locale/Makefile 2002-10-17 10:05:53.000000000 -0700 ++++ glibc-2.3.2-nounit/locale/Makefile 2004-05-29 23:18:27.000000000 -0700 +@@ -100,6 +100,7 @@ + CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts + CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts + CFLAGS-charmap-dir.c = -Wno-write-strings ++CFLAGS-loadlocale.c = $(fno-unit-at-a-time) + + # This makes sure -DNOT_IN_libc is passed for all these modules. + cpp-srcs-left := $(addsuffix .c,$(localedef-modules) $(localedef-aux) \ diff --git a/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-PR14096.patch b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-PR14096.patch new file mode 100644 index 0000000..fe97f67 --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-PR14096.patch @@ -0,0 +1,55 @@ +--- glibc-2.3.2/stdlib/abs.c.old 2004-07-18 12:08:43.000000000 -0700 ++++ glibc-2.3.2/stdlib/abs.c 2004-07-18 12:09:18.000000000 -0700 +@@ -16,6 +16,8 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#define __NO_INLINE__ 1 /* avoid http://gcc.gnu.org/PR14096 */ ++ + #include <stdlib.h> + + #undef abs +--- glibc-2.3.2/stdlib/atoi.c.old 2004-07-18 12:08:17.000000000 -0700 ++++ glibc-2.3.2/stdlib/atoi.c 2004-07-18 12:08:27.000000000 -0700 +@@ -16,6 +16,8 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#define __NO_INLINE__ 1 /* avoid http://gcc.gnu.org/PR14096 */ ++ + #include <stdlib.h> + + #undef atoi +--- glibc-2.3.2/stdlib/atof.c.old 2004-07-18 12:06:09.000000000 -0700 ++++ glibc-2.3.2/stdlib/atof.c 2004-07-18 12:05:31.000000000 -0700 +@@ -16,6 +16,8 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#define __NO_INLINE__ 1 /* avoid http://gcc.gnu.org/PR14096 */ ++ + #include <stdlib.h> + + #undef atof +--- glibc-2.3.2/stdlib/atol.c.old 2004-07-18 12:08:49.000000000 -0700 ++++ glibc-2.3.2/stdlib/atol.c 2004-07-18 12:09:40.000000000 -0700 +@@ -16,6 +16,8 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#define __NO_INLINE__ 1 /* avoid http://gcc.gnu.org/PR14096 */ ++ + #include <stdlib.h> + + #undef atol +--- glibc-2.3.2/stdlib/atoll.c.old 2004-07-18 12:08:55.000000000 -0700 ++++ glibc-2.3.2/stdlib/atoll.c 2004-07-18 12:09:59.000000000 -0700 +@@ -16,6 +16,8 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#define __NO_INLINE__ 1 /* avoid http://gcc.gnu.org/PR14096 */ ++ + #include <stdlib.h> + + #undef atoll diff --git a/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-elf.patch b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-elf.patch new file mode 100644 index 0000000..1bd61e5 --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-elf.patch @@ -0,0 +1,34 @@ + +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/elf/dl-load.c.diff?r1=1.235&r2=1.236&cvsroot=glibc + +Fixes gcc-3.5 errors + +dl-load.c: In function `_dl_map_object_from_fd': +dl-load.c:1179: error: invalid lvalue in assignment +dl-load.c:1205: error: invalid lvalue in assignment + +=================================================================== +RCS file: /cvs/glibc/libc/elf/dl-load.c,v +retrieving revision 1.235 +retrieving revision 1.236 +diff -u -r1.235 -r1.236 +--- libc/elf/dl-load.c 2004/02/09 07:03:48 1.235 ++++ libc/elf/dl-load.c 2004/02/21 18:25:41 1.236 +@@ -1228,7 +1228,7 @@ + } + else + /* Adjust the PT_PHDR value by the runtime load address. */ +- (ElfW(Addr)) l->l_phdr += l->l_addr; ++ l->l_phdr = (ElfW(Phdr) *) ((ElfW(Addr)) l->l_phdr + l->l_addr); + } + + #ifdef USE_TLS +@@ -1254,7 +1254,7 @@ + } + } + else +- (ElfW(Addr)) l->l_ld += l->l_addr; ++ l->l_ld = (ElfW(Dyn) *) ((ElfW(Addr)) l->l_ld + l->l_addr); + + l->l_entry += l->l_addr; + diff --git a/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-gconv.patch b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-gconv.patch new file mode 100644 index 0000000..3d6df5b --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-gconv.patch @@ -0,0 +1,228 @@ +Fixes +gconv_open.c: In function `__gconv_open': +gconv_open.c:186: error: invalid lvalue in assignment +when building glibc-2.3.2 with gcc-3.5. + +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/iconv/gconv_simple.c.diff?r1=1.59&r2=1.63&cvsroot=glibc' + * (internal_ucs4_loop): Fix typo in last change. + + * (internal_ucs4le_loop): Remove cast used as lvalue. + + * Fix last commit. + + * iconv/gconv_simple.c (ucs4le_internal_loop): Remove cast used as lvalue. + (internal_ucs4le_loop_single): Likewise. + (ucs4_internal_loop): Likewise. + (BODY): Likewise. + (internal_ucs4_loop_single): Likewise. + +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/iconv/gconv_open.c.diff?r1=1.32&r2=1.33&cvsroot=glibc' + * iconv/gconv_simple.c (ucs4le_internal_loop): Remove cast used as lvalue. + (internal_ucs4le_loop_single): Likewise. + (ucs4_internal_loop): Likewise. + (BODY): Likewise. + (internal_ucs4_loop_single): Likewise. + + +=================================================================== +RCS file: /cvs/glibc/libc/iconv/gconv_open.c,v +retrieving revision 1.32 +retrieving revision 1.33 +diff -u -r1.32 -r1.33 +--- libc/iconv/gconv_open.c 2001/11/29 04:51:58 1.32 ++++ libc/iconv/gconv_open.c 2004/02/07 15:56:32 1.33 +@@ -1,5 +1,5 @@ + /* Find matching transformation algorithms and initialize steps. +- Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. ++ Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. + +@@ -182,8 +182,13 @@ + || __builtin_expect (__gconv_translit_find (runp), 0) == 0) + lastp = runp; + else +- /* This means we haven't found the module. Remove it. */ +- (lastp == NULL ? trans : lastp->next) = runp->next; ++ { ++ /* This means we haven't found the module. Remove it. */ ++ if (lastp == NULL) ++ trans = runp->next; ++ else ++ lastp->next = runp->next; ++ } + } + + /* Allocate room for handle. */ +=================================================================== +RCS file: /cvs/glibc/libc/iconv/gconv_simple.c,v +retrieving revision 1.59 +retrieving revision 1.63 +diff -u -r1.59 -r1.63 +--- libc/iconv/gconv_simple.c 2003/06/11 21:36:37 1.59 ++++ libc/iconv/gconv_simple.c 2004/03/09 10:00:31 1.63 +@@ -1,5 +1,5 @@ + /* Simple transformations functions. +- Copyright (C) 1997-2002, 2003 Free Software Foundation, Inc. ++ Copyright (C) 1997-2003, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. + +@@ -87,12 +87,13 @@ + #if __BYTE_ORDER == __LITTLE_ENDIAN + /* Sigh, we have to do some real work. */ + size_t cnt; ++ uint32_t *outptr32 = (uint32_t *) outptr; + + for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4) +- *((uint32_t *) outptr)++ = bswap_32 (*(const uint32_t *) inptr); ++ *outptr32++ = bswap_32 (*(const uint32_t *) inptr); + + *inptrp = inptr; +- *outptrp = outptr; ++ *outptrp = (unsigned char *) outptr32; + #elif __BYTE_ORDER == __BIG_ENDIAN + /* Simply copy the data. */ + *inptrp = inptr + n_convert * 4; +@@ -192,13 +193,16 @@ + (*outptrp)[2] = state->__value.__wchb[1]; + (*outptrp)[3] = state->__value.__wchb[0]; + +- *outptrp += 4; + #elif __BYTE_ORDER == __BIG_ENDIAN + /* XXX unaligned */ +- *(*((uint32_t **) outptrp)++) = state->__value.__wch; ++ (*outptrp)[0] = state->__value.__wchb[0]; ++ (*outptrp)[1] = state->__value.__wchb[1]; ++ (*outptrp)[2] = state->__value.__wchb[2]; ++ (*outptrp)[3] = state->__value.__wchb[3]; + #else + # error "This endianess is not supported." + #endif ++ *outptrp += 4; + + /* Clear the state buffer. */ + state->__count &= ~7; +@@ -268,7 +272,8 @@ + return __GCONV_ILLEGAL_INPUT; + } + +- *((uint32_t *) outptr)++ = inval; ++ *((uint32_t *) outptr) = inval; ++ outptr += sizeof (uint32_t); + } + + *inptrp = inptr; +@@ -447,9 +452,11 @@ + #if __BYTE_ORDER == __BIG_ENDIAN + /* Sigh, we have to do some real work. */ + size_t cnt; ++ uint32_t *outptr32 = (uint32_t *) outptr; + + for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4) +- *((uint32_t *) outptr)++ = bswap_32 (*(const uint32_t *) inptr); ++ *outptr32++ = bswap_32 (*(const uint32_t *) inptr); ++ outptr = (unsigned char *) outptr32; + + *inptrp = inptr; + *outptrp = outptr; +@@ -555,12 +562,17 @@ + (*outptrp)[2] = state->__value.__wchb[1]; + (*outptrp)[3] = state->__value.__wchb[0]; + +- *outptrp += 4; + #else + /* XXX unaligned */ +- *(*((uint32_t **) outptrp)++) = state->__value.__wch; ++ (*outptrp)[0] = state->__value.__wchb[0]; ++ (*outptrp)[1] = state->__value.__wchb[1]; ++ (*outptrp)[2] = state->__value.__wchb[2]; ++ (*outptrp)[3] = state->__value.__wchb[3]; ++ + #endif + ++ *outptrp += 4; ++ + /* Clear the state buffer. */ + state->__count &= ~7; + +@@ -626,7 +638,8 @@ + return __GCONV_ILLEGAL_INPUT; + } + +- *((uint32_t *) outptr)++ = inval; ++ *((uint32_t *) outptr) = inval; ++ outptr += sizeof (uint32_t); + } + + *inptrp = inptr; +@@ -808,7 +821,8 @@ + } \ + else \ + /* It's an one byte sequence. */ \ +- *((uint32_t *) outptr)++ = *inptr++; \ ++ *((uint32_t *) outptr) = *inptr++; \ ++ outptr += sizeof (uint32_t); \ + } + #define LOOP_NEED_FLAGS + #include <iconv/loop.c> +@@ -838,7 +852,8 @@ + } \ + else \ + /* It's an one byte sequence. */ \ +- *outptr++ = *((const uint32_t *) inptr)++; \ ++ *outptr++ = *((const uint32_t *) inptr); \ ++ inptr += sizeof (uint32_t); \ + } + #define LOOP_NEED_FLAGS + #include <iconv/loop.c> +@@ -1032,7 +1047,8 @@ + } \ + \ + /* Now adjust the pointers and store the result. */ \ +- *((uint32_t *) outptr)++ = ch; \ ++ *((uint32_t *) outptr) = ch; \ ++ outptr += sizeof (uint32_t); \ + } + #define LOOP_NEED_FLAGS + +@@ -1153,7 +1169,8 @@ + STANDARD_FROM_LOOP_ERR_HANDLER (2); \ + } \ + \ +- *((uint32_t *) outptr)++ = u1; \ ++ *((uint32_t *) outptr) = u1; \ ++ outptr += sizeof (uint32_t); \ + inptr += 2; \ + } + #define LOOP_NEED_FLAGS +@@ -1201,7 +1218,8 @@ + } \ + else \ + { \ +- *((uint16_t *) outptr)++ = val; \ ++ *((uint16_t *) outptr) = val; \ ++ outptr += sizeof (uint16_t); \ + inptr += 4; \ + } \ + } +@@ -1242,7 +1260,8 @@ + continue; \ + } \ + \ +- *((uint32_t *) outptr)++ = u1; \ ++ *((uint32_t *) outptr) = u1; \ ++ outptr += sizeof (uint32_t); \ + inptr += 2; \ + } + #define LOOP_NEED_FLAGS +@@ -1291,7 +1310,8 @@ + } \ + else \ + { \ +- *((uint16_t *) outptr)++ = bswap_16 (val); \ ++ *((uint16_t *) outptr) = bswap_16 (val); \ ++ outptr += sizeof (uint16_t); \ + inptr += 4; \ + } \ + } diff --git a/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-msort.patch b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-msort.patch new file mode 100644 index 0000000..e2673de --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-msort.patch @@ -0,0 +1,46 @@ +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/stdlib/msort.c.diff?r1=1.20&r2=1.21&cvsroot=glibc + +Fixes + +msort.c: In function `msort_with_tmp': +msort.c:59: error: invalid lvalue in increment +msort.c:59: error: invalid lvalue in increment +msort.c:64: error: invalid lvalue in increment +msort.c:64: error: invalid lvalue in increment + +when building with gcc-3.5. + +=================================================================== +RCS file: /cvs/glibc/libc/stdlib/msort.c,v +retrieving revision 1.20 +retrieving revision 1.21 +diff -u -r1.20 -r1.21 +--- libc/stdlib/msort.c 2002/09/24 04:20:57 1.20 ++++ libc/stdlib/msort.c 2004/02/07 15:57:34 1.21 +@@ -1,6 +1,6 @@ + /* An alternative to qsort, with an identical interface. + This file is part of the GNU C Library. +- Copyright (C) 1992,95-97,99,2000,01,02 Free Software Foundation, Inc. ++ Copyright (C) 1992,95-97,99,2000,01,02,04 Free Software Foundation, Inc. + Written by Mike Haertel, September 1988. + + The GNU C Library is free software; you can redistribute it and/or +@@ -56,12 +56,16 @@ + if ((*cmp) (b1, b2) <= 0) + { + --n1; +- *((op_t *) tmp)++ = *((op_t *) b1)++; ++ *((op_t *) tmp) = *((op_t *) b1); ++ tmp += sizeof (op_t); ++ b1 += sizeof (op_t); + } + else + { + --n2; +- *((op_t *) tmp)++ = *((op_t *) b2)++; ++ *((op_t *) tmp) = *((op_t *) b2); ++ tmp += sizeof (op_t); ++ b2 += sizeof (op_t); + } + } + else diff --git a/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-sunrpc.patch b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-sunrpc.patch new file mode 100644 index 0000000..5a68bc2 --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-sunrpc.patch @@ -0,0 +1,233 @@ +http://sources.redhat.com/ml/libc-hacker/2004-02/msg00005.html +[Also in CVS, but the original patch is easier to get.] + +Fixes errors like + +clnt_perr.c: In function `_buf': +clnt_perr.c:67: error: invalid lvalue in assignment + +when building with gcc-3.5. + +To: libc-hacker at sources dot redhat dot com +Subject: Fix cast as lvalue in sunrpc +From: Andreas Schwab <schwab at suse dot de> +X-Yow: SHHHH!! I hear SIX TATTOOED TRUCK-DRIVERS tossing ENGINE BLOCKS + into empty OIL DRUMS dot dot +Date: Sun, 08 Feb 2004 17:38:31 +0100 +Message-ID: <je4qu1frw8.fsf@sykes.suse.de> + +This fixes the uses of casts as lvalue in the sunrpc code. + +Andreas. + +2004-02-08 Andreas Schwab <schwab@suse.de> + + * include/rpc/rpc.h: Declare thread variables with their correct + type. + * sunrpc/clnt_perr.c: Don't cast thread variables. + * sunrpc/clnt_raw.c: Likewise. + * sunrpc/clnt_simp.c: Likewise. + * sunrpc/key_call.c: Likewise. + * sunrpc/svcauth_des.c: Likewise. + * sunrpc/svc.c: Likewise. + * sunrpc/svc_raw.c: Likewise. + * sunrpc/svc_simple.c: Likewise. + +Index: include/rpc/rpc.h +=================================================================== +RCS file: /cvs/glibc/libc/include/rpc/rpc.h,v +retrieving revision 1.8 +diff -u -p -a -r1.8 rpc.h +--- glibc/include/rpc/rpc.h 5 Aug 2002 22:10:59 -0000 1.8 ++++ glibc/include/rpc/rpc.h 8 Feb 2004 14:19:14 -0000 +@@ -17,24 +17,24 @@ struct rpc_thread_variables { + struct pollfd *svc_pollfd_s; /* Global, rpc_common.c */ + int svc_max_pollfd_s; /* Global, rpc_common.c */ + +- void *clnt_perr_buf_s; /* clnt_perr.c */ ++ char *clnt_perr_buf_s; /* clnt_perr.c */ + +- void *clntraw_private_s; /* clnt_raw.c */ ++ struct clntraw_private_s *clntraw_private_s; /* clnt_raw.c */ + +- void *callrpc_private_s; /* clnt_simp.c */ ++ struct callrpc_private_s *callrpc_private_s; /* clnt_simp.c */ + +- void *key_call_private_s; /* key_call.c */ ++ struct key_call_private *key_call_private_s; /* key_call.c */ + +- void *authdes_cache_s; /* svcauth_des.c */ +- void *authdes_lru_s; /* svcauth_des.c */ ++ struct cache_entry *authdes_cache_s; /* svcauth_des.c */ ++ int *authdes_lru_s; /* svcauth_des.c */ + +- void *svc_xports_s; /* svc.c */ +- void *svc_head_s; /* svc.c */ ++ SVCXPRT **svc_xports_s; /* svc.c */ ++ struct svc_callout *svc_head_s; /* svc.c */ + +- void *svcraw_private_s; /* svc_raw.c */ ++ struct svcraw_private_s *svcraw_private_s; /* svc_raw.c */ + +- void *svcsimple_proglst_s; /* svc_simple.c */ +- void *svcsimple_transp_s; /* svc_simple.c */ ++ struct proglst_ *svcsimple_proglst_s; /* svc_simple.c */ ++ SVCXPRT *svcsimple_transp_s; /* svc_simple.c */ + }; + + extern struct rpc_thread_variables *__rpc_thread_variables(void) +Index: sunrpc/clnt_perr.c +=================================================================== +RCS file: /cvs/glibc/libc/sunrpc/clnt_perr.c,v +retrieving revision 1.19 +diff -u -p -a -r1.19 clnt_perr.c +--- glibc/sunrpc/clnt_perr.c 1 Nov 2002 20:43:54 -0000 1.19 ++++ glibc/sunrpc/clnt_perr.c 8 Feb 2004 14:19:14 -0000 +@@ -55,7 +55,7 @@ static char *auth_errmsg (enum auth_stat + * buf variable in a few functions. Overriding a global variable + * with a local variable of the same name is a bad idea, anyway. + */ +-#define buf ((char *)RPC_THREAD_VARIABLE(clnt_perr_buf_s)) ++#define buf RPC_THREAD_VARIABLE(clnt_perr_buf_s) + #else + static char *buf; + #endif +Index: sunrpc/clnt_raw.c +=================================================================== +RCS file: /cvs/glibc/libc/sunrpc/clnt_raw.c,v +retrieving revision 1.10 +diff -u -p -a -r1.10 clnt_raw.c +--- glibc/sunrpc/clnt_raw.c 15 May 2002 00:21:00 -0000 1.10 ++++ glibc/sunrpc/clnt_raw.c 8 Feb 2004 14:19:14 -0000 +@@ -61,7 +61,7 @@ struct clntraw_private_s + u_int mcnt; + }; + #ifdef _RPC_THREAD_SAFE_ +-#define clntraw_private ((struct clntraw_private_s *)RPC_THREAD_VARIABLE(clntraw_private_s)) ++#define clntraw_private RPC_THREAD_VARIABLE(clntraw_private_s) + #else + static struct clntraw_private_s *clntraw_private; + #endif +Index: sunrpc/clnt_simp.c +=================================================================== +RCS file: /cvs/glibc/libc/sunrpc/clnt_simp.c,v +retrieving revision 1.14 +diff -u -p -a -r1.14 clnt_simp.c +--- glibc/sunrpc/clnt_simp.c 15 May 2002 00:21:00 -0000 1.14 ++++ glibc/sunrpc/clnt_simp.c 8 Feb 2004 14:19:14 -0000 +@@ -55,7 +55,7 @@ struct callrpc_private_s + char *oldhost; + }; + #ifdef _RPC_THREAD_SAFE_ +-#define callrpc_private ((struct callrpc_private_s *)RPC_THREAD_VARIABLE(callrpc_private_s)) ++#define callrpc_private RPC_THREAD_VARIABLE(callrpc_private_s) + #else + static struct callrpc_private_s *callrpc_private; + #endif +Index: sunrpc/key_call.c +=================================================================== +RCS file: /cvs/glibc/libc/sunrpc/key_call.c,v +retrieving revision 1.16 +diff -u -p -a -r1.16 key_call.c +--- glibc/sunrpc/key_call.c 6 Aug 2002 06:08:50 -0000 1.16 ++++ glibc/sunrpc/key_call.c 8 Feb 2004 14:19:14 -0000 +@@ -370,7 +370,7 @@ struct key_call_private { + uid_t uid; /* user-id at last authorization */ + }; + #ifdef _RPC_THREAD_SAFE_ +-#define key_call_private_main ((struct key_call_private *)RPC_THREAD_VARIABLE(key_call_private_s)) ++#define key_call_private_main RPC_THREAD_VARIABLE(key_call_private_s) + #else + static struct key_call_private *key_call_private_main; + #endif +Index: sunrpc/svc.c +=================================================================== +RCS file: /cvs/glibc/libc/sunrpc/svc.c,v +retrieving revision 1.17 +diff -u -p -a -r1.17 svc.c +--- glibc/sunrpc/svc.c 29 Aug 2003 07:45:18 -0000 1.17 ++++ glibc/sunrpc/svc.c 8 Feb 2004 14:19:14 -0000 +@@ -44,7 +44,7 @@ + #include <sys/poll.h> + + #ifdef _RPC_THREAD_SAFE_ +-#define xports ((SVCXPRT **)RPC_THREAD_VARIABLE(svc_xports_s)) ++#define xports RPC_THREAD_VARIABLE(svc_xports_s) + #else + static SVCXPRT **xports; + #endif +@@ -63,7 +63,7 @@ struct svc_callout { + void (*sc_dispatch) (struct svc_req *, SVCXPRT *); + }; + #ifdef _RPC_THREAD_SAFE_ +-#define svc_head ((struct svc_callout *)RPC_THREAD_VARIABLE(svc_head_s)) ++#define svc_head RPC_THREAD_VARIABLE(svc_head_s) + #else + static struct svc_callout *svc_head; + #endif +Index: sunrpc/svc_raw.c +=================================================================== +RCS file: /cvs/glibc/libc/sunrpc/svc_raw.c,v +retrieving revision 1.5 +diff -u -p -a -r1.5 svc_raw.c +--- glibc/sunrpc/svc_raw.c 26 Feb 2002 01:43:56 -0000 1.5 ++++ glibc/sunrpc/svc_raw.c 8 Feb 2004 14:19:14 -0000 +@@ -54,7 +54,7 @@ struct svcraw_private_s + char verf_body[MAX_AUTH_BYTES]; + }; + #ifdef _RPC_THREAD_SAFE_ +-#define svcraw_private ((struct svcraw_private_s *)RPC_THREAD_VARIABLE(svcraw_private_s)) ++#define svcraw_private RPC_THREAD_VARIABLE(svcraw_private_s) + #else + static struct svcraw_private_s *svcraw_private; + #endif +Index: sunrpc/svc_simple.c +=================================================================== +RCS file: /cvs/glibc/libc/sunrpc/svc_simple.c,v +retrieving revision 1.16 +diff -u -p -a -r1.16 svc_simple.c +--- glibc/sunrpc/svc_simple.c 6 Aug 2002 05:10:30 -0000 1.16 ++++ glibc/sunrpc/svc_simple.c 8 Feb 2004 14:19:14 -0000 +@@ -61,7 +61,7 @@ struct proglst_ + struct proglst_ *p_nxt; + }; + #ifdef _RPC_THREAD_SAFE_ +-#define proglst ((struct proglst_ *)RPC_THREAD_VARIABLE(svcsimple_proglst_s)) ++#define proglst RPC_THREAD_VARIABLE(svcsimple_proglst_s) + #else + static struct proglst_ *proglst; + #endif +@@ -69,7 +69,7 @@ static struct proglst_ *proglst; + + static void universal (struct svc_req *rqstp, SVCXPRT *transp_s); + #ifdef _RPC_THREAD_SAFE_ +-#define transp ((SVCXPRT *)RPC_THREAD_VARIABLE(svcsimple_transp_s)) ++#define transp RPC_THREAD_VARIABLE(svcsimple_transp_s) + #else + static SVCXPRT *transp; + #endif +Index: sunrpc/svcauth_des.c +=================================================================== +RCS file: /cvs/glibc/libc/sunrpc/svcauth_des.c,v +retrieving revision 1.8 +diff -u -p -a -r1.8 svcauth_des.c +--- glibc/sunrpc/svcauth_des.c 20 Aug 2001 06:37:09 -0000 1.8 ++++ glibc/sunrpc/svcauth_des.c 8 Feb 2004 14:19:14 -0000 +@@ -72,8 +72,8 @@ struct cache_entry + char *localcred; /* generic local credential */ + }; + #ifdef _RPC_THREAD_SAFE_ +-#define authdes_cache ((struct cache_entry *)RPC_THREAD_VARIABLE(authdes_cache_s)) +-#define authdes_lru ((int *)RPC_THREAD_VARIABLE(authdes_lru_s)) ++#define authdes_cache RPC_THREAD_VARIABLE(authdes_cache_s) ++#define authdes_lru RPC_THREAD_VARIABLE(authdes_lru_s) + #else + static struct cache_entry *authdes_cache; + static int *authdes_lru; + +-- +Andreas Schwab, SuSE Labs, schwab@suse.de +SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany +Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 +"And now for something completely different." + diff --git a/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-xdr.patch b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-xdr.patch new file mode 100644 index 0000000..4d811e9 --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-xdr.patch @@ -0,0 +1,44 @@ +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sunrpc/rpc/xdr.h.diff?r1=1.27&r2=1.28&cvsroot=glibc +(but see also http://sources.redhat.com/ml/libc-alpha/2004-03/msg00267.html +and http://gcc.gnu.org/ml/gcc-patches/2004-03/msg02056.html) + +Fixes errors + +rpc_cmsg.c: In function `xdr_callmsg': +rpc_cmsg.c:70: error: invalid lvalue in increment +rpc_cmsg.c:71: error: invalid lvalue in increment +rpc_cmsg.c:74: error: invalid lvalue in increment +rpc_cmsg.c:77: error: invalid lvalue in increment +rpc_cmsg.c:78: error: invalid lvalue in increment +rpc_cmsg.c:79: error: invalid lvalue in increment +rpc_cmsg.c:81: error: invalid lvalue in increment +rpc_cmsg.c:89: error: invalid lvalue in increment +rpc_cmsg.c:106: error: invalid lvalue in increment +rpc_cmsg.c:107: error: invalid lvalue in increment +rpc_cmsg.c:112: error: invalid lvalue in increment +rpc_cmsg.c:117: error: invalid lvalue in increment +rpc_cmsg.c:118: error: invalid lvalue in increment +rpc_cmsg.c:119: error: invalid lvalue in increment +rpc_cmsg.c:121: error: invalid lvalue in increment +rpc_cmsg.c:160: error: invalid lvalue in increment + +=================================================================== +RCS file: /cvs/glibc/libc/sunrpc/rpc/xdr.h,v +retrieving revision 1.27 +retrieving revision 1.28 +diff -u -r1.27 -r1.28 +--- libc/sunrpc/rpc/xdr.h 2002/12/16 02:05:49 1.27 ++++ libc/sunrpc/rpc/xdr.h 2004/03/22 10:52:33 1.28 +@@ -262,10 +262,8 @@ + * and shouldn't be used any longer. Code which use this defines or longs + * in the RPC code will not work on 64bit Solaris platforms ! + */ +-#define IXDR_GET_LONG(buf) \ +- ((long)ntohl((u_long)*__extension__((u_int32_t*)(buf))++)) +-#define IXDR_PUT_LONG(buf, v) \ +- (*__extension__((u_int32_t*)(buf))++ = (long)htonl((u_long)(v))) ++#define IXDR_GET_LONG(buf) ((long)IXDR_GET_U_INT32(buf)) ++#define IXDR_PUT_LONG(buf, v) ((long)IXDR_PUT_INT32(buf, (long)(v))) + #define IXDR_GET_U_LONG(buf) ((u_long)IXDR_GET_LONG(buf)) + #define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG(buf, (long)(v)) + diff --git a/patches/glibc/2.3.2/glibc-2.3.2-alpha-pwrite64.patch b/patches/glibc/2.3.2/glibc-2.3.2-alpha-pwrite64.patch new file mode 100644 index 0000000..809c1b3 --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-alpha-pwrite64.patch @@ -0,0 +1,54 @@ +Fix for this error: + +crosstool-0.28-rc19/build/alpha-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/libc_pic.os(.text+0xd9b2c): In function `posix_fallocate64': +: undefined reference to `__GI___pwrite64' +collect2: ld returned 1 exit status +make[1]: *** [crosstool-0.28-rc19/build/alpha-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/libc.so] Error 1 +make[1]: Leaving directory `crosstool-0.28-rc19/build/alpha-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2' +make: *** [all] Error 2 + +extracted from GLIBC CVS by Dan Kegel +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/alpha/sysdep.h.diff?r1=1.14&r2=1.15&cvsroot=glibc' +(to match context of...) +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/alpha/sysdep.h.diff?r1=1.16&r2=1.17&cvsroot=glibc' +and rediffed. + +cf. +http://sources.redhat.com/ml/libc-alpha/2003-10/msg00038.html + +Originally thought we needed this hunk, too: +http://sources.redhat.com/ml/libc-alpha/2003-10/msg00037.html +but it seems the sysdep.h change is sufficient, and works better +when compiling against linux-2.4. + +=================================================================== +--- glibc-2.3.2/sysdeps/unix/sysv/linux/alpha/sysdep.h.old 2004-05-24 22:21:44.000000000 -0700 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/alpha/sysdep.h 2004-05-24 22:22:48.000000000 -0700 +@@ -1,4 +1,4 @@ +-/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003 ++/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003, 2004 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995. +@@ -60,6 +60,21 @@ + #define __NR_osf_getsysinfo 256 + #define __NR_osf_setsysinfo 257 + ++/* Help old kernel headers where particular syscalls are not available. */ ++#ifndef __NR_semtimedop ++# define __NR_semtimedop 423 ++#endif ++ ++/* This is a kludge to make syscalls.list find these under the names ++ pread and pwrite, since some kernel headers define those names ++ and some define the *64 names for the same system calls. */ ++#if !defined __NR_pread && defined __NR_pread64 ++# define __NR_pread __NR_pread64 ++#endif ++#if !defined __NR_pwrite && defined __NR_pwrite64 ++# define __NR_pwrite __NR_pwrite64 ++#endif ++ + /* + * In order to get the hidden arguments for rt_sigaction set up + * properly, we need to call the assembly version. Detect this in the diff --git a/patches/glibc/2.3.2/glibc-2.3.2-arm-fix-strlen.patch b/patches/glibc/2.3.2/glibc-2.3.2-arm-fix-strlen.patch new file mode 100644 index 0000000..03e5c5b --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-arm-fix-strlen.patch @@ -0,0 +1,54 @@ +See also +http://lists.gnu.org/archive/html/bug-glibc/2002-12/msg00056.html +http://lists.arm.linux.org.uk/pipermail/linux-arm-toolchain/2004-June/000016.html + +2002-12-12 Andreas Schwab <schwab@suse.de> + * sysdeps/arm/strlen.S: Fix last word check for big endian. + +To: libc-alpha at sources dot redhat dot com +Subject: [PATCH] REPOST: ARM big-endian strlen() fix +References: <m3brjy27mo.fsf@defiant.pm.waw.pl> +From: Krzysztof Halasa <khc at pm dot waw dot pl> +Date: Thu, 10 Jun 2004 13:41:44 +0200 +Message-ID: <m3r7sn8wsn.fsf@defiant.pm.waw.pl> +MIME-Version: 1.0 +Content-Type: multipart/mixed; boundary="=-=-=" + +--=-=-= + +The attached patch fixes strlen() on big-endian ARM. Please apply. +Thanks. +-- +Krzysztof Halasa, B*FH + +--=-=-= +Content-Type: text/x-patch +Content-Disposition: inline; filename=glibc-strlen.patch + +--- glibc-2.3.3.old/sysdeps/arm/strlen.S 2003-04-30 00:47:20.000000000 +0200 ++++ glibc-2.3.3/sysdeps/arm/strlen.S 2004-06-06 03:21:48.351931240 +0200 +@@ -53,12 +53,21 @@ + ldrne r2, [r1], $4 @ and we continue to the next word + bne Laligned @ + Llastword: @ drop through to here once we find a ++#ifdef __ARMEB__ ++ tst r2, $0xff000000 @ word that has a zero byte in it ++ addne r0, r0, $1 @ ++ tstne r2, $0x00ff0000 @ and add up to 3 bytes on to it ++ addne r0, r0, $1 @ ++ tstne r2, $0x0000ff00 @ (if first three all non-zero, 4th ++ addne r0, r0, $1 @ must be zero) ++#else + tst r2, $0x000000ff @ word that has a zero byte in it + addne r0, r0, $1 @ + tstne r2, $0x0000ff00 @ and add up to 3 bytes on to it + addne r0, r0, $1 @ + tstne r2, $0x00ff0000 @ (if first three all non-zero, 4th + addne r0, r0, $1 @ must be zero) ++#endif + RETINSTR(mov,pc,lr) + END(strlen) + libc_hidden_builtin_def (strlen) + +--=-=-=-- + diff --git a/patches/glibc/2.3.2/glibc-2.3.2-cross-2.patch b/patches/glibc/2.3.2/glibc-2.3.2-cross-2.patch new file mode 100644 index 0000000..7eae11a --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-cross-2.patch @@ -0,0 +1,18 @@ +When configuring canadian cross toolchain and you're unlucky enough to be +using a build and host that are different, but that config.sub thinks mean the same thing, +you might end up without BUILD_CC being defined as 'cc' or 'gcc', +which might cause $CC to be used instead, which would be wrong... + +Dan Kegel + +--- glibc-2.3.2/configure.old 2004-05-26 19:46:43.000000000 -0700 ++++ glibc-2.3.2/configure 2004-05-26 19:52:47.000000000 -0700 +@@ -3323,7 +3323,7 @@ + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + +-if test $host != $build; then ++if test "$cross_compiling" = yes; then + for ac_prog in gcc cc + do + # Extract the first word of "$ac_prog", so it can be a program name with args. diff --git a/patches/glibc/2.3.2/glibc-2.3.2-cross.patch b/patches/glibc/2.3.2/glibc-2.3.2-cross.patch new file mode 100644 index 0000000..d28ab9e --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-cross.patch @@ -0,0 +1,27 @@ +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/resolv/Makefile.diff?r1=1.41&r2=1.42&cvsroot=glibc + +Fixes +/bin/sh: /crosstool-0.15/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.3.2/build-glibc/elf/ld.so.1: cannot execute binary file +make[2]: *** [/crosstool-0.15/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.3.2/build-glibc/resolv/tst-leaks.out] Error 126 + +2003-03-01 Andreas Schwab <schwab@suse.de> + + * resolv/Makefile (tests): Don't depend on + $(objpfx)mtrace-tst-leaks when cross compiling. + +=================================================================== +RCS file: /cvs/glibc/libc/resolv/Makefile,v +retrieving revision 1.41 +retrieving revision 1.42 +diff -u -r1.41 -r1.42 +--- libc/resolv/Makefile 2003/02/23 03:35:39 1.41 ++++ libc/resolv/Makefile 2003/03/01 22:15:00 1.42 +@@ -93,6 +93,8 @@ + tst-leaks-ENV = MALLOC_TRACE=$(objpfx)tst-leaks.mtrace + $(objpfx)mtrace-tst-leaks: $(objpfx)tst-leaks.out + $(common-objpfx)malloc/mtrace $(objpfx)tst-leaks.mtrace > $@ ++ifeq (no,$(cross-compiling)) + ifneq (no,$(PERL)) + tests: $(objpfx)mtrace-tst-leaks + endif ++endif diff --git a/patches/glibc/2.3.2/glibc-2.3.2-cygwin.patch b/patches/glibc/2.3.2/glibc-2.3.2-cygwin.patch new file mode 100644 index 0000000..2b46818 --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-cygwin.patch @@ -0,0 +1,90 @@ +Fixes +elf/librtld.os: In function `process_envvars': : undefined reference to `__access' +... +when building glibc-2.3.2 on cygwin + +Idea from +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch +Basically, make glibc use .oST as suffix for 'object static' +instead of .oS, since cygwin has trouble distinguishing .os from .oS +(Original patch had .on, but .oST is more mnemonic for 'object static') + +glibc-linuxthreads-2.3.2 also requires a patch, see +../glibc-linuxthreads-2.3.2/glibc-linuxthreads-2.3.2-cygwin.patch + + +--- glibc-2.3.2/Makeconfig.orig 2003-01-05 21:31:36.000000000 -0800 ++++ glibc-2.3.2/Makeconfig 2004-03-13 23:42:03.781250000 -0800 +@@ -433,13 +433,13 @@ + # run the linked programs. + link-libc = -Wl,-rpath-link=$(rpath-link) \ + $(common-objpfx)libc.so$(libc.so-version) \ +- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib) ++ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib) + # This is how to find at build-time things that will be installed there. + rpath-dirs = math elf dlfcn nss nis rt resolv crypt + else + ifneq (,$(filter aix aix%,$(config-os))) + link-libc = $(common-objpfx)libc.a \ +- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib) ++ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib) + rpath-dirs = math dlfcn nss nis rt resolv crypt + endif + endif +@@ -652,7 +652,7 @@ + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX}) + # to pass different flags for each flavor. + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o)) +-all-object-suffixes := .o .os .op .og .ob .oS ++all-object-suffixes := .o .os .op .og .ob .oST + object-suffixes := + CPPFLAGS-.o = $(pic-default) + CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) +@@ -706,14 +706,14 @@ + + ifeq (yes,$(build-shared)) + # Build special library that contains the static-only routines for libc. +-object-suffixes-for-libc += .oS ++object-suffixes-for-libc += .oST + + # Must build the routines as PIC, though, because they can end up in (users') + # shared objects. We don't want to use CFLAGS-os because users may, for + # example, make that processor-specific. +-CFLAGS-.oS = $(CFLAGS-.o) $(pic-ccflag) +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 +-libtype.oS = lib%_nonshared.a ++CFLAGS-.oST = $(CFLAGS-.o) $(pic-ccflag) ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 ++libtype.oST = lib%_nonshared.a + endif + + +--- glibc-2.3.2/Makerules.orig 2003-02-22 15:23:31.000000000 -0800 ++++ glibc-2.3.2/Makerules 2004-03-13 23:43:40.984375000 -0800 +@@ -446,7 +446,7 @@ + # Bounded pointer thunks are only built for *.ob + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks)) + +-elide-routines.oS += $(filter-out $(static-only-routines),\ ++elide-routines.oST += $(filter-out $(static-only-routines),\ + $(routines) $(aux) $(sysdep_routines)) \ + $(elide-bp-thunks) + elide-routines.os += $(static-only-routines) $(elide-bp-thunks) +@@ -958,7 +958,7 @@ + install: $(inst_libdir)/libc.so + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \ + $(common-objpfx)libc.so$(libc.so-version) \ +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\ ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\ + $(libprefix)$(libc-name)) \ + $(+force) + (echo '/* GNU ld script';\ +@@ -966,7 +966,7 @@ + echo ' the static library, so try that secondarily. */';\ + cat $<; \ + echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \ +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\ ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\ + ')' \ + ) > $@.new + mv -f $@.new $@ diff --git a/patches/glibc/2.3.2/glibc-2.3.2-mips-user.patch b/patches/glibc/2.3.2/glibc-2.3.2-mips-user.patch new file mode 100644 index 0000000..bd70d4a --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-mips-user.patch @@ -0,0 +1,588 @@ +Retrieved from +http://sources.redhat.com/cgi-bin/get-raw-msg?listname=libc-alpha&date=2003-04&msgid=orfzoof4j0.fsf%40free.redhat.lsd.ic.unicamp.br +paths adjusted, and rediffed against glibc-2.3.2 +(i.e. to compensate for fact that +http://sources.redhat.com/ml/glibc-cvs/2003-q1/msg01155.html +is not present) + +Should fix + +In file included from ../sysdeps/unix/sysv/linux/mips/sys/procfs.h:29, + from ../linuxthreads_db/proc_service.h:20, + from ../linuxthreads_db/thread_dbP.h:7, + from ../linuxthreads/descr.h:43, + from ../linuxthreads/internals.h:29, + from ../linuxthreads/sysdeps/pthread/bits/libc-lock.h:27, + from ../sysdeps/generic/ldsodefs.h:38, + from ../sysdeps/unix/sysv/linux/ldsodefs.h:25, + from ../sysdeps/mips/elf/ldsodefs.h:25, + from ../sysdeps/unix/sysv/linux/init-first.c:30: +../sysdeps/unix/sysv/linux/mips/sys/user.h:26:21: asm/reg.h: No such file or directory +In file included from ../sysdeps/unix/sysv/linux/mips/sys/procfs.h:29, + from ../linuxthreads_db/proc_service.h:20, + from ../linuxthreads_db/thread_dbP.h:7, + from ../linuxthreads/descr.h:43, + from ../linuxthreads/internals.h:29, + from ../linuxthreads/sysdeps/pthread/bits/libc-lock.h:27, + from ../sysdeps/generic/ldsodefs.h:38, + from ../sysdeps/unix/sysv/linux/ldsodefs.h:25, + from ../sysdeps/mips/elf/ldsodefs.h:25, + from ../sysdeps/unix/sysv/linux/init-first.c:30: +../sysdeps/unix/sysv/linux/mips/sys/user.h:30: error: `EF_SIZE' undeclared here (not in a function) +make[2]: *** [mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/csu/init-first.o] Error 1 +make[2]: Leaving directory `mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2/csu' +make[1]: *** [csu/subdir_lib] Error 2 +make[1]: Leaving directory `mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2' +make: *** [all] Error 2 + +From libc-alpha-return-12105-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com Sat Apr 12 09:28:56 2003 +Return-Path: <libc-alpha-return-12105-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com> +Delivered-To: listarch-libc-alpha at sources dot redhat dot com +Received: (qmail 2802 invoked by alias); 12 Apr 2003 09:28:56 -0000 +Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm +Precedence: bulk +List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com> +List-Archive: <http://sources.redhat.com/ml/libc-alpha/> +List-Post: <mailto:libc-alpha at sources dot redhat dot com> +List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs> +Sender: libc-alpha-owner at sources dot redhat dot com +Delivered-To: mailing list libc-alpha at sources dot redhat dot com +Received: (qmail 2795 invoked from network); 12 Apr 2003 09:28:55 -0000 +Received: from unknown (HELO lacrosse.corp.redhat.com) (66.187.233.200) + by sources dot redhat dot com with SMTP; 12 Apr 2003 09:28:55 -0000 +Received: from free.redhat.lsd.ic.unicamp.br (aoliva.cipe.redhat.com [10.0.1.10]) + by lacrosse dot corp dot redhat dot com (8 dot 11 dot 6/8 dot 9 dot 3) with ESMTP id h3C9SqV01131 + for <libc-alpha at sources dot redhat dot com>; Sat, 12 Apr 2003 05:28:52 -0400 +Received: from free.redhat.lsd.ic.unicamp.br (free.redhat.lsd.ic.unicamp.br [127.0.0.1]) + by free dot redhat dot lsd dot ic dot unicamp dot br (8 dot 12 dot 8/8 dot 12 dot 8) with ESMTP id h3C9SpVT028734 + for <libc-alpha at sources dot redhat dot com>; Sat, 12 Apr 2003 06:28:51 -0300 +Received: (from aoliva@localhost) + by free dot redhat dot lsd dot ic dot unicamp dot br (8 dot 12 dot 8/8 dot 12 dot 8/Submit) id h3C9SpFb028730; + Sat, 12 Apr 2003 06:28:51 -0300 +To: libc-alpha at sources dot redhat dot com +Subject: signal-handling tweaks for mips/mips64 +From: Alexandre Oliva <aoliva at redhat dot com> +Organization: GCC Team, Red Hat +Date: 12 Apr 2003 06:28:51 -0300 +Message-ID: <orfzoof4j0.fsf@free.redhat.lsd.ic.unicamp.br> +Lines: 49 +User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 +MIME-Version: 1.0 +Content-Type: multipart/mixed; boundary="=-=-=" + +--=-=-= + +It was reported to me that ucontext is utterly broken, even in o32 +with a stable 32-bit mips kernel. Indeed, it doesn't match the +ucontext structure defined by the kernel at all. This means that +programs taking real-time signals in o32 won't be able to extract +correct information from the mcontext_t, since the kernel puts data in +there that's in an entirely different format. + +I've looked for any ways in which the current data structures could +possibly be useful, and didn't find any. gdb and rda thought they +were using the register arrays, but it turned out they were using the +arrays in procps instead. makecontext(), [sg]etcontext() et al aren't +implemented on mips, so any uses thereof will just return ENOSYS, +without messing with the given data structure. So, I believe it is +not too late for us to fix it such that it matches the kernel data +structures. + +While at that, I fixed a number of incompatibilities introduced by +either differences between kernel headers that we used to include, +whose contents are different depending on whether asm points to +asm-mips or asm-mips64. + +With this patch, after some pending kernel patches are checked in, one +will be able to obtain the correct information from signal handlers in +all mips ABIs. With n64, this is already true. With o32, it works +with the 32-bit mips kernel, but the mips64 kernel needs a patch to +implement the proper sigcontext ABI. n32 still a patch to be +developed for it to be possible for ucontext to be POSIX-compliant. +Currently, the kernel uses the same ucontext for n32 and n64, but this +doesn't work in n32 because uc_link must be a pointer and stack_t must +contain a pointer and a size_t, whose sizes differ between n32 and +n64. I believe Ralf is working on a patch for the kernel to generate +n32-compliant ucontext when invoking signal handlers in n32 processes. +The only uncertainty is whether uc_flags will be a 32- or 64-bit value +in n32; I left it as the latter, just because I already had that in +place; if it changes, a (simplifying) follow-up patch will be posted. +However, I wanted to circulate the idea of fixing ucontext_t for o32 +as soon as possible, so I didn't wait for a decision on the exact n32 +ABI. + +Ok to install? + + +--=-=-= +Content-Type: text/x-patch +Content-Disposition: inline; filename=mips-sigstuff.patch + +Index: ChangeLog +from Alexandre Oliva <aoliva@redhat.com> + + * sysdeps/unix/sysv/linux/mips/profil-counter: New. + * sysdeps/unix/sysv/linux/mips/sigcontextinfo.h: Port to n32/n64. + * sysdeps/unix/sysv/linux/mips/bits/sigcontext.h: New. + * sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Port to n32/n64. + (mcontext_t): Make it match the 32-bit mips kernel in o32. + * sysdeps/unix/sysv/linux/mips/sys/user.h: Bring in constants from + the mips and mips64 headers. + (struct user): Port to n32/n64. + +Index: sysdeps/unix/sysv/linux/mips/profil-counter.h +=================================================================== +RCS file: sysdeps/unix/sysv/linux/mips/profil-counter.h +diff -N sysdeps/unix/sysv/linux/mips/profil-counter.h +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ libc/sysdeps/unix/sysv/linux/mips/profil-counter.h 12 Apr 2003 09:13:13 -0000 +@@ -0,0 +1,2 @@ ++/* We can use the ix86 version. */ ++#include <sysdeps/unix/sysv/linux/i386/profil-counter.h> +Index: sysdeps/unix/sysv/linux/mips/sigcontextinfo.h +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h,v +retrieving revision 1.6 +diff -u -p -r1.6 sigcontextinfo.h +--- libc/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h 6 Jul 2001 04:56:18 -0000 1.6 ++++ libc/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h 12 Apr 2003 09:13:13 -0000 +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. ++/* Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger <aj@suse.de>, 2000. + +@@ -18,6 +18,8 @@ + 02111-1307 USA. */ + + ++#if _MIPS_SIM == _MIPS_SIM_ABI32 ++ + #define SIGCONTEXT unsigned long _code, struct sigcontext * + #define SIGCONTEXT_EXTRA_ARGS _code, + #define GET_PC(ctx) ((void *) ctx->sc_pc) +@@ -25,3 +27,15 @@ + #define GET_STACK(ctx) ((void *) ctx->sc_regs[29]) + #define CALL_SIGHANDLER(handler, signo, ctx) \ + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) ++ ++#else ++ ++#define SIGCONTEXT unsigned long _code, ucontext_t * ++#define SIGCONTEXT_EXTRA_ARGS _code, ++#define GET_PC(ctx) ((void *) ctx->uc_mcontext.pc) ++#define GET_FRAME(ctx) ((void *) ctx->uc_mcontext.gregs[30]) ++#define GET_STACK(ctx) ((void *) ctx->uc_mcontext.gregs[29]) ++#define CALL_SIGHANDLER(handler, signo, ctx) \ ++ (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) ++ ++#endif +Index: sysdeps/unix/sysv/linux/mips/bits/sigcontext.h +=================================================================== +RCS file: sysdeps/unix/sysv/linux/mips/bits/sigcontext.h +diff -N sysdeps/unix/sysv/linux/mips/bits/sigcontext.h +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ libc/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h 12 Apr 2003 09:13:13 -0000 +@@ -0,0 +1,103 @@ ++/* Copyright (C) 1996, 1997, 1998, 2003 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H ++# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead." ++#endif ++ ++#ifndef sigcontext_struct ++/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but ++ we need sigcontext. */ ++# define sigcontext_struct sigcontext ++ ++/* # include <asm/sigcontext.h> */ ++/* Instead of including the kernel header, that will vary depending on ++ whether the 32- or the 64-bit kernel is installed, we paste the ++ contents here. In case you're wondering about the different ++ licenses, the fact that the file is pasted, instead of included, ++ doesn't really make any difference for the program that includes ++ this header. */ ++#if _MIPS_SIM == _MIPS_SIM_ABI32 ++/* ++ * This file is subject to the terms and conditions of the GNU General Public ++ * License. See the file "COPYING" in the main directory of this archive ++ * for more details. ++ * ++ * Copyright (C) 1996, 1997, 2000 by Ralf Baechle ++ */ ++#ifndef _ASM_SIGCONTEXT_H ++#define _ASM_SIGCONTEXT_H ++ ++/* ++ * Keep this struct definition in sync with the sigcontext fragment ++ * in arch/mips/tools/offset.c ++ */ ++struct sigcontext { ++ unsigned int sc_regmask; /* Unused */ ++ unsigned int sc_status; ++ unsigned long long sc_pc; ++ unsigned long long sc_regs[32]; ++ unsigned long long sc_fpregs[32]; ++ unsigned int sc_ownedfp; /* Unused */ ++ unsigned int sc_fpc_csr; ++ unsigned int sc_fpc_eir; /* Unused */ ++ unsigned int sc_used_math; ++ unsigned int sc_ssflags; /* Unused */ ++ unsigned long long sc_mdhi; ++ unsigned long long sc_mdlo; ++ ++ unsigned int sc_cause; /* Unused */ ++ unsigned int sc_badvaddr; /* Unused */ ++ ++ unsigned long sc_sigset[4]; /* kernel's sigset_t */ ++}; ++ ++#endif /* _ASM_SIGCONTEXT_H */ ++#else /* _MIPS_SIM != _MIPS_SIM_ABI32 */ ++/* ++ * This file is subject to the terms and conditions of the GNU General Public ++ * License. See the file "COPYING" in the main directory of this archive ++ * for more details. ++ * ++ * Copyright (C) 1996, 1997, 1999 by Ralf Baechle ++ * Copyright (C) 1999 Silicon Graphics, Inc. ++ */ ++#ifndef _ASM_SIGCONTEXT_H ++#define _ASM_SIGCONTEXT_H ++ ++/* ++ * Keep this struct definition in sync with the sigcontext fragment ++ * in arch/mips/tools/offset.c ++ */ ++struct sigcontext { ++ unsigned long long sc_regs[32]; ++ unsigned long long sc_fpregs[32]; ++ unsigned long long sc_mdhi; ++ unsigned long long sc_mdlo; ++ unsigned long long sc_pc; ++ unsigned int sc_status; ++ unsigned int sc_fpc_csr; ++ unsigned int sc_fpc_eir; ++ unsigned int sc_used_math; ++ unsigned int sc_cause; ++ unsigned int sc_badvaddr; ++}; ++ ++#endif /* _ASM_SIGCONTEXT_H */ ++#endif /* _MIPS_SIM != _MIPS_SIM_ABI32 */ ++#endif +[hunk deleted, see below] +Index: sysdeps/unix/sysv/linux/mips/sys/user.h +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/sys/user.h,v +retrieving revision 1.1 +diff -u -p -r1.1 user.h +--- libc/sysdeps/unix/sysv/linux/mips/sys/user.h 8 Feb 2002 16:21:00 -0000 1.1 ++++ libc/sysdeps/unix/sysv/linux/mips/sys/user.h 12 Apr 2003 09:13:13 -0000 +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2002 Free Software Foundation, Inc. ++/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -23,7 +23,154 @@ + too much into it. Don't use it for anything other than GDB unless + you know what you are doing. */ + +-#include <asm/reg.h> ++/* #include <asm/reg.h> */ ++/* Instead of including the kernel header, that will vary depending on ++ whether the 32- or the 64-bit kernel is installed, we paste its ++ contents here. Note that the fact that the file is inline here, ++ instead of included separately, doesn't change in any way the ++ licensing status of a program that includes user.h. Since this is ++ for gdb alone, and gdb is GPLed, no surprises here. */ ++#if _MIPS_SIM == _MIPS_SIM_ABI32 ++/* ++ * Various register offset definitions for debuggers, core file ++ * examiners and whatnot. ++ * ++ * This file is subject to the terms and conditions of the GNU General Public ++ * License. See the file "COPYING" in the main directory of this archive ++ * for more details. ++ * ++ * Copyright (C) 1995, 1999 by Ralf Baechle ++ */ ++#ifndef __ASM_MIPS_REG_H ++#define __ASM_MIPS_REG_H ++ ++/* ++ * This defines/structures correspond to the register layout on stack - ++ * if the order here is changed, it needs to be updated in ++ * include/asm-mips/stackframe.h ++ */ ++#define EF_REG0 6 ++#define EF_REG1 7 ++#define EF_REG2 8 ++#define EF_REG3 9 ++#define EF_REG4 10 ++#define EF_REG5 11 ++#define EF_REG6 12 ++#define EF_REG7 13 ++#define EF_REG8 14 ++#define EF_REG9 15 ++#define EF_REG10 16 ++#define EF_REG11 17 ++#define EF_REG12 18 ++#define EF_REG13 19 ++#define EF_REG14 20 ++#define EF_REG15 21 ++#define EF_REG16 22 ++#define EF_REG17 23 ++#define EF_REG18 24 ++#define EF_REG19 25 ++#define EF_REG20 26 ++#define EF_REG21 27 ++#define EF_REG22 28 ++#define EF_REG23 29 ++#define EF_REG24 30 ++#define EF_REG25 31 ++/* ++ * k0/k1 unsaved ++ */ ++#define EF_REG28 34 ++#define EF_REG29 35 ++#define EF_REG30 36 ++#define EF_REG31 37 ++ ++/* ++ * Saved special registers ++ */ ++#define EF_LO 38 ++#define EF_HI 39 ++ ++#define EF_CP0_EPC 40 ++#define EF_CP0_BADVADDR 41 ++#define EF_CP0_STATUS 42 ++#define EF_CP0_CAUSE 43 ++ ++#define EF_SIZE 180 /* size in bytes */ ++ ++#endif /* __ASM_MIPS_REG_H */ ++ ++#else /* _MIPS_SIM != _MIPS_SIM_ABI32 */ ++ ++/* ++ * Various register offset definitions for debuggers, core file ++ * examiners and whatnot. ++ * ++ * This file is subject to the terms and conditions of the GNU General Public ++ * License. See the file "COPYING" in the main directory of this archive ++ * for more details. ++ * ++ * Copyright (C) 1995, 1999 Ralf Baechle ++ * Copyright (C) 1995, 1999 Silicon Graphics ++ */ ++#ifndef _ASM_REG_H ++#define _ASM_REG_H ++ ++/* ++ * This defines/structures correspond to the register layout on stack - ++ * if the order here is changed, it needs to be updated in ++ * include/asm-mips/stackframe.h ++ */ ++#define EF_REG0 0 ++#define EF_REG1 1 ++#define EF_REG2 2 ++#define EF_REG3 3 ++#define EF_REG4 4 ++#define EF_REG5 5 ++#define EF_REG6 6 ++#define EF_REG7 7 ++#define EF_REG8 8 ++#define EF_REG9 9 ++#define EF_REG10 10 ++#define EF_REG11 11 ++#define EF_REG12 12 ++#define EF_REG13 13 ++#define EF_REG14 14 ++#define EF_REG15 15 ++#define EF_REG16 16 ++#define EF_REG17 17 ++#define EF_REG18 18 ++#define EF_REG19 19 ++#define EF_REG20 20 ++#define EF_REG21 21 ++#define EF_REG22 22 ++#define EF_REG23 23 ++#define EF_REG24 24 ++#define EF_REG25 25 ++/* ++ * k0/k1 unsaved ++ */ ++#define EF_REG28 28 ++#define EF_REG29 29 ++#define EF_REG30 30 ++#define EF_REG31 31 ++ ++/* ++ * Saved special registers ++ */ ++#define EF_LO 32 ++#define EF_HI 33 ++ ++#define EF_CP0_EPC 34 ++#define EF_CP0_BADVADDR 35 ++#define EF_CP0_STATUS 36 ++#define EF_CP0_CAUSE 37 ++ ++#define EF_SIZE 304 /* size in bytes */ ++ ++#endif /* _ASM_REG_H */ ++ ++#endif /* _MIPS_SIM != _MIPS_SIM_ABI32 */ ++ ++#if _MIPS_SIM == _MIPS_SIM_ABI32 + + struct user + { +@@ -39,6 +186,24 @@ struct user + unsigned long magic; /* identifies a core file */ + char u_comm[32]; /* user command name */ + }; ++ ++#else ++ ++struct user { ++ __extension__ unsigned long regs[EF_SIZE/8+64]; /* integer and fp regs */ ++ __extension__ unsigned long u_tsize; /* text size (pages) */ ++ __extension__ unsigned long u_dsize; /* data size (pages) */ ++ __extension__ unsigned long u_ssize; /* stack size (pages) */ ++ __extension__ unsigned long long start_code; /* text starting address */ ++ __extension__ unsigned long long start_data; /* data starting address */ ++ __extension__ unsigned long long start_stack; /* stack starting address */ ++ __extension__ long long signal; /* signal causing core dump */ ++ __extension__ unsigned long long u_ar0; /* help gdb find registers */ ++ __extension__ unsigned long long magic; /* identifies a core file */ ++ char u_comm[32]; /* user command name */ ++}; ++ ++#endif + + #define PAGE_SHIFT 12 + #define PAGE_SIZE (1UL << PAGE_SHIFT) + +--=-=-= + + +-- +Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ +Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org} +CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org} +Free Software Evangelist Professional serial bug killer + +--=-=-=-- + +And the rediffed hunk: + +--- glibc-2.3.2/sysdeps/unix/sysv/linux/mips/sys/ucontext.h.old 2004-05-30 07:23:32.000000000 -0700 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/mips/sys/ucontext.h 2004-05-30 07:22:56.000000000 -0700 +@@ -29,43 +29,72 @@ + #include <bits/sigcontext.h> + + +-/* Type for general register. */ +-typedef unsigned long int greg_t; ++/* Type for general register. Even in o32 we assume 64-bit registers, ++ like the kernel. */ ++__extension__ typedef unsigned long long int greg_t; + + /* Number of general registers. */ +-#define NGREG 37 +-#define NFPREG 33 ++#define NGREG 32 ++#define NFPREG 32 + + /* Container for all general registers. */ +-/* gregset_t must be an array. The below declared array corresponds to: +-typedef struct gregset { +- greg_t g_regs[32]; +- greg_t g_hi; +- greg_t g_lo; +- greg_t g_pad[3]; +-} gregset_t; */ + typedef greg_t gregset_t[NGREG]; + + /* Container for all FPU registers. */ + typedef struct fpregset { + union { +- double fp_dregs[32]; ++ double fp_dregs[NFPREG]; + struct { + float _fp_fregs; + unsigned int _fp_pad; +- } fp_fregs[32]; ++ } fp_fregs[NFPREG]; + } fp_r; +- unsigned int fp_csr; +- unsigned int fp_pad; + } fpregset_t; + + + /* Context to describe whole processor state. */ ++#if _MIPS_SIM == _MIPS_SIM_ABI32 ++/* Earlier versions of glibc for mips had an entirely different ++ definition of mcontext_t, that didn't even resemble the ++ corresponding kernel data structure. Since all legitimate uses of ++ ucontext_t in glibc mustn't have accessed anything beyond ++ uc_mcontext and, even then, taking a pointer to it, casting it to ++ sigcontext_t, and accessing it as such, which is what it has always ++ been, this can still be rectified. Fortunately, makecontext, ++ [gs]etcontext et all have never been implemented. */ + typedef struct + { ++ unsigned int regmask; ++ unsigned int status; ++ greg_t pc; + gregset_t gregs; + fpregset_t fpregs; ++ unsigned int fp_owned; ++ unsigned int fpc_csr; ++ unsigned int fpc_eir; ++ unsigned int used_math; ++ unsigned int ssflags; ++ greg_t mdhi; ++ greg_t mdlo; ++ unsigned int cause; ++ unsigned int badvaddr; + } mcontext_t; ++#else ++typedef struct ++ { ++ gregset_t gregs; ++ fpregset_t fpregs; ++ greg_t mdhi; ++ greg_t mdlo; ++ greg_t pc; ++ unsigned int status; ++ unsigned int fpc_csr; ++ unsigned int fpc_eir; ++ unsigned int used_math; ++ unsigned int cause; ++ unsigned int badvaddr; ++ } mcontext_t; ++#endif + + /* Userlevel context. */ + typedef struct ucontext diff --git a/patches/glibc/2.3.2/glibc-2.3.2-mips.patch b/patches/glibc/2.3.2/glibc-2.3.2-mips.patch new file mode 100644 index 0000000..2094429 --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-mips.patch @@ -0,0 +1,60 @@ +From Bill Gatliff, who said: +"Attached is a glibc-2.3.2 patchfile I use for MIPS. Versions prior to and including glibc-2.3.2 won't build without it." + +diff -bBurN glibc-2.3.2.orig/elf/dl-conflict.c glibc-2.3.2/elf/dl-conflict.c +--- glibc-2.3.2.orig/elf/dl-conflict.c 2003-06-12 21:07:54.000000000 -0500 ++++ glibc-2.3.2/elf/dl-conflict.c 2003-06-12 21:09:12.000000000 -0500 +@@ -33,6 +33,7 @@ + _dl_resolve_conflicts (struct link_map *l, ElfW(Rela) *conflict, + ElfW(Rela) *conflictend) + { ++#ifndef _DL_HAVE_NO_ELF_MACHINE_RELA + if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_RELOC, 0)) + _dl_printf ("\nconflict processing: %s\n", + l->l_name[0] ? l->l_name : rtld_progname); +@@ -64,4 +65,5 @@ + for (; conflict < conflictend; ++conflict) + elf_machine_rela (l, conflict, NULL, NULL, (void *) conflict->r_offset); + } ++#endif + } +diff -bBurN glibc-2.3.2.orig/sysdeps/mips/dl-machine.h glibc-2.3.2/sysdeps/mips/dl-machine.h +--- glibc-2.3.2.orig/sysdeps/mips/dl-machine.h 2003-06-12 21:07:49.000000000 -0500 ++++ glibc-2.3.2/sysdeps/mips/dl-machine.h 2003-06-12 21:11:10.000000000 -0500 +@@ -56,6 +56,10 @@ + #define ELF_MACHINE_JMP_SLOT R_MIPS_REL32 + #define elf_machine_type_class(type) ELF_RTYPE_CLASS_PLT + ++/* MIPS doesn't support RELA; see: ++ http://lists.debian.org/debian-mips/2002/debian-mips-200209/msg00020.html */ ++#define _DL_HAVE_NO_ELF_MACHINE_RELA ++ + /* Translate a processor specific dynamic tag to the index + in l_info array. */ + #define DT_MIPS(x) (DT_MIPS_##x - DT_LOPROC + DT_NUM) +diff -bBurN glibc-2.3.2.orig/sysdeps/mips/Makefile glibc-2.3.2/sysdeps/mips/Makefile +--- glibc-2.3.2.orig/sysdeps/mips/Makefile 2003-06-12 21:07:48.000000000 -0500 ++++ glibc-2.3.2/sysdeps/mips/Makefile 2003-06-12 21:10:14.000000000 -0500 +@@ -6,3 +6,11 @@ + ifeq ($(subdir),setjmp) + sysdep_routines += setjmp_aux + endif ++ ++ifeq ($(subdir),csu) ++ifeq (yes,$(build-shared)) ++# Compatibility ++sysdep_routines += divdi3 ++shared-only-routines += divdi3 ++endif ++endif +diff -bBurN glibc-2.3.2.orig/sysdeps/unix/sysv/linux/mips/syscalls.list glibc-2.3.2/sysdeps/unix/sysv/linux/mips/syscalls.list +--- glibc-2.3.2.orig/sysdeps/unix/sysv/linux/mips/syscalls.list 2003-06-12 21:07:53.000000000 -0500 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/mips/syscalls.list 2003-06-12 21:12:30.000000000 -0500 +@@ -41,6 +41,7 @@ + sys_mknod xmknod mknod i:sii __syscall_mknod + + # System calls with wrappers. ++s_readahead EXTRA readahead i:iipi __syscall_readahead + rt_sigaction - rt_sigaction i:ippi __syscall_rt_sigaction + rt_sigpending - rt_sigpending i:pi __syscall_rt_sigpending + rt_sigprocmask - rt_sigprocmask i:ippi __syscall_rt_sigprocmask diff --git a/patches/glibc/2.3.2/glibc-2.3.2-override.patch b/patches/glibc/2.3.2/glibc-2.3.2-override.patch new file mode 100644 index 0000000..17c999d --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-override.patch @@ -0,0 +1,38 @@ +The error + +make[2]: *** [.../gcc-3.3.3-glibc-2.1.3/i686-unknown-linux-gnu/share/zoneinfo/Africa/Algiers] Segmentation fault +make[2]: Leaving directory `.../gcc-3.3.3-glibc-2.1.3/glibc-2.1.3/timezone' +make[1]: *** [timezone/subdir_install] Error 2 + +is caused by glibc trying to run something it just compiled. +A crude workaround for this was posted at +http://lists.scratchbox.org/pipermail/scratchbox-users/2004-February/000018.html +but the following patch lets you optionally override these programs at +make time by setting Make variables + localedef_FOR_BUILD rpcgen_FOR_BUILD zic_FOR_BUILD +and maybe a few others to point to versions of those programs +that can run on the build machine. +Thanks to http://groups.google.com/groups?selm=9012160052.AA23106%40kaos.ksr.com +for pointing out the idiom for inline $(ifdef ...) in GNU Make. + +Dan Kegel 2004-05-17 +[rediffed for glibc-2.3.2] +[typos corrected - those are make variables, not environment variables, + and it's $(built-program-override-name), not $(build-program-override-name)] + +--- glibc-2.3.2/Makeconfig.old 2004-05-17 13:53:46.000000000 -0700 ++++ glibc-2.3.2/Makeconfig 2004-05-17 14:09:59.000000000 -0700 +@@ -534,9 +534,12 @@ + run-program-prefix = + endif + # Never use $(run-program-prefix) for the statically-linked %-bp test programs +-built-program-cmd = $(patsubst %,$(run-program-prefix),\ ++built-program-real = $(patsubst %,$(run-program-prefix),\ + $(filter-out %-bp,$(built-program-file))) \ + $(built-program-file) ++# If user set foo_FOR_BUILD, use that instead of actually running the program we just linked. ++built-program-override-name = $(notdir $(word 2,$^))_FOR_BUILD ++built-program-cmd = $(if $(findstring undefined,$(origin $(built-program-override-name))),$(built-program-real),$($(built-program-override-name))) + + ifndef LD + LD := ld -X diff --git a/patches/glibc/2.3.2/glibc-2.3.2-powerpc-as.patch b/patches/glibc/2.3.2/glibc-2.3.2-powerpc-as.patch new file mode 100644 index 0000000..02c72b1 --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-powerpc-as.patch @@ -0,0 +1,58 @@ +Retrieved from + http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/powerpc/powerpc32/Makefile.diff?r1=1.4&r2=1.5&cvsroot=glibc + http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/powerpc/powerpc64/Makefile.diff?r1=1.2&r2=1.3&cvsroot=glibc +Fixes + /tmp/ccEVhqgD.s:279: Error: Unrecognized opcode: `stvx' + /tmp/ccEVhqgD.s:288: Error: Unrecognized opcode: `lvx' + make[2]: *** [powerpc-7450-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/dlfcn/eval.os] Error 1 + make[2]: Leaving directory `powerpc-7450-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2/dlfcn' + make[1]: *** [dlfcn/others] Error 2 + make[1]: Leaving directory `powerpc-7450-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2' + make: *** [all] Error 2 + + +Revision 1.5 Wed Oct 22 21:30:02 2003 UTC (7 months, 1 week ago) by roland +Branch: MAIN +CVS Tags: HEAD +Changes since 1.4: +0 -3 lines +Diff to previous 1.4 (colored) + +2003-10-22 Steven Munroe <sjmunroe@us.ibm.com> + + * sysdeps/powerpc/powerpc32/Makefile (+cflags, asm-CPPFLAGS): Don't + append options to these. + * sysdeps/powerpc/powerpc64/Makefile (+cflags, asm-CPPFLAGS): Likewise. + +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/powerpc/powerpc32/Makefile,v +retrieving revision 1.4 +retrieving revision 1.5 +diff -u -r1.4 -r1.5 +--- libc/sysdeps/powerpc/powerpc32/Makefile 2003/01/27 21:02:01 1.4 ++++ libc/sysdeps/powerpc/powerpc32/Makefile 2003/10/22 21:30:02 1.5 +@@ -1,8 +1,5 @@ + # Powerpc32 specific build options. + +-+cflags += -Wa,-mppc -mpowerpc +-asm-CPPFLAGS += -Wa,-mppc +- + ifeq ($(with-fp),no) + +cflags += -msoft-float + sysdep-LDFLAGS += -msoft-float +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/powerpc/powerpc64/Makefile,v +retrieving revision 1.2 +retrieving revision 1.3 +diff -u -r1.2 -r1.3 +--- libc/sysdeps/powerpc/powerpc64/Makefile 2002/09/27 19:44:16 1.2 ++++ libc/sysdeps/powerpc/powerpc64/Makefile 2003/10/22 21:30:03 1.3 +@@ -1,9 +1,6 @@ + # Powerpc64 specific build options. + # this is ./sysdeps/powerpc/powerpc64/Makefile + +-+cflags += -Wa,-mppc64 -mpowerpc64 +-asm-CPPFLAGS += -Wa,-mppc64 +- + # Each TOC entry takes 8 bytes and the TOC holds up to 2^16 bytes, + # or 8192 entries. + # If -fpic is not specified, the latest gcc-3.2.1 now generates diff --git a/patches/glibc/2.3.2/glibc-2.3.2-pr139-fix.patch b/patches/glibc/2.3.2/glibc-2.3.2-pr139-fix.patch new file mode 100644 index 0000000..96e8fb3 --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-pr139-fix.patch @@ -0,0 +1,104 @@ +2004-04-29 Jakub Jelinek <jakub@redhat.com> + + * sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c (_Qp_qtoi): Use %f31 + for single precision register, add it to __asm clobbers [BZ #139]. + * sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c (_Qp_qtoui): Use %f31 + for single precision register, add it to __asm clobbers. + * sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c (_Qp_qtoux): Use fqtox + instead of fqtoi in QP_HANDLE_EXCEPTIONS. + * sysdeps/sparc/sparc64/soft-fp/qp_qtox.c (_Qp_qtox): Likewise. + Reported by M. H. VanLeeuwen <vanl@megsinet.net>. + +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=139 +Fixes error +qp_qtoi.s:261: Error: Illegal operands: There are only 32 single precision f registers; [0-31] +plus a couple other things vanl noticed. + +diff -ur orig/qp_qtoi.c new/qp_qtoi.c +--- orig/qp_qtoi.c Sat May 1 00:40:06 2004 ++++ libc/sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c Sat May 1 00:39:40 2004 +@@ -1,6 +1,6 @@ + /* Software floating-point emulation. + Return (int)(*a) +- Copyright (C) 1997,1999 Free Software Foundation, Inc. ++ Copyright (C) 1997, 1999, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). +@@ -38,9 +38,9 @@ + __asm ( + " ldd [%1], %%f52\n" + " ldd [%1+8], %%f54\n" +-" fqtoi %%f52, %%f60\n" +-" st %%f60, [%0]\n" +-" " : : "r" (&rx), "r" (a) : QP_CLOBBER); ++" fqtoi %%f52, %%f31\n" ++" st %%f31, [%0]\n" ++" " : : "r" (&rx), "r" (a) : QP_CLOBBER, "f31"); + r = rx); + + return r; +diff -ur orig/qp_qtoui.c new/qp_qtoui.c +--- orig/qp_qtoui.c Sat May 1 00:40:06 2004 ++++ libc/sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c Sat May 1 00:39:40 2004 +@@ -1,6 +1,6 @@ + /* Software floating-point emulation. + Return (unsigned int)(*a) +- Copyright (C) 1997,1999 Free Software Foundation, Inc. ++ Copyright (C) 1997, 1999, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). +@@ -38,9 +38,9 @@ + __asm ( + " ldd [%1], %%f52\n" + " ldd [%1+8], %%f54\n" +-" fqtoi %%f52, %%f60\n" +-" st %%f60, [%0]\n" +-" " : : "r" (&rx), "r" (a) : QP_CLOBBER); ++" fqtoi %%f52, %%f31\n" ++" st %%f31, [%0]\n" ++" " : : "r" (&rx), "r" (a) : QP_CLOBBER, "f31"); + r = rx); + + return r; +diff -ur orig/qp_qtoux.c new/qp_qtoux.c +--- orig/qp_qtoux.c Sat May 1 00:40:06 2004 ++++ libc/sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c Sat May 1 00:39:40 2004 +@@ -1,6 +1,6 @@ + /* Software floating-point emulation. + Return (unsigned long)(*a) +- Copyright (C) 1997,1999 Free Software Foundation, Inc. ++ Copyright (C) 1997, 1999, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). +@@ -38,7 +38,7 @@ + __asm ( + " ldd [%1], %%f52\n" + " ldd [%1+8], %%f54\n" +-" fqtoi %%f52, %%f60\n" ++" fqtox %%f52, %%f60\n" + " std %%f60, [%0]\n" + " " : : "r" (&rx), "r" (a) : QP_CLOBBER); + r = rx); +diff -ur orig/qp_qtox.c new/qp_qtox.c +--- orig/qp_qtox.c Sat May 1 00:40:06 2004 ++++ libc/sysdeps/sparc/sparc64/soft-fp/qp_qtox.c Sat May 1 00:39:40 2004 +@@ -1,6 +1,6 @@ + /* Software floating-point emulation. + Return (long)(*a) +- Copyright (C) 1997,1999 Free Software Foundation, Inc. ++ Copyright (C) 1997, 1999, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson (rth@cygnus.com) and + Jakub Jelinek (jj@ultra.linux.cz). +@@ -38,7 +38,7 @@ + __asm ( + " ldd [%1], %%f52\n" + " ldd [%1+8], %%f54\n" +-" fqtoi %%f52, %%f60\n" ++" fqtox %%f52, %%f60\n" + " std %%f60, [%0]\n" + " " : : "r" (&rx), "r" (a) : QP_CLOBBER); + r = rx); diff --git a/patches/glibc/2.3.2/glibc-2.3.2-sh4-socket.patch b/patches/glibc/2.3.2/glibc-2.3.2-sh4-socket.patch new file mode 100644 index 0000000..51de6c8 --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-sh4-socket.patch @@ -0,0 +1,39 @@ +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/sh/socket.S.diff?r1=1.5&r2=1.6&cvsroot=glibc + +Ankur Sheth said: +"The problem that I ran into was that multi-threaded apps would crash with a +seg fault when they invoked some of the socket calls (sendto() in my case. +This happened only on the sh4. Turns out that a certain register (PR) was +not being saved and restored properly before and after invoking the system +call. This patch fixes it. It applies cleanly on glibc 2.3.2. +[Thanks to Kaz for helping us find this.]" + +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/sh/socket.S,v +retrieving revision 1.5 +retrieving revision 1.6 +diff -u -r1.5 -r1.6 +--- libc/sysdeps/unix/sysv/linux/sh/socket.S 2003/01/05 11:07:44 1.5 ++++ libc/sysdeps/unix/sysv/linux/sh/socket.S 2003/07/12 01:25:53 1.6 +@@ -94,7 +94,9 @@ + #if defined NEED_CANCELLATION && defined CENABLE + .Lsocket_cancel: + /* Enable asynchronous cancellation. */ ++ sts.l pr,@-r15 + CENABLE ++ lds.l @r15+,pr + + /* Do the system call trap. */ + mov #+P(SOCKOP_,socket), r4 +@@ -102,9 +104,11 @@ + mov.l .L1,r3 + trapa #0x12 + ++ sts.l pr,@-r15 + mov.l r0,@-r15 + CDISABLE + mov.l @r15+,r0 ++ lds.l @r15+,pr + + /* Pop args off the stack */ + P(POPARGS_,NARGS) diff --git a/patches/glibc/2.3.2/glibc-2.3.2-sh4-trapa.patch b/patches/glibc/2.3.2/glibc-2.3.2-sh4-trapa.patch new file mode 100644 index 0000000..f93bb6f --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-sh4-trapa.patch @@ -0,0 +1,55 @@ +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/sh/sysdep.h.diff?r1=1.9&r2=1.10&cvsroot=glibc + +Ankur Sheth said: + +"This is actually a workaround for a bug in the sh4. The actual bug is +documented here : +http://documentation.renesas.com/eng/products/mpumcu/tu/tnsh7456ae.pdf +Basically the cache & TLB should not be accessed for 4 (or was it 5?) cycles +after isssuing a TRAPA instruction. I didn't run into any specific problem +because of this bug, but it seems useful to have and the patch itself seems +pretty harmless." + + +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/sh/sysdep.h,v +retrieving revision 1.9 +retrieving revision 1.10 +diff -u -r1.9 -r1.10 +--- libc/sysdeps/unix/sysv/linux/sh/sysdep.h 2003/09/01 04:05:21 1.9 ++++ libc/sysdeps/unix/sysv/linux/sh/sysdep.h 2003/10/15 04:36:32 1.10 +@@ -183,6 +183,13 @@ + # endif /* _LIBC_REENTRANT */ + #endif /* PIC */ + ++# ifdef NEED_SYSCALL_INST_PAD ++# define SYSCALL_INST_PAD \ ++ or r0,r0; or r0,r0; or r0,r0; or r0,r0; or r0,r0 ++# else ++# define SYSCALL_INST_PAD ++# endif ++ + #define SYSCALL_INST0 trapa #0x10 + #define SYSCALL_INST1 trapa #0x11 + #define SYSCALL_INST2 trapa #0x12 +@@ -195,19 +202,13 @@ + #define DO_CALL(syscall_name, args) \ + mov.l 1f,r3; \ + SYSCALL_INST##args; \ ++ SYSCALL_INST_PAD; \ + bra 2f; \ + nop; \ + .align 2; \ + 1: .long SYS_ify (syscall_name); \ + 2: + +-# ifdef NEED_SYSCALL_INST_PAD +-# define SYSCALL_INST_PAD \ +- or r0,r0; or r0,r0; or r0,r0; or r0,r0; or r0,r0 +-# else +-# define SYSCALL_INST_PAD +-# endif +- + #else /* not __ASSEMBLER__ */ + + #define SYSCALL_INST_STR0 "trapa #0x10\n\t" diff --git a/patches/glibc/2.3.2/glibc-2.3.2-sparc32-sysdep.patch b/patches/glibc/2.3.2/glibc-2.3.2-sparc32-sysdep.patch new file mode 100644 index 0000000..289f66e --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-sparc32-sysdep.patch @@ -0,0 +1,46 @@ +Fixes the error + +<stdin>: Assembler messages: +<stdin>:2: Error: junk at end of line, first unrecognized character is `1' ... +<stdin>:2: Error: Illegal operands: PC-relative operand can't be a constant +make[4]: *** [/home/dank/wk/crosstool-0.28-rc13/build/sparc-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/io/rtld-open.os] Error 1 +make[4]: Leaving directory `/home/dank/wk/crosstool-0.28-rc13/build/sparc-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2/io' +make[3]: *** [/home/dank/wk/crosstool-0.28-rc13/build/sparc-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/io/rtld-xstat64.os] Error 2 +make[3]: Leaving directory `/home/dank/wk/crosstool-0.28-rc13/build/sparc-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2/elf' +make[2]: *** [/home/dank/wk/crosstool-0.28-rc13/build/sparc-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/elf/rtld-libc.a] Error 2 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc13/build/sparc-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2/elf' +make[1]: *** [elf/subdir_lib] Error 2 + +when building glibc-2.3.2 with gcc-3.4.0 for sparc32. + +The .s file left behind by -save-temps contains the big long line + +.text; .global __libc_open; .align 4; __libc_open:; .type __libc_open,@function;; mov 5, %g1; ta 0x10; bcs __syscall_error_handler; nop; .section .gnu.linkonce.t. 1 .get_pic.l7,"ax",@progbits; .globl 1 .get_pic.l7; .hidden 1 .get_pic.l7; .type 1 .get_pic.l7,@function; 1 .get_pic.l7: retl; add %o7, %l7, %l7; .previous; .subsection 3; __syscall_error_handler: save %sp,-96,%sp; sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %l7; call 1 .get_pic.l7; add %l7, %lo(_GLOBAL_OFFSET_TABLE_+4), %l7; ld [%l7 + errno], %l0; st %i0, [%l0]; jmpl %i7+8, %g0; restore %g0, -1, %o0; .previous; + retl; nop + +The error messages appear to refer to the '1 .get_pic.17', e.g. + .globl 1 .get_pic.l7; .hidden 1 .get_pic.l7; +which seems to come from +glibc-2.3.2/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h +where it appears originally as + .globl __sparc.get_pic.l7; \ + .hidden __sparc.get_pic.l7; \ + +Note that __sparc is a predefined symbol on Solaris and some other environments; +it's not surprising to see it predefined on Linux, too. + + +--- glibc-2.3.2/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h.old 2004-05-15 10:23:11.000000000 -0700 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h 2004-05-15 10:24:12.000000000 -0700 +@@ -39,6 +39,11 @@ + #undef END + #undef LOC + ++/* gcc-3.4.0 seems to expand __sparc as a predefined preprocessor symbol, which we don't want here */ ++#ifdef __sparc ++#undef __sparc ++#endif ++ + #define ENTRY(name) \ + .global C_SYMBOL_NAME(name); \ + .align 4;\ diff --git a/patches/glibc/2.3.2/glibc-2.3.2-sparc64-dl-machine.patch b/patches/glibc/2.3.2/glibc-2.3.2-sparc64-dl-machine.patch new file mode 100644 index 0000000..20cb799 --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-sparc64-dl-machine.patch @@ -0,0 +1,29 @@ +See http://gcc.gnu.org/PR15345 + +Quick kludge by H.J.Lu +Works around gcc-3.4.0 error which shows up when building glibc-2.3.2 for sparc64: + +.../sparc64-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/libc.a(dl-reloc.o)(.text+0x4b4): In function `elf_machine_load_address.3': +: undefined reference to `_DYNAMIC' +collect2: ld returned 1 exit status +make[2]: *** [/home/dank/wk/crosstool-0.28-rc10/build/sparc64-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/elf/sln] Error 1 + + +--- glibc-2.3.2/sysdeps/sparc/sparc64/dl-machine.h.orig Sat May 8 20:54:26 2004 ++++ glibc-2.3.2/sysdeps/sparc/sparc64/dl-machine.h Sat May 8 17:18:04 2004 +@@ -65,6 +65,7 @@ + } + + /* Return the run-time load address of the shared object. */ ++#ifdef IS_IN_rtld + static inline Elf64_Addr + elf_machine_load_address (void) + { +@@ -84,6 +85,7 @@ + pc[3]*4 is l_addr + _GLOBAL_OFFSET_TABLE_ - (long)pc - 12 */ + return (Elf64_Addr) got - *got + (Elf32_Sword) ((pc[2] - pc[3]) * 4) - 4; + } ++#endif + + /* We have 4 cases to handle. And we code different code sequences + for each one. I love V9 code models... */ diff --git a/patches/glibc/2.3.2/glibc-2.3.2-sparc64-pause.patch b/patches/glibc/2.3.2/glibc-2.3.2-sparc64-pause.patch new file mode 100644 index 0000000..13e3381 --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-sparc64-pause.patch @@ -0,0 +1,22 @@ +From: "M.H.VanLeeuwen" +Subject: crosstool, sparc64, linux 2.6.4, gcc 3.3.3, glibc 2.3.2 success +Date: Mon, 15 Mar 2004 00:23:04 -0600 +To: crossgcc@sources.redhat.com +Message-ID: <40554BC8.749A5EC3@megsinet.net> +... + +backported from GLIBC CVS + +Fixes: +../sysdeps/unix/sysv/linux/sparc/sparc64/pause.c:1:39: sysdeps/unix/common/pause.c: No such file or directory +make[2]: *** [/cross/build/sparc64-unknown-linux-gnu/gcc-3.3.2-glibc-2.3.2/build-glibc/posix/pause.o] Error 1 +make[2]: Leaving directory `/cross/build/sparc64-unknown-linux-gnu/gcc-3.3.2-glibc-2.3.2/glibc-2.3.2/posix' +make[1]: *** [posix/subdir_lib] Error 2 +make: *** [all] Error 2 + +========================================================================================================================= +--- glibc-2.3.2/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c.orig Sun Mar 7 08:51:20 2004 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c Sun Mar 7 08:51:29 2004 +@@ -1 +1 @@ +-#include <sysdeps/unix/common/pause.c> ++#include <sysdeps/posix/pause.c> diff --git a/patches/glibc/2.3.2/glibc-2.3.2-sparc64-pwrite64.patch b/patches/glibc/2.3.2/glibc-2.3.2-sparc64-pwrite64.patch new file mode 100644 index 0000000..9eefe57 --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-sparc64-pwrite64.patch @@ -0,0 +1,36 @@ +Fix for this error: + +/cross/crosstool-0.27/build/sparc64-unknown-linux-gnu/gcc-3.3.3-glibc-2.3.2/build-glibc/libc_pic.os(.text+0xc4d28): In function `posix_fallocate64': +: undefined reference to `__GI___pwrite64' +collect2: ld returned 1 exit status +make[1]: *** [/cross/crosstool-0.27/build/sparc64-unknown-linux-gnu/gcc-3.3.3-glibc-2.3.2/build-glibc/libc.so] Error 1 + +extracted from GLIBC CVS by M.H.VanLeeuwen + +cf. +http://sources.redhat.com/ml/libc-alpha/2003-10/msg00038.html + +Originally thought we needed this hunk, too: +http://sources.redhat.com/ml/libc-alpha/2003-10/msg00037.html +but it seems the sysdep.h change is sufficient, and works better +when compiling against linux-2.4. + +--- glibc-2.3.2/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h.orig Sat Mar 13 02:01:51 2004 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h Sat Mar 13 02:02:20 2004 +@@ -29,6 +29,16 @@ + #undef SYS_ify + #define SYS_ify(syscall_name) __NR_##syscall_name + ++/* This is a kludge to make syscalls.list find these under the names ++ pread and pwrite, since some kernel headers define those names ++ and some define the *64 names for the same system calls. */ ++#if !defined __NR_pread && defined __NR_pread64 ++# define __NR_pread __NR_pread64 ++#endif ++#if !defined __NR_pwrite && defined __NR_pwrite64 ++# define __NR_pwrite __NR_pwrite64 ++#endif ++ + #ifdef __ASSEMBLER__ + + #define LOADSYSCALL(x) mov __NR_##x, %g1 diff --git a/patches/glibc/2.3.2/glibc-2.3.2-without-fp.patch b/patches/glibc/2.3.2/glibc-2.3.2-without-fp.patch new file mode 100644 index 0000000..76cdfaa --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.2-without-fp.patch @@ -0,0 +1,89 @@ +Sender: libc-alpha-owner@sources.redhat.com +Date: Tue, 29 Jul 2003 17:49:47 -0400 +From: Daniel Jacobowitz <drow@mvista.com> +To: GNU C Library <libc-alpha@sources.redhat.com> +Subject: Re: __sim_exceptions undefined when linking glibc-2.3.2's libm.so with --without-fp +Message-ID: <20030729214947.GA29932@nevyn.them.org> + +On Tue, Jul 29, 2003 at 02:53:33PM -0700, Dan Kegel wrote: +> On ppc405, I'm getting the following when linking glibc's libm: +> /gcc-3.3-glibc-2.3.2/build-glibc/math/libm_pic.a(fclrexcpt.os)(.text+0x1a): +> In function `feclearexcept@GLIBC_2.1': +> : undefined reference to `__sim_exceptions' +> +> That symbol seems to be present in libc.so. nm shows + +--without-fp doesn't work. Try this. Make up a changelog entry if it +works. + +Date: Tue, 29 Jul 2003 14:56:50 -0700 +Message-Id: <200307292156.h6TLuol24356@magilla.sf.frob.com> +From: Roland McGrath <roland@redhat.com> +To: Daniel Jacobowitz <drow@mvista.com> +Cc: GNU C Library <libc-alpha@sources.redhat.com> +Subject: Re: __sim_exceptions undefined when linking glibc-2.3.2's libm.so with --without-fp +In-Reply-To: Daniel Jacobowitz's message of Tuesday, 29 July 2003 17:49:47 -0400 <20030729214947.GA29932@nevyn.them.org> + +> +int __sim_exceptions __attribute__ ((section(".bss"))); + +Use __attribute__ ((nocommon)) instead (and please watch the standard +whitespace conventions, i.e. ``section (''). + +diff -purN glibc-2.3.2.orig/sysdeps/powerpc/nofpu/sim-full.c glibc-2.3.2/sysdeps/powerpc/nofpu/sim-full.c +--- glibc-2.3.2.orig/sysdeps/powerpc/nofpu/sim-full.c 2002-10-19 16:06:29.000000000 -0400 ++++ glibc-2.3.2/sysdeps/powerpc/nofpu/sim-full.c 2003-05-14 15:10:42.000000000 -0400 +@@ -24,11 +24,14 @@ + + /* Global to store sticky exceptions. */ +-int __sim_exceptions; ++int __sim_exceptions __attribute__ ((nocommon)); ++libc_hidden_data_def (__sim_exceptions); + + /* By default, no exceptions should trap. */ + int __sim_disabled_exceptions = 0xffffffff; ++libc_hidden_data_def (__sim_disabled_exceptions); + +-int __sim_round_mode; ++int __sim_round_mode __attribute__ ((nocommon)); ++libc_hidden_data_def (__sim_round_mode); + + void + __simulate_exceptions (int x) +diff -purN glibc-2.3.2.orig/sysdeps/powerpc/nofpu/soft-supp.h glibc-2.3.2/sysdeps/powerpc/nofpu/soft-supp.h +--- glibc-2.3.2.orig/sysdeps/powerpc/nofpu/soft-supp.h 2002-10-19 16:06:29.000000000 -0400 ++++ glibc-2.3.2/sysdeps/powerpc/nofpu/soft-supp.h 2003-05-14 15:09:53.000000000 -0400 +@@ -27,7 +27,11 @@ typedef union + } fenv_union_t; + + +-extern int __sim_exceptions attribute_hidden; +-extern int __sim_disabled_exceptions attribute_hidden; +-extern int __sim_round_mode attribute_hidden; ++extern int __sim_exceptions; ++libc_hidden_proto (__sim_exceptions); ++extern int __sim_disabled_exceptions; ++libc_hidden_proto (__sim_disabled_exceptions); ++extern int __sim_round_mode; ++libc_hidden_proto (__sim_round_mode); ++ + extern void __simulate_exceptions (int x) attribute_hidden; +diff -urp glibc-2.3.2.orig/sysdeps/powerpc/soft-fp/sfp-machine.h glibc-2.3.2/sysdeps/powerpc/soft-fp/sfp-machine.h +--- glibc-2.3.2.orig/sysdeps/powerpc/soft-fp/sfp-machine.h 2002-10-17 18:36:14.000000000 -0400 ++++ glibc-2.3.2/sysdeps/powerpc/soft-fp/sfp-machine.h 2003-05-14 16:48:13.000000000 -0400 +@@ -52,7 +52,11 @@ + #define FP_HANDLE_EXCEPTIONS __simulate_exceptions (_fex) + #define FP_ROUNDMODE __sim_round_mode + +-extern int __sim_exceptions attribute_hidden; +-extern int __sim_disabled_exceptions attribute_hidden; +-extern int __sim_round_mode attribute_hidden; ++extern int __sim_exceptions; ++libc_hidden_proto (__sim_exceptions); ++extern int __sim_disabled_exceptions; ++libc_hidden_proto (__sim_disabled_exceptions); ++extern int __sim_round_mode; ++libc_hidden_proto (__sim_round_mode); ++ + extern void __simulate_exceptions (int x) attribute_hidden; + + diff --git a/patches/glibc/2.3.2/glibc-2.3.3-allow-gcc-4.0-configure.patch b/patches/glibc/2.3.2/glibc-2.3.3-allow-gcc-4.0-configure.patch new file mode 100644 index 0000000..3f568ae --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.3-allow-gcc-4.0-configure.patch @@ -0,0 +1,30 @@ +Fixes following problem building glibc-2.3.3 with gcc-4.0: + +checking version of i686-unknown-linux-gnu-gcc ... 4.0.0, bad +checking for gnumake... no +checking for gmake... gmake +checking version of gmake... 3.79.1, ok +checking for gnumsgfmt... no +checking for gmsgfmt... no +checking for msgfmt... msgfmt +checking version of msgfmt... 0.11.4, ok +checking for makeinfo... makeinfo +checking version of makeinfo... 4.3, ok +checking for sed... sed +checking version of sed... 4.0.5, ok +checking for autoconf... autoconf +checking whether autoconf works... yes +configure: error: +*** These critical programs are missing or too old: gcc + +--- glibc-2.3.3/configure.old Mon Mar 14 12:01:10 2005 ++++ glibc-2.3.3/configure Mon Mar 14 12:02:03 2005 +@@ -3899,7 +3899,7 @@ + ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 3.[2-9]*) ++ 3.[2-9]*|4.[01]*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + diff --git a/patches/glibc/2.3.2/glibc-2.3.3-allow-gcc-4.0-powerpc-procfs.patch b/patches/glibc/2.3.2/glibc-2.3.3-allow-gcc-4.0-powerpc-procfs.patch new file mode 100644 index 0000000..0c824bc --- /dev/null +++ b/patches/glibc/2.3.2/glibc-2.3.3-allow-gcc-4.0-powerpc-procfs.patch @@ -0,0 +1,65 @@ +(Combined with earlier fix old/glibc-2.3.2-powerpc-procfs.patch +from http://sources.redhat.com/ml/libc-alpha/2003-12/msg00101.html) + +This fix discussed here: +http://gcc.gnu.org/ml/gcc/2005-01/msg00509.html + +Revision 1.12, Wed Mar 2 20:11:38 2005 UTC by roland +Branch: MAIN +CVS Tags: fedora-glibc-20050303T1335, HEAD +Changes since 1.11: +3 -8 lines +Diff to previous 1.11 (colored) + +2005-02-21 Alan Modra <amodra@bigpond.net.au> + + * sysdeps/unix/sysv/linux/powerpc/sys/procfs.h (elf_vrreg_t): Don't + use __uint128_t. + +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h?cvsroot=glibc +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h.diff?r1=1.11&r2=1.12&cvsroot=glibc + +Fixes + +In file included from ../linuxthreads_db/proc_service.h:20, + from ../linuxthreads_db/thread_dbP.h:7, + from ../linuxthreads/descr.h:44, + from ../linuxthreads/internals.h:30, + from ../linuxthreads/sysdeps/pthread/bits/libc-lock.h:27, + from ../sysdeps/generic/ldsodefs.h:38, + from ../sysdeps/unix/sysv/linux/ldsodefs.h:25, + from <stdin>:2: +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:57: error: syntax error before 'elf_vrreg_t' +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:57: warning: type defaults to 'int' in declaration of 'elf_vrreg_t' +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:57: warning: data definition has no type or storage class +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:58: error: syntax error before 'elf_vrregset_t' +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:58: warning: type defaults to 'int' in declaration of 'elf_vrregset_t' +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:58: warning: data definition has no type or storage class +make[2]: make[2]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/powerpc-750-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/glibc-2.3-20050307/csu' + +Rediffed against glibc-2.3.3 + +--- glibc-2.3.3.orig/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h Sun Jan 12 00:24:23 2003 ++++ glibc-2.3.3.new/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h Fri Mar 18 11:20:58 2005 +@@ -45,18 +45,13 @@ + + typedef double elf_fpreg_t; + typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; +-#endif +- +-/* gcc 3.1 and newer support __uint128_t. */ +-#if !__GNUC_PREREQ(3,1) +-typedef struct { +- unsigned long u[4]; +-} __attribute((aligned(16))) __uint128_t; +-#endif + + /* Altivec registers */ +-typedef __uint128_t elf_vrreg_t; ++typedef struct { ++ unsigned int u[4]; ++} __attribute__ ((aligned (16))) elf_vrreg_t; + typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG]; ++#endif + + struct elf_siginfo + { diff --git a/patches/glibc/2.3.2/glibc-configure-apple-as.patch b/patches/glibc/2.3.2/glibc-configure-apple-as.patch new file mode 100644 index 0000000..604c36d --- /dev/null +++ b/patches/glibc/2.3.2/glibc-configure-apple-as.patch @@ -0,0 +1,23 @@ +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html + +The following makes it possible to configure glibc-2.3.2 on Mac OS X, +where the assembler but doesn't understand the --version flag. + +Fixes the symptom +checking whether ld is GNU ld... no +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as +checking version of /usr/libexec/gcc/darwin/ppc/as... +<PAUSES HERE AND JUST SITS THERE DOING NOTHING> + +--- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003 ++++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004 +@@ -3789,7 +3789,7 @@ + # Found it, now check the version. + echo "$as_me:$LINENO: checking version of $AS" >&5 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6 +- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` ++ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 2.1[3-9]*) diff --git a/patches/glibc/2.3.2/glibc-drow-sh.patch b/patches/glibc/2.3.2/glibc-drow-sh.patch new file mode 100644 index 0000000..82984e5 --- /dev/null +++ b/patches/glibc/2.3.2/glibc-drow-sh.patch @@ -0,0 +1,77 @@ +[pread changes deleted, since those seem to be specific to glibc-2.3.2] + +Date: Thu, 19 Jun 2003 20:02:07 -0400 +From: Daniel Jacobowitz <drow@false.org> +Subject: [linux-sh:02808] Patch needed for CVS glibc on SH +To: linux-sh@m17n.org, libc-alpha@sources.redhat.com +Message-Id: <20030620000207.GA19907@nevyn.them.org> +X-ML-Name: linux-sh +X-Mail-Count: 02808 +X-MLServer: fml [fml 4.0.1]; post only (only members can post) +X-ML-Info: If you have a question, send e-mail with the body + "help" (without quotes) to the address linux-sh-ctl@m17n.org; + help=<mailto:linux-sh-ctl@m17n.org?body=help> +Mail-Followup-To: linux-sh@m17n.org, libc-alpha@sources.redhat.com +Content-Disposition: inline +User-Agent: Mutt/1.5.1i +Mime-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Precedence: bulk +Lines: 74 +List-Software: fml [fml 4.0.1] +List-Post: <mailto:linux-sh@m17n.org> +List-Owner: <mailto:linux-sh-admin@m17n.org> +List-Help: <mailto:linux-sh-ctl@m17n.org?body=help> +List-Unsubscribe: <mailto:linux-sh-ctl@m17n.org?body=unsubscribe> +List-Id: linux-sh.m17n.org + +I believe this flushes my current patches to make glibc work on SH. Issues: + - MIPS pread functions have some wackiness in them for the MIPS calling + conventions, which align long longs to even register pairs; it appears + that SH does not do this. This fixes pread64/pwrite64. + - st_ino is _NOT_ 64-bit in the latest SH kernel trees, or at least it + wasn't when I checked in April. --enable-kernel=2.4.x breaks terribly + without this patch; the errors are along the lines of "version GLIBC_2.3 + not found", because that's the first consequence of a messed up inode + field - ld.so compares by inodes at some point. + +-- +Daniel Jacobowitz +MontaVista Software Debian GNU/Linux Developer + +2003-06-19 Daniel Jacobowitz <drow@mvista.com> + + * sysdeps/unix/sysv/linux/kernel-features.h: Update kernel features + for the SH architecture. + * sysdeps/unix/sysv/linux/sh/pread.c: Use generic Linux version + instead of the MIPS version. + * sysdeps/unix/sysv/linux/sh/pread64.c: Likewise. + * sysdeps/unix/sysv/linux/sh/pwrite.c: Likewise. + * sysdeps/unix/sysv/linux/sh/pwrite64.c: Likewise. + +--- glibc-2.3.2/sysdeps/unix/sysv/linux/kernel-features.h.org 2003-04-21 10:57:55.000000000 -0400 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/kernel-features.h 2003-04-21 11:16:47.000000000 -0400 +@@ -151,11 +151,20 @@ + + /* The changed st_ino field appeared in 2.4.0-test6. But we cannot + distinguish this version from other 2.4.0 releases. Therefore play +- save and assume it available is for 2.4.1 and up. */ +-#if __LINUX_KERNEL_VERSION >= 132097 ++ save and assume it available is for 2.4.1 and up. However, SH is lame, ++ and still does not have a 64-bit inode field. */ ++#if __LINUX_KERNEL_VERSION >= 132097 \ ++ && !defined __sh__ + # define __ASSUME_ST_INO_64_BIT 1 + #endif + ++/* SH kernels got stat64, mmap2, and truncate64 during 2.4.0-test. */ ++#if __LINUX_KERNEL_VERSION >= 132096 && defined __sh__ ++# define __ASSUME_TRUNCATE64_SYSCALL 1 ++# define __ASSUME_MMAP2_SYSCALL 1 ++# define __ASSUME_STAT64_SYSCALL 1 ++#endif ++ + /* To support locking of large files a new fcntl() syscall was introduced + in 2.4.0-test7. We test for 2.4.1 for the earliest version we know + the syscall is available. */ + diff --git a/patches/glibc/2.3.2/glibc-fp-byteorder.patch b/patches/glibc/2.3.2/glibc-fp-byteorder.patch new file mode 100644 index 0000000..f20432e --- /dev/null +++ b/patches/glibc/2.3.2/glibc-fp-byteorder.patch @@ -0,0 +1,203 @@ +Taken from http://sources.redhat.com/ml/crossgcc/2004-02/msg00104.html +Author: addsub@eyou.com +Target: ARM + +Fixes http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/920501-8.c +and makes printf("%f", 1.0) work. + +Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00115.html : + It ... fixes the 'printf("%f\n", 0.5); prints 0.000000' and general 'floating point + is broken' on my big-endian hardfloat FPA ARM platform. ... + It's definitely needed for hardfloat. So I'd think it's needed for + big-endian systems in any case, and for VFP on little-endian systems + too. Someone would have to verify that though. + +Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00123.html + I just had a look at glibc-20040830, and [this patch] is still needed and useful + for this version. glibc-20040830 out-of-the-box still contains the + following wrong assumptions: + - sysdeps/arm/bits/endian.h: float word order is big endian (which it is + not on vfp systems) + - sysdeps/arm/gmp-mparam.h: IEEE doubles are mixed endian (which they + are not on big endian systems, neither on vfp systems) + - sysdeps/arm/ieee754.h: IEEE doubles are in little endian byte order + (which they are not on big endian systems) + [This patch] seems the right solution for all of these issues. + +Dimitry Andric wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00132.html : + It's even needed for glibc CVS, AFAICS. + The patch hunk which modifies glibc.new/sysdeps/arm/bits/endian.h + (currently at version 1.4) is only needed for proper VFP operation. + But the hunk which modifies sysdeps/arm/gmp-mparam.h, and the hunk + that deletes sysdeps/arm/ieee754.h (yes, this IS correct), are needed + for proper operation of *any* FP model on big endian ARM. + +See also discussion in followups to +http://sources.redhat.com/ml/crossgcc/2004-05/msg00245.html) + +Message-ID: <276985760.37584@eyou.com> +Received: from unknown (HELO eyou.com) (172.16.2.2) + by 0.0.0.0 with SMTP; Tue, 17 Feb 2004 10:42:40 +0800 +Received: (qmail 8238 invoked by uid 65534); 17 Feb 2004 10:42:38 +0800 +Date: 17 Feb 2004 10:42:38 +0800 +Message-ID: <20040217104238.8237.qmail@eyou.com> +From: "add" <addsub@eyou.com> +To: dank@kegel.com +Reply-To: "add" <addsub@eyou.com> +Subject: Re: problem while building arm vfp softfloat gcc ` + +Hi, Dan, This is a patch I applied to my glibc-2.3.2, then my softfloat +toolchain can printf("%f\n",1.0). So you may have a try of this + + +diff -uNrp glibc.old/sysdeps/arm/bits/endian.h glibc.new/sysdeps/arm/bits/endian.h +--- glibc.old/sysdeps/arm/bits/endian.h 1999-04-12 11:59:13.000000000 -0400 ++++ glibc.new/sysdeps/arm/bits/endian.h 2004-02-12 09:15:13.000000000 -0500 +@@ -9,4 +9,9 @@ + #else + #define __BYTE_ORDER __LITTLE_ENDIAN + #endif ++ ++#ifdef __VFP_FP__ ++#define __FLOAT_WORD_ORDER __BYTE_ORDER ++#else + #define __FLOAT_WORD_ORDER __BIG_ENDIAN ++#endif +diff -uNrp glibc.old/sysdeps/arm/gmp-mparam.h glibc.new/sysdeps/arm/gmp-mparam.h +--- glibc.old/sysdeps/arm/gmp-mparam.h 2001-07-07 15:21:19.000000000 -0400 ++++ glibc.new/sysdeps/arm/gmp-mparam.h 2004-02-12 09:15:13.000000000 -0500 +@@ -26,5 +26,13 @@ MA 02111-1307, USA. */ + #define BITS_PER_SHORTINT 16 + #define BITS_PER_CHAR 8 + +-#define IEEE_DOUBLE_BIG_ENDIAN 0 +-#define IEEE_DOUBLE_MIXED_ENDIAN 1 ++#if defined(__ARMEB__) ++# define IEEE_DOUBLE_MIXED_ENDIAN 0 ++# define IEEE_DOUBLE_BIG_ENDIAN 1 ++#elif defined(__VFP_FP__) ++# define IEEE_DOUBLE_MIXED_ENDIAN 0 ++# define IEEE_DOUBLE_BIG_ENDIAN 0 ++#else ++# define IEEE_DOUBLE_BIG_ENDIAN 0 ++# define IEEE_DOUBLE_MIXED_ENDIAN 1 ++#endif +diff -uNrp glibc.old/sysdeps/arm/ieee754.h glibc.new/sysdeps/arm/ieee754.h +--- glibc.old/sysdeps/arm/ieee754.h 2001-07-07 15:21:19.000000000 -0400 ++++ glibc.new/sysdeps/arm/ieee754.h 1969-12-31 19:00:00.000000000 -0500 +@@ -1,115 +0,0 @@ +-/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#ifndef _IEEE754_H +- +-#define _IEEE754_H 1 +-#include <features.h> +- +-#include <endian.h> +- +-__BEGIN_DECLS +- +-union ieee754_float +- { +- float f; +- +- /* This is the IEEE 754 single-precision format. */ +- struct +- { +- unsigned int mantissa:23; +- unsigned int exponent:8; +- unsigned int negative:1; +- } ieee; +- +- /* This format makes it easier to see if a NaN is a signalling NaN. */ +- struct +- { +- unsigned int mantissa:22; +- unsigned int quiet_nan:1; +- unsigned int exponent:8; +- unsigned int negative:1; +- } ieee_nan; +- }; +- +-#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */ +- +- +-union ieee754_double +- { +- double d; +- +- /* This is the IEEE 754 double-precision format. */ +- struct +- { +- unsigned int mantissa0:20; +- unsigned int exponent:11; +- unsigned int negative:1; +- unsigned int mantissa1:32; +- } ieee; +- +- /* This format makes it easier to see if a NaN is a signalling NaN. */ +- struct +- { +- unsigned int mantissa0:19; +- unsigned int quiet_nan:1; +- unsigned int exponent:11; +- unsigned int negative:1; +- unsigned int mantissa1:32; +- } ieee_nan; +- }; +- +-#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ +- +- +-/* The following two structures are correct for `new' floating point systems but +- wrong for the old FPPC. The only solution seems to be to avoid their use on +- old hardware. */ +- +-union ieee854_long_double +- { +- long double d; +- +- /* This is the IEEE 854 double-extended-precision format. */ +- struct +- { +- unsigned int exponent:15; +- unsigned int empty:16; +- unsigned int negative:1; +- unsigned int mantissa1:32; +- unsigned int mantissa0:32; +- } ieee; +- +- /* This is for NaNs in the IEEE 854 double-extended-precision format. */ +- struct +- { +- unsigned int exponent:15; +- unsigned int empty:16; +- unsigned int negative:1; +- unsigned int mantissa1:32; +- unsigned int mantissa0:30; +- unsigned int quiet_nan:1; +- unsigned int one:1; +- } ieee_nan; +- }; +- +-#define IEEE854_LONG_DOUBLE_BIAS 0x3fff +- +-__END_DECLS +- +-#endif /* ieee754.h */ diff --git a/patches/glibc/2.3.2/glibc-test-lowram.patch b/patches/glibc/2.3.2/glibc-test-lowram.patch new file mode 100644 index 0000000..2308629 --- /dev/null +++ b/patches/glibc/2.3.2/glibc-test-lowram.patch @@ -0,0 +1,14 @@ +--- glibc-2.2.5/malloc/tst-calloc.c.old Sun Aug 3 16:17:58 2003 ++++ glibc-2.2.5/malloc/tst-calloc.c Sun Aug 3 16:20:01 2003 +@@ -24,9 +24,8 @@ + #include <stdio.h> + + +-/* Number of samples per size. */ +-#define N 50000 +- ++/* Number of samples per size. This is also the maximum memory consumption in kilobytes. */ ++#define N 8000 + + static void + fixed_test (int size) diff --git a/patches/glibc/2.3.2/nobits.patch b/patches/glibc/2.3.2/nobits.patch new file mode 100644 index 0000000..c639051 --- /dev/null +++ b/patches/glibc/2.3.2/nobits.patch @@ -0,0 +1,27 @@ +Fix build on architectures (like arm) where gas accepts @ as comment. + +First reported here: +http://sources.redhat.com/ml/libc-alpha/2003-04/msg00265.html + +In use here: +http://www.netwinder.org/autobuild/nw-9/patches/glibc-2.3.2-nobits.patch + +Committed to cvs: +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/include/libc-symbols.h.diff?r1=1.52&r2=1.53&cvsroot=glibc + +=================================================================== +RCS file: /cvs/glibc/libc/include/libc-symbols.h,v +retrieving revision 1.52 +retrieving revision 1.53 +diff -u -r1.52 -r1.53 +--- libc/include/libc-symbols.h 2003/04/30 04:18:03 1.52 ++++ libc/include/libc-symbols.h 2003/05/02 02:20:48 1.53 +@@ -247,7 +247,7 @@ + __attribute__ ((unused, section (".gnu.warning." #symbol __sec_comment))) \ + = msg; + # define libc_freeres_ptr(decl) \ +- __make_section_unallocated ("__libc_freeres_ptrs, \"aw\", @nobits") \ ++ __make_section_unallocated ("__libc_freeres_ptrs, \"aw\", %nobits") \ + decl __attribute__ ((section ("__libc_freeres_ptrs" __sec_comment))) + # define __libc_freeres_fn_section \ + __attribute__ ((section ("__libc_freeres_fn"))) diff --git a/patches/glibc/2.3.2/old/glibc-2.3.2-powerpc-procfs.patch b/patches/glibc/2.3.2/old/glibc-2.3.2-powerpc-procfs.patch new file mode 100644 index 0000000..e0bf46d --- /dev/null +++ b/patches/glibc/2.3.2/old/glibc-2.3.2-powerpc-procfs.patch @@ -0,0 +1,28 @@ +See http://sources.redhat.com/ml/libc-alpha/2003-12/msg00101.html +Fixes +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:58: error: conflicting types for 'elf_vrreg_t' +when building glibc-2.3.2 for powerpc64 and linux-2.6.x + +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h,v +retrieving revision 1.10 +retrieving revision 1.11 +diff -u -r1.10 -r1.11 +--- libc/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h 2003/01/12 08:24:23 1.10 ++++ libc/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h 2003/12/17 23:09:34 1.11 +@@ -45,7 +45,6 @@ + + typedef double elf_fpreg_t; + typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; +-#endif + + /* gcc 3.1 and newer support __uint128_t. */ + #if !__GNUC_PREREQ(3,1) +@@ -57,6 +56,7 @@ + /* Altivec registers */ + typedef __uint128_t elf_vrreg_t; + typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG]; ++#endif + + struct elf_siginfo + { diff --git a/patches/glibc/2.3.2/sscanf.patch b/patches/glibc/2.3.2/sscanf.patch new file mode 100644 index 0000000..b18985a --- /dev/null +++ b/patches/glibc/2.3.2/sscanf.patch @@ -0,0 +1,80 @@ +2003-03-05 Roland McGrath <roland@redhat.com> + + * stdio-common/sscanf.c: Use prototype defn with ... syntax. + * libio/swscanf.c: Likewise. + * libio/swprintf.c: Likewise. + +=================================================================== +RCS file: /cvs/glibc/libc/stdio-common/sscanf.c,v +retrieving revision 1.8 +retrieving revision 1.9 +diff -u -r1.8 -r1.9 +--- libc/stdio-common/sscanf.c 2002/08/10 09:24:42 1.8 ++++ libc/stdio-common/sscanf.c 2003/03/05 19:58:03 1.9 +@@ -1,4 +1,4 @@ +-/* Copyright (C) 1991,95,96,98,2002 Free Software Foundation, Inc. ++/* Copyright (C) 1991,1995,1996,1998,2002,2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -27,9 +27,7 @@ + /* Read formatted input from S, according to the format string FORMAT. */ + /* VARARGS2 */ + int +-sscanf (s, format) +- const char *s; +- const char *format; ++sscanf (const char *s, const char *format, ...) + { + va_list arg; + int done; +=================================================================== +RCS file: /cvs/glibc/libc/libio/swprintf.c,v +retrieving revision 1.3 +retrieving revision 1.4 +diff -u -r1.3 -r1.4 +--- libc/libio/swprintf.c 2001/07/06 04:55:32 1.3 ++++ libc/libio/swprintf.c 2003/03/05 19:58:03 1.4 +@@ -1,4 +1,5 @@ +-/* Copyright (C) 1991,1995,1997,1998,1999,2000 Free Software Foundation, Inc. ++/* Copyright (C) 1991,1995,1997,1998,1999,2000,2003 ++ Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -22,10 +23,7 @@ + /* Write formatted output into S, according to the format string FORMAT. */ + /* VARARGS3 */ + int +-swprintf (s, n, format) +- wchar_t *s; +- size_t n; +- const wchar_t *format; ++swprintf (wchar_t *s, size_t n, const wchar_t *format, ...) + { + va_list arg; + int done; +=================================================================== +RCS file: /cvs/glibc/libc/libio/swscanf.c,v +retrieving revision 1.2 +retrieving revision 1.3 +diff -u -r1.2 -r1.3 +--- libc/libio/swscanf.c 2001/07/06 04:55:32 1.2 ++++ libc/libio/swscanf.c 2003/03/05 19:58:03 1.3 +@@ -1,4 +1,4 @@ +-/* Copyright (C) 1991, 1995, 1996, 1998, 1999 Free Software Foundation, Inc. ++/* Copyright (C) 1991,1995,1996,1998,1999,2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -22,9 +22,7 @@ + /* Read formatted input from S, according to the format string FORMAT. */ + /* VARARGS2 */ + int +-swscanf (s, format) +- const wchar_t *s; +- const wchar_t *format; ++swscanf (const wchar_t *s, const wchar_t *format, ...) + { + va_list arg; + int done; diff --git a/patches/glibc/2.3.2/string2-typedef.patch b/patches/glibc/2.3.2/string2-typedef.patch new file mode 100644 index 0000000..1cf4846 --- /dev/null +++ b/patches/glibc/2.3.2/string2-typedef.patch @@ -0,0 +1,35 @@ +See http://gcc.gnu.org/ml/gcc/2003-08/msg00959.html + +Compiling glibc-2.3.2 with a gcc-3.4 snapshot, I'm seeing +a whole bunch of warnings like this: + +../string/bits/string2.h:80: warning: `packed' attribute ignored +../string/bits/string2.h:81: warning: `packed' attribute ignored +... + +Looks like it was bad code that was silently ignored by previous compilers. +Ulrich fixed it as follows: + +=================================================================== +RCS file: /cvs/glibc/libc/string/bits/string2.h,v +retrieving revision 1.68 +retrieving revision 1.69 +diff -u -r1.68 -r1.69 +--- libc/string/bits/string2.h 2002/05/25 06:10:18 1.68 ++++ libc/string/bits/string2.h 2003/08/20 00:07:37 1.69 +@@ -1,5 +1,5 @@ + /* Machine-independant string function optimizations. +- Copyright (C) 1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc. ++ Copyright (C) 1997-2002, 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. + +@@ -76,7 +76,7 @@ + use unaligned memory accesses. */ + # define __STRING2_COPY_TYPE(N) \ + typedef struct { unsigned char __arr[N]; } \ +- __STRING2_COPY_ARR##N __attribute__ ((packed)) ++ __attribute__ ((__packed__)) __STRING2_COPY_ARR##N + __STRING2_COPY_TYPE (2); + __STRING2_COPY_TYPE (3); + __STRING2_COPY_TYPE (4); |