patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-x86_64.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 
     3 In file included from dynamic-link.h:22,
     4                  from dl-reloc.c:265:
     5 ../sysdeps/x86_64/dl-machine.h: In function '_dl_relocate_object':
     6 ../sysdeps/x86_64/dl-machine.h:361: error: invalid storage class for function 'elf_machine_rela'
     7 ../sysdeps/x86_64/dl-machine.h:525: error: invalid storage class for function 'elf_machine_rela_relative'
     8 ../sysdeps/x86_64/dl-machine.h:534: error: invalid storage class for function 'elf_machine_lazy_rel'
     9 make[2]: *** [/home/dank/queue/jobdir.fast/crosstool-dev/build/x86_64-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3.3/build-glibc/elf/dl-reloc.o] Error 1
    10 
    11 --- glibc-2.3.3/sysdeps/x86_64/dl-machine.h.old	Wed Mar 16 16:19:15 2005
    12 +++ glibc-2.3.3/sysdeps/x86_64/dl-machine.h	Wed Mar 16 16:22:09 2005
    13 @@ -354,7 +354,14 @@
    14  /* Perform the relocation specified by RELOC and SYM (which is fully resolved).
    15     MAP is the object containing the reloc.  */
    16  
    17 -static inline void
    18 +#if __GNUC__ >= 4
    19 +  auto inline void
    20 +#else
    21 +  static inline void
    22 +#endif
    23 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
    24 +  __attribute ((always_inline))
    25 +#endif
    26  elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
    27  		  const Elf64_Sym *sym, const struct r_found_version *version,
    28  		  void *const reloc_addr_arg)
    29 @@ -519,7 +526,14 @@
    30      }
    31  }
    32  
    33 -static inline void
    34 +#if __GNUC__ >= 4
    35 +  auto inline void
    36 +#else
    37 +  static inline void
    38 +#endif
    39 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
    40 +  __attribute ((always_inline))
    41 +#endif
    42  elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
    43  			   void *const reloc_addr_arg)
    44  {
    45 @@ -528,7 +542,14 @@
    46    *reloc_addr = l_addr + reloc->r_addend;
    47  }
    48  
    49 -static inline void
    50 +#if __GNUC__ >= 4
    51 +  auto inline void
    52 +#else
    53 +  static inline void
    54 +#endif
    55 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
    56 +  __attribute ((always_inline))
    57 +#endif
    58  elf_machine_lazy_rel (struct link_map *map,
    59  		      Elf64_Addr l_addr, const Elf64_Rela *reloc)
    60  {