patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-i386.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Jul 28 21:34:41 2007 +0000 (2007-07-28)
changeset 301 2be7232a73ac
permissions -rw-r--r--
Bump version to 0.2.2.
     1 Fixes
     2 
     3 In file included from dynamic-link.h:22,
     4                  from dl-reloc.c:265:
     5 ../sysdeps/i386/dl-machine.h: In function '_dl_relocate_object':
     6 ../sysdeps/i386/dl-machine.h:395: error: invalid storage class for function 'elf_machine_rel'
     7 ../sysdeps/i386/dl-machine.h:539: error: invalid storage class for function 'elf_machine_rela'
     8 ../sysdeps/i386/dl-machine.h:640: error: invalid storage class for function 'elf_machine_rel_relative'
     9 ../sysdeps/i386/dl-machine.h:650: error: invalid storage class for function 'elf_machine_rela_relative'
    10 ../sysdeps/i386/dl-machine.h:659: error: invalid storage class for function 'elf_machine_lazy_rel'
    11 ../sysdeps/i386/dl-machine.h:680: error: invalid storage class for function 'elf_machine_lazy_rela'
    12 make[2]: *** [/home/dank/queue/jobdir.dual2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3.3/build-glibc/elf/dl-reloc.o] Error 1
    13 
    14 --- glibc-2.3.3/sysdeps/i386/dl-machine.h.old	Wed Mar 16 22:24:09 2005
    15 +++ glibc-2.3.3/sysdeps/i386/dl-machine.h	Thu Mar 17 01:30:09 2005
    16 @@ -385,7 +385,14 @@
    17  /* Perform the relocation specified by RELOC and SYM (which is fully resolved).
    18     MAP is the object containing the reloc.  */
    19  
    20 -static inline void
    21 +#if __GNUC__ >= 4
    22 +  auto inline void
    23 +#else
    24 +  static inline void
    25 +#endif
    26 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
    27 +  __attribute ((always_inline))
    28 +#endif
    29  elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
    30  		 const Elf32_Sym *sym, const struct r_found_version *version,
    31  		 void *const reloc_addr_arg)
    32 @@ -529,7 +536,14 @@
    33  }
    34  
    35  #ifndef RTLD_BOOTSTRAP
    36 -static inline void
    37 +#if __GNUC__ >= 4
    38 +  auto inline void
    39 +#else
    40 +  static inline void
    41 +#endif
    42 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
    43 +  __attribute ((always_inline))
    44 +#endif
    45  elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
    46  		  const Elf32_Sym *sym, const struct r_found_version *version,
    47  		  void *const reloc_addr_arg)
    48 @@ -631,7 +645,14 @@
    49  }
    50  #endif	/* !RTLD_BOOTSTRAP */
    51  
    52 -static inline void
    53 +#if __GNUC__ >= 4
    54 +  auto inline void
    55 +#else
    56 +  static inline void
    57 +#endif
    58 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
    59 +  __attribute ((always_inline))
    60 +#endif
    61  elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
    62  			  void *const reloc_addr_arg)
    63  {
    64 @@ -641,7 +662,14 @@
    65  }
    66  
    67  #ifndef RTLD_BOOTSTRAP
    68 -static inline void
    69 +#if __GNUC__ >= 4
    70 +  auto inline void
    71 +#else
    72 +  static inline void
    73 +#endif
    74 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
    75 +  __attribute ((always_inline))
    76 +#endif
    77  elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
    78  			   void *const reloc_addr_arg)
    79  {
    80 @@ -650,7 +678,14 @@
    81  }
    82  #endif	/* !RTLD_BOOTSTRAP */
    83  
    84 -static inline void
    85 +#if __GNUC__ >= 4
    86 +  auto inline void
    87 +#else
    88 +  static inline void
    89 +#endif
    90 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
    91 +  __attribute ((always_inline))
    92 +#endif
    93  elf_machine_lazy_rel (struct link_map *map,
    94  		      Elf32_Addr l_addr, const Elf32_Rel *reloc)
    95  {
    96 @@ -671,7 +706,14 @@
    97  
    98  #ifndef RTLD_BOOTSTRAP
    99  
   100 -static inline void
   101 +#if __GNUC__ >= 4
   102 +  auto inline void
   103 +#else
   104 +  static inline void
   105 +#endif
   106 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
   107 +  __attribute ((always_inline))
   108 +#endif
   109  elf_machine_lazy_rela (struct link_map *map,
   110  		       Elf32_Addr l_addr, const Elf32_Rela *reloc)
   111  {