patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-locale.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
In file included from strcoll.c:101:
yann@1
     4
../locale/weight.h: In function 'strcoll':
yann@1
     5
../locale/weight.h:23: error: invalid storage class for function 'findidx'
yann@1
     6
make[2]: *** [/home/dank/queue/jobdir.fast2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/build-glibc/string/strcoll.o] Error 1
yann@1
     7
make[2]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/glibc-2.2.5/string'
yann@1
     8
make[1]: *** [string/subdir_lib] Error 2
yann@1
     9
make[1]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/glibc-2.2.5'
yann@1
    10
make: *** [all] Error 2
yann@1
    11
yann@1
    12
Discussed here
yann@1
    13
http://sources.redhat.com/ml/libc-hacker/2004-09/msg00015.html
yann@1
    14
the fix checked in to cvs seems to be
yann@1
    15
http://sources.redhat.com/ml/glibc-cvs/2004-q3/msg01071.html
yann@1
    16
but that fix doesn't support older gcc's, so I can't use it directly.
yann@1
    17
yann@1
    18
Here's a fix the does work with older versions of gcc:
yann@1
    19
yann@1
    20
--- glibc-2.2.5/locale/weight.h.old	2001-07-05 21:55:33.000000000 -0700
yann@1
    21
+++ glibc-2.2.5/locale/weight.h	2005-03-10 16:07:46.669579888 -0800
yann@1
    22
@@ -18,7 +18,12 @@
yann@1
    23
    02111-1307 USA.  */
yann@1
    24
 
yann@1
    25
 /* Find index of weight.  */
yann@1
    26
+#if __GNUC__ >= 4
yann@1
    27
+auto inline int32_t
yann@1
    28
+__attribute ((always_inline))
yann@1
    29
+#else
yann@1
    30
 static inline int32_t
yann@1
    31
+#endif
yann@1
    32
 findidx (const unsigned char **cpp)
yann@1
    33
 {
yann@1
    34
   int_fast32_t i = table[*(*cpp)++];
yann@1
    35
--- glibc-2.2.5/locale/weightwc.h.old	2001-08-06 21:26:15.000000000 -0700
yann@1
    36
+++ glibc-2.2.5/locale/weightwc.h	2005-03-10 16:13:08.651631176 -0800
yann@1
    37
@@ -18,7 +18,12 @@
yann@1
    38
    02111-1307 USA.  */
yann@1
    39
 
yann@1
    40
 /* Find index of weight.  */
yann@1
    41
+#if __GNUC__ >= 4
yann@1
    42
+auto inline int32_t
yann@1
    43
+__attribute ((always_inline))
yann@1
    44
+#else
yann@1
    45
 static inline int32_t
yann@1
    46
+#endif
yann@1
    47
 findidx (const wint_t **cpp)
yann@1
    48
 {
yann@1
    49
   int32_t i;