Add a new patch to make glibc build with latest (4.3.x) gcc.
See: http://sourceware.org/ml/libc-help/2008-06/msg00063.html
/trunk/patches/glibc/2.7/210-gcc-4.3_sysinclude_path.patch | 50 50 0 0 ++++++++++++++++++++
1 file changed, 50 insertions(+)
1.1 --- a/patches/glibc/2.7/180-glibc-2.7-build_wcs_upper_buffer.patch Tue Jun 24 16:24:09 2008 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,22 +0,0 @@
1.4 -Matthias Kaehlcke <matthias at kaehlcke dot net> writes:
1.5 -
1.6 -A compilation of an ARM toolchain with glibc 2.7 using crosstool-ng
1.7 -failed with a gcc error in glibc-2.7/posix/regex_internal.c, more
1.8 -concretly in the function build_wcs_upper_buffer(). The return type of
1.9 -the function prototype in regex_internal.h doesn't correspond with the
1.10 -return type of this function in regex_internal.c.
1.11 -
1.12 -The attached patch corrects the return type of the function prototype
1.13 -in regex_internal.h
1.14 -
1.15 ---- glibc-2.7/posix/regex_internal.h.org 2008-05-30 11:16:01.000000000 +0200
1.16 -+++ glibc-2.7/posix/regex_internal.h 2008-05-30 11:16:35.000000000 +0200
1.17 -@@ -391,7 +391,7 @@
1.18 - internal_function;
1.19 - # ifdef RE_ENABLE_I18N
1.20 - static void build_wcs_buffer (re_string_t *pstr) internal_function;
1.21 --static int build_wcs_upper_buffer (re_string_t *pstr) internal_function;
1.22 -+static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr) internal_function;
1.23 - # endif /* RE_ENABLE_I18N */
1.24 - static void build_upper_buffer (re_string_t *pstr) internal_function;
1.25 - static void re_string_translate_buffer (re_string_t *pstr) internal_function;
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/patches/glibc/2.7/190-glibc-2.7-build_wcs_upper_buffer.patch Tue Jun 24 16:46:24 2008 +0000
2.3 @@ -0,0 +1,22 @@
2.4 +Matthias Kaehlcke <matthias at kaehlcke dot net> writes:
2.5 +
2.6 +A compilation of an ARM toolchain with glibc 2.7 using crosstool-ng
2.7 +failed with a gcc error in glibc-2.7/posix/regex_internal.c, more
2.8 +concretly in the function build_wcs_upper_buffer(). The return type of
2.9 +the function prototype in regex_internal.h doesn't correspond with the
2.10 +return type of this function in regex_internal.c.
2.11 +
2.12 +The attached patch corrects the return type of the function prototype
2.13 +in regex_internal.h
2.14 +
2.15 +--- glibc-2.7/posix/regex_internal.h.org 2008-05-30 11:16:01.000000000 +0200
2.16 ++++ glibc-2.7/posix/regex_internal.h 2008-05-30 11:16:35.000000000 +0200
2.17 +@@ -391,7 +391,7 @@
2.18 + internal_function;
2.19 + # ifdef RE_ENABLE_I18N
2.20 + static void build_wcs_buffer (re_string_t *pstr) internal_function;
2.21 +-static int build_wcs_upper_buffer (re_string_t *pstr) internal_function;
2.22 ++static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr) internal_function;
2.23 + # endif /* RE_ENABLE_I18N */
2.24 + static void build_upper_buffer (re_string_t *pstr) internal_function;
2.25 + static void re_string_translate_buffer (re_string_t *pstr) internal_function;
3.1 --- a/patches/glibc/2.7/190-use_short_for_fnstsw.patch Tue Jun 24 16:24:09 2008 +0000
3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
3.3 @@ -1,18 +0,0 @@
3.4 -Original patch from H.J. Lu, as reported there:
3.5 -http://www.nabble.com/PATCH:-Use-short-for-fnstsw-td14775171.html
3.6 -
3.7 -fnstsw stores 16bit into %ax. The upper 16bit of %eax is unchanged.
3.8 -The new assembler (binutils-2.18.50.0.4 and up) will disallow "fnstsw %eax".
3.9 -
3.10 -diff -dur glibc-2.7.orig/sysdeps/i386/fpu/ftestexcept.c glibc-2.7/sysdeps/i386/fpu/ftestexcept.c
3.11 ---- glibc-2.7.orig/sysdeps/i386/fpu/ftestexcept.c 2004-03-05 11:14:48.000000000 +0100
3.12 -+++ glibc-2.7/sysdeps/i386/fpu/ftestexcept.c 2008-06-24 10:54:43.000000000 +0200
3.13 -@@ -26,7 +26,7 @@
3.14 - int
3.15 - fetestexcept (int excepts)
3.16 - {
3.17 -- int temp;
3.18 -+ short temp;
3.19 - int xtemp = 0;
3.20 -
3.21 - /* Get current exceptions. */
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/patches/glibc/2.7/200-use_short_for_fnstsw.patch Tue Jun 24 16:46:24 2008 +0000
4.3 @@ -0,0 +1,18 @@
4.4 +Original patch from H.J. Lu, as reported there:
4.5 +http://www.nabble.com/PATCH:-Use-short-for-fnstsw-td14775171.html
4.6 +
4.7 +fnstsw stores 16bit into %ax. The upper 16bit of %eax is unchanged.
4.8 +The new assembler (binutils-2.18.50.0.4 and up) will disallow "fnstsw %eax".
4.9 +
4.10 +diff -dur glibc-2.7.orig/sysdeps/i386/fpu/ftestexcept.c glibc-2.7/sysdeps/i386/fpu/ftestexcept.c
4.11 +--- glibc-2.7.orig/sysdeps/i386/fpu/ftestexcept.c 2004-03-05 11:14:48.000000000 +0100
4.12 ++++ glibc-2.7/sysdeps/i386/fpu/ftestexcept.c 2008-06-24 10:54:43.000000000 +0200
4.13 +@@ -26,7 +26,7 @@
4.14 + int
4.15 + fetestexcept (int excepts)
4.16 + {
4.17 +- int temp;
4.18 ++ short temp;
4.19 + int xtemp = 0;
4.20 +
4.21 + /* Get current exceptions. */
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/patches/glibc/2.7/210-gcc-4.3_sysinclude_path.patch Tue Jun 24 16:46:24 2008 +0000
5.3 @@ -0,0 +1,50 @@
5.4 +Patch pointed to by Ryan ARNOLD on the libc-help ML.
5.5 +See: http://sourceware.org/ml/libc-help/2008-06/msg00063.html
5.6 +
5.7 +Forwarded to crosstool-NG by Ioannis E. VENETIS:
5.8 +See: http://sourceware.org/ml/libc-help/2008-06/msg00063.html
5.9 +
5.10 +GCC 4.3 changed the location of some of the header files. I don't
5.11 +understand why you'd be getting these errors while building GCC since
5.12 +it provides them.
5.13 +
5.14 +With regard to GLIBC, Roland checked in some changes so that the GLIBC
5.15 +build system could find the new locations of the GCC provided header
5.16 +files.
5.17 +
5.18 +diff -durN glibc-2.7.orig/configure.in glibc-2.7/configure.in
5.19 +--- glibc-2.7.orig/configure.in 2007-06-08 05:16:36.000000000 +0200
5.20 ++++ glibc-2.7/configure.in 2008-06-24 18:38:46.000000000 +0200
5.21 +@@ -911,8 +911,12 @@
5.22 + # header directory and add that to the list. NOTE: Only does the right
5.23 + # thing on a system that doesn't need fixincludes. (Not presently a problem.)
5.24 + if test -n "$sysheaders"; then
5.25 +- ccheaders=`$CC -print-file-name=include`
5.26 +- SYSINCLUDES="-nostdinc -isystem $ccheaders \
5.27 ++ SYSINCLUDES=-nostdinc
5.28 ++ for d in include include-fixed; do
5.29 ++ i=`$CC -print-file-name="$d"` && test "x$i" != x && test "x$i" != "x$d" &&
5.30 ++ SYSINCLUDES="$SYSINCLUDES -isystem $i"
5.31 ++ done
5.32 ++ SYSINCLUDES="$SYSINCLUDES \
5.33 + -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
5.34 + if test -n "$CXX"; then
5.35 + cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` &&
5.36 +diff -durN glibc-2.7.orig/configure glibc-2.7/configure
5.37 +--- glibc-2.7.orig/configure 2008-06-24 18:35:34.000000000 +0200
5.38 ++++ glibc-2.7/configure 2008-06-24 18:38:46.000000000 +0200
5.39 +@@ -5062,8 +5062,12 @@
5.40 + # header directory and add that to the list. NOTE: Only does the right
5.41 + # thing on a system that doesn't need fixincludes. (Not presently a problem.)
5.42 + if test -n "$sysheaders"; then
5.43 +- ccheaders=`$CC -print-file-name=include`
5.44 +- SYSINCLUDES="-nostdinc -isystem $ccheaders \
5.45 ++ SYSINCLUDES=-nostdinc
5.46 ++ for d in include include-fixed; do
5.47 ++ i=`$CC -print-file-name="$d"` && test "x$i" != "x$d" &&
5.48 ++ SYSINCLUDES="$SYSINCLUDES -isystem $i"
5.49 ++ done
5.50 ++ SYSINCLUDES="$SYSINCLUDES \
5.51 + -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
5.52 + if test -n "$CXX"; then
5.53 + cxxversion=`$CXX -dumpversion 2>&5` &&