1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-locale.patch Sat Jul 14 13:09:17 2007 +0000
1.3 @@ -0,0 +1,49 @@
1.4 +Fixes
1.5 +
1.6 +In file included from strcoll.c:101:
1.7 +../locale/weight.h: In function 'strcoll':
1.8 +../locale/weight.h:23: error: invalid storage class for function 'findidx'
1.9 +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
1.10 +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'
1.11 +make[1]: *** [string/subdir_lib] Error 2
1.12 +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'
1.13 +make: *** [all] Error 2
1.14 +
1.15 +Discussed here
1.16 +http://sources.redhat.com/ml/libc-hacker/2004-09/msg00015.html
1.17 +the fix checked in to cvs seems to be
1.18 +http://sources.redhat.com/ml/glibc-cvs/2004-q3/msg01071.html
1.19 +but that fix doesn't support older gcc's, so I can't use it directly.
1.20 +
1.21 +Here's a fix the does work with older versions of gcc:
1.22 +
1.23 +--- glibc-2.2.5/locale/weight.h.old 2001-07-05 21:55:33.000000000 -0700
1.24 ++++ glibc-2.2.5/locale/weight.h 2005-03-10 16:07:46.669579888 -0800
1.25 +@@ -18,7 +18,12 @@
1.26 + 02111-1307 USA. */
1.27 +
1.28 + /* Find index of weight. */
1.29 ++#if __GNUC__ >= 4
1.30 ++auto inline int32_t
1.31 ++__attribute ((always_inline))
1.32 ++#else
1.33 + static inline int32_t
1.34 ++#endif
1.35 + findidx (const unsigned char **cpp)
1.36 + {
1.37 + int_fast32_t i = table[*(*cpp)++];
1.38 +--- glibc-2.2.5/locale/weightwc.h.old 2001-08-06 21:26:15.000000000 -0700
1.39 ++++ glibc-2.2.5/locale/weightwc.h 2005-03-10 16:13:08.651631176 -0800
1.40 +@@ -18,7 +18,12 @@
1.41 + 02111-1307 USA. */
1.42 +
1.43 + /* Find index of weight. */
1.44 ++#if __GNUC__ >= 4
1.45 ++auto inline int32_t
1.46 ++__attribute ((always_inline))
1.47 ++#else
1.48 + static inline int32_t
1.49 ++#endif
1.50 + findidx (const wint_t **cpp)
1.51 + {
1.52 + int32_t i;