patches/glibc/2.3.3/glibc-2.3.4-allow-gcc-4.0-powerpc32.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... :-(
yann@1
     1
Fixes
yann@1
     2
yann@1
     3
../sysdeps/powerpc/powerpc32/dl-machine.h: In function '_dl_relocate_object':
yann@1
     4
../sysdeps/powerpc/powerpc32/dl-machine.h:461: error: invalid storage class for function 'elf_machine_rela_relative'
yann@1
     5
../sysdeps/powerpc/powerpc32/dl-machine.h:469: error: invalid storage class for function 'elf_machine_lazy_rel'
yann@1
     6
make[2]: *** [/home/dank/queue/jobdir.dual2/crosstool-dev/build/powerpc-750-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/build-glibc/elf/dl-reloc.o] Error 1
yann@1
     7
yann@1
     8
diff -ur glibc-2.3-20050307.orig/sysdeps/powerpc/powerpc32/dl-machine.h glibc-2.3-20050307/sysdeps/powerpc/powerpc32/dl-machine.h
yann@1
     9
--- glibc-2.3-20050307.orig/sysdeps/powerpc/powerpc32/dl-machine.h	Wed Jul 30 23:33:52 2003
yann@1
    10
+++ glibc-2.3-20050307/sysdeps/powerpc/powerpc32/dl-machine.h	Thu Mar 17 13:19:16 2005
yann@1
    11
@@ -455,7 +455,14 @@
yann@1
    12
     }
yann@1
    13
 }
yann@1
    14
 
yann@1
    15
-static inline void
yann@1
    16
+#if __GNUC__ >= 4
yann@1
    17
+  auto inline void
yann@1
    18
+#else
yann@1
    19
+  static inline void
yann@1
    20
+#endif
yann@1
    21
+#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
yann@1
    22
+  __attribute ((always_inline))
yann@1
    23
+#endif
yann@1
    24
 elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
yann@1
    25
 			   void *const reloc_addr_arg)
yann@1
    26
 {
yann@1
    27
@@ -463,7 +470,14 @@
yann@1
    28
   *reloc_addr = l_addr + reloc->r_addend;
yann@1
    29
 }
yann@1
    30
 
yann@1
    31
-static inline void
yann@1
    32
+#if __GNUC__ >= 4
yann@1
    33
+  auto inline void
yann@1
    34
+#else
yann@1
    35
+  static inline void
yann@1
    36
+#endif
yann@1
    37
+#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
yann@1
    38
+  __attribute ((always_inline))
yann@1
    39
+#endif
yann@1
    40
 elf_machine_lazy_rel (struct link_map *map,
yann@1
    41
 		      Elf32_Addr l_addr, const Elf32_Rela *reloc)
yann@1
    42
 {