Author: matthew
Date: 2005-07-15 13:51:05 -0600 (Fri, 15 Jul 2005)
New Revision: 1019

Added:
   trunk/glibc/glibc-2.3.5-gcc4_fix_elf-1.patch
   trunk/glibc/glibc-2.3.5-gcc4_fix_iconvdata-1.patch
   trunk/glibc/glibc-2.3.5-gcc4_fix_string-1.patch
   trunk/glibc/glibc-2.3.5-gcc4_fix_symbols-1.patch
Log:
Added Glibc GCC-4.0.x related patches

Added: trunk/glibc/glibc-2.3.5-gcc4_fix_elf-1.patch
===================================================================
--- trunk/glibc/glibc-2.3.5-gcc4_fix_elf-1.patch        2005-07-14 20:47:00 UTC 
(rev 1018)
+++ trunk/glibc/glibc-2.3.5-gcc4_fix_elf-1.patch        2005-07-15 19:51:05 UTC 
(rev 1019)
@@ -0,0 +1,427 @@
+Submitted By: Matthew Burgess <[EMAIL PROTECTED]>
+Date: 2005-07-15
+Initial Package Version: 2.3.5
+Upstream Status: From Upstream
+Origin: Ryan Oliver, courtesy of upstream CVS and Dan Kegel's crosstool
+        (http://kegel.com/crosstool/)
+Description: Fixes a compilation problem with gcc-4.0.x that results in:
+  rtld.c: In function '_dl_start':
+  dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' 
declared
+  but never defined
+  dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but
+  never defined
+
+diff -Naur glibc-2.3.5.orig/elf/dynamic-link.h glibc-2.3.5/elf/dynamic-link.h
+--- glibc-2.3.5.orig/elf/dynamic-link.h        2004-09-24 17:09:03.000000000 
+0000
++++ glibc-2.3.5/elf/dynamic-link.h     2005-07-15 18:24:04.450773880 +0000
+@@ -1,5 +1,5 @@
+ /* Inline functions for dynamic linking.
+-   Copyright (C) 1995-2002, 2003, 2004 Free Software Foundation, Inc.
++   Copyright (C) 1995-2002, 2003, 2004, 2005 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
+@@ -31,26 +31,30 @@
+    optimizing away alignment tests or using word instructions for
+    copying memory, breaking the very code written to handle the
+    unaligned cases.  */
+-auto void __attribute__((always_inline))
++# if ! ELF_MACHINE_NO_REL
++auto inline void __attribute__((always_inline))
+ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
+                const ElfW(Sym) *sym, const struct r_found_version *version,
+                void *const reloc_addr);
+-auto void __attribute__((always_inline))
++auto inline void __attribute__((always_inline))
++elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
++                        void *const reloc_addr);
++# endif
++# if ! ELF_MACHINE_NO_RELA
++auto inline void __attribute__((always_inline))
+ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
+                 const ElfW(Sym) *sym, const struct r_found_version *version,
+                 void *const reloc_addr);
+-auto void __attribute__((always_inline))
+-elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
+-                        void *const reloc_addr);
+-auto void __attribute__((always_inline))
++auto inline void __attribute__((always_inline))
+ elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
+                          void *const reloc_addr);
++# endif
+ # if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
+-auto void __attribute__((always_inline))
++auto inline void __attribute__((always_inline))
+ elf_machine_lazy_rel (struct link_map *map,
+                     ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
+ # else
+-auto void __attribute__((always_inline))
++auto inline void __attribute__((always_inline))
+ elf_machine_lazy_rel (struct link_map *map,
+                     ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
+ # endif
+diff -Naur glibc-2.3.5.orig/sysdeps/alpha/dl-machine.h 
glibc-2.3.5/sysdeps/alpha/dl-machine.h
+--- glibc-2.3.5.orig/sysdeps/alpha/dl-machine.h        2004-10-15 
07:06:11.000000000 +0000
++++ glibc-2.3.5/sysdeps/alpha/dl-machine.h     2005-07-15 18:24:04.620748040 
+0000
+@@ -1,5 +1,5 @@
+ /* Machine-dependent ELF dynamic relocation inline functions.  Alpha version.
+-   Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc.
++   Copyright (C) 1996-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+    Contributed by Richard Henderson <[EMAIL PROTECTED]>.
+ 
+@@ -508,6 +508,7 @@
+ /* Perform the relocation specified by RELOC and SYM (which is fully 
resolved).
+    MAP is the object containing the reloc.  */
+ auto inline void
++__attribute__ ((always_inline))
+ elf_machine_rela (struct link_map *map,
+                 const Elf64_Rela *reloc,
+                 const Elf64_Sym *sym,
+@@ -646,6 +647,7 @@
+ #define ELF_MACHINE_REL_RELATIVE 1
+ 
+ auto inline void
++__attribute__ ((always_inline))
+ elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
+                          void *const reloc_addr_arg)
+ {
+@@ -662,6 +664,7 @@
+ }
+ 
+ auto inline void
++__attribute__ ((always_inline))
+ elf_machine_lazy_rel (struct link_map *map,
+                     Elf64_Addr l_addr, const Elf64_Rela *reloc)
+ {
+diff -Naur glibc-2.3.5.orig/sysdeps/arm/dl-machine.h 
glibc-2.3.5/sysdeps/arm/dl-machine.h
+--- glibc-2.3.5.orig/sysdeps/arm/dl-machine.h  2004-12-04 21:20:17.000000000 
+0000
++++ glibc-2.3.5/sysdeps/arm/dl-machine.h       2005-07-15 18:24:04.621747888 
+0000
+@@ -350,16 +350,15 @@
+ 
+ #endif /* !dl_machine_h */
+ 
+-#ifdef RESOLVE
+-
+ /* ARM never uses Elf32_Rela relocations for the dynamic linker.
+    Prelinked libraries may use Elf32_Rela though.  */
+-# ifdef RTLD_BOOTSTRAP
+-#  define ELF_MACHINE_NO_RELA 1
+-# endif
++#define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP
++
++#ifdef RESOLVE
+ 
+ /* Deal with an out-of-range PC24 reloc.  */
+-static Elf32_Addr
++auto inline Elf32_Addr
++__attribute__ ((always_inline))
+ fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value)
+ {
+   static void *fix_page;
+@@ -392,7 +391,8 @@
+ /* Perform the relocation specified by RELOC and SYM (which is fully 
resolved).
+    MAP is the object containing the reloc.  */
+ 
+-static inline void
++auto inline void
++__attribute__ ((always_inline))
+ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
+                const Elf32_Sym *sym, const struct r_found_version *version,
+                void *const reloc_addr_arg)
+@@ -517,7 +517,8 @@
+ }
+ 
+ # ifndef RTLD_BOOTSTRAP
+-static inline void
++auto inline void
++__attribute__ ((always_inline))
+ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
+                 const Elf32_Sym *sym, const struct r_found_version *version,
+                 void *const reloc_addr_arg)
+@@ -597,7 +598,8 @@
+ }
+ # endif
+ 
+-static inline void
++auto inline void
++__attribute__ ((always_inline))
+ elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
+                         void *const reloc_addr_arg)
+ {
+@@ -606,7 +608,8 @@
+ }
+ 
+ # ifndef RTLD_BOOTSTRAP
+-static inline void
++auto inline void
++__attribute__ ((always_inline))
+ elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
+                          void *const reloc_addr_arg)
+ {
+@@ -615,7 +618,8 @@
+ }
+ # endif
+ 
+-static inline void
++auto inline void
++__attribute__ ((always_inline))
+ elf_machine_lazy_rel (struct link_map *map,
+                     Elf32_Addr l_addr, const Elf32_Rel *reloc)
+ {
+diff -Naur glibc-2.3.5.orig/sysdeps/generic/dl-machine.h 
glibc-2.3.5/sysdeps/generic/dl-machine.h
+--- glibc-2.3.5.orig/sysdeps/generic/dl-machine.h      2001-09-08 
17:16:43.000000000 +0000
++++ glibc-2.3.5/sysdeps/generic/dl-machine.h   2005-07-15 18:24:04.622747736 
+0000
+@@ -1,5 +1,6 @@
+ /* Machine-dependent ELF dynamic relocation inline functions.  Stub version.
+-   Copyright (C) 1995,1996,1997,1999,2000,2001 Free Software Foundation, Inc.
++   Copyright (C) 1995, 1996, 1997, 1999, 2000, 2001, 2005
++   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
+@@ -64,7 +65,8 @@
+    LOADADDR is the load address of the object; INFO is an array indexed
+    by DT_* of the .dynamic section info.  */
+ 
+-static inline void
++auto inline void
++__attribute__ ((always_inline))
+ elf_machine_rel (Elf32_Addr loadaddr, Elf32_Dyn *info[DT_NUM],
+                const Elf32_Rel *reloc, const Elf32_Sym *sym,
+                Elf32_Addr (*resolve) (const Elf32_Sym **ref,
+@@ -87,7 +89,8 @@
+ }
+ 
+ 
+-static inline Elf32_Addr
++auto inline Elf32_Addr
++__attribute__ ((always_inline))
+ elf_machine_rela (Elf32_Addr loadaddr, Elf32_Dyn *info[DT_NUM],
+                 const Elf32_Rel *reloc, const Elf32_Sym *sym,
+                 Elf32_Addr (*resolve) (const Elf32_Sym **ref,
+diff -Naur glibc-2.3.5.orig/sysdeps/i386/dl-machine.h 
glibc-2.3.5/sysdeps/i386/dl-machine.h
+--- glibc-2.3.5.orig/sysdeps/i386/dl-machine.h 2005-02-16 10:58:03.000000000 
+0000
++++ glibc-2.3.5/sysdeps/i386/dl-machine.h      2005-07-15 18:24:04.629746672 
+0000
+@@ -387,13 +387,11 @@
+ 
+ #endif /* !dl_machine_h */
+ 
+-#ifdef RESOLVE
+-
+ /* The i386 never uses Elf32_Rela relocations for the dynamic linker.
+    Prelinked libraries may use Elf32_Rela though.  */
+-#ifdef RTLD_BOOTSTRAP
+-# define ELF_MACHINE_NO_RELA 1
+-#endif
++#define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP
++
++#ifdef RESOLVE
+ 
+ /* Perform the relocation specified by RELOC and SYM (which is fully 
resolved).
+    MAP is the object containing the reloc.  */
+diff -Naur glibc-2.3.5.orig/sysdeps/mips/dl-machine.h 
glibc-2.3.5/sysdeps/mips/dl-machine.h
+--- glibc-2.3.5.orig/sysdeps/mips/dl-machine.h 2004-11-24 04:36:09.000000000 
+0000
++++ glibc-2.3.5/sysdeps/mips/dl-machine.h      2005-07-15 18:24:04.623747584 
+0000
+@@ -528,7 +528,7 @@
+ /* Perform the relocation specified by RELOC and SYM (which is fully 
resolved).
+    MAP is the object containing the reloc.  */
+ 
+-static inline void
++auto inline void
+ #ifdef RTLD_BOOTSTRAP
+   __attribute__ ((always_inline))
+ #endif
+@@ -635,14 +635,16 @@
+     }
+ }
+ 
+-static inline void
++auto inline void
++__attribute__((always_inline))
+ elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
+                         void *const reloc_addr)
+ {
+   /* XXX Nothing to do.  There is no relative relocation, right?  */
+ }
+ 
+-static inline void
++auto inline void
++__attribute__((always_inline))
+ elf_machine_lazy_rel (struct link_map *map,
+                     ElfW(Addr) l_addr, const ElfW(Rel) *reloc)
+ {
+@@ -651,7 +653,8 @@
+ 
+ #ifndef RTLD_BOOTSTRAP
+ /* Relocate GOT. */
+-static inline void
++auto inline void
++__attribute__((always_inline))
+ elf_machine_got_rel (struct link_map *map, int lazy)
+ {
+   ElfW(Addr) *got;
+@@ -738,7 +741,8 @@
+ /* Set up the loaded object described by L so its stub function
+    will jump to the on-demand fixup code __dl_runtime_resolve.  */
+ 
+-static inline int
++auto inline int
++__attribute__((always_inline))
+ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
+ {
+ # ifndef RTLD_BOOTSTRAP
+diff -Naur glibc-2.3.5.orig/sysdeps/powerpc/powerpc32/dl-machine.h 
glibc-2.3.5/sysdeps/powerpc/powerpc32/dl-machine.h
+--- glibc-2.3.5.orig/sysdeps/powerpc/powerpc32/dl-machine.h    2003-07-31 
06:33:52.000000000 +0000
++++ glibc-2.3.5/sysdeps/powerpc/powerpc32/dl-machine.h 2005-07-15 
18:24:04.624747432 +0000
+@@ -353,7 +353,7 @@
+    LOADADDR is the load address of the object; INFO is an array indexed
+    by DT_* of the .dynamic section info.  */
+ 
+-inline void
++auto inline void __attribute__ ((always_inline))
+ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
+                 const Elf32_Sym *sym, const struct r_found_version *version,
+                 void *const reloc_addr_arg)
+@@ -455,7 +455,7 @@
+     }
+ }
+ 
+-static inline void
++auto inline void __attribute__ ((always_inline))
+ elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
+                          void *const reloc_addr_arg)
+ {
+@@ -463,7 +463,7 @@
+   *reloc_addr = l_addr + reloc->r_addend;
+ }
+ 
+-static inline void
++auto inline void __attribute__ ((always_inline))
+ elf_machine_lazy_rel (struct link_map *map,
+                     Elf32_Addr l_addr, const Elf32_Rela *reloc)
+ {
+diff -Naur glibc-2.3.5.orig/sysdeps/powerpc/powerpc64/dl-machine.h 
glibc-2.3.5/sysdeps/powerpc/powerpc64/dl-machine.h
+--- glibc-2.3.5.orig/sysdeps/powerpc/powerpc64/dl-machine.h    2004-09-08 
06:57:14.000000000 +0000
++++ glibc-2.3.5/sysdeps/powerpc/powerpc64/dl-machine.h 2005-07-15 
18:24:04.626747128 +0000
+@@ -567,7 +567,7 @@
+                                 const Elf64_Sym *refsym)
+                                 attribute_hidden;
+ 
+-static inline void
++auto inline void __attribute__ ((always_inline))
+ elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
+                          void *const reloc_addr_arg)
+ {
+@@ -577,7 +577,7 @@
+ 
+ #if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD)
+ /* This computes the value used by TPREL* relocs.  */
+-static Elf64_Addr __attribute__ ((const))
++auto inline Elf64_Addr __attribute__ ((always_inline, const))
+ elf_machine_tprel (struct link_map *map,
+                  struct link_map *sym_map,
+                  const Elf64_Sym *sym,
+@@ -598,7 +598,7 @@
+ 
+ /* Perform the relocation specified by RELOC and SYM (which is fully
+    resolved).  MAP is the object containing the reloc.  */
+-static inline void
++auto inline void __attribute__ ((always_inline))
+ elf_machine_rela (struct link_map *map,
+                 const Elf64_Rela *reloc,
+                 const Elf64_Sym *sym,
+@@ -883,11 +883,12 @@
+   MODIFIED_CODE_NOQUEUE (reloc_addr);
+ }
+ 
+-static inline void
++auto inline void __attribute__ ((always_inline))
+ elf_machine_lazy_rel (struct link_map *map,
+                     Elf64_Addr l_addr, const Elf64_Rela *reloc)
+ {
+   /* elf_machine_runtime_setup handles this.  */
+ }
+ 
++
+ #endif /* RESOLVE */
+diff -Naur glibc-2.3.5.orig/sysdeps/sparc/sparc32/dl-machine.h 
glibc-2.3.5/sysdeps/sparc/sparc32/dl-machine.h
+--- glibc-2.3.5.orig/sysdeps/sparc/sparc32/dl-machine.h        2004-05-17 
18:20:30.000000000 +0000
++++ glibc-2.3.5/sysdeps/sparc/sparc32/dl-machine.h     2005-07-15 
18:24:04.627746976 +0000
+@@ -1,5 +1,5 @@
+ /* Machine-dependent ELF dynamic relocation inline functions.  SPARC version.
+-   Copyright (C) 1996-2003, 2004 Free Software Foundation, Inc.
++   Copyright (C) 1996-2003, 2004, 2005 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
+@@ -411,7 +411,8 @@
+ /* Perform the relocation specified by RELOC and SYM (which is fully 
resolved).
+    MAP is the object containing the reloc.  */
+ 
+-static inline void
++auto inline void
++__attribute__ ((always_inline))
+ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
+                 const Elf32_Sym *sym, const struct r_found_version *version,
+                 void *const reloc_addr_arg)
+@@ -593,7 +594,8 @@
+     }
+ }
+ 
+-static inline void
++auto inline void
++__attribute__ ((always_inline))
+ elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
+                          void *const reloc_addr_arg)
+ {
+@@ -601,7 +603,8 @@
+   *reloc_addr += l_addr + reloc->r_addend;
+ }
+ 
+-static inline void
++auto inline void
++__attribute__ ((always_inline))
+ elf_machine_lazy_rel (struct link_map *map,
+                     Elf32_Addr l_addr, const Elf32_Rela *reloc)
+ {
+diff -Naur glibc-2.3.5.orig/sysdeps/sparc/sparc64/dl-machine.h 
glibc-2.3.5/sysdeps/sparc/sparc64/dl-machine.h
+--- glibc-2.3.5.orig/sysdeps/sparc/sparc64/dl-machine.h        2004-03-05 
10:27:55.000000000 +0000
++++ glibc-2.3.5/sysdeps/sparc/sparc64/dl-machine.h     2005-07-15 
18:24:04.628746824 +0000
+@@ -1,5 +1,5 @@
+ /* Machine-dependent ELF dynamic relocation inline functions.  Sparc64 
version.
+-   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
++   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+       Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+@@ -238,7 +238,8 @@
+ /* Perform the relocation specified by RELOC and SYM (which is fully 
resolved).
+    MAP is the object containing the reloc.  */
+ 
+-static inline void
++auto inline void
++__attribute__ ((always_inline))
+ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
+                 const Elf64_Sym *sym, const struct r_found_version *version,
+                 void *const reloc_addr_arg)
+@@ -430,7 +431,8 @@
+     }
+ }
+ 
+-static inline void
++auto inline void
++__attribute__ ((always_inline))
+ elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
+                          void *const reloc_addr_arg)
+ {
+@@ -438,7 +440,8 @@
+   *reloc_addr = l_addr + reloc->r_addend;
+ }
+ 
+-static inline void
++auto inline void
++__attribute__ ((always_inline))
+ elf_machine_lazy_rel (struct link_map *map,
+                     Elf64_Addr l_addr, const Elf64_Rela *reloc)
+ {

Added: trunk/glibc/glibc-2.3.5-gcc4_fix_iconvdata-1.patch
===================================================================
--- trunk/glibc/glibc-2.3.5-gcc4_fix_iconvdata-1.patch  2005-07-14 20:47:00 UTC 
(rev 1018)
+++ trunk/glibc/glibc-2.3.5-gcc4_fix_iconvdata-1.patch  2005-07-15 19:51:05 UTC 
(rev 1019)
@@ -0,0 +1,44 @@
+Submitted By: Matthew Burgess <[EMAIL PROTECTED]>
+Date: 2005-07-15
+Initial Package Version: 2.3.5
+Upstream Status: From Upstream
+Origin: Ryan Oliver, courtesy of Dan Kegel's crosstool
+        (http://kegel.com/crosstool/)
+Description: Fixes a compilation problem with gcc-4.0.x that results in:
+             jis0208.h:32: error: array type has incomplete element type
+
+diff -Naur glibc-2.3.5.orig/iconvdata/jis0208.h glibc-2.3.5/iconvdata/jis0208.h
+--- glibc-2.3.5.orig/iconvdata/jis0208.h       2003-06-11 21:40:42.000000000 
+0000
++++ glibc-2.3.5/iconvdata/jis0208.h    2005-07-15 18:32:20.726328528 +0000
+@@ -24,15 +24,6 @@
+ #include <gconv.h>
+ #include <stdint.h>
+ 
+-/* Conversion table.  */
+-extern const uint16_t __jis0208_to_ucs[];
+-
+-extern const char __jisx0208_from_ucs4_lat1[256][2];
+-extern const char __jisx0208_from_ucs4_greek[0xc1][2];
+-extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[];
+-extern const char __jisx0208_from_ucs_tab[][2];
+-
+-
+ /* Struct for table with indeces in UCS mapping table.  */
+ struct jisx0208_ucs_idx
+ {
+@@ -42,6 +33,15 @@
+ };
+ 
+ 
++/* Conversion table.  */
++extern const uint16_t __jis0208_to_ucs[];
++
++extern const char __jisx0208_from_ucs4_lat1[256][2];
++extern const char __jisx0208_from_ucs4_greek[0xc1][2];
++extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[];
++extern const char __jisx0208_from_ucs_tab[][2];
++
++
+ static inline uint32_t
+ __attribute ((always_inline))
+ jisx0208_to_ucs4 (const unsigned char **s, size_t avail, unsigned char offset)

Added: trunk/glibc/glibc-2.3.5-gcc4_fix_string-1.patch
===================================================================
--- trunk/glibc/glibc-2.3.5-gcc4_fix_string-1.patch     2005-07-14 20:47:00 UTC 
(rev 1018)
+++ trunk/glibc/glibc-2.3.5-gcc4_fix_string-1.patch     2005-07-15 19:51:05 UTC 
(rev 1019)
@@ -0,0 +1,59 @@
+Submitted By: Matthew Burgess <[EMAIL PROTECTED]>
+Date: 2005-07-15
+Initial Package Version: 2.3.5
+Upstream Status: From Upstream
+Origin: Ryan Oliver, courtesy of Dan Kegel's crosstool
+        (http://kegel.com/crosstool/)
+Description: Fixes a compilation problem with gcc-4.0.x that results in:
+             ../string/strcoll.c:39: error: '__EI_strcoll' aliased to undefined
+             symbol '__GI_strcoll'
+
+diff -Naur glibc-2.3.5.orig/include/wchar.h glibc-2.3.5/include/wchar.h
+--- glibc-2.3.5.orig/include/wchar.h   2004-03-14 20:45:10.000000000 +0000
++++ glibc-2.3.5/include/wchar.h        2005-07-15 18:17:51.206515632 +0000
+@@ -56,7 +56,6 @@
+ extern int __wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2,
+                         size_t __n)
+      __attribute_pure__;
+-extern int __wcscoll (__const wchar_t *__s1, __const wchar_t *__s2);
+ extern size_t __wcslen (__const wchar_t *__s) __attribute_pure__;
+ extern size_t __wcsnlen (__const wchar_t *__s, size_t __maxlen)
+      __attribute_pure__;
+diff -Naur glibc-2.3.5.orig/string/strcoll.c glibc-2.3.5/string/strcoll.c
+--- glibc-2.3.5.orig/string/strcoll.c  2004-03-14 20:51:30.000000000 +0000
++++ glibc-2.3.5/string/strcoll.c       2005-07-15 18:17:51.205515784 +0000
+@@ -23,6 +23,7 @@
+ # define STRING_TYPE char
+ # define STRCOLL strcoll
+ # define STRCOLL_L __strcoll_l
++# define USE_HIDDEN_DEF
+ #endif
+ 
+ #include "../locale/localeinfo.h"
+@@ -35,6 +36,7 @@
+ {
+   return STRCOLL_L (s1, s2, _NL_CURRENT_LOCALE);
+ }
+-#if !defined WIDE_CHAR_VERSION
+-libc_hidden_def (strcoll)
++
++#ifdef USE_HIDDEN_DEF
++libc_hidden_def (STRCOLL)
+ #endif
+diff -Naur glibc-2.3.5.orig/wcsmbs/wcscoll.c glibc-2.3.5/wcsmbs/wcscoll.c
+--- glibc-2.3.5.orig/wcsmbs/wcscoll.c  2004-03-14 21:05:48.000000000 +0000
++++ glibc-2.3.5/wcsmbs/wcscoll.c       2005-07-15 18:17:51.206515632 +0000
+@@ -22,12 +22,11 @@
+ 
+ #define STRING_TYPE wchar_t
+ #define USTRING_TYPE wint_t
+-#define STRCOLL __wcscoll
++#define STRCOLL wcscoll
+ #define STRCOLL_L __wcscoll_l
+ 
+ #include "../string/strcoll.c"
+ 
+ #ifndef USE_IN_EXTENDED_LOCALE_MODEL
+-weak_alias (__wcscoll, wcscoll)
+ libc_hidden_weak (wcscoll)
+ #endif

Added: trunk/glibc/glibc-2.3.5-gcc4_fix_symbols-1.patch
===================================================================
--- trunk/glibc/glibc-2.3.5-gcc4_fix_symbols-1.patch    2005-07-14 20:47:00 UTC 
(rev 1018)
+++ trunk/glibc/glibc-2.3.5-gcc4_fix_symbols-1.patch    2005-07-15 19:51:05 UTC 
(rev 1019)
@@ -0,0 +1,103 @@
+Submitted By: Matthew Burgess <[EMAIL PROTECTED]>
+Date: 2005-07-15
+Initial Package Version: 2.3.5
+Upstream Status: From Upstream (libc/include/libc-symbols.h -r1.71)
+Origin: Ryan Oliver, courtesy of Dan Kegel's crosstool
+        (http://kegel.com/crosstool/)
+Description: Fixes a compilation problem with gcc-4.0.x that results in:
+             ../sysdeps/ieee754/dbl-64/s_isinf.c:29: error: 'isinf' aliased to
+             undefined symbol '__isinf'
+
+diff -Naur glibc-2.3.5.orig/include/libc-symbols.h 
glibc-2.3.5/include/libc-symbols.h
+--- glibc-2.3.5.orig/include/libc-symbols.h    2004-10-24 21:17:08.000000000 
+0000
++++ glibc-2.3.5/include/libc-symbols.h 2005-07-15 17:31:10.854233888 +0000
+@@ -582,78 +582,23 @@
+ #  define hidden_proto(name, attrs...) \
+   __hidden_proto (name, __GI_##name, ##attrs)
+ #  define __hidden_proto(name, internal, attrs...) \
+-  extern __typeof (name) internal; \
+   extern __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
+   __hidden_proto_hiddenattr (attrs);
+ #  define __hidden_asmname(name) \
+   __hidden_asmname1 (__USER_LABEL_PREFIX__, name)
+ #  define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
+ #  define __hidden_asmname2(prefix, name) #prefix name
+-#  ifdef HAVE_ASM_SET_DIRECTIVE
+-#   define __hidden_def1(original, alias)                     \
+-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP     \
+-  .set C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
+-#   ifdef HAVE_ASM_GLOBAL_DOT_NAME
+-#     define __hidden_dot_def1(original, alias)        ASM_LINE_SEP   \
+-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
+-  .set C_SYMBOL_DOT_NAME (alias), C_SYMBOL_DOT_NAME (original)
+-#   else
+-#     define __hidden_dot_def1(original, alias)
+-#   endif
+-#  else
+-#   define __hidden_def1(original, alias)                     \
+-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP     \
+-  C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
+-#   ifdef HAVE_ASM_GLOBAL_DOT_NAME
+-#    define __hidden_dot_def1(original, alias)        ASM_LINE_SEP    \
+-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
+-  C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
+-#   else
+-#    define __hidden_dot_def1(original, alias)
+-#   endif
+-#  endif
+-#  define __hidden_def2(...) #__VA_ARGS__
+-#  define __hidden_def3(...) __hidden_def2 (__VA_ARGS__)
+-#  define hidden_def(name)                                    \
+-  __asm__ (__hidden_def3 (__hidden_def1 (__GI_##name, name) \
+-  __hidden_dot_def1 (__GI_##name, name)));
+-#  define hidden_data_def(name)                                       \
+-  __asm__ (__hidden_def3 (__hidden_def1 (__GI_##name, name)));
+-#  define hidden_ver(local, name)                             \
+-  __asm__ (__hidden_def3 (__hidden_def1 (local, __GI_##name) \
+-  __hidden_dot_def1 (local, __GI_##name)));
+-#  define hidden_data_ver(local, name)                                \
+-  __asm__ (__hidden_def3 (__hidden_def1 (local, __GI_##name)));
+-#  ifdef HAVE_WEAK_SYMBOLS
+-#   ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
+-#    define __hidden_weak1(original, alias)                   \
+-  .weakext C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
+-#    ifdef HAVE_ASM_GLOBAL_DOT_NAME
+-#     define __hidden_dot_weak1(original, alias)      ASM_LINE_SEP    \
+-  .weakext C_SYMBOL_DOT_NAME (alias), C_SYMBOL_DOT_NAME (original)
+-#    else
+-#     define __hidden_dot_weak1(original, alias)
+-#    endif
+-#   else /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
+-#    define __hidden_weak1(original, alias)                   \
+-  .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP                    \
+-  C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
+-#    ifdef HAVE_ASM_GLOBAL_DOT_NAME
+-#     define __hidden_dot_weak1(original, alias)      ASM_LINE_SEP    \
+-  .weak C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP        \
+-  C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
+-#    else
+-#     define __hidden_dot_weak1(original, alias)
+-#    endif
+-#   endif
+-#   define hidden_weak(name)                                  \
+-  __asm__ (__hidden_def3 (__hidden_weak1 (__GI_##name, name) \
+-  __hidden_dot_weak1 (__GI_##name, name)));
+-#   define hidden_data_weak(name)                                     \
+-  __asm__ (__hidden_def3 (__hidden_weak1 (__GI_##name, name)));
+-#  else
+-#   define hidden_weak(name) hidden_def (name)
+-#  endif
++#  define __hidden_ver1(local, internal, name) \
++  extern __typeof (name) __EI_##name __asm__(__hidden_asmname (#internal)); \
++  extern __typeof (name) __EI_##name \
++      __attribute__((alias (__hidden_asmname (#local))))
++#  define hidden_ver(local, name)     __hidden_ver1(local, __GI_##name, name);
++#  define hidden_data_ver(local, name)        hidden_ver(local, name)
++#  define hidden_def(name)            __hidden_ver1(__GI_##name, name, name);
++#  define hidden_data_def(name)               hidden_def(name)
++#  define hidden_weak(name) \
++      __hidden_ver1(__GI_##name, name, name) __attribute__((weak));
++#  define hidden_data_weak(name)      hidden_weak(name)
+ # else
+ /* For assembly, we need to do the opposite of what we do in C:
+    in assembly gcc __REDIRECT stuff is not in place, so functions

-- 
http://linuxfromscratch.org/mailman/listinfo/patches
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to