patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-i386.patch
changeset 19 d80e6dedcc13
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-i386.patch	Mon Mar 12 18:59:31 2007 +0000
     1.3 @@ -0,0 +1,49 @@
     1.4 +Fixes
     1.5 +../sysdeps/i386/dl-machine.h: In function '_dl_relocate_object':
     1.6 +../sysdeps/i386/dl-machine.h:306: error: invalid storage class for function 'elf_machine_rel'
     1.7 +../sysdeps/i386/dl-machine.h:385: error: invalid storage class for function 'elf_machine_rel_relative'
     1.8 +../sysdeps/i386/dl-machine.h:393: error: invalid storage class for function 'elf_machine_lazy_rel'
     1.9 +
    1.10 +when building glibc-2.2.5 with gcc-4.0.
    1.11 +
    1.12 +--- /home/dank/downloads/glibc-2.2.5/sysdeps/i386/dl-machine.h	2001-08-30 16:09:10.000000000 -0700
    1.13 ++++ glibc-2.2.5/sysdeps/i386/dl-machine.h	2005-03-11 14:00:22.601858328 -0800
    1.14 +@@ -298,7 +299,12 @@
    1.15 + /* Perform the relocation specified by RELOC and SYM (which is fully resolved).
    1.16 +    MAP is the object containing the reloc.  */
    1.17 + 
    1.18 ++#if __GNUC__ >= 4
    1.19 ++auto inline void
    1.20 ++__attribute ((always_inline))
    1.21 ++#else
    1.22 + static inline void
    1.23 ++#endif
    1.24 + elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
    1.25 + 		 const Elf32_Sym *sym, const struct r_found_version *version,
    1.26 + 		 Elf32_Addr *const reloc_addr)
    1.27 +@@ -378,7 +384,12 @@
    1.28 +     }
    1.29 + }
    1.30 + 
    1.31 ++#if __GNUC__ >= 4
    1.32 ++auto inline void
    1.33 ++__attribute ((always_inline))
    1.34 ++#else
    1.35 + static inline void
    1.36 ++#endif
    1.37 + elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
    1.38 + 			  Elf32_Addr *const reloc_addr)
    1.39 + {
    1.40 +@@ -386,7 +397,12 @@
    1.41 +   *reloc_addr += l_addr;
    1.42 + }
    1.43 + 
    1.44 ++#if __GNUC__ >= 4
    1.45 ++auto inline void
    1.46 ++__attribute ((always_inline))
    1.47 ++#else
    1.48 + static inline void
    1.49 ++#endif
    1.50 + elf_machine_lazy_rel (struct link_map *map,
    1.51 + 		      Elf32_Addr l_addr, const Elf32_Rel *reloc)
    1.52 + {