patches/glibc/2.3.4/glibc-2.3.4-allow-gcc-4.0-arm.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1 eeea35fbf182
permissions -rw-r--r--
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... :-(
     1 Fixes
     2 In file included from dynamic-link.h:22,
     3                  from dl-reloc.c:265:
     4 ../sysdeps/arm/dl-machine.h: In function '_dl_relocate_object':
     5 ../sysdeps/arm/dl-machine.h:371: error: invalid storage class for function 'fix_bad_pc24'
     6 ../sysdeps/arm/dl-machine.h:406: error: invalid storage class for function 'elf_machine_rel'
     7 ../sysdeps/arm/dl-machine.h:532: error: invalid storage class for function 'elf_machine_rela'
     8 ../sysdeps/arm/dl-machine.h:612: error: invalid storage class for function 'elf_machine_rel_relative'
     9 ../sysdeps/arm/dl-machine.h:621: error: invalid storage class for function 'elf_machine_rela_relative'
    10 ../sysdeps/arm/dl-machine.h:630: error: invalid storage class for function 'elf_machine_lazy_rel'
    11 make[2]: Leaving directory `/home/dank/queue/jobdir.k8/crosstool-dev/build/arm-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3.3/glibc-2.3.3/elf'
    12 
    13 when building glibc-2.3.[34] with gcc-4.0
    14 
    15 Like
    16 http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/arm/dl-machine.h.diff?r1=1.51&r2=1.52&cvsroot=glibc
    17 but works with older compilers, and fixes fix_bad_pc24.
    18 
    19 
    20 --- glibc-2.3.4/sysdeps/arm/dl-machine.h.old	Sun Mar 20 17:54:37 2005
    21 +++ glibc-2.3.4/sysdeps/arm/dl-machine.h	Sun Mar 20 17:57:32 2005
    22 @@ -359,7 +359,14 @@
    23  # endif
    24  
    25  /* Deal with an out-of-range PC24 reloc.  */
    26 -static Elf32_Addr
    27 +#if __GNUC__ >= 4
    28 +  auto inline Elf32_Addr
    29 +#else
    30 +  static inline Elf32_Addr
    31 +#endif
    32 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
    33 +  __attribute ((always_inline))
    34 +#endif
    35  fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value)
    36  {
    37    static void *fix_page;
    38 @@ -392,7 +399,14 @@
    39  /* Perform the relocation specified by RELOC and SYM (which is fully resolved).
    40     MAP is the object containing the reloc.  */
    41  
    42 -static inline void
    43 +#if __GNUC__ >= 4
    44 +  auto inline void
    45 +#else
    46 +  static inline void
    47 +#endif
    48 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
    49 +  __attribute ((always_inline))
    50 +#endif
    51  elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
    52  		 const Elf32_Sym *sym, const struct r_found_version *version,
    53  		 void *const reloc_addr_arg)
    54 @@ -517,7 +531,14 @@
    55  }
    56  
    57  # ifndef RTLD_BOOTSTRAP
    58 -static inline void
    59 +#if __GNUC__ >= 4
    60 +  auto inline void
    61 +#else
    62 +  static inline void
    63 +#endif
    64 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
    65 +  __attribute ((always_inline))
    66 +#endif
    67  elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
    68  		  const Elf32_Sym *sym, const struct r_found_version *version,
    69  		  void *const reloc_addr_arg)
    70 @@ -597,7 +618,14 @@
    71  }
    72  # endif
    73  
    74 -static inline void
    75 +#if __GNUC__ >= 4
    76 +  auto inline void
    77 +#else
    78 +  static inline void
    79 +#endif
    80 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
    81 +  __attribute ((always_inline))
    82 +#endif
    83  elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
    84  			  void *const reloc_addr_arg)
    85  {
    86 @@ -606,7 +634,14 @@
    87  }
    88  
    89  # ifndef RTLD_BOOTSTRAP
    90 -static inline void
    91 +#if __GNUC__ >= 4
    92 +  auto inline void
    93 +#else
    94 +  static inline void
    95 +#endif
    96 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
    97 +  __attribute ((always_inline))
    98 +#endif
    99  elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
   100  			   void *const reloc_addr_arg)
   101  {
   102 @@ -615,7 +650,14 @@
   103  }
   104  # endif
   105  
   106 -static inline void
   107 +#if __GNUC__ >= 4
   108 +  auto inline void
   109 +#else
   110 +  static inline void
   111 +#endif
   112 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
   113 +  __attribute ((always_inline))
   114 +#endif
   115  elf_machine_lazy_rel (struct link_map *map,
   116  		      Elf32_Addr l_addr, const Elf32_Rel *reloc)
   117  {