patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-mipsel.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 Message-ID: <424A8F67.7060307@kaear.co.uk>
     2 Date: Wed, 30 Mar 2005 12:37:11 +0100
     3 From: Piete Sartain <kaear@kaear.co.uk>
     4 To:  crossgcc@sources.redhat.com
     5 Subject: [Patch]  CT 0.3 - glibc-2.2.5-allow-gcc-4.0-mipsel
     6 
     7 
     8 I copied the relevant sections out of 
     9 http://kegel.com/crosstool/crosstool-0.29/patches/glibc-2.3-20050307/glibc-2.3.4-allow-gcc-4.0-powerpc64.patch 
    10 for a mipsel target.
    11 
    12 The build still fails, but now with an assembler error at crtbegin.o.
    13 
    14 [---dank: judging from my old buildlogs, this should fix:
    15 
    16 In file included from dynamic-link.h:21,
    17                  from dl-reloc.c:153:
    18 ../sysdeps/mips/dl-machine.h: In function '_dl_relocate_object':
    19 ../sysdeps/mips/dl-machine.h:477: error: invalid storage class for function 'elf_machine_rel'
    20 ../sysdeps/mips/dl-machine.h:539: error: invalid storage class for function 'elf_machine_rel_relative'
    21 ../sysdeps/mips/dl-machine.h:546: error: invalid storage class for function 'elf_machine_lazy_rel'
    22 ../sysdeps/mips/dl-machine.h:554: error: invalid storage class for function 'elf_machine_got_rel'
    23 ../sysdeps/mips/dl-machine.h:641: error: invalid storage class for function 'elf_machine_runtime_setup'
    24 make[2]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-0.30/build/mipsel-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/glibc-2.2.5/elf'
    25 make[2]: *** [/home/dank/queue/jobdir.fast2/crosstool-0.30/build/mipsel-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/build-glibc/elf/dl-reloc.o] Error 1
    26 make[1]: *** [elf/subdir_lib] Error 2
    27 make[1]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-0.30/build/mipsel-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/glibc-2.2.5'
    28 make: *** [all] Error 2
    29 ---]
    30 
    31 
    32 --- glibc-2.2.5/sysdeps/mips/dl-machine.h.old	2005-03-28 18:19:56.000000000 +0100
    33 +++ glibc-2.2.5/sysdeps/mips/dl-machine.h	2005-03-28 18:25:15.000000000 +0100
    34 @@ -534,14 +534,28 @@
    35      }
    36  }
    37  
    38 -static inline void
    39 +#if __GNUC__ >= 4
    40 +  auto inline void
    41 +#else
    42 +  static inline void
    43 +#endif
    44 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
    45 +  __attribute ((always_inline))
    46 +#endif
    47  elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
    48  			  ElfW(Addr) *const reloc_addr)
    49  {
    50    /* XXX Nothing to do.  There is no relative relocation, right?  */
    51  }
    52  
    53 -static inline void
    54 +#if __GNUC__ >= 4
    55 +  auto inline void
    56 +#else
    57 +  static inline void
    58 +#endif
    59 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
    60 +  __attribute ((always_inline))
    61 +#endif
    62  elf_machine_lazy_rel (struct link_map *map,
    63  		      ElfW(Addr) l_addr, const ElfW(Rel) *reloc)
    64  {
    65 @@ -550,7 +564,14 @@
    66  
    67  #ifndef RTLD_BOOTSTRAP
    68  /* Relocate GOT. */
    69 -static inline void
    70 +#if __GNUC__ >= 4
    71 +  auto inline void
    72 +#else
    73 +  static inline void
    74 +#endif
    75 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
    76 +  __attribute ((always_inline))
    77 +#endif
    78  elf_machine_got_rel (struct link_map *map, int lazy)
    79  {
    80    ElfW(Addr) *got;
    81