From 7ec11b4c82137ae4a72335c0b6fb826f29186cde Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Tue, 24 Jun 2008 16:46:24 +0000 Subject: 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(+) diff --git a/patches/glibc/2.7/180-glibc-2.7-build_wcs_upper_buffer.patch b/patches/glibc/2.7/180-glibc-2.7-build_wcs_upper_buffer.patch deleted file mode 100644 index 72cde92..0000000 --- a/patches/glibc/2.7/180-glibc-2.7-build_wcs_upper_buffer.patch +++ /dev/null @@ -1,22 +0,0 @@ -Matthias Kaehlcke writes: - -A compilation of an ARM toolchain with glibc 2.7 using crosstool-ng -failed with a gcc error in glibc-2.7/posix/regex_internal.c, more -concretly in the function build_wcs_upper_buffer(). The return type of -the function prototype in regex_internal.h doesn't correspond with the -return type of this function in regex_internal.c. - -The attached patch corrects the return type of the function prototype -in regex_internal.h - ---- glibc-2.7/posix/regex_internal.h.org 2008-05-30 11:16:01.000000000 +0200 -+++ glibc-2.7/posix/regex_internal.h 2008-05-30 11:16:35.000000000 +0200 -@@ -391,7 +391,7 @@ - internal_function; - # ifdef RE_ENABLE_I18N - static void build_wcs_buffer (re_string_t *pstr) internal_function; --static int build_wcs_upper_buffer (re_string_t *pstr) internal_function; -+static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr) internal_function; - # endif /* RE_ENABLE_I18N */ - static void build_upper_buffer (re_string_t *pstr) internal_function; - static void re_string_translate_buffer (re_string_t *pstr) internal_function; diff --git a/patches/glibc/2.7/190-glibc-2.7-build_wcs_upper_buffer.patch b/patches/glibc/2.7/190-glibc-2.7-build_wcs_upper_buffer.patch new file mode 100644 index 0000000..72cde92 --- /dev/null +++ b/patches/glibc/2.7/190-glibc-2.7-build_wcs_upper_buffer.patch @@ -0,0 +1,22 @@ +Matthias Kaehlcke writes: + +A compilation of an ARM toolchain with glibc 2.7 using crosstool-ng +failed with a gcc error in glibc-2.7/posix/regex_internal.c, more +concretly in the function build_wcs_upper_buffer(). The return type of +the function prototype in regex_internal.h doesn't correspond with the +return type of this function in regex_internal.c. + +The attached patch corrects the return type of the function prototype +in regex_internal.h + +--- glibc-2.7/posix/regex_internal.h.org 2008-05-30 11:16:01.000000000 +0200 ++++ glibc-2.7/posix/regex_internal.h 2008-05-30 11:16:35.000000000 +0200 +@@ -391,7 +391,7 @@ + internal_function; + # ifdef RE_ENABLE_I18N + static void build_wcs_buffer (re_string_t *pstr) internal_function; +-static int build_wcs_upper_buffer (re_string_t *pstr) internal_function; ++static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr) internal_function; + # endif /* RE_ENABLE_I18N */ + static void build_upper_buffer (re_string_t *pstr) internal_function; + static void re_string_translate_buffer (re_string_t *pstr) internal_function; diff --git a/patches/glibc/2.7/190-use_short_for_fnstsw.patch b/patches/glibc/2.7/190-use_short_for_fnstsw.patch deleted file mode 100644 index 722f8d2..0000000 --- a/patches/glibc/2.7/190-use_short_for_fnstsw.patch +++ /dev/null @@ -1,18 +0,0 @@ -Original patch from H.J. Lu, as reported there: -http://www.nabble.com/PATCH:-Use-short-for-fnstsw-td14775171.html - -fnstsw stores 16bit into %ax. The upper 16bit of %eax is unchanged. -The new assembler (binutils-2.18.50.0.4 and up) will disallow "fnstsw %eax". - -diff -dur glibc-2.7.orig/sysdeps/i386/fpu/ftestexcept.c glibc-2.7/sysdeps/i386/fpu/ftestexcept.c ---- glibc-2.7.orig/sysdeps/i386/fpu/ftestexcept.c 2004-03-05 11:14:48.000000000 +0100 -+++ glibc-2.7/sysdeps/i386/fpu/ftestexcept.c 2008-06-24 10:54:43.000000000 +0200 -@@ -26,7 +26,7 @@ - int - fetestexcept (int excepts) - { -- int temp; -+ short temp; - int xtemp = 0; - - /* Get current exceptions. */ diff --git a/patches/glibc/2.7/200-use_short_for_fnstsw.patch b/patches/glibc/2.7/200-use_short_for_fnstsw.patch new file mode 100644 index 0000000..722f8d2 --- /dev/null +++ b/patches/glibc/2.7/200-use_short_for_fnstsw.patch @@ -0,0 +1,18 @@ +Original patch from H.J. Lu, as reported there: +http://www.nabble.com/PATCH:-Use-short-for-fnstsw-td14775171.html + +fnstsw stores 16bit into %ax. The upper 16bit of %eax is unchanged. +The new assembler (binutils-2.18.50.0.4 and up) will disallow "fnstsw %eax". + +diff -dur glibc-2.7.orig/sysdeps/i386/fpu/ftestexcept.c glibc-2.7/sysdeps/i386/fpu/ftestexcept.c +--- glibc-2.7.orig/sysdeps/i386/fpu/ftestexcept.c 2004-03-05 11:14:48.000000000 +0100 ++++ glibc-2.7/sysdeps/i386/fpu/ftestexcept.c 2008-06-24 10:54:43.000000000 +0200 +@@ -26,7 +26,7 @@ + int + fetestexcept (int excepts) + { +- int temp; ++ short temp; + int xtemp = 0; + + /* Get current exceptions. */ diff --git a/patches/glibc/2.7/210-gcc-4.3_sysinclude_path.patch b/patches/glibc/2.7/210-gcc-4.3_sysinclude_path.patch new file mode 100644 index 0000000..7af09a4 --- /dev/null +++ b/patches/glibc/2.7/210-gcc-4.3_sysinclude_path.patch @@ -0,0 +1,50 @@ +Patch pointed to by Ryan ARNOLD on the libc-help ML. +See: http://sourceware.org/ml/libc-help/2008-06/msg00063.html + +Forwarded to crosstool-NG by Ioannis E. VENETIS: +See: http://sourceware.org/ml/libc-help/2008-06/msg00063.html + +GCC 4.3 changed the location of some of the header files. I don't +understand why you'd be getting these errors while building GCC since +it provides them. + +With regard to GLIBC, Roland checked in some changes so that the GLIBC +build system could find the new locations of the GCC provided header +files. + +diff -durN glibc-2.7.orig/configure.in glibc-2.7/configure.in +--- glibc-2.7.orig/configure.in 2007-06-08 05:16:36.000000000 +0200 ++++ glibc-2.7/configure.in 2008-06-24 18:38:46.000000000 +0200 +@@ -911,8 +911,12 @@ + # header directory and add that to the list. NOTE: Only does the right + # thing on a system that doesn't need fixincludes. (Not presently a problem.) + if test -n "$sysheaders"; then +- ccheaders=`$CC -print-file-name=include` +- SYSINCLUDES="-nostdinc -isystem $ccheaders \ ++ SYSINCLUDES=-nostdinc ++ for d in include include-fixed; do ++ i=`$CC -print-file-name="$d"` && test "x$i" != x && test "x$i" != "x$d" && ++ SYSINCLUDES="$SYSINCLUDES -isystem $i" ++ done ++ SYSINCLUDES="$SYSINCLUDES \ + -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`" + if test -n "$CXX"; then + cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` && +diff -durN glibc-2.7.orig/configure glibc-2.7/configure +--- glibc-2.7.orig/configure 2008-06-24 18:35:34.000000000 +0200 ++++ glibc-2.7/configure 2008-06-24 18:38:46.000000000 +0200 +@@ -5062,8 +5062,12 @@ + # header directory and add that to the list. NOTE: Only does the right + # thing on a system that doesn't need fixincludes. (Not presently a problem.) + if test -n "$sysheaders"; then +- ccheaders=`$CC -print-file-name=include` +- SYSINCLUDES="-nostdinc -isystem $ccheaders \ ++ SYSINCLUDES=-nostdinc ++ for d in include include-fixed; do ++ i=`$CC -print-file-name="$d"` && test "x$i" != "x$d" && ++ SYSINCLUDES="$SYSINCLUDES -isystem $i" ++ done ++ SYSINCLUDES="$SYSINCLUDES \ + -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`" + if test -n "$CXX"; then + cxxversion=`$CXX -dumpversion 2>&5` && -- cgit v0.10.2-6-g49f6