gcc: remove deprecated gcc 4.2.[1-3] versions and unused patches
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
parent
2ab8ec9e26
commit
fb67a2dc3a
3
CHANGES
3
CHANGES
@ -3,7 +3,8 @@
|
||||
Fixes all over the tree.
|
||||
|
||||
Mark the combination of uClibc 0.9.31, gcc 4.2.x, C++ and
|
||||
locale support as broken.
|
||||
locale support as broken. Remove deprecated GCC 4.2.[1-3]
|
||||
versions.
|
||||
|
||||
Mark CRIS architecture as deprecated, as it is discontinued
|
||||
upstream.
|
||||
|
@ -1,200 +0,0 @@
|
||||
--- gcc/libgomp/configure
|
||||
+++ gcc/libgomp/configure
|
||||
@@ -3771,7 +3771,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/gcc/config/cris/linux.h
|
||||
+++ gcc/gcc/config/cris/linux.h
|
||||
@@ -74,7 +74,11 @@
|
||||
#define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
|
||||
|
||||
#undef CRIS_SUBTARGET_VERSION
|
||||
-#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
|
||||
+#if UCLIBC_DEFAULT
|
||||
+# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
|
||||
+#else
|
||||
+# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
|
||||
+#endif
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
|
||||
--- gcc/libstdc++-v3/configure
|
||||
+++ gcc/libstdc++-v3/configure
|
||||
@@ -4276,7 +4276,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/zlib/configure
|
||||
+++ gcc/zlib/configure
|
||||
@@ -3422,7 +3422,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libobjc/configure
|
||||
+++ gcc/libobjc/configure
|
||||
@@ -3309,7 +3309,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libgfortran/configure
|
||||
+++ gcc/libgfortran/configure
|
||||
@@ -3695,7 +3695,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libmudflap/configure
|
||||
+++ gcc/libmudflap/configure
|
||||
@@ -5378,7 +5378,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/boehm-gc/configure
|
||||
+++ gcc/boehm-gc/configure
|
||||
@@ -4316,7 +4316,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libffi/configure
|
||||
+++ gcc/libffi/configure
|
||||
@@ -3453,7 +3453,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libssp/configure
|
||||
+++ gcc/libssp/configure
|
||||
@@ -4409,7 +4409,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/contrib/regression/objs-gcc.sh
|
||||
+++ gcc/contrib/regression/objs-gcc.sh
|
||||
@@ -105,6 +105,10 @@
|
||||
then
|
||||
make all-gdb all-dejagnu all-ld || exit 1
|
||||
make install-gdb install-dejagnu install-ld || exit 1
|
||||
+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
|
||||
+ then
|
||||
+ make all-gdb all-dejagnu all-ld || exit 1
|
||||
+ make install-gdb install-dejagnu install-ld || exit 1
|
||||
elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
|
||||
make bootstrap || exit 1
|
||||
make install || exit 1
|
||||
--- gcc/libjava/classpath/ltconfig
|
||||
+++ gcc/libjava/classpath/ltconfig
|
||||
@@ -603,7 +603,7 @@
|
||||
|
||||
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
|
||||
case $host_os in
|
||||
-linux-gnu*) ;;
|
||||
+linux-gnu*|linux-uclibc*) ;;
|
||||
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
|
||||
esac
|
||||
|
||||
@@ -1251,7 +1251,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
version_type=linux
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
--- gcc/libjava/classpath/configure
|
||||
+++ gcc/libjava/classpath/configure
|
||||
@@ -4665,7 +4665,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libjava/configure
|
||||
+++ gcc/libjava/configure
|
||||
@@ -5212,7 +5212,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libtool.m4
|
||||
+++ gcc/libtool.m4
|
||||
@@ -739,7 +739,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/ltconfig
|
||||
+++ gcc/ltconfig
|
||||
@@ -603,7 +603,7 @@
|
||||
|
||||
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
|
||||
case $host_os in
|
||||
-linux-gnu*) ;;
|
||||
+linux-gnu*|linux-uclibc*) ;;
|
||||
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
|
||||
esac
|
||||
|
||||
@@ -1251,7 +1251,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
version_type=linux
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
@ -1,11 +0,0 @@
|
||||
--- gcc/gcc/config.gcc.uclibc100-sh~ 2006-03-06 20:46:56 +0100
|
||||
+++ gcc/gcc/config.gcc 2006-03-10 15:02:41 +0100
|
||||
@@ -1905,7 +1905,7 @@
|
||||
;;
|
||||
sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
|
||||
sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
|
||||
- sh-*-linux* | sh[346lbe]*-*-linux* | \
|
||||
+ sh*-*-linux* | sh[346lbe]*-*-linux* | \
|
||||
sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
|
||||
sh64-*-netbsd* | sh64l*-*-netbsd*)
|
||||
tmake_file="${tmake_file} sh/t-sh sh/t-elf"
|
File diff suppressed because it is too large
Load Diff
@ -1,213 +0,0 @@
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2006-03-10 15:32:37 +0100
|
||||
@@ -60,4 +60,49 @@
|
||||
extern "C" __typeof(wctype_l) __wctype_l;
|
||||
#endif
|
||||
|
||||
+# define __nl_langinfo_l nl_langinfo_l
|
||||
+# define __strcoll_l strcoll_l
|
||||
+# define __strftime_l strftime_l
|
||||
+# define __strtod_l strtod_l
|
||||
+# define __strtof_l strtof_l
|
||||
+# define __strtold_l strtold_l
|
||||
+# define __strxfrm_l strxfrm_l
|
||||
+# define __newlocale newlocale
|
||||
+# define __freelocale freelocale
|
||||
+# define __duplocale duplocale
|
||||
+# define __uselocale uselocale
|
||||
+
|
||||
+# ifdef _GLIBCXX_USE_WCHAR_T
|
||||
+# define __iswctype_l iswctype_l
|
||||
+# define __towlower_l towlower_l
|
||||
+# define __towupper_l towupper_l
|
||||
+# define __wcscoll_l wcscoll_l
|
||||
+# define __wcsftime_l wcsftime_l
|
||||
+# define __wcsxfrm_l wcsxfrm_l
|
||||
+# define __wctype_l wctype_l
|
||||
+# endif
|
||||
+
|
||||
+#else
|
||||
+# define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
+# define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
|
||||
+# define __strtod_l(S, E, L) strtod((S), (E))
|
||||
+# define __strtof_l(S, E, L) strtof((S), (E))
|
||||
+# define __strtold_l(S, E, L) strtold((S), (E))
|
||||
+# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
|
||||
+# warning should dummy __newlocale check for C|POSIX ?
|
||||
+# define __newlocale(a, b, c) NULL
|
||||
+# define __freelocale(a) ((void)0)
|
||||
+# define __duplocale(a) __c_locale()
|
||||
+//# define __uselocale ?
|
||||
+//
|
||||
+# ifdef _GLIBCXX_USE_WCHAR_T
|
||||
+# define __iswctype_l(C, M, L) iswctype((C), (M))
|
||||
+# define __towlower_l(C, L) towlower((C))
|
||||
+# define __towupper_l(C, L) towupper((C))
|
||||
+# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
|
||||
+//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T))
|
||||
+# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
|
||||
+# define __wctype_l(S, L) wctype((S))
|
||||
+# endif
|
||||
+
|
||||
#endif // GLIBC 2.3 and later
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -39,20 +39,6 @@
|
||||
#include <langinfo.h>
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
|
||||
-#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
|
||||
-#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
|
||||
-#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
|
||||
-#define __strtof_l(S, E, L) strtof((S), (E))
|
||||
-#define __strtod_l(S, E, L) strtod((S), (E))
|
||||
-#define __strtold_l(S, E, L) strtold((S), (E))
|
||||
-#warning should dummy __newlocale check for C|POSIX ?
|
||||
-#define __newlocale(a, b, c) NULL
|
||||
-#define __freelocale(a) ((void)0)
|
||||
-#define __duplocale(a) __c_locale()
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
template<>
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -36,13 +36,6 @@
|
||||
#include <locale>
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
|
||||
-#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
|
||||
-#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
|
||||
-#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// These are basically extensions to char_traits, and perhaps should
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -43,10 +43,6 @@
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// Construct and return valid pattern consisting of some combination of:
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -41,9 +41,6 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
|
||||
namespace std
|
||||
{
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/time_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/time_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -40,9 +40,6 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
|
||||
namespace std
|
||||
{
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -38,13 +38,6 @@
|
||||
#undef _LIBC
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __wctype_l(S, L) wctype((S))
|
||||
-#define __towupper_l(C, L) towupper((C))
|
||||
-#define __towlower_l(C, L) towlower((C))
|
||||
-#define __iswctype_l(C, M, L) iswctype((C), (M))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// NB: The other ctype<char> specializations are in src/locale.cc and
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -39,13 +39,10 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix gettext stuff
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-extern "C" char *__dcgettext(const char *domainname,
|
||||
- const char *msgid, int category);
|
||||
#undef gettext
|
||||
-#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
|
||||
+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
+#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
|
||||
#else
|
||||
-#undef gettext
|
||||
#define gettext(msgid) (msgid)
|
||||
#endif
|
||||
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-10 15:32:37 +0100
|
||||
@@ -36,15 +36,11 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix prototypes for *textdomain funcs
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-extern "C" char *__textdomain(const char *domainname);
|
||||
-extern "C" char *__bindtextdomain(const char *domainname,
|
||||
- const char *dirname);
|
||||
-#else
|
||||
-#undef __textdomain
|
||||
-#undef __bindtextdomain
|
||||
-#define __textdomain(D) ((void)0)
|
||||
-#define __bindtextdomain(D,P) ((void)0)
|
||||
+#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
+#undef textdomain
|
||||
+#undef bindtextdomain
|
||||
+#define textdomain(D) ((void)0)
|
||||
+#define bindtextdomain(D,P) ((void)0)
|
||||
#endif
|
||||
|
||||
// Non-virtual member functions.
|
||||
@@ -70,7 +66,7 @@
|
||||
messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
|
||||
const char* __dir) const
|
||||
{
|
||||
- __bindtextdomain(__s.c_str(), __dir);
|
||||
+ bindtextdomain(__s.c_str(), __dir);
|
||||
return this->do_open(__s, __loc);
|
||||
}
|
||||
|
||||
@@ -90,7 +86,7 @@
|
||||
{
|
||||
// No error checking is done, assume the catalog exists and can
|
||||
// be used.
|
||||
- __textdomain(__s.c_str());
|
||||
+ textdomain(__s.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-03-10 15:32:37 +0100
|
||||
@@ -68,6 +68,7 @@
|
||||
{
|
||||
extern "C" __typeof(uselocale) __uselocale;
|
||||
}
|
||||
+#define __uselocale uselocale
|
||||
#endif
|
||||
|
||||
namespace std
|
@ -1,48 +0,0 @@
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:37:27 +0100
|
||||
@@ -401,7 +401,7 @@
|
||||
# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
_M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
-# else
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
_M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
# endif
|
||||
@@ -556,7 +556,7 @@
|
||||
# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
_M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
-# else
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
_M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
# endif
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:37:27 +0100
|
||||
@@ -127,12 +127,25 @@
|
||||
{
|
||||
// Named locale.
|
||||
// NB: In the GNU model wchar_t is always 32 bit wide.
|
||||
+#ifdef __UCLIBC_MJN3_ONLY__
|
||||
+#warning fix this... should be numeric
|
||||
+#endif
|
||||
+#ifdef __UCLIBC__
|
||||
+# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
+# endif
|
||||
+#else
|
||||
union { char *__s; wchar_t __w; } __u;
|
||||
__u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
|
||||
_M_data->_M_decimal_point = __u.__w;
|
||||
|
||||
__u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
|
||||
_M_data->_M_thousands_sep = __u.__w;
|
||||
+#endif
|
||||
|
||||
if (_M_data->_M_thousands_sep == L'\0')
|
||||
_M_data->_M_grouping = "";
|
@ -1,347 +0,0 @@
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-10 15:39:14 +0100
|
||||
@@ -46,16 +47,13 @@
|
||||
__convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- float __f = __strtof_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __f;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ float __f = __strtof_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __f;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -63,16 +61,13 @@
|
||||
__convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- double __d = __strtod_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __d;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ double __d = __strtod_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __d;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -80,16 +75,13 @@
|
||||
__convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- long double __ld = __strtold_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __ld;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __ld;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -110,7 +102,7 @@
|
||||
void
|
||||
locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
|
||||
{
|
||||
- if (_S_get_c_locale() != __cloc)
|
||||
+ if (__cloc && _S_get_c_locale() != __cloc)
|
||||
__freelocale(__cloc);
|
||||
}
|
||||
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-10 15:39:14 +0100
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
namespace std
|
||||
@@ -138,20 +143,34 @@
|
||||
ctype<wchar_t>::
|
||||
do_is(mask __m, wchar_t __c) const
|
||||
{
|
||||
- // Highest bitmask in ctype_base == 10, but extra in "C"
|
||||
- // library for blank.
|
||||
+ // The case of __m == ctype_base::space is particularly important,
|
||||
+ // due to its use in many istream functions. Therefore we deal with
|
||||
+ // it first, exploiting the knowledge that on GNU systems _M_bit[5]
|
||||
+ // is the mask corresponding to ctype_base::space. NB: an encoding
|
||||
+ // change would not affect correctness!
|
||||
bool __ret = false;
|
||||
- const size_t __bitmasksize = 11;
|
||||
- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
|
||||
- if (__m & _M_bit[__bitcur]
|
||||
- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
|
||||
- {
|
||||
- __ret = true;
|
||||
- break;
|
||||
- }
|
||||
+ if (__m == _M_bit[5])
|
||||
+ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
|
||||
+ else
|
||||
+ {
|
||||
+ // Highest bitmask in ctype_base == 10, but extra in "C"
|
||||
+ // library for blank.
|
||||
+ const size_t __bitmasksize = 11;
|
||||
+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
|
||||
+ if (__m & _M_bit[__bitcur])
|
||||
+ {
|
||||
+ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
|
||||
+ {
|
||||
+ __ret = true;
|
||||
+ break;
|
||||
+ }
|
||||
+ else if (__m == _M_bit[__bitcur])
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
return __ret;
|
||||
}
|
||||
-
|
||||
+
|
||||
const wchar_t*
|
||||
ctype<wchar_t>::
|
||||
do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h.uclibc200_update~ 2006-03-10 15:32:37 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-10 15:39:14 +0100
|
||||
@@ -47,18 +47,21 @@
|
||||
template<typename _CharT>
|
||||
messages<_CharT>::messages(size_t __refs)
|
||||
: facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
|
||||
- _M_name_messages(_S_get_c_name())
|
||||
+ _M_name_messages(_S_get_c_name())
|
||||
{ }
|
||||
|
||||
template<typename _CharT>
|
||||
messages<_CharT>::messages(__c_locale __cloc, const char* __s,
|
||||
size_t __refs)
|
||||
- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
|
||||
- _M_name_messages(__s)
|
||||
+ : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL)
|
||||
{
|
||||
- char* __tmp = new char[std::strlen(__s) + 1];
|
||||
- std::strcpy(__tmp, __s);
|
||||
+ const size_t __len = std::strlen(__s) + 1;
|
||||
+ char* __tmp = new char[__len];
|
||||
+ std::memcpy(__tmp, __s, __len);
|
||||
_M_name_messages = __tmp;
|
||||
+
|
||||
+ // Last to avoid leaking memory if new throws.
|
||||
+ _M_c_locale_messages = _S_clone_c_locale(__cloc);
|
||||
}
|
||||
|
||||
template<typename _CharT>
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_update~ 2006-03-10 15:37:27 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:39:14 +0100
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
@@ -206,7 +211,7 @@
|
||||
}
|
||||
break;
|
||||
default:
|
||||
- ;
|
||||
+ __ret = pattern();
|
||||
}
|
||||
return __ret;
|
||||
}
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_update~ 2006-03-10 15:37:27 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:39:14 +0100
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/time_members.h.uclibc200_update~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/time_members.h 2006-03-10 15:39:14 +0100
|
||||
@@ -37,25 +37,33 @@
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(size_t __refs)
|
||||
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(_S_get_c_name())
|
||||
+ _M_name_timepunct(_S_get_c_name())
|
||||
{ _M_initialize_timepunct(); }
|
||||
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
|
||||
: facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(_S_get_c_name())
|
||||
+ _M_name_timepunct(_S_get_c_name())
|
||||
{ _M_initialize_timepunct(); }
|
||||
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
|
||||
size_t __refs)
|
||||
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(__s)
|
||||
+ _M_name_timepunct(NULL)
|
||||
{
|
||||
- char* __tmp = new char[std::strlen(__s) + 1];
|
||||
- std::strcpy(__tmp, __s);
|
||||
+ const size_t __len = std::strlen(__s) + 1;
|
||||
+ char* __tmp = new char[__len];
|
||||
+ std::memcpy(__tmp, __s, __len);
|
||||
_M_name_timepunct = __tmp;
|
||||
- _M_initialize_timepunct(__cloc);
|
||||
+
|
||||
+ try
|
||||
+ { _M_initialize_timepunct(__cloc); }
|
||||
+ catch(...)
|
||||
+ {
|
||||
+ delete [] _M_name_timepunct;
|
||||
+ __throw_exception_again;
|
||||
+ }
|
||||
}
|
||||
|
||||
template<typename _CharT>
|
||||
--- gcc-4.2/libstdc++-v3/config/locale/uclibc/c_locale.h.old 2006-09-28 11:39:00.000000000 +0200
|
||||
+++ gcc-4.2/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-09-28 12:10:41.000000000 +0200
|
||||
@@ -39,21 +39,23 @@
|
||||
#pragma GCC system_header
|
||||
|
||||
#include <cstring> // get std::strlen
|
||||
-#include <cstdio> // get std::snprintf or std::sprintf
|
||||
+#include <cstdio> // get std::vsnprintf or std::vsprintf
|
||||
#include <clocale>
|
||||
#include <langinfo.h> // For codecvt
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix this
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_LOCALE__
|
||||
+#ifdef _GLIBCXX_USE_ICONV
|
||||
#include <iconv.h> // For codecvt using iconv, iconv_t
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-#include <libintl.h> // For messages
|
||||
+#ifdef HAVE_LIBINTL_H
|
||||
+#include <libintl.h> // For messages
|
||||
#endif
|
||||
+#include <cstdarg>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning what is _GLIBCXX_C_LOCALE_GNU for
|
||||
+// psm: used in os/gnu-linux/ctype_noninline.h
|
||||
#endif
|
||||
#define _GLIBCXX_C_LOCALE_GNU 1
|
||||
|
||||
@@ -62,7 +64,7 @@
|
||||
#endif
|
||||
// #define _GLIBCXX_NUM_CATEGORIES 6
|
||||
#define _GLIBCXX_NUM_CATEGORIES 0
|
||||
-
|
||||
+
|
||||
#ifdef __UCLIBC_HAS_XLOCALE__
|
||||
namespace __gnu_cxx
|
||||
{
|
||||
@@ -79,22 +81,24 @@
|
||||
typedef int* __c_locale;
|
||||
#endif
|
||||
|
||||
- // Convert numeric value of type _Tv to string and return length of
|
||||
- // string. If snprintf is available use it, otherwise fall back to
|
||||
- // the unsafe sprintf which, in general, can be dangerous and should
|
||||
+ // Convert numeric value of type double to string and return length of
|
||||
+ // string. If vsnprintf is available use it, otherwise fall back to
|
||||
+ // the unsafe vsprintf which, in general, can be dangerous and should
|
||||
// be avoided.
|
||||
- template<typename _Tv>
|
||||
- int
|
||||
- __convert_from_v(char* __out,
|
||||
- const int __size __attribute__ ((__unused__)),
|
||||
- const char* __fmt,
|
||||
-#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
- _Tv __v, const __c_locale& __cloc, int __prec)
|
||||
+ inline int
|
||||
+ __convert_from_v(const __c_locale&
|
||||
+#ifndef __UCLIBC_HAS_XCLOCALE__
|
||||
+ __cloc __attribute__ ((__unused__))
|
||||
+#endif
|
||||
+ ,
|
||||
+ char* __out,
|
||||
+ const int __size,
|
||||
+ const char* __fmt, ...)
|
||||
{
|
||||
+ va_list __args;
|
||||
+#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
__c_locale __old = __gnu_cxx::__uselocale(__cloc);
|
||||
#else
|
||||
- _Tv __v, const __c_locale&, int __prec)
|
||||
- {
|
||||
# ifdef __UCLIBC_HAS_LOCALE__
|
||||
char* __old = std::setlocale(LC_ALL, NULL);
|
||||
char* __sav = new char[std::strlen(__old) + 1];
|
||||
@@ -103,7 +107,9 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
|
||||
+ va_start(__args, __fmt);
|
||||
+ const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
|
||||
+ va_end(__args);
|
||||
|
||||
#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
__gnu_cxx::__uselocale(__old);
|
@ -1,50 +0,0 @@
|
||||
# DP: Build and install libstdc++_pic.a library.
|
||||
|
||||
--- gcc/libstdc++-v3/src/Makefile.am
|
||||
+++ gcc/libstdc++-v3/src/Makefile.am
|
||||
@@ -214,6 +214,12 @@
|
||||
$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
|
||||
+install-exec-local:
|
||||
+ifeq ($(enable_shared),yes)
|
||||
+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
|
||||
+endif
|
||||
+
|
||||
# Added bits to build debug library.
|
||||
if GLIBCXX_BUILD_DEBUG
|
||||
all-local: build_debug
|
||||
--- gcc/libstdc++-v3/src/Makefile.in
|
||||
+++ gcc/libstdc++-v3/src/Makefile.in
|
||||
@@ -627,7 +627,7 @@
|
||||
|
||||
install-data-am: install-data-local
|
||||
|
||||
-install-exec-am: install-toolexeclibLTLIBRARIES
|
||||
+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
@@ -660,6 +660,7 @@
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-data-local install-exec \
|
||||
+ install-exec-local \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip install-toolexeclibLTLIBRARIES installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
@@ -743,6 +743,13 @@
|
||||
install_debug:
|
||||
(cd ${debugdir} && $(MAKE) \
|
||||
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
|
||||
+
|
||||
+install-exec-local:
|
||||
+ifeq ($(enable_shared),yes)
|
||||
+ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
|
||||
+endif
|
||||
+
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
@ -1,11 +0,0 @@
|
||||
--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
|
||||
+++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
|
||||
@@ -500,7 +500,7 @@
|
||||
#ifdef __linux__
|
||||
# include <features.h>
|
||||
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
|
||||
- && !defined(__ia64__)
|
||||
+ && !defined(__ia64__) && !defined(__UCLIBC__)
|
||||
# ifndef GC_HAVE_BUILTIN_BACKTRACE
|
||||
# define GC_HAVE_BUILTIN_BACKTRACE
|
||||
# endif
|
@ -1,11 +0,0 @@
|
||||
--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500
|
||||
+++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500
|
||||
@@ -142,7 +142,7 @@
|
||||
using ::vsprintf;
|
||||
}
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
|
||||
|
||||
#undef snprintf
|
||||
#undef vfscanf
|
@ -1,12 +0,0 @@
|
||||
--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
|
||||
+++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
|
||||
@@ -7194,6 +7194,9 @@
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <complex.h>
|
||||
+#ifdef __UCLIBC__
|
||||
+#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
|
||||
+#endif
|
||||
int
|
||||
main ()
|
||||
{
|
@ -1,24 +0,0 @@
|
||||
--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100
|
||||
+++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100
|
||||
@@ -59,6 +59,9 @@
|
||||
#include <bits/allocator.h>
|
||||
#include <ext/hash_fun.h>
|
||||
|
||||
+/* cope w/ index defined as macro, SuSv3 proposal */
|
||||
+#undef index
|
||||
+
|
||||
# ifdef __GC
|
||||
# define __GC_CONST const
|
||||
# else
|
||||
--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100
|
||||
+++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100
|
||||
@@ -53,6 +53,9 @@
|
||||
#include <ext/memory> // For uninitialized_copy_n
|
||||
#include <ext/numeric> // For power
|
||||
|
||||
+/* cope w/ index defined as macro, SuSv3 proposal */
|
||||
+#undef index
|
||||
+
|
||||
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
using std::size_t;
|
@ -1,49 +0,0 @@
|
||||
Index: gcc-4.2/libmudflap/mf-hooks2.c
|
||||
===================================================================
|
||||
--- gcc-4.2/libmudflap/mf-hooks2.c (revision 119834)
|
||||
+++ gcc-4.2/libmudflap/mf-hooks2.c (working copy)
|
||||
@@ -427,7 +427,7 @@
|
||||
{
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
|
||||
- bzero (s, n);
|
||||
+ memset (s, 0, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -437,7 +437,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
|
||||
MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
|
||||
- bcopy (src, dest, n);
|
||||
+ memmove (dest, src, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -447,7 +447,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
|
||||
MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
|
||||
- return bcmp (s1, s2, n);
|
||||
+ return n == 0 ? 0 : memcmp (s1, s2, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
|
||||
- return index (s, c);
|
||||
+ return strchr (s, c);
|
||||
}
|
||||
|
||||
|
||||
@@ -465,7 +465,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
|
||||
- return rindex (s, c);
|
||||
+ return strrchr (s, c);
|
||||
}
|
||||
|
||||
/* XXX: stpcpy, memccpy */
|
@ -1,36 +0,0 @@
|
||||
diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h
|
||||
--- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 13:06:56.000000000 +0100
|
||||
+++ gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 15:23:41.000000000 +0100
|
||||
@@ -32,7 +32,8 @@
|
||||
//
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
-
|
||||
+namespace std
|
||||
+{
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix prototypes for *textdomain funcs
|
||||
#endif
|
||||
@@ -115,3 +116,4 @@
|
||||
this->_S_create_c_locale(this->_M_c_locale_messages, __s);
|
||||
}
|
||||
}
|
||||
+}
|
||||
diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h
|
||||
--- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 13:06:56.000000000 +0100
|
||||
+++ gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 15:20:31.000000000 +0100
|
||||
@@ -33,7 +33,8 @@
|
||||
//
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
-
|
||||
+namespace std
|
||||
+{
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(size_t __refs)
|
||||
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
|
||||
@@ -74,3 +75,4 @@
|
||||
delete _M_data;
|
||||
_S_destroy_c_locale(_M_c_locale_timepunct);
|
||||
}
|
||||
+}
|
@ -1,13 +0,0 @@
|
||||
Index: gcc-4.2/gcc/Makefile.in
|
||||
===================================================================
|
||||
--- gcc-4.2/gcc/Makefile.in (revision 121758)
|
||||
+++ gcc-4.2/gcc/Makefile.in (working copy)
|
||||
@@ -2658,7 +2658,7 @@ mips-tdump.o : mips-tdump.c $(CONFIG_H)
|
||||
# FIXME: writing proper dependencies for this is a *LOT* of work.
|
||||
libbackend.o : $(OBJS-common:.o=.c) $(out_file) \
|
||||
insn-config.h insn-flags.h insn-codes.h insn-constants.h \
|
||||
- insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE)
|
||||
+ insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE) gcov-iov.h
|
||||
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
|
||||
-DTARGET_NAME=\"$(target_noncanonical)\" \
|
||||
-DLOCALEDIR=\"$(localedir)\" \
|
@ -1,67 +0,0 @@
|
||||
By Lennert Buytenhek <buytenh@wantstofly.org>
|
||||
Adds support for arm*b-linux* big-endian ARM targets
|
||||
|
||||
See http://gcc.gnu.org/PR16350
|
||||
|
||||
--- gcc-4.2.0/gcc/config/arm/linux-elf.h
|
||||
+++ gcc-4.2.0/gcc/config/arm/linux-elf.h
|
||||
@@ -28,19 +28,33 @@
|
||||
#undef TARGET_VERSION
|
||||
#define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr);
|
||||
|
||||
+/*
|
||||
+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
|
||||
+ * (big endian) configurations.
|
||||
+ */
|
||||
+#if TARGET_BIG_ENDIAN_DEFAULT
|
||||
+#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
|
||||
+#define TARGET_ENDIAN_OPTION "mbig-endian"
|
||||
+#define TARGET_LINKER_EMULATION "armelfb_linux"
|
||||
+#else
|
||||
+#define TARGET_ENDIAN_DEFAULT 0
|
||||
+#define TARGET_ENDIAN_OPTION "mlittle-endian"
|
||||
+#define TARGET_LINKER_EMULATION "armelf_linux"
|
||||
+#endif
|
||||
+
|
||||
#undef TARGET_DEFAULT_FLOAT_ABI
|
||||
#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
|
||||
|
||||
#undef TARGET_DEFAULT
|
||||
-#define TARGET_DEFAULT (0)
|
||||
+#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
|
||||
|
||||
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
|
||||
|
||||
-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
|
||||
+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
|
||||
|
||||
#undef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS \
|
||||
- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
|
||||
+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
|
||||
|
||||
/* Now we define the strings used to build the spec file. */
|
||||
#undef LIB_SPEC
|
||||
@@ -61,7 +75,7 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "} \
|
||||
-X \
|
||||
- %{mbig-endian:-EB}" \
|
||||
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
|
||||
#undef LINK_SPEC
|
||||
--- gcc-4.2.0/gcc/config.gcc.orig 2006-09-22 14:53:41.000000000 +0200
|
||||
+++ gcc-4.2.0/gcc/config.gcc 2006-09-25 10:45:21.000000000 +0200
|
||||
@@ -696,6 +696,11 @@
|
||||
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
|
||||
tmake_file="${tmake_file} t-linux arm/t-arm"
|
||||
case ${target} in
|
||||
+ arm*b-*)
|
||||
+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
|
||||
+ ;;
|
||||
+ esac
|
||||
+ case ${target} in
|
||||
arm*-*-linux-*eabi)
|
||||
tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
|
||||
tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
|
@ -1,153 +0,0 @@
|
||||
Hi,
|
||||
|
||||
The attached patch makes sure that we create smaller object code for
|
||||
simple switch statements. We just make sure to flatten the switch
|
||||
statement into an if-else chain, basically.
|
||||
|
||||
This fixes a size-regression as compared to gcc-3.4, as can be seen
|
||||
below.
|
||||
|
||||
2007-04-15 Bernhard Fischer <..>
|
||||
|
||||
* stmt.c (expand_case): Do not create a complex binary tree when
|
||||
optimizing for size but rather use the simple ordered list.
|
||||
(emit_case_nodes): do not emit jumps to the default_label when
|
||||
optimizing for size.
|
||||
|
||||
Not regtested so far.
|
||||
Comments?
|
||||
|
||||
Attached is the test switch.c mentioned below.
|
||||
|
||||
$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do
|
||||
gcc-$i -DCHAIN -Os -o switch-CHAIN-$i.o -c switch.c ;done
|
||||
$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do
|
||||
gcc-$i -UCHAIN -Os -o switch-$i.o -c switch.c ;done
|
||||
|
||||
$ size switch-*.o
|
||||
text data bss dec hex filename
|
||||
169 0 0 169 a9 switch-2.95.o
|
||||
115 0 0 115 73 switch-3.3.o
|
||||
103 0 0 103 67 switch-3.4.o
|
||||
124 0 0 124 7c switch-4.0.o
|
||||
124 0 0 124 7c switch-4.1.o
|
||||
124 0 0 124 7c switch-4.2.orig-HEAD.o
|
||||
95 0 0 95 5f switch-4.3-HEAD.o
|
||||
124 0 0 124 7c switch-4.3.orig-HEAD.o
|
||||
166 0 0 166 a6 switch-CHAIN-2.95.o
|
||||
111 0 0 111 6f switch-CHAIN-3.3.o
|
||||
95 0 0 95 5f switch-CHAIN-3.4.o
|
||||
95 0 0 95 5f switch-CHAIN-4.0.o
|
||||
95 0 0 95 5f switch-CHAIN-4.1.o
|
||||
95 0 0 95 5f switch-CHAIN-4.2.orig-HEAD.o
|
||||
95 0 0 95 5f switch-CHAIN-4.3-HEAD.o
|
||||
95 0 0 95 5f switch-CHAIN-4.3.orig-HEAD.o
|
||||
|
||||
|
||||
Content-Type: text/x-diff; charset=us-ascii
|
||||
Content-Disposition: attachment; filename="gcc-4.3.gcc-flatten-switch-stmt.00.diff"
|
||||
|
||||
Index: gcc-4.2.0/gcc/stmt.c
|
||||
===================================================================
|
||||
--- gcc-4.2.0.orig/gcc/stmt.c (revision 123843)
|
||||
+++ gcc-4.2.0/gcc/stmt.c (working copy)
|
||||
@@ -2517,7 +2517,11 @@ expand_case (tree exp)
|
||||
use_cost_table
|
||||
= (TREE_CODE (orig_type) != ENUMERAL_TYPE
|
||||
&& estimate_case_costs (case_list));
|
||||
- balance_case_nodes (&case_list, NULL);
|
||||
+ /* When optimizing for size, we want a straight list to avoid
|
||||
+ jumps as much as possible. This basically creates an if-else
|
||||
+ chain. */
|
||||
+ if (!optimize_size)
|
||||
+ balance_case_nodes (&case_list, NULL);
|
||||
emit_case_nodes (index, case_list, default_label, index_type);
|
||||
emit_jump (default_label);
|
||||
}
|
||||
@@ -3075,6 +3079,7 @@ emit_case_nodes (rtx index, case_node_pt
|
||||
{
|
||||
if (!node_has_low_bound (node, index_type))
|
||||
{
|
||||
+ if (!optimize_size) /* don't jl to the .default_label. */
|
||||
emit_cmp_and_jump_insns (index,
|
||||
convert_modes
|
||||
(mode, imode,
|
||||
|
||||
|
||||
Content-Type: text/x-csrc; charset=us-ascii
|
||||
Content-Disposition: attachment; filename="switch.c"
|
||||
|
||||
int
|
||||
commutative_tree_code (int code)
|
||||
{
|
||||
#define CASE(val, ret) case val:/* __asm__("# val="#val ",ret="#ret);*/ return ret;
|
||||
#ifndef CHAIN
|
||||
switch (code)
|
||||
{
|
||||
# if 1
|
||||
CASE(1,3)
|
||||
CASE(3,2)
|
||||
CASE(5,8)
|
||||
CASE(7,1)
|
||||
CASE(33,4)
|
||||
CASE(44,9)
|
||||
CASE(55,10)
|
||||
CASE(66,-1)
|
||||
CASE(77,99)
|
||||
CASE(666,0)
|
||||
# else
|
||||
case 1:
|
||||
return 3;
|
||||
case 3:
|
||||
return 2;
|
||||
case 5:
|
||||
return 8;
|
||||
case 7:
|
||||
return 1;
|
||||
case 33:
|
||||
return 4;
|
||||
case 44:
|
||||
return 9;
|
||||
case 55:
|
||||
return 10;
|
||||
case 66:
|
||||
return -1;
|
||||
case 77:
|
||||
return 99;
|
||||
case 666:
|
||||
return 0;
|
||||
# endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 4711;
|
||||
|
||||
#else
|
||||
if (code == 1)
|
||||
return 3;
|
||||
else if (code == 3)
|
||||
return 2;
|
||||
else if (code == 5)
|
||||
return 8;
|
||||
else if (code == 7)
|
||||
return 1;
|
||||
else if (code == 33)
|
||||
return 4;
|
||||
else if (code == 44)
|
||||
return 9;
|
||||
else if (code == 55)
|
||||
return 10;
|
||||
else if (code == 66)
|
||||
return -1;
|
||||
else if (code == 77)
|
||||
return 99;
|
||||
else if (code == 666)
|
||||
return 0;
|
||||
else
|
||||
return 4711;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
--AhhlLboLdkugWU4S--
|
||||
|
@ -1,200 +0,0 @@
|
||||
--- gcc/libgomp/configure
|
||||
+++ gcc/libgomp/configure
|
||||
@@ -3771,7 +3771,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/gcc/config/cris/linux.h
|
||||
+++ gcc/gcc/config/cris/linux.h
|
||||
@@ -74,7 +74,11 @@
|
||||
#define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
|
||||
|
||||
#undef CRIS_SUBTARGET_VERSION
|
||||
-#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
|
||||
+#if UCLIBC_DEFAULT
|
||||
+# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
|
||||
+#else
|
||||
+# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
|
||||
+#endif
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
|
||||
--- gcc/libstdc++-v3/configure
|
||||
+++ gcc/libstdc++-v3/configure
|
||||
@@ -4276,7 +4276,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/zlib/configure
|
||||
+++ gcc/zlib/configure
|
||||
@@ -3422,7 +3422,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libobjc/configure
|
||||
+++ gcc/libobjc/configure
|
||||
@@ -3309,7 +3309,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libgfortran/configure
|
||||
+++ gcc/libgfortran/configure
|
||||
@@ -3695,7 +3695,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libmudflap/configure
|
||||
+++ gcc/libmudflap/configure
|
||||
@@ -5378,7 +5378,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/boehm-gc/configure
|
||||
+++ gcc/boehm-gc/configure
|
||||
@@ -4316,7 +4316,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libffi/configure
|
||||
+++ gcc/libffi/configure
|
||||
@@ -3453,7 +3453,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libssp/configure
|
||||
+++ gcc/libssp/configure
|
||||
@@ -4409,7 +4409,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/contrib/regression/objs-gcc.sh
|
||||
+++ gcc/contrib/regression/objs-gcc.sh
|
||||
@@ -105,6 +105,10 @@
|
||||
then
|
||||
make all-gdb all-dejagnu all-ld || exit 1
|
||||
make install-gdb install-dejagnu install-ld || exit 1
|
||||
+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
|
||||
+ then
|
||||
+ make all-gdb all-dejagnu all-ld || exit 1
|
||||
+ make install-gdb install-dejagnu install-ld || exit 1
|
||||
elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
|
||||
make bootstrap || exit 1
|
||||
make install || exit 1
|
||||
--- gcc/libjava/classpath/ltconfig
|
||||
+++ gcc/libjava/classpath/ltconfig
|
||||
@@ -603,7 +603,7 @@
|
||||
|
||||
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
|
||||
case $host_os in
|
||||
-linux-gnu*) ;;
|
||||
+linux-gnu*|linux-uclibc*) ;;
|
||||
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
|
||||
esac
|
||||
|
||||
@@ -1251,7 +1251,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
version_type=linux
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
--- gcc/libjava/classpath/configure
|
||||
+++ gcc/libjava/classpath/configure
|
||||
@@ -4665,7 +4665,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libjava/configure
|
||||
+++ gcc/libjava/configure
|
||||
@@ -5212,7 +5212,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libtool.m4
|
||||
+++ gcc/libtool.m4
|
||||
@@ -739,7 +739,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/ltconfig
|
||||
+++ gcc/ltconfig
|
||||
@@ -603,7 +603,7 @@
|
||||
|
||||
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
|
||||
case $host_os in
|
||||
-linux-gnu*) ;;
|
||||
+linux-gnu*|linux-uclibc*) ;;
|
||||
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
|
||||
esac
|
||||
|
||||
@@ -1251,7 +1251,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
version_type=linux
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
@ -1,11 +0,0 @@
|
||||
--- gcc/gcc/config.gcc.uclibc100-sh~ 2006-03-06 20:46:56 +0100
|
||||
+++ gcc/gcc/config.gcc 2006-03-10 15:02:41 +0100
|
||||
@@ -1905,7 +1905,7 @@
|
||||
;;
|
||||
sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
|
||||
sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
|
||||
- sh-*-linux* | sh[346lbe]*-*-linux* | \
|
||||
+ sh*-*-linux* | sh[346lbe]*-*-linux* | \
|
||||
sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
|
||||
sh64-*-netbsd* | sh64l*-*-netbsd*)
|
||||
tmake_file="${tmake_file} sh/t-sh sh/t-elf"
|
@ -1,13 +0,0 @@
|
||||
diff -rdup gcc-4.2.1.oorig/gcc/config.gcc gcc-4.2.1/gcc/config.gcc
|
||||
--- gcc-4.2.1.oorig/gcc/config.gcc 2007-10-01 11:52:52.000000000 +0200
|
||||
+++ gcc-4.2.1/gcc/config.gcc 2007-10-01 13:22:12.000000000 +0200
|
||||
@@ -494,6 +494,9 @@ case ${target} in
|
||||
alpha*)
|
||||
tm_file="${cpu_type}/${cpu_type}.h alpha/elf.h alpha/linux.h alpha/linux-elf.h gnu.h ${tm_file}"
|
||||
;;
|
||||
+ i[34567]86-*hurd*-*)
|
||||
+ tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/gnu.h gnu.h ${tm_file}"
|
||||
+ ;;
|
||||
i[34567]86-*-*)
|
||||
tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h gnu.h ${tm_file}"
|
||||
;;
|
File diff suppressed because it is too large
Load Diff
@ -1,213 +0,0 @@
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2006-03-10 15:32:37 +0100
|
||||
@@ -60,4 +60,49 @@
|
||||
extern "C" __typeof(wctype_l) __wctype_l;
|
||||
#endif
|
||||
|
||||
+# define __nl_langinfo_l nl_langinfo_l
|
||||
+# define __strcoll_l strcoll_l
|
||||
+# define __strftime_l strftime_l
|
||||
+# define __strtod_l strtod_l
|
||||
+# define __strtof_l strtof_l
|
||||
+# define __strtold_l strtold_l
|
||||
+# define __strxfrm_l strxfrm_l
|
||||
+# define __newlocale newlocale
|
||||
+# define __freelocale freelocale
|
||||
+# define __duplocale duplocale
|
||||
+# define __uselocale uselocale
|
||||
+
|
||||
+# ifdef _GLIBCXX_USE_WCHAR_T
|
||||
+# define __iswctype_l iswctype_l
|
||||
+# define __towlower_l towlower_l
|
||||
+# define __towupper_l towupper_l
|
||||
+# define __wcscoll_l wcscoll_l
|
||||
+# define __wcsftime_l wcsftime_l
|
||||
+# define __wcsxfrm_l wcsxfrm_l
|
||||
+# define __wctype_l wctype_l
|
||||
+# endif
|
||||
+
|
||||
+#else
|
||||
+# define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
+# define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
|
||||
+# define __strtod_l(S, E, L) strtod((S), (E))
|
||||
+# define __strtof_l(S, E, L) strtof((S), (E))
|
||||
+# define __strtold_l(S, E, L) strtold((S), (E))
|
||||
+# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
|
||||
+# warning should dummy __newlocale check for C|POSIX ?
|
||||
+# define __newlocale(a, b, c) NULL
|
||||
+# define __freelocale(a) ((void)0)
|
||||
+# define __duplocale(a) __c_locale()
|
||||
+//# define __uselocale ?
|
||||
+//
|
||||
+# ifdef _GLIBCXX_USE_WCHAR_T
|
||||
+# define __iswctype_l(C, M, L) iswctype((C), (M))
|
||||
+# define __towlower_l(C, L) towlower((C))
|
||||
+# define __towupper_l(C, L) towupper((C))
|
||||
+# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
|
||||
+//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T))
|
||||
+# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
|
||||
+# define __wctype_l(S, L) wctype((S))
|
||||
+# endif
|
||||
+
|
||||
#endif // GLIBC 2.3 and later
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -39,20 +39,6 @@
|
||||
#include <langinfo.h>
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
|
||||
-#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
|
||||
-#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
|
||||
-#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
|
||||
-#define __strtof_l(S, E, L) strtof((S), (E))
|
||||
-#define __strtod_l(S, E, L) strtod((S), (E))
|
||||
-#define __strtold_l(S, E, L) strtold((S), (E))
|
||||
-#warning should dummy __newlocale check for C|POSIX ?
|
||||
-#define __newlocale(a, b, c) NULL
|
||||
-#define __freelocale(a) ((void)0)
|
||||
-#define __duplocale(a) __c_locale()
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
template<>
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -36,13 +36,6 @@
|
||||
#include <locale>
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
|
||||
-#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
|
||||
-#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
|
||||
-#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// These are basically extensions to char_traits, and perhaps should
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -43,10 +43,6 @@
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// Construct and return valid pattern consisting of some combination of:
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -41,9 +41,6 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
|
||||
namespace std
|
||||
{
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/time_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/time_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -40,9 +40,6 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
|
||||
namespace std
|
||||
{
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -38,13 +38,6 @@
|
||||
#undef _LIBC
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __wctype_l(S, L) wctype((S))
|
||||
-#define __towupper_l(C, L) towupper((C))
|
||||
-#define __towlower_l(C, L) towlower((C))
|
||||
-#define __iswctype_l(C, M, L) iswctype((C), (M))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// NB: The other ctype<char> specializations are in src/locale.cc and
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -39,13 +39,10 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix gettext stuff
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-extern "C" char *__dcgettext(const char *domainname,
|
||||
- const char *msgid, int category);
|
||||
#undef gettext
|
||||
-#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
|
||||
+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
+#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
|
||||
#else
|
||||
-#undef gettext
|
||||
#define gettext(msgid) (msgid)
|
||||
#endif
|
||||
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-10 15:32:37 +0100
|
||||
@@ -36,15 +36,11 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix prototypes for *textdomain funcs
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-extern "C" char *__textdomain(const char *domainname);
|
||||
-extern "C" char *__bindtextdomain(const char *domainname,
|
||||
- const char *dirname);
|
||||
-#else
|
||||
-#undef __textdomain
|
||||
-#undef __bindtextdomain
|
||||
-#define __textdomain(D) ((void)0)
|
||||
-#define __bindtextdomain(D,P) ((void)0)
|
||||
+#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
+#undef textdomain
|
||||
+#undef bindtextdomain
|
||||
+#define textdomain(D) ((void)0)
|
||||
+#define bindtextdomain(D,P) ((void)0)
|
||||
#endif
|
||||
|
||||
// Non-virtual member functions.
|
||||
@@ -70,7 +66,7 @@
|
||||
messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
|
||||
const char* __dir) const
|
||||
{
|
||||
- __bindtextdomain(__s.c_str(), __dir);
|
||||
+ bindtextdomain(__s.c_str(), __dir);
|
||||
return this->do_open(__s, __loc);
|
||||
}
|
||||
|
||||
@@ -90,7 +86,7 @@
|
||||
{
|
||||
// No error checking is done, assume the catalog exists and can
|
||||
// be used.
|
||||
- __textdomain(__s.c_str());
|
||||
+ textdomain(__s.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-03-10 15:32:37 +0100
|
||||
@@ -68,6 +68,7 @@
|
||||
{
|
||||
extern "C" __typeof(uselocale) __uselocale;
|
||||
}
|
||||
+#define __uselocale uselocale
|
||||
#endif
|
||||
|
||||
namespace std
|
@ -1,48 +0,0 @@
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:37:27 +0100
|
||||
@@ -401,7 +401,7 @@
|
||||
# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
_M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
-# else
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
_M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
# endif
|
||||
@@ -556,7 +556,7 @@
|
||||
# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
_M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
-# else
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
_M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
# endif
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:37:27 +0100
|
||||
@@ -127,12 +127,25 @@
|
||||
{
|
||||
// Named locale.
|
||||
// NB: In the GNU model wchar_t is always 32 bit wide.
|
||||
+#ifdef __UCLIBC_MJN3_ONLY__
|
||||
+#warning fix this... should be numeric
|
||||
+#endif
|
||||
+#ifdef __UCLIBC__
|
||||
+# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
+# endif
|
||||
+#else
|
||||
union { char *__s; wchar_t __w; } __u;
|
||||
__u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
|
||||
_M_data->_M_decimal_point = __u.__w;
|
||||
|
||||
__u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
|
||||
_M_data->_M_thousands_sep = __u.__w;
|
||||
+#endif
|
||||
|
||||
if (_M_data->_M_thousands_sep == L'\0')
|
||||
_M_data->_M_grouping = "";
|
@ -1,347 +0,0 @@
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-10 15:39:14 +0100
|
||||
@@ -46,16 +47,13 @@
|
||||
__convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- float __f = __strtof_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __f;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ float __f = __strtof_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __f;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -63,16 +61,13 @@
|
||||
__convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- double __d = __strtod_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __d;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ double __d = __strtod_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __d;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -80,16 +75,13 @@
|
||||
__convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- long double __ld = __strtold_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __ld;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __ld;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -110,7 +102,7 @@
|
||||
void
|
||||
locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
|
||||
{
|
||||
- if (_S_get_c_locale() != __cloc)
|
||||
+ if (__cloc && _S_get_c_locale() != __cloc)
|
||||
__freelocale(__cloc);
|
||||
}
|
||||
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-10 15:39:14 +0100
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
namespace std
|
||||
@@ -138,20 +143,34 @@
|
||||
ctype<wchar_t>::
|
||||
do_is(mask __m, wchar_t __c) const
|
||||
{
|
||||
- // Highest bitmask in ctype_base == 10, but extra in "C"
|
||||
- // library for blank.
|
||||
+ // The case of __m == ctype_base::space is particularly important,
|
||||
+ // due to its use in many istream functions. Therefore we deal with
|
||||
+ // it first, exploiting the knowledge that on GNU systems _M_bit[5]
|
||||
+ // is the mask corresponding to ctype_base::space. NB: an encoding
|
||||
+ // change would not affect correctness!
|
||||
bool __ret = false;
|
||||
- const size_t __bitmasksize = 11;
|
||||
- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
|
||||
- if (__m & _M_bit[__bitcur]
|
||||
- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
|
||||
- {
|
||||
- __ret = true;
|
||||
- break;
|
||||
- }
|
||||
+ if (__m == _M_bit[5])
|
||||
+ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
|
||||
+ else
|
||||
+ {
|
||||
+ // Highest bitmask in ctype_base == 10, but extra in "C"
|
||||
+ // library for blank.
|
||||
+ const size_t __bitmasksize = 11;
|
||||
+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
|
||||
+ if (__m & _M_bit[__bitcur])
|
||||
+ {
|
||||
+ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
|
||||
+ {
|
||||
+ __ret = true;
|
||||
+ break;
|
||||
+ }
|
||||
+ else if (__m == _M_bit[__bitcur])
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
return __ret;
|
||||
}
|
||||
-
|
||||
+
|
||||
const wchar_t*
|
||||
ctype<wchar_t>::
|
||||
do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h.uclibc200_update~ 2006-03-10 15:32:37 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-10 15:39:14 +0100
|
||||
@@ -47,18 +47,21 @@
|
||||
template<typename _CharT>
|
||||
messages<_CharT>::messages(size_t __refs)
|
||||
: facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
|
||||
- _M_name_messages(_S_get_c_name())
|
||||
+ _M_name_messages(_S_get_c_name())
|
||||
{ }
|
||||
|
||||
template<typename _CharT>
|
||||
messages<_CharT>::messages(__c_locale __cloc, const char* __s,
|
||||
size_t __refs)
|
||||
- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
|
||||
- _M_name_messages(__s)
|
||||
+ : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL)
|
||||
{
|
||||
- char* __tmp = new char[std::strlen(__s) + 1];
|
||||
- std::strcpy(__tmp, __s);
|
||||
+ const size_t __len = std::strlen(__s) + 1;
|
||||
+ char* __tmp = new char[__len];
|
||||
+ std::memcpy(__tmp, __s, __len);
|
||||
_M_name_messages = __tmp;
|
||||
+
|
||||
+ // Last to avoid leaking memory if new throws.
|
||||
+ _M_c_locale_messages = _S_clone_c_locale(__cloc);
|
||||
}
|
||||
|
||||
template<typename _CharT>
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_update~ 2006-03-10 15:37:27 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:39:14 +0100
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
@@ -206,7 +211,7 @@
|
||||
}
|
||||
break;
|
||||
default:
|
||||
- ;
|
||||
+ __ret = pattern();
|
||||
}
|
||||
return __ret;
|
||||
}
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_update~ 2006-03-10 15:37:27 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:39:14 +0100
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/time_members.h.uclibc200_update~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/time_members.h 2006-03-10 15:39:14 +0100
|
||||
@@ -37,25 +37,33 @@
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(size_t __refs)
|
||||
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(_S_get_c_name())
|
||||
+ _M_name_timepunct(_S_get_c_name())
|
||||
{ _M_initialize_timepunct(); }
|
||||
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
|
||||
: facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(_S_get_c_name())
|
||||
+ _M_name_timepunct(_S_get_c_name())
|
||||
{ _M_initialize_timepunct(); }
|
||||
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
|
||||
size_t __refs)
|
||||
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(__s)
|
||||
+ _M_name_timepunct(NULL)
|
||||
{
|
||||
- char* __tmp = new char[std::strlen(__s) + 1];
|
||||
- std::strcpy(__tmp, __s);
|
||||
+ const size_t __len = std::strlen(__s) + 1;
|
||||
+ char* __tmp = new char[__len];
|
||||
+ std::memcpy(__tmp, __s, __len);
|
||||
_M_name_timepunct = __tmp;
|
||||
- _M_initialize_timepunct(__cloc);
|
||||
+
|
||||
+ try
|
||||
+ { _M_initialize_timepunct(__cloc); }
|
||||
+ catch(...)
|
||||
+ {
|
||||
+ delete [] _M_name_timepunct;
|
||||
+ __throw_exception_again;
|
||||
+ }
|
||||
}
|
||||
|
||||
template<typename _CharT>
|
||||
--- gcc-4.2/libstdc++-v3/config/locale/uclibc/c_locale.h.old 2006-09-28 11:39:00.000000000 +0200
|
||||
+++ gcc-4.2/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-09-28 12:10:41.000000000 +0200
|
||||
@@ -39,21 +39,23 @@
|
||||
#pragma GCC system_header
|
||||
|
||||
#include <cstring> // get std::strlen
|
||||
-#include <cstdio> // get std::snprintf or std::sprintf
|
||||
+#include <cstdio> // get std::vsnprintf or std::vsprintf
|
||||
#include <clocale>
|
||||
#include <langinfo.h> // For codecvt
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix this
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_LOCALE__
|
||||
+#ifdef _GLIBCXX_USE_ICONV
|
||||
#include <iconv.h> // For codecvt using iconv, iconv_t
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-#include <libintl.h> // For messages
|
||||
+#ifdef HAVE_LIBINTL_H
|
||||
+#include <libintl.h> // For messages
|
||||
#endif
|
||||
+#include <cstdarg>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning what is _GLIBCXX_C_LOCALE_GNU for
|
||||
+// psm: used in os/gnu-linux/ctype_noninline.h
|
||||
#endif
|
||||
#define _GLIBCXX_C_LOCALE_GNU 1
|
||||
|
||||
@@ -62,7 +64,7 @@
|
||||
#endif
|
||||
// #define _GLIBCXX_NUM_CATEGORIES 6
|
||||
#define _GLIBCXX_NUM_CATEGORIES 0
|
||||
-
|
||||
+
|
||||
#ifdef __UCLIBC_HAS_XLOCALE__
|
||||
namespace __gnu_cxx
|
||||
{
|
||||
@@ -79,22 +81,24 @@
|
||||
typedef int* __c_locale;
|
||||
#endif
|
||||
|
||||
- // Convert numeric value of type _Tv to string and return length of
|
||||
- // string. If snprintf is available use it, otherwise fall back to
|
||||
- // the unsafe sprintf which, in general, can be dangerous and should
|
||||
+ // Convert numeric value of type double to string and return length of
|
||||
+ // string. If vsnprintf is available use it, otherwise fall back to
|
||||
+ // the unsafe vsprintf which, in general, can be dangerous and should
|
||||
// be avoided.
|
||||
- template<typename _Tv>
|
||||
- int
|
||||
- __convert_from_v(char* __out,
|
||||
- const int __size __attribute__ ((__unused__)),
|
||||
- const char* __fmt,
|
||||
-#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
- _Tv __v, const __c_locale& __cloc, int __prec)
|
||||
+ inline int
|
||||
+ __convert_from_v(const __c_locale&
|
||||
+#ifndef __UCLIBC_HAS_XCLOCALE__
|
||||
+ __cloc __attribute__ ((__unused__))
|
||||
+#endif
|
||||
+ ,
|
||||
+ char* __out,
|
||||
+ const int __size,
|
||||
+ const char* __fmt, ...)
|
||||
{
|
||||
+ va_list __args;
|
||||
+#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
__c_locale __old = __gnu_cxx::__uselocale(__cloc);
|
||||
#else
|
||||
- _Tv __v, const __c_locale&, int __prec)
|
||||
- {
|
||||
# ifdef __UCLIBC_HAS_LOCALE__
|
||||
char* __old = std::setlocale(LC_ALL, NULL);
|
||||
char* __sav = new char[std::strlen(__old) + 1];
|
||||
@@ -103,7 +107,9 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
|
||||
+ va_start(__args, __fmt);
|
||||
+ const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
|
||||
+ va_end(__args);
|
||||
|
||||
#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
__gnu_cxx::__uselocale(__old);
|
@ -1,50 +0,0 @@
|
||||
# DP: Build and install libstdc++_pic.a library.
|
||||
|
||||
--- gcc/libstdc++-v3/src/Makefile.am
|
||||
+++ gcc/libstdc++-v3/src/Makefile.am
|
||||
@@ -214,6 +214,12 @@
|
||||
$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
|
||||
+install-exec-local:
|
||||
+ifeq ($(enable_shared),yes)
|
||||
+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
|
||||
+endif
|
||||
+
|
||||
# Added bits to build debug library.
|
||||
if GLIBCXX_BUILD_DEBUG
|
||||
all-local: build_debug
|
||||
--- gcc/libstdc++-v3/src/Makefile.in
|
||||
+++ gcc/libstdc++-v3/src/Makefile.in
|
||||
@@ -627,7 +627,7 @@
|
||||
|
||||
install-data-am: install-data-local
|
||||
|
||||
-install-exec-am: install-toolexeclibLTLIBRARIES
|
||||
+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
@@ -660,6 +660,7 @@
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-data-local install-exec \
|
||||
+ install-exec-local \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip install-toolexeclibLTLIBRARIES installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
@@ -743,6 +743,13 @@
|
||||
install_debug:
|
||||
(cd ${debugdir} && $(MAKE) \
|
||||
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
|
||||
+
|
||||
+install-exec-local:
|
||||
+ifeq ($(enable_shared),yes)
|
||||
+ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
|
||||
+endif
|
||||
+
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
@ -1,11 +0,0 @@
|
||||
--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
|
||||
+++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
|
||||
@@ -500,7 +500,7 @@
|
||||
#ifdef __linux__
|
||||
# include <features.h>
|
||||
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
|
||||
- && !defined(__ia64__)
|
||||
+ && !defined(__ia64__) && !defined(__UCLIBC__)
|
||||
# ifndef GC_HAVE_BUILTIN_BACKTRACE
|
||||
# define GC_HAVE_BUILTIN_BACKTRACE
|
||||
# endif
|
@ -1,11 +0,0 @@
|
||||
--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500
|
||||
+++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500
|
||||
@@ -142,7 +142,7 @@
|
||||
using ::vsprintf;
|
||||
}
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
|
||||
|
||||
#undef snprintf
|
||||
#undef vfscanf
|
@ -1,12 +0,0 @@
|
||||
--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
|
||||
+++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
|
||||
@@ -7194,6 +7194,9 @@
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <complex.h>
|
||||
+#ifdef __UCLIBC__
|
||||
+#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
|
||||
+#endif
|
||||
int
|
||||
main ()
|
||||
{
|
@ -1,24 +0,0 @@
|
||||
--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100
|
||||
+++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100
|
||||
@@ -59,6 +59,9 @@
|
||||
#include <bits/allocator.h>
|
||||
#include <ext/hash_fun.h>
|
||||
|
||||
+/* cope w/ index defined as macro, SuSv3 proposal */
|
||||
+#undef index
|
||||
+
|
||||
# ifdef __GC
|
||||
# define __GC_CONST const
|
||||
# else
|
||||
--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100
|
||||
+++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100
|
||||
@@ -53,6 +53,9 @@
|
||||
#include <ext/memory> // For uninitialized_copy_n
|
||||
#include <ext/numeric> // For power
|
||||
|
||||
+/* cope w/ index defined as macro, SuSv3 proposal */
|
||||
+#undef index
|
||||
+
|
||||
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
using std::size_t;
|
@ -1,49 +0,0 @@
|
||||
Index: gcc-4.2/libmudflap/mf-hooks2.c
|
||||
===================================================================
|
||||
--- gcc-4.2/libmudflap/mf-hooks2.c (revision 119834)
|
||||
+++ gcc-4.2/libmudflap/mf-hooks2.c (working copy)
|
||||
@@ -427,7 +427,7 @@
|
||||
{
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
|
||||
- bzero (s, n);
|
||||
+ memset (s, 0, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -437,7 +437,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
|
||||
MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
|
||||
- bcopy (src, dest, n);
|
||||
+ memmove (dest, src, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -447,7 +447,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
|
||||
MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
|
||||
- return bcmp (s1, s2, n);
|
||||
+ return n == 0 ? 0 : memcmp (s1, s2, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
|
||||
- return index (s, c);
|
||||
+ return strchr (s, c);
|
||||
}
|
||||
|
||||
|
||||
@@ -465,7 +465,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
|
||||
- return rindex (s, c);
|
||||
+ return strrchr (s, c);
|
||||
}
|
||||
|
||||
/* XXX: stpcpy, memccpy */
|
@ -1,36 +0,0 @@
|
||||
diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h
|
||||
--- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 13:06:56.000000000 +0100
|
||||
+++ gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 15:23:41.000000000 +0100
|
||||
@@ -32,7 +32,8 @@
|
||||
//
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
-
|
||||
+namespace std
|
||||
+{
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix prototypes for *textdomain funcs
|
||||
#endif
|
||||
@@ -115,3 +116,4 @@
|
||||
this->_S_create_c_locale(this->_M_c_locale_messages, __s);
|
||||
}
|
||||
}
|
||||
+}
|
||||
diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h
|
||||
--- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 13:06:56.000000000 +0100
|
||||
+++ gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 15:20:31.000000000 +0100
|
||||
@@ -33,7 +33,8 @@
|
||||
//
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
-
|
||||
+namespace std
|
||||
+{
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(size_t __refs)
|
||||
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
|
||||
@@ -74,3 +75,4 @@
|
||||
delete _M_data;
|
||||
_S_destroy_c_locale(_M_c_locale_timepunct);
|
||||
}
|
||||
+}
|
@ -1,26 +0,0 @@
|
||||
This patch fixes a bug into ostream::operator<<(double) due to the wrong size
|
||||
passed into the __convert_from_v method. The wrong size is then passed to
|
||||
std::snprintf function, that, on uClibc, doens't handle sized 0 buffer.
|
||||
|
||||
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
||||
|
||||
--- gcc-4.2.1/libstdc++-v3/include/bits/locale_facets.tcc 2006-10-17 18:43:47.000000000 +0200
|
||||
+++ gcc-4.2.1-st/libstdc++-v3/include/bits/locale_facets.tcc 2007-08-22 18:54:23.000000000 +0200
|
||||
@@ -1143,7 +1143,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
|
||||
const int __cs_size = __fixed ? __max_exp + __prec + 4
|
||||
: __max_digits * 2 + __prec;
|
||||
char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
|
||||
- __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, __fbuf,
|
||||
+ __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf,
|
||||
__prec, __v);
|
||||
#endif
|
||||
|
||||
@@ -1777,7 +1777,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
|
||||
// max_exponent10 + 1 for the integer part, + 2 for sign and '\0'.
|
||||
const int __cs_size = numeric_limits<long double>::max_exponent10 + 3;
|
||||
char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
|
||||
- int __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, "%.*Lf",
|
||||
+ int __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, "%.*Lf",
|
||||
0, __units);
|
||||
#endif
|
||||
string_type __digits(__len, char_type());
|
@ -1,13 +0,0 @@
|
||||
Index: gcc-4.2/gcc/Makefile.in
|
||||
===================================================================
|
||||
--- gcc-4.2/gcc/Makefile.in (revision 121758)
|
||||
+++ gcc-4.2/gcc/Makefile.in (working copy)
|
||||
@@ -2658,7 +2658,7 @@ mips-tdump.o : mips-tdump.c $(CONFIG_H)
|
||||
# FIXME: writing proper dependencies for this is a *LOT* of work.
|
||||
libbackend.o : $(OBJS-common:.o=.c) $(out_file) \
|
||||
insn-config.h insn-flags.h insn-codes.h insn-constants.h \
|
||||
- insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE)
|
||||
+ insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE) gcov-iov.h
|
||||
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
|
||||
-DTARGET_NAME=\"$(target_noncanonical)\" \
|
||||
-DLOCALEDIR=\"$(localedir)\" \
|
@ -1,67 +0,0 @@
|
||||
By Lennert Buytenhek <buytenh@wantstofly.org>
|
||||
Adds support for arm*b-linux* big-endian ARM targets
|
||||
|
||||
See http://gcc.gnu.org/PR16350
|
||||
|
||||
--- gcc-4.2.0/gcc/config/arm/linux-elf.h
|
||||
+++ gcc-4.2.0/gcc/config/arm/linux-elf.h
|
||||
@@ -28,19 +28,33 @@
|
||||
#undef TARGET_VERSION
|
||||
#define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr);
|
||||
|
||||
+/*
|
||||
+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
|
||||
+ * (big endian) configurations.
|
||||
+ */
|
||||
+#if TARGET_BIG_ENDIAN_DEFAULT
|
||||
+#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
|
||||
+#define TARGET_ENDIAN_OPTION "mbig-endian"
|
||||
+#define TARGET_LINKER_EMULATION "armelfb_linux"
|
||||
+#else
|
||||
+#define TARGET_ENDIAN_DEFAULT 0
|
||||
+#define TARGET_ENDIAN_OPTION "mlittle-endian"
|
||||
+#define TARGET_LINKER_EMULATION "armelf_linux"
|
||||
+#endif
|
||||
+
|
||||
#undef TARGET_DEFAULT_FLOAT_ABI
|
||||
#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
|
||||
|
||||
#undef TARGET_DEFAULT
|
||||
-#define TARGET_DEFAULT (0)
|
||||
+#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
|
||||
|
||||
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
|
||||
|
||||
-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
|
||||
+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
|
||||
|
||||
#undef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS \
|
||||
- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
|
||||
+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
|
||||
|
||||
/* Now we define the strings used to build the spec file. */
|
||||
#undef LIB_SPEC
|
||||
@@ -61,7 +75,7 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "} \
|
||||
-X \
|
||||
- %{mbig-endian:-EB}" \
|
||||
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
|
||||
#undef LINK_SPEC
|
||||
--- gcc-4.2.0/gcc/config.gcc.orig 2006-09-22 14:53:41.000000000 +0200
|
||||
+++ gcc-4.2.0/gcc/config.gcc 2006-09-25 10:45:21.000000000 +0200
|
||||
@@ -696,6 +696,11 @@
|
||||
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
|
||||
tmake_file="${tmake_file} t-linux arm/t-arm"
|
||||
case ${target} in
|
||||
+ arm*b-*)
|
||||
+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
|
||||
+ ;;
|
||||
+ esac
|
||||
+ case ${target} in
|
||||
arm*-*-linux-*eabi)
|
||||
tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
|
||||
tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
|
@ -1,153 +0,0 @@
|
||||
Hi,
|
||||
|
||||
The attached patch makes sure that we create smaller object code for
|
||||
simple switch statements. We just make sure to flatten the switch
|
||||
statement into an if-else chain, basically.
|
||||
|
||||
This fixes a size-regression as compared to gcc-3.4, as can be seen
|
||||
below.
|
||||
|
||||
2007-04-15 Bernhard Fischer <..>
|
||||
|
||||
* stmt.c (expand_case): Do not create a complex binary tree when
|
||||
optimizing for size but rather use the simple ordered list.
|
||||
(emit_case_nodes): do not emit jumps to the default_label when
|
||||
optimizing for size.
|
||||
|
||||
Not regtested so far.
|
||||
Comments?
|
||||
|
||||
Attached is the test switch.c mentioned below.
|
||||
|
||||
$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do
|
||||
gcc-$i -DCHAIN -Os -o switch-CHAIN-$i.o -c switch.c ;done
|
||||
$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do
|
||||
gcc-$i -UCHAIN -Os -o switch-$i.o -c switch.c ;done
|
||||
|
||||
$ size switch-*.o
|
||||
text data bss dec hex filename
|
||||
169 0 0 169 a9 switch-2.95.o
|
||||
115 0 0 115 73 switch-3.3.o
|
||||
103 0 0 103 67 switch-3.4.o
|
||||
124 0 0 124 7c switch-4.0.o
|
||||
124 0 0 124 7c switch-4.1.o
|
||||
124 0 0 124 7c switch-4.2.orig-HEAD.o
|
||||
95 0 0 95 5f switch-4.3-HEAD.o
|
||||
124 0 0 124 7c switch-4.3.orig-HEAD.o
|
||||
166 0 0 166 a6 switch-CHAIN-2.95.o
|
||||
111 0 0 111 6f switch-CHAIN-3.3.o
|
||||
95 0 0 95 5f switch-CHAIN-3.4.o
|
||||
95 0 0 95 5f switch-CHAIN-4.0.o
|
||||
95 0 0 95 5f switch-CHAIN-4.1.o
|
||||
95 0 0 95 5f switch-CHAIN-4.2.orig-HEAD.o
|
||||
95 0 0 95 5f switch-CHAIN-4.3-HEAD.o
|
||||
95 0 0 95 5f switch-CHAIN-4.3.orig-HEAD.o
|
||||
|
||||
|
||||
Content-Type: text/x-diff; charset=us-ascii
|
||||
Content-Disposition: attachment; filename="gcc-4.3.gcc-flatten-switch-stmt.00.diff"
|
||||
|
||||
Index: gcc-4.2.0/gcc/stmt.c
|
||||
===================================================================
|
||||
--- gcc-4.2.0.orig/gcc/stmt.c (revision 123843)
|
||||
+++ gcc-4.2.0/gcc/stmt.c (working copy)
|
||||
@@ -2517,7 +2517,11 @@ expand_case (tree exp)
|
||||
use_cost_table
|
||||
= (TREE_CODE (orig_type) != ENUMERAL_TYPE
|
||||
&& estimate_case_costs (case_list));
|
||||
- balance_case_nodes (&case_list, NULL);
|
||||
+ /* When optimizing for size, we want a straight list to avoid
|
||||
+ jumps as much as possible. This basically creates an if-else
|
||||
+ chain. */
|
||||
+ if (!optimize_size)
|
||||
+ balance_case_nodes (&case_list, NULL);
|
||||
emit_case_nodes (index, case_list, default_label, index_type);
|
||||
emit_jump (default_label);
|
||||
}
|
||||
@@ -3075,6 +3079,7 @@ emit_case_nodes (rtx index, case_node_pt
|
||||
{
|
||||
if (!node_has_low_bound (node, index_type))
|
||||
{
|
||||
+ if (!optimize_size) /* don't jl to the .default_label. */
|
||||
emit_cmp_and_jump_insns (index,
|
||||
convert_modes
|
||||
(mode, imode,
|
||||
|
||||
|
||||
Content-Type: text/x-csrc; charset=us-ascii
|
||||
Content-Disposition: attachment; filename="switch.c"
|
||||
|
||||
int
|
||||
commutative_tree_code (int code)
|
||||
{
|
||||
#define CASE(val, ret) case val:/* __asm__("# val="#val ",ret="#ret);*/ return ret;
|
||||
#ifndef CHAIN
|
||||
switch (code)
|
||||
{
|
||||
# if 1
|
||||
CASE(1,3)
|
||||
CASE(3,2)
|
||||
CASE(5,8)
|
||||
CASE(7,1)
|
||||
CASE(33,4)
|
||||
CASE(44,9)
|
||||
CASE(55,10)
|
||||
CASE(66,-1)
|
||||
CASE(77,99)
|
||||
CASE(666,0)
|
||||
# else
|
||||
case 1:
|
||||
return 3;
|
||||
case 3:
|
||||
return 2;
|
||||
case 5:
|
||||
return 8;
|
||||
case 7:
|
||||
return 1;
|
||||
case 33:
|
||||
return 4;
|
||||
case 44:
|
||||
return 9;
|
||||
case 55:
|
||||
return 10;
|
||||
case 66:
|
||||
return -1;
|
||||
case 77:
|
||||
return 99;
|
||||
case 666:
|
||||
return 0;
|
||||
# endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 4711;
|
||||
|
||||
#else
|
||||
if (code == 1)
|
||||
return 3;
|
||||
else if (code == 3)
|
||||
return 2;
|
||||
else if (code == 5)
|
||||
return 8;
|
||||
else if (code == 7)
|
||||
return 1;
|
||||
else if (code == 33)
|
||||
return 4;
|
||||
else if (code == 44)
|
||||
return 9;
|
||||
else if (code == 55)
|
||||
return 10;
|
||||
else if (code == 66)
|
||||
return -1;
|
||||
else if (code == 77)
|
||||
return 99;
|
||||
else if (code == 666)
|
||||
return 0;
|
||||
else
|
||||
return 4711;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
--AhhlLboLdkugWU4S--
|
||||
|
@ -1,26 +0,0 @@
|
||||
--- gcc-4.2-20061205/gcc/config/arm/t-linux 2006-12-08 15:18:33.000000000 -0800
|
||||
+++ gcc-4.2-20061205/gcc/config/arm/t-linux 2006-12-08 15:18:33.000000000 -0800
|
||||
@@ -4,7 +4,10 @@
|
||||
LIBGCC2_DEBUG_CFLAGS = -g0
|
||||
|
||||
LIB1ASMSRC = arm/lib1funcs.asm
|
||||
-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
|
||||
+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
|
||||
+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
|
||||
+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
|
||||
+ _fixsfsi _fixunssfsi _floatdidf _floatundidf _floatdisf _floatundisf
|
||||
|
||||
# MULTILIB_OPTIONS = mhard-float/msoft-float
|
||||
# MULTILIB_DIRNAMES = hard-float soft-float
|
||||
|
||||
--- gcc-4.2-20061205/gcc/config/arm/linux-elf.h 2006-12-08 15:18:33.000000000 -0800
|
||||
+++ gcc-4.2-20061205/gcc/config/arm/linux-elf.h 2006-12-08 15:18:33.000000000 -0800
|
||||
@@ -63,7 +63,7 @@
|
||||
%{shared:-lc} \
|
||||
%{!shared:%{profile:-lc_p}%{!profile:-lc}}"
|
||||
|
||||
-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
|
||||
+#define LIBGCC_SPEC "-lgcc"
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
|
@ -1,21 +0,0 @@
|
||||
diff -uNpr gcc-4.2.1_orig/gcc/config/rs6000/darwin-ldouble.c gcc-4.2.1/gcc/config/rs6000/darwin-ldouble.c
|
||||
--- gcc-4.2.1_orig/gcc/config/rs6000/darwin-ldouble.c 2007-03-05 11:54:00.000000000 -0500
|
||||
+++ gcc-4.2.1/gcc/config/rs6000/darwin-ldouble.c 2008-01-31 17:51:24.000000000 -0500
|
||||
@@ -70,6 +70,8 @@ Software Foundation, 51 Franklin Street,
|
||||
but GCC currently generates poor code when a union is used to turn
|
||||
a long double into a pair of doubles. */
|
||||
|
||||
+#if defined (_SOFT_FLOAT) && defined (__LONG_DOUBLE_128__)
|
||||
+
|
||||
long double __gcc_qadd (double, double, double, double);
|
||||
long double __gcc_qsub (double, double, double, double);
|
||||
long double __gcc_qmul (double, double, double, double);
|
||||
@@ -219,8 +221,6 @@ __gcc_qdiv (double a, double b, double c
|
||||
return z.ldval;
|
||||
}
|
||||
|
||||
-#if defined (_SOFT_FLOAT) && defined (__LONG_DOUBLE_128__)
|
||||
-
|
||||
long double __gcc_qneg (double, double);
|
||||
int __gcc_qeq (double, double, double, double);
|
||||
int __gcc_qne (double, double, double, double);
|
@ -1,200 +0,0 @@
|
||||
--- gcc/libgomp/configure
|
||||
+++ gcc/libgomp/configure
|
||||
@@ -3771,7 +3771,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/gcc/config/cris/linux.h
|
||||
+++ gcc/gcc/config/cris/linux.h
|
||||
@@ -74,7 +74,11 @@
|
||||
#define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
|
||||
|
||||
#undef CRIS_SUBTARGET_VERSION
|
||||
-#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
|
||||
+#if UCLIBC_DEFAULT
|
||||
+# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
|
||||
+#else
|
||||
+# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
|
||||
+#endif
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
|
||||
|
||||
--- gcc/libstdc++-v3/configure
|
||||
+++ gcc/libstdc++-v3/configure
|
||||
@@ -4276,7 +4276,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/zlib/configure
|
||||
+++ gcc/zlib/configure
|
||||
@@ -3422,7 +3422,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libobjc/configure
|
||||
+++ gcc/libobjc/configure
|
||||
@@ -3309,7 +3309,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libgfortran/configure
|
||||
+++ gcc/libgfortran/configure
|
||||
@@ -3695,7 +3695,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libmudflap/configure
|
||||
+++ gcc/libmudflap/configure
|
||||
@@ -5378,7 +5378,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/boehm-gc/configure
|
||||
+++ gcc/boehm-gc/configure
|
||||
@@ -4316,7 +4316,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libffi/configure
|
||||
+++ gcc/libffi/configure
|
||||
@@ -3453,7 +3453,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libssp/configure
|
||||
+++ gcc/libssp/configure
|
||||
@@ -4409,7 +4409,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/contrib/regression/objs-gcc.sh
|
||||
+++ gcc/contrib/regression/objs-gcc.sh
|
||||
@@ -105,6 +105,10 @@
|
||||
then
|
||||
make all-gdb all-dejagnu all-ld || exit 1
|
||||
make install-gdb install-dejagnu install-ld || exit 1
|
||||
+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
|
||||
+ then
|
||||
+ make all-gdb all-dejagnu all-ld || exit 1
|
||||
+ make install-gdb install-dejagnu install-ld || exit 1
|
||||
elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
|
||||
make bootstrap || exit 1
|
||||
make install || exit 1
|
||||
--- gcc/libjava/classpath/ltconfig
|
||||
+++ gcc/libjava/classpath/ltconfig
|
||||
@@ -603,7 +603,7 @@
|
||||
|
||||
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
|
||||
case $host_os in
|
||||
-linux-gnu*) ;;
|
||||
+linux-gnu*|linux-uclibc*) ;;
|
||||
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
|
||||
esac
|
||||
|
||||
@@ -1251,7 +1251,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
version_type=linux
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
--- gcc/libjava/classpath/configure
|
||||
+++ gcc/libjava/classpath/configure
|
||||
@@ -4665,7 +4665,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libjava/configure
|
||||
+++ gcc/libjava/configure
|
||||
@@ -5212,7 +5212,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/libtool.m4
|
||||
+++ gcc/libtool.m4
|
||||
@@ -739,7 +739,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
--- gcc/ltconfig
|
||||
+++ gcc/ltconfig
|
||||
@@ -603,7 +603,7 @@
|
||||
|
||||
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
|
||||
case $host_os in
|
||||
-linux-gnu*) ;;
|
||||
+linux-gnu*|linux-uclibc*) ;;
|
||||
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
|
||||
esac
|
||||
|
||||
@@ -1251,7 +1251,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
version_type=linux
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
@ -1,11 +0,0 @@
|
||||
--- gcc/gcc/config.gcc.uclibc100-sh~ 2006-03-06 20:46:56 +0100
|
||||
+++ gcc/gcc/config.gcc 2006-03-10 15:02:41 +0100
|
||||
@@ -1905,7 +1905,7 @@
|
||||
;;
|
||||
sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
|
||||
sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
|
||||
- sh-*-linux* | sh[346lbe]*-*-linux* | \
|
||||
+ sh*-*-linux* | sh[346lbe]*-*-linux* | \
|
||||
sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
|
||||
sh64-*-netbsd* | sh64l*-*-netbsd*)
|
||||
tmake_file="${tmake_file} sh/t-sh sh/t-elf"
|
@ -1,13 +0,0 @@
|
||||
diff -rdup gcc-4.2.1.oorig/gcc/config.gcc gcc-4.2.1/gcc/config.gcc
|
||||
--- gcc-4.2.1.oorig/gcc/config.gcc 2007-10-01 11:52:52.000000000 +0200
|
||||
+++ gcc-4.2.1/gcc/config.gcc 2007-10-01 13:22:12.000000000 +0200
|
||||
@@ -494,6 +494,9 @@ case ${target} in
|
||||
alpha*)
|
||||
tm_file="${cpu_type}/${cpu_type}.h alpha/elf.h alpha/linux.h alpha/linux-elf.h gnu.h ${tm_file}"
|
||||
;;
|
||||
+ i[34567]86-*hurd*-*)
|
||||
+ tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/gnu.h gnu.h ${tm_file}"
|
||||
+ ;;
|
||||
i[34567]86-*-*)
|
||||
tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h gnu.h ${tm_file}"
|
||||
;;
|
File diff suppressed because it is too large
Load Diff
@ -1,213 +0,0 @@
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2006-03-10 15:32:37 +0100
|
||||
@@ -60,4 +60,49 @@
|
||||
extern "C" __typeof(wctype_l) __wctype_l;
|
||||
#endif
|
||||
|
||||
+# define __nl_langinfo_l nl_langinfo_l
|
||||
+# define __strcoll_l strcoll_l
|
||||
+# define __strftime_l strftime_l
|
||||
+# define __strtod_l strtod_l
|
||||
+# define __strtof_l strtof_l
|
||||
+# define __strtold_l strtold_l
|
||||
+# define __strxfrm_l strxfrm_l
|
||||
+# define __newlocale newlocale
|
||||
+# define __freelocale freelocale
|
||||
+# define __duplocale duplocale
|
||||
+# define __uselocale uselocale
|
||||
+
|
||||
+# ifdef _GLIBCXX_USE_WCHAR_T
|
||||
+# define __iswctype_l iswctype_l
|
||||
+# define __towlower_l towlower_l
|
||||
+# define __towupper_l towupper_l
|
||||
+# define __wcscoll_l wcscoll_l
|
||||
+# define __wcsftime_l wcsftime_l
|
||||
+# define __wcsxfrm_l wcsxfrm_l
|
||||
+# define __wctype_l wctype_l
|
||||
+# endif
|
||||
+
|
||||
+#else
|
||||
+# define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
+# define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
|
||||
+# define __strtod_l(S, E, L) strtod((S), (E))
|
||||
+# define __strtof_l(S, E, L) strtof((S), (E))
|
||||
+# define __strtold_l(S, E, L) strtold((S), (E))
|
||||
+# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
|
||||
+# warning should dummy __newlocale check for C|POSIX ?
|
||||
+# define __newlocale(a, b, c) NULL
|
||||
+# define __freelocale(a) ((void)0)
|
||||
+# define __duplocale(a) __c_locale()
|
||||
+//# define __uselocale ?
|
||||
+//
|
||||
+# ifdef _GLIBCXX_USE_WCHAR_T
|
||||
+# define __iswctype_l(C, M, L) iswctype((C), (M))
|
||||
+# define __towlower_l(C, L) towlower((C))
|
||||
+# define __towupper_l(C, L) towupper((C))
|
||||
+# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
|
||||
+//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T))
|
||||
+# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
|
||||
+# define __wctype_l(S, L) wctype((S))
|
||||
+# endif
|
||||
+
|
||||
#endif // GLIBC 2.3 and later
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -39,20 +39,6 @@
|
||||
#include <langinfo.h>
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
|
||||
-#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
|
||||
-#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
|
||||
-#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
|
||||
-#define __strtof_l(S, E, L) strtof((S), (E))
|
||||
-#define __strtod_l(S, E, L) strtod((S), (E))
|
||||
-#define __strtold_l(S, E, L) strtold((S), (E))
|
||||
-#warning should dummy __newlocale check for C|POSIX ?
|
||||
-#define __newlocale(a, b, c) NULL
|
||||
-#define __freelocale(a) ((void)0)
|
||||
-#define __duplocale(a) __c_locale()
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
template<>
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -36,13 +36,6 @@
|
||||
#include <locale>
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
|
||||
-#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
|
||||
-#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
|
||||
-#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// These are basically extensions to char_traits, and perhaps should
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -43,10 +43,6 @@
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// Construct and return valid pattern consisting of some combination of:
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -41,9 +41,6 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
|
||||
namespace std
|
||||
{
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/time_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/time_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -40,9 +40,6 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
|
||||
namespace std
|
||||
{
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -38,13 +38,6 @@
|
||||
#undef _LIBC
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __wctype_l(S, L) wctype((S))
|
||||
-#define __towupper_l(C, L) towupper((C))
|
||||
-#define __towlower_l(C, L) towlower((C))
|
||||
-#define __iswctype_l(C, M, L) iswctype((C), (M))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// NB: The other ctype<char> specializations are in src/locale.cc and
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc 2006-03-10 15:32:37 +0100
|
||||
@@ -39,13 +39,10 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix gettext stuff
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-extern "C" char *__dcgettext(const char *domainname,
|
||||
- const char *msgid, int category);
|
||||
#undef gettext
|
||||
-#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
|
||||
+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
+#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
|
||||
#else
|
||||
-#undef gettext
|
||||
#define gettext(msgid) (msgid)
|
||||
#endif
|
||||
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-10 15:32:37 +0100
|
||||
@@ -36,15 +36,11 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix prototypes for *textdomain funcs
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-extern "C" char *__textdomain(const char *domainname);
|
||||
-extern "C" char *__bindtextdomain(const char *domainname,
|
||||
- const char *dirname);
|
||||
-#else
|
||||
-#undef __textdomain
|
||||
-#undef __bindtextdomain
|
||||
-#define __textdomain(D) ((void)0)
|
||||
-#define __bindtextdomain(D,P) ((void)0)
|
||||
+#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
+#undef textdomain
|
||||
+#undef bindtextdomain
|
||||
+#define textdomain(D) ((void)0)
|
||||
+#define bindtextdomain(D,P) ((void)0)
|
||||
#endif
|
||||
|
||||
// Non-virtual member functions.
|
||||
@@ -70,7 +66,7 @@
|
||||
messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
|
||||
const char* __dir) const
|
||||
{
|
||||
- __bindtextdomain(__s.c_str(), __dir);
|
||||
+ bindtextdomain(__s.c_str(), __dir);
|
||||
return this->do_open(__s, __loc);
|
||||
}
|
||||
|
||||
@@ -90,7 +86,7 @@
|
||||
{
|
||||
// No error checking is done, assume the catalog exists and can
|
||||
// be used.
|
||||
- __textdomain(__s.c_str());
|
||||
+ textdomain(__s.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-03-10 15:32:37 +0100
|
||||
@@ -68,6 +68,7 @@
|
||||
{
|
||||
extern "C" __typeof(uselocale) __uselocale;
|
||||
}
|
||||
+#define __uselocale uselocale
|
||||
#endif
|
||||
|
||||
namespace std
|
@ -1,48 +0,0 @@
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:37:27 +0100
|
||||
@@ -401,7 +401,7 @@
|
||||
# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
_M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
-# else
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
_M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
# endif
|
||||
@@ -556,7 +556,7 @@
|
||||
# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
_M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
-# else
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
_M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
# endif
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:37:27 +0100
|
||||
@@ -127,12 +127,25 @@
|
||||
{
|
||||
// Named locale.
|
||||
// NB: In the GNU model wchar_t is always 32 bit wide.
|
||||
+#ifdef __UCLIBC_MJN3_ONLY__
|
||||
+#warning fix this... should be numeric
|
||||
+#endif
|
||||
+#ifdef __UCLIBC__
|
||||
+# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
+# endif
|
||||
+#else
|
||||
union { char *__s; wchar_t __w; } __u;
|
||||
__u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
|
||||
_M_data->_M_decimal_point = __u.__w;
|
||||
|
||||
__u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
|
||||
_M_data->_M_thousands_sep = __u.__w;
|
||||
+#endif
|
||||
|
||||
if (_M_data->_M_thousands_sep == L'\0')
|
||||
_M_data->_M_grouping = "";
|
@ -1,347 +0,0 @@
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-10 15:39:14 +0100
|
||||
@@ -46,16 +47,13 @@
|
||||
__convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- float __f = __strtof_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __f;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ float __f = __strtof_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __f;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -63,16 +61,13 @@
|
||||
__convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- double __d = __strtod_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __d;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ double __d = __strtod_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __d;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -80,16 +75,13 @@
|
||||
__convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- long double __ld = __strtold_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __ld;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __ld;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -110,7 +102,7 @@
|
||||
void
|
||||
locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
|
||||
{
|
||||
- if (_S_get_c_locale() != __cloc)
|
||||
+ if (__cloc && _S_get_c_locale() != __cloc)
|
||||
__freelocale(__cloc);
|
||||
}
|
||||
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-10 15:39:14 +0100
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
namespace std
|
||||
@@ -138,20 +143,34 @@
|
||||
ctype<wchar_t>::
|
||||
do_is(mask __m, wchar_t __c) const
|
||||
{
|
||||
- // Highest bitmask in ctype_base == 10, but extra in "C"
|
||||
- // library for blank.
|
||||
+ // The case of __m == ctype_base::space is particularly important,
|
||||
+ // due to its use in many istream functions. Therefore we deal with
|
||||
+ // it first, exploiting the knowledge that on GNU systems _M_bit[5]
|
||||
+ // is the mask corresponding to ctype_base::space. NB: an encoding
|
||||
+ // change would not affect correctness!
|
||||
bool __ret = false;
|
||||
- const size_t __bitmasksize = 11;
|
||||
- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
|
||||
- if (__m & _M_bit[__bitcur]
|
||||
- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
|
||||
- {
|
||||
- __ret = true;
|
||||
- break;
|
||||
- }
|
||||
+ if (__m == _M_bit[5])
|
||||
+ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
|
||||
+ else
|
||||
+ {
|
||||
+ // Highest bitmask in ctype_base == 10, but extra in "C"
|
||||
+ // library for blank.
|
||||
+ const size_t __bitmasksize = 11;
|
||||
+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
|
||||
+ if (__m & _M_bit[__bitcur])
|
||||
+ {
|
||||
+ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
|
||||
+ {
|
||||
+ __ret = true;
|
||||
+ break;
|
||||
+ }
|
||||
+ else if (__m == _M_bit[__bitcur])
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
return __ret;
|
||||
}
|
||||
-
|
||||
+
|
||||
const wchar_t*
|
||||
ctype<wchar_t>::
|
||||
do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h.uclibc200_update~ 2006-03-10 15:32:37 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-10 15:39:14 +0100
|
||||
@@ -47,18 +47,21 @@
|
||||
template<typename _CharT>
|
||||
messages<_CharT>::messages(size_t __refs)
|
||||
: facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
|
||||
- _M_name_messages(_S_get_c_name())
|
||||
+ _M_name_messages(_S_get_c_name())
|
||||
{ }
|
||||
|
||||
template<typename _CharT>
|
||||
messages<_CharT>::messages(__c_locale __cloc, const char* __s,
|
||||
size_t __refs)
|
||||
- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
|
||||
- _M_name_messages(__s)
|
||||
+ : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL)
|
||||
{
|
||||
- char* __tmp = new char[std::strlen(__s) + 1];
|
||||
- std::strcpy(__tmp, __s);
|
||||
+ const size_t __len = std::strlen(__s) + 1;
|
||||
+ char* __tmp = new char[__len];
|
||||
+ std::memcpy(__tmp, __s, __len);
|
||||
_M_name_messages = __tmp;
|
||||
+
|
||||
+ // Last to avoid leaking memory if new throws.
|
||||
+ _M_c_locale_messages = _S_clone_c_locale(__cloc);
|
||||
}
|
||||
|
||||
template<typename _CharT>
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_update~ 2006-03-10 15:37:27 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:39:14 +0100
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
@@ -206,7 +211,7 @@
|
||||
}
|
||||
break;
|
||||
default:
|
||||
- ;
|
||||
+ __ret = pattern();
|
||||
}
|
||||
return __ret;
|
||||
}
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_update~ 2006-03-10 15:37:27 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:39:14 +0100
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
--- gcc/libstdc++-v3/config/locale/uclibc/time_members.h.uclibc200_update~ 2006-03-10 15:06:17 +0100
|
||||
+++ gcc/libstdc++-v3/config/locale/uclibc/time_members.h 2006-03-10 15:39:14 +0100
|
||||
@@ -37,25 +37,33 @@
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(size_t __refs)
|
||||
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(_S_get_c_name())
|
||||
+ _M_name_timepunct(_S_get_c_name())
|
||||
{ _M_initialize_timepunct(); }
|
||||
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
|
||||
: facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(_S_get_c_name())
|
||||
+ _M_name_timepunct(_S_get_c_name())
|
||||
{ _M_initialize_timepunct(); }
|
||||
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
|
||||
size_t __refs)
|
||||
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(__s)
|
||||
+ _M_name_timepunct(NULL)
|
||||
{
|
||||
- char* __tmp = new char[std::strlen(__s) + 1];
|
||||
- std::strcpy(__tmp, __s);
|
||||
+ const size_t __len = std::strlen(__s) + 1;
|
||||
+ char* __tmp = new char[__len];
|
||||
+ std::memcpy(__tmp, __s, __len);
|
||||
_M_name_timepunct = __tmp;
|
||||
- _M_initialize_timepunct(__cloc);
|
||||
+
|
||||
+ try
|
||||
+ { _M_initialize_timepunct(__cloc); }
|
||||
+ catch(...)
|
||||
+ {
|
||||
+ delete [] _M_name_timepunct;
|
||||
+ __throw_exception_again;
|
||||
+ }
|
||||
}
|
||||
|
||||
template<typename _CharT>
|
||||
--- gcc-4.2/libstdc++-v3/config/locale/uclibc/c_locale.h.old 2006-09-28 11:39:00.000000000 +0200
|
||||
+++ gcc-4.2/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-09-28 12:10:41.000000000 +0200
|
||||
@@ -39,21 +39,23 @@
|
||||
#pragma GCC system_header
|
||||
|
||||
#include <cstring> // get std::strlen
|
||||
-#include <cstdio> // get std::snprintf or std::sprintf
|
||||
+#include <cstdio> // get std::vsnprintf or std::vsprintf
|
||||
#include <clocale>
|
||||
#include <langinfo.h> // For codecvt
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix this
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_LOCALE__
|
||||
+#ifdef _GLIBCXX_USE_ICONV
|
||||
#include <iconv.h> // For codecvt using iconv, iconv_t
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-#include <libintl.h> // For messages
|
||||
+#ifdef HAVE_LIBINTL_H
|
||||
+#include <libintl.h> // For messages
|
||||
#endif
|
||||
+#include <cstdarg>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning what is _GLIBCXX_C_LOCALE_GNU for
|
||||
+// psm: used in os/gnu-linux/ctype_noninline.h
|
||||
#endif
|
||||
#define _GLIBCXX_C_LOCALE_GNU 1
|
||||
|
||||
@@ -62,7 +64,7 @@
|
||||
#endif
|
||||
// #define _GLIBCXX_NUM_CATEGORIES 6
|
||||
#define _GLIBCXX_NUM_CATEGORIES 0
|
||||
-
|
||||
+
|
||||
#ifdef __UCLIBC_HAS_XLOCALE__
|
||||
namespace __gnu_cxx
|
||||
{
|
||||
@@ -79,22 +81,24 @@
|
||||
typedef int* __c_locale;
|
||||
#endif
|
||||
|
||||
- // Convert numeric value of type _Tv to string and return length of
|
||||
- // string. If snprintf is available use it, otherwise fall back to
|
||||
- // the unsafe sprintf which, in general, can be dangerous and should
|
||||
+ // Convert numeric value of type double to string and return length of
|
||||
+ // string. If vsnprintf is available use it, otherwise fall back to
|
||||
+ // the unsafe vsprintf which, in general, can be dangerous and should
|
||||
// be avoided.
|
||||
- template<typename _Tv>
|
||||
- int
|
||||
- __convert_from_v(char* __out,
|
||||
- const int __size __attribute__ ((__unused__)),
|
||||
- const char* __fmt,
|
||||
-#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
- _Tv __v, const __c_locale& __cloc, int __prec)
|
||||
+ inline int
|
||||
+ __convert_from_v(const __c_locale&
|
||||
+#ifndef __UCLIBC_HAS_XCLOCALE__
|
||||
+ __cloc __attribute__ ((__unused__))
|
||||
+#endif
|
||||
+ ,
|
||||
+ char* __out,
|
||||
+ const int __size,
|
||||
+ const char* __fmt, ...)
|
||||
{
|
||||
+ va_list __args;
|
||||
+#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
__c_locale __old = __gnu_cxx::__uselocale(__cloc);
|
||||
#else
|
||||
- _Tv __v, const __c_locale&, int __prec)
|
||||
- {
|
||||
# ifdef __UCLIBC_HAS_LOCALE__
|
||||
char* __old = std::setlocale(LC_ALL, NULL);
|
||||
char* __sav = new char[std::strlen(__old) + 1];
|
||||
@@ -103,7 +107,9 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
|
||||
+ va_start(__args, __fmt);
|
||||
+ const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
|
||||
+ va_end(__args);
|
||||
|
||||
#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
__gnu_cxx::__uselocale(__old);
|
@ -1,50 +0,0 @@
|
||||
# DP: Build and install libstdc++_pic.a library.
|
||||
|
||||
--- gcc/libstdc++-v3/src/Makefile.am
|
||||
+++ gcc/libstdc++-v3/src/Makefile.am
|
||||
@@ -214,6 +214,12 @@
|
||||
$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
|
||||
+install-exec-local:
|
||||
+ifeq ($(enable_shared),yes)
|
||||
+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
|
||||
+endif
|
||||
+
|
||||
# Added bits to build debug library.
|
||||
if GLIBCXX_BUILD_DEBUG
|
||||
all-local: build_debug
|
||||
--- gcc/libstdc++-v3/src/Makefile.in
|
||||
+++ gcc/libstdc++-v3/src/Makefile.in
|
||||
@@ -627,7 +627,7 @@
|
||||
|
||||
install-data-am: install-data-local
|
||||
|
||||
-install-exec-am: install-toolexeclibLTLIBRARIES
|
||||
+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
@@ -660,6 +660,7 @@
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-data-local install-exec \
|
||||
+ install-exec-local \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip install-toolexeclibLTLIBRARIES installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
@@ -743,6 +743,13 @@
|
||||
install_debug:
|
||||
(cd ${debugdir} && $(MAKE) \
|
||||
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
|
||||
+
|
||||
+install-exec-local:
|
||||
+ifeq ($(enable_shared),yes)
|
||||
+ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
|
||||
+endif
|
||||
+
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
@ -1,11 +0,0 @@
|
||||
--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
|
||||
+++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
|
||||
@@ -500,7 +500,7 @@
|
||||
#ifdef __linux__
|
||||
# include <features.h>
|
||||
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
|
||||
- && !defined(__ia64__)
|
||||
+ && !defined(__ia64__) && !defined(__UCLIBC__)
|
||||
# ifndef GC_HAVE_BUILTIN_BACKTRACE
|
||||
# define GC_HAVE_BUILTIN_BACKTRACE
|
||||
# endif
|
@ -1,11 +0,0 @@
|
||||
--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500
|
||||
+++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500
|
||||
@@ -142,7 +142,7 @@
|
||||
using ::vsprintf;
|
||||
}
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
|
||||
|
||||
#undef snprintf
|
||||
#undef vfscanf
|
@ -1,12 +0,0 @@
|
||||
--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
|
||||
+++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
|
||||
@@ -7194,6 +7194,9 @@
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <complex.h>
|
||||
+#ifdef __UCLIBC__
|
||||
+#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
|
||||
+#endif
|
||||
int
|
||||
main ()
|
||||
{
|
@ -1,24 +0,0 @@
|
||||
--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100
|
||||
+++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100
|
||||
@@ -59,6 +59,9 @@
|
||||
#include <bits/allocator.h>
|
||||
#include <ext/hash_fun.h>
|
||||
|
||||
+/* cope w/ index defined as macro, SuSv3 proposal */
|
||||
+#undef index
|
||||
+
|
||||
# ifdef __GC
|
||||
# define __GC_CONST const
|
||||
# else
|
||||
--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100
|
||||
+++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100
|
||||
@@ -53,6 +53,9 @@
|
||||
#include <ext/memory> // For uninitialized_copy_n
|
||||
#include <ext/numeric> // For power
|
||||
|
||||
+/* cope w/ index defined as macro, SuSv3 proposal */
|
||||
+#undef index
|
||||
+
|
||||
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
using std::size_t;
|
@ -1,49 +0,0 @@
|
||||
Index: gcc-4.2/libmudflap/mf-hooks2.c
|
||||
===================================================================
|
||||
--- gcc-4.2/libmudflap/mf-hooks2.c (revision 119834)
|
||||
+++ gcc-4.2/libmudflap/mf-hooks2.c (working copy)
|
||||
@@ -427,7 +427,7 @@
|
||||
{
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
|
||||
- bzero (s, n);
|
||||
+ memset (s, 0, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -437,7 +437,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
|
||||
MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
|
||||
- bcopy (src, dest, n);
|
||||
+ memmove (dest, src, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -447,7 +447,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
|
||||
MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
|
||||
- return bcmp (s1, s2, n);
|
||||
+ return n == 0 ? 0 : memcmp (s1, s2, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
|
||||
- return index (s, c);
|
||||
+ return strchr (s, c);
|
||||
}
|
||||
|
||||
|
||||
@@ -465,7 +465,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
|
||||
- return rindex (s, c);
|
||||
+ return strrchr (s, c);
|
||||
}
|
||||
|
||||
/* XXX: stpcpy, memccpy */
|
@ -1,36 +0,0 @@
|
||||
diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h
|
||||
--- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 13:06:56.000000000 +0100
|
||||
+++ gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 15:23:41.000000000 +0100
|
||||
@@ -32,7 +32,8 @@
|
||||
//
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
-
|
||||
+namespace std
|
||||
+{
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix prototypes for *textdomain funcs
|
||||
#endif
|
||||
@@ -115,3 +116,4 @@
|
||||
this->_S_create_c_locale(this->_M_c_locale_messages, __s);
|
||||
}
|
||||
}
|
||||
+}
|
||||
diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h
|
||||
--- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 13:06:56.000000000 +0100
|
||||
+++ gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 15:20:31.000000000 +0100
|
||||
@@ -33,7 +33,8 @@
|
||||
//
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
-
|
||||
+namespace std
|
||||
+{
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(size_t __refs)
|
||||
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
|
||||
@@ -74,3 +75,4 @@
|
||||
delete _M_data;
|
||||
_S_destroy_c_locale(_M_c_locale_timepunct);
|
||||
}
|
||||
+}
|
@ -1,26 +0,0 @@
|
||||
This patch fixes a bug into ostream::operator<<(double) due to the wrong size
|
||||
passed into the __convert_from_v method. The wrong size is then passed to
|
||||
std::snprintf function, that, on uClibc, doens't handle sized 0 buffer.
|
||||
|
||||
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
||||
|
||||
--- gcc-4.2.1/libstdc++-v3/include/bits/locale_facets.tcc 2006-10-17 18:43:47.000000000 +0200
|
||||
+++ gcc-4.2.1-st/libstdc++-v3/include/bits/locale_facets.tcc 2007-08-22 18:54:23.000000000 +0200
|
||||
@@ -1143,7 +1143,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
|
||||
const int __cs_size = __fixed ? __max_exp + __prec + 4
|
||||
: __max_digits * 2 + __prec;
|
||||
char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
|
||||
- __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, __fbuf,
|
||||
+ __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf,
|
||||
__prec, __v);
|
||||
#endif
|
||||
|
||||
@@ -1777,7 +1777,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
|
||||
// max_exponent10 + 1 for the integer part, + 2 for sign and '\0'.
|
||||
const int __cs_size = numeric_limits<long double>::max_exponent10 + 3;
|
||||
char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
|
||||
- int __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, "%.*Lf",
|
||||
+ int __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, "%.*Lf",
|
||||
0, __units);
|
||||
#endif
|
||||
string_type __digits(__len, char_type());
|
@ -1,13 +0,0 @@
|
||||
Index: gcc-4.2/gcc/Makefile.in
|
||||
===================================================================
|
||||
--- gcc-4.2/gcc/Makefile.in (revision 121758)
|
||||
+++ gcc-4.2/gcc/Makefile.in (working copy)
|
||||
@@ -2658,7 +2658,7 @@ mips-tdump.o : mips-tdump.c $(CONFIG_H)
|
||||
# FIXME: writing proper dependencies for this is a *LOT* of work.
|
||||
libbackend.o : $(OBJS-common:.o=.c) $(out_file) \
|
||||
insn-config.h insn-flags.h insn-codes.h insn-constants.h \
|
||||
- insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE)
|
||||
+ insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE) gcov-iov.h
|
||||
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
|
||||
-DTARGET_NAME=\"$(target_noncanonical)\" \
|
||||
-DLOCALEDIR=\"$(localedir)\" \
|
@ -1,67 +0,0 @@
|
||||
By Lennert Buytenhek <buytenh@wantstofly.org>
|
||||
Adds support for arm*b-linux* big-endian ARM targets
|
||||
|
||||
See http://gcc.gnu.org/PR16350
|
||||
|
||||
--- gcc-4.2.0/gcc/config/arm/linux-elf.h
|
||||
+++ gcc-4.2.0/gcc/config/arm/linux-elf.h
|
||||
@@ -28,19 +28,33 @@
|
||||
#undef TARGET_VERSION
|
||||
#define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr);
|
||||
|
||||
+/*
|
||||
+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
|
||||
+ * (big endian) configurations.
|
||||
+ */
|
||||
+#if TARGET_BIG_ENDIAN_DEFAULT
|
||||
+#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
|
||||
+#define TARGET_ENDIAN_OPTION "mbig-endian"
|
||||
+#define TARGET_LINKER_EMULATION "armelfb_linux"
|
||||
+#else
|
||||
+#define TARGET_ENDIAN_DEFAULT 0
|
||||
+#define TARGET_ENDIAN_OPTION "mlittle-endian"
|
||||
+#define TARGET_LINKER_EMULATION "armelf_linux"
|
||||
+#endif
|
||||
+
|
||||
#undef TARGET_DEFAULT_FLOAT_ABI
|
||||
#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
|
||||
|
||||
#undef TARGET_DEFAULT
|
||||
-#define TARGET_DEFAULT (0)
|
||||
+#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
|
||||
|
||||
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
|
||||
|
||||
-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
|
||||
+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
|
||||
|
||||
#undef MULTILIB_DEFAULTS
|
||||
#define MULTILIB_DEFAULTS \
|
||||
- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
|
||||
+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
|
||||
|
||||
/* Now we define the strings used to build the spec file. */
|
||||
#undef LIB_SPEC
|
||||
@@ -61,7 +75,7 @@
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "} \
|
||||
-X \
|
||||
- %{mbig-endian:-EB}" \
|
||||
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
|
||||
SUBTARGET_EXTRA_LINK_SPEC
|
||||
|
||||
#undef LINK_SPEC
|
||||
--- gcc-4.2.0/gcc/config.gcc.orig 2006-09-22 14:53:41.000000000 +0200
|
||||
+++ gcc-4.2.0/gcc/config.gcc 2006-09-25 10:45:21.000000000 +0200
|
||||
@@ -696,6 +696,11 @@
|
||||
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
|
||||
tmake_file="${tmake_file} t-linux arm/t-arm"
|
||||
case ${target} in
|
||||
+ arm*b-*)
|
||||
+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
|
||||
+ ;;
|
||||
+ esac
|
||||
+ case ${target} in
|
||||
arm*-*-linux-*eabi)
|
||||
tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
|
||||
tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
|
@ -1,153 +0,0 @@
|
||||
Hi,
|
||||
|
||||
The attached patch makes sure that we create smaller object code for
|
||||
simple switch statements. We just make sure to flatten the switch
|
||||
statement into an if-else chain, basically.
|
||||
|
||||
This fixes a size-regression as compared to gcc-3.4, as can be seen
|
||||
below.
|
||||
|
||||
2007-04-15 Bernhard Fischer <..>
|
||||
|
||||
* stmt.c (expand_case): Do not create a complex binary tree when
|
||||
optimizing for size but rather use the simple ordered list.
|
||||
(emit_case_nodes): do not emit jumps to the default_label when
|
||||
optimizing for size.
|
||||
|
||||
Not regtested so far.
|
||||
Comments?
|
||||
|
||||
Attached is the test switch.c mentioned below.
|
||||
|
||||
$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do
|
||||
gcc-$i -DCHAIN -Os -o switch-CHAIN-$i.o -c switch.c ;done
|
||||
$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do
|
||||
gcc-$i -UCHAIN -Os -o switch-$i.o -c switch.c ;done
|
||||
|
||||
$ size switch-*.o
|
||||
text data bss dec hex filename
|
||||
169 0 0 169 a9 switch-2.95.o
|
||||
115 0 0 115 73 switch-3.3.o
|
||||
103 0 0 103 67 switch-3.4.o
|
||||
124 0 0 124 7c switch-4.0.o
|
||||
124 0 0 124 7c switch-4.1.o
|
||||
124 0 0 124 7c switch-4.2.orig-HEAD.o
|
||||
95 0 0 95 5f switch-4.3-HEAD.o
|
||||
124 0 0 124 7c switch-4.3.orig-HEAD.o
|
||||
166 0 0 166 a6 switch-CHAIN-2.95.o
|
||||
111 0 0 111 6f switch-CHAIN-3.3.o
|
||||
95 0 0 95 5f switch-CHAIN-3.4.o
|
||||
95 0 0 95 5f switch-CHAIN-4.0.o
|
||||
95 0 0 95 5f switch-CHAIN-4.1.o
|
||||
95 0 0 95 5f switch-CHAIN-4.2.orig-HEAD.o
|
||||
95 0 0 95 5f switch-CHAIN-4.3-HEAD.o
|
||||
95 0 0 95 5f switch-CHAIN-4.3.orig-HEAD.o
|
||||
|
||||
|
||||
Content-Type: text/x-diff; charset=us-ascii
|
||||
Content-Disposition: attachment; filename="gcc-4.3.gcc-flatten-switch-stmt.00.diff"
|
||||
|
||||
Index: gcc-4.2.0/gcc/stmt.c
|
||||
===================================================================
|
||||
--- gcc-4.2.0.orig/gcc/stmt.c (revision 123843)
|
||||
+++ gcc-4.2.0/gcc/stmt.c (working copy)
|
||||
@@ -2517,7 +2517,11 @@ expand_case (tree exp)
|
||||
use_cost_table
|
||||
= (TREE_CODE (orig_type) != ENUMERAL_TYPE
|
||||
&& estimate_case_costs (case_list));
|
||||
- balance_case_nodes (&case_list, NULL);
|
||||
+ /* When optimizing for size, we want a straight list to avoid
|
||||
+ jumps as much as possible. This basically creates an if-else
|
||||
+ chain. */
|
||||
+ if (!optimize_size)
|
||||
+ balance_case_nodes (&case_list, NULL);
|
||||
emit_case_nodes (index, case_list, default_label, index_type);
|
||||
emit_jump (default_label);
|
||||
}
|
||||
@@ -3075,6 +3079,7 @@ emit_case_nodes (rtx index, case_node_pt
|
||||
{
|
||||
if (!node_has_low_bound (node, index_type))
|
||||
{
|
||||
+ if (!optimize_size) /* don't jl to the .default_label. */
|
||||
emit_cmp_and_jump_insns (index,
|
||||
convert_modes
|
||||
(mode, imode,
|
||||
|
||||
|
||||
Content-Type: text/x-csrc; charset=us-ascii
|
||||
Content-Disposition: attachment; filename="switch.c"
|
||||
|
||||
int
|
||||
commutative_tree_code (int code)
|
||||
{
|
||||
#define CASE(val, ret) case val:/* __asm__("# val="#val ",ret="#ret);*/ return ret;
|
||||
#ifndef CHAIN
|
||||
switch (code)
|
||||
{
|
||||
# if 1
|
||||
CASE(1,3)
|
||||
CASE(3,2)
|
||||
CASE(5,8)
|
||||
CASE(7,1)
|
||||
CASE(33,4)
|
||||
CASE(44,9)
|
||||
CASE(55,10)
|
||||
CASE(66,-1)
|
||||
CASE(77,99)
|
||||
CASE(666,0)
|
||||
# else
|
||||
case 1:
|
||||
return 3;
|
||||
case 3:
|
||||
return 2;
|
||||
case 5:
|
||||
return 8;
|
||||
case 7:
|
||||
return 1;
|
||||
case 33:
|
||||
return 4;
|
||||
case 44:
|
||||
return 9;
|
||||
case 55:
|
||||
return 10;
|
||||
case 66:
|
||||
return -1;
|
||||
case 77:
|
||||
return 99;
|
||||
case 666:
|
||||
return 0;
|
||||
# endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 4711;
|
||||
|
||||
#else
|
||||
if (code == 1)
|
||||
return 3;
|
||||
else if (code == 3)
|
||||
return 2;
|
||||
else if (code == 5)
|
||||
return 8;
|
||||
else if (code == 7)
|
||||
return 1;
|
||||
else if (code == 33)
|
||||
return 4;
|
||||
else if (code == 44)
|
||||
return 9;
|
||||
else if (code == 55)
|
||||
return 10;
|
||||
else if (code == 66)
|
||||
return -1;
|
||||
else if (code == 77)
|
||||
return 99;
|
||||
else if (code == 666)
|
||||
return 0;
|
||||
else
|
||||
return 4711;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
--AhhlLboLdkugWU4S--
|
||||
|
@ -1,26 +0,0 @@
|
||||
--- gcc-4.2-20061205/gcc/config/arm/t-linux 2006-12-08 15:18:33.000000000 -0800
|
||||
+++ gcc-4.2-20061205/gcc/config/arm/t-linux 2006-12-08 15:18:33.000000000 -0800
|
||||
@@ -4,7 +4,10 @@
|
||||
LIBGCC2_DEBUG_CFLAGS = -g0
|
||||
|
||||
LIB1ASMSRC = arm/lib1funcs.asm
|
||||
-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
|
||||
+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
|
||||
+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
|
||||
+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
|
||||
+ _fixsfsi _fixunssfsi _floatdidf _floatundidf _floatdisf _floatundisf
|
||||
|
||||
# MULTILIB_OPTIONS = mhard-float/msoft-float
|
||||
# MULTILIB_DIRNAMES = hard-float soft-float
|
||||
|
||||
--- gcc-4.2-20061205/gcc/config/arm/linux-elf.h 2006-12-08 15:18:33.000000000 -0800
|
||||
+++ gcc-4.2-20061205/gcc/config/arm/linux-elf.h 2006-12-08 15:18:33.000000000 -0800
|
||||
@@ -63,7 +63,7 @@
|
||||
%{shared:-lc} \
|
||||
%{!shared:%{profile:-lc_p}%{!profile:-lc}}"
|
||||
|
||||
-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
|
||||
+#define LIBGCC_SPEC "-lgcc"
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
|
@ -1,21 +0,0 @@
|
||||
diff -uNpr gcc-4.2.1_orig/gcc/config/rs6000/darwin-ldouble.c gcc-4.2.1/gcc/config/rs6000/darwin-ldouble.c
|
||||
--- gcc-4.2.1_orig/gcc/config/rs6000/darwin-ldouble.c 2007-03-05 11:54:00.000000000 -0500
|
||||
+++ gcc-4.2.1/gcc/config/rs6000/darwin-ldouble.c 2008-01-31 17:51:24.000000000 -0500
|
||||
@@ -70,6 +70,8 @@ Software Foundation, 51 Franklin Street,
|
||||
but GCC currently generates poor code when a union is used to turn
|
||||
a long double into a pair of doubles. */
|
||||
|
||||
+#if defined (_SOFT_FLOAT) && defined (__LONG_DOUBLE_128__)
|
||||
+
|
||||
long double __gcc_qadd (double, double, double, double);
|
||||
long double __gcc_qsub (double, double, double, double);
|
||||
long double __gcc_qmul (double, double, double, double);
|
||||
@@ -219,8 +221,6 @@ __gcc_qdiv (double a, double b, double c
|
||||
return z.ldval;
|
||||
}
|
||||
|
||||
-#if defined (_SOFT_FLOAT) && defined (__LONG_DOUBLE_128__)
|
||||
-
|
||||
long double __gcc_qneg (double, double);
|
||||
int __gcc_qeq (double, double, double, double);
|
||||
int __gcc_qne (double, double, double, double);
|
@ -1,33 +0,0 @@
|
||||
--- gcc/gcc/config/--- gcc/contrib/regression/objs-gcc.sh
|
||||
+++ gcc/contrib/regression/objs-gcc.sh
|
||||
@@ -105,6 +105,10 @@
|
||||
then
|
||||
make all-gdb all-dejagnu all-ld || exit 1
|
||||
make install-gdb install-dejagnu install-ld || exit 1
|
||||
+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
|
||||
+ then
|
||||
+ make all-gdb all-dejagnu all-ld || exit 1
|
||||
+ make install-gdb install-dejagnu install-ld || exit 1
|
||||
elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
|
||||
make bootstrap || exit 1
|
||||
make install || exit 1
|
||||
--- gcc/libjava/classpath/ltconfig
|
||||
+++ gcc/libjava/classpath/ltconfig
|
||||
@@ -603,7 +603,7 @@
|
||||
|
||||
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
|
||||
case $host_os in
|
||||
-linux-gnu*) ;;
|
||||
+linux-gnu*|linux-uclibc*) ;;
|
||||
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
|
||||
esac
|
||||
|
||||
@@ -1251,7 +1251,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
version_type=linux
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
@ -1,13 +0,0 @@
|
||||
diff -rdup gcc-4.2.1.oorig/gcc/config.gcc gcc-4.2.1/gcc/config.gcc
|
||||
--- gcc-4.2.1.oorig/gcc/config.gcc 2007-10-01 11:52:52.000000000 +0200
|
||||
+++ gcc-4.2.1/gcc/config.gcc 2007-10-01 13:22:12.000000000 +0200
|
||||
@@ -494,6 +494,9 @@ case ${target} in
|
||||
alpha*)
|
||||
tm_file="${cpu_type}/${cpu_type}.h alpha/elf.h alpha/linux.h alpha/linux-elf.h gnu.h ${tm_file}"
|
||||
;;
|
||||
+ i[34567]86-*hurd*-*)
|
||||
+ tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/gnu.h gnu.h ${tm_file}"
|
||||
+ ;;
|
||||
i[34567]86-*-*)
|
||||
tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h gnu.h ${tm_file}"
|
||||
;;
|
@ -1,11 +0,0 @@
|
||||
--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
|
||||
+++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
|
||||
@@ -500,7 +500,7 @@
|
||||
#ifdef __linux__
|
||||
# include <features.h>
|
||||
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
|
||||
- && !defined(__ia64__)
|
||||
+ && !defined(__ia64__) && !defined(__UCLIBC__)
|
||||
# ifndef GC_HAVE_BUILTIN_BACKTRACE
|
||||
# define GC_HAVE_BUILTIN_BACKTRACE
|
||||
# endif
|
@ -1,13 +0,0 @@
|
||||
Index: gcc-4.3.0/libstdc++-v3/include/c_global/cstdio
|
||||
===================================================================
|
||||
--- gcc-4.3.0/libstdc++-v3/include/c_global/cstdio (revision 129202)
|
||||
+++ gcc-4.3.0/libstdc++-v3/include/c_global/cstdio (working copy)
|
||||
@@ -144,7 +144,7 @@
|
||||
|
||||
_GLIBCXX_END_NAMESPACE
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if _GLIBCXX_USE_C99 || defined __UCLIBC__
|
||||
|
||||
#undef snprintf
|
||||
#undef vfscanf
|
@ -1,49 +0,0 @@
|
||||
Index: gcc-4.2/libmudflap/mf-hooks2.c
|
||||
===================================================================
|
||||
--- gcc-4.2/libmudflap/mf-hooks2.c (revision 119834)
|
||||
+++ gcc-4.2/libmudflap/mf-hooks2.c (working copy)
|
||||
@@ -427,7 +427,7 @@
|
||||
{
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
|
||||
- bzero (s, n);
|
||||
+ memset (s, 0, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -437,7 +437,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
|
||||
MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
|
||||
- bcopy (src, dest, n);
|
||||
+ memmove (dest, src, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -447,7 +447,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
|
||||
MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
|
||||
- return bcmp (s1, s2, n);
|
||||
+ return n == 0 ? 0 : memcmp (s1, s2, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
|
||||
- return index (s, c);
|
||||
+ return strchr (s, c);
|
||||
}
|
||||
|
||||
|
||||
@@ -465,7 +465,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
|
||||
- return rindex (s, c);
|
||||
+ return strrchr (s, c);
|
||||
}
|
||||
|
||||
/* XXX: stpcpy, memccpy */
|
@ -1,29 +0,0 @@
|
||||
Index: gcc-4.3.0/gcc/config/arm/t-linux
|
||||
===================================================================
|
||||
--- gcc-4.3.0/gcc/config/arm/t-linux (revision 129896)
|
||||
+++ gcc-4.3.0/gcc/config/arm/t-linux (working copy)
|
||||
@@ -3,7 +3,10 @@
|
||||
TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC
|
||||
|
||||
LIB1ASMSRC = arm/lib1funcs.asm
|
||||
-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
|
||||
+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
|
||||
+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
|
||||
+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
|
||||
+ _fixsfsi _fixunssfsi _floatdidf _floatundidf _floatdisf _floatundisf
|
||||
|
||||
# MULTILIB_OPTIONS = mhard-float/msoft-float
|
||||
# MULTILIB_DIRNAMES = hard-float soft-float
|
||||
Index: gcc-4.3.0/gcc/config/arm/linux-elf.h
|
||||
===================================================================
|
||||
--- gcc-4.3.0/gcc/config/arm/linux-elf.h (revision 129896)
|
||||
+++ gcc-4.3.0/gcc/config/arm/linux-elf.h (working copy)
|
||||
@@ -48,7 +62,7 @@
|
||||
%{shared:-lc} \
|
||||
%{!shared:%{profile:-lc_p}%{!profile:-lc}}"
|
||||
|
||||
-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
|
||||
+#define LIBGCC_SPEC "-lgcc"
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- gcc-4.3.2.orig/gcc/regrename.c 2007-09-09 04:23:47.000000000 +0200
|
||||
+++ gcc-4.3.2/gcc/regrename.c 2009-02-05 10:23:59.000000000 +0100
|
||||
@@ -813,7 +813,7 @@
|
||||
OP_IN, 0);
|
||||
|
||||
for (i = 0; i < recog_data.n_dups; i++)
|
||||
- *recog_data.dup_loc[i] = copy_rtx (old_dups[i]);
|
||||
+ *recog_data.dup_loc[i] = old_dups[i];
|
||||
for (i = 0; i < n_ops; i++)
|
||||
*recog_data.operand_loc[i] = old_operands[i];
|
||||
if (recog_data.n_dups)
|
@ -1,188 +0,0 @@
|
||||
Index: gcc-4.3.2/gcc/tree-scalar-evolution.c
|
||||
===================================================================
|
||||
--- gcc-4.3.2.orig/gcc/tree-scalar-evolution.c 2009-01-28 10:14:37.000000000 +0100
|
||||
+++ gcc-4.3.2/gcc/tree-scalar-evolution.c 2009-01-28 10:17:50.000000000 +0100
|
||||
@@ -2716,6 +2716,50 @@
|
||||
scalar_evolution_info = NULL;
|
||||
}
|
||||
|
||||
+/* Returns true if the expression EXPR is considered to be too expensive
|
||||
+ for scev_const_prop. */
|
||||
+
|
||||
+bool
|
||||
+expression_expensive_p (tree expr)
|
||||
+{
|
||||
+ enum tree_code code;
|
||||
+
|
||||
+ if (is_gimple_val (expr))
|
||||
+ return false;
|
||||
+
|
||||
+ code = TREE_CODE (expr);
|
||||
+ if (code == TRUNC_DIV_EXPR
|
||||
+ || code == CEIL_DIV_EXPR
|
||||
+ || code == FLOOR_DIV_EXPR
|
||||
+ || code == ROUND_DIV_EXPR
|
||||
+ || code == TRUNC_MOD_EXPR
|
||||
+ || code == CEIL_MOD_EXPR
|
||||
+ || code == FLOOR_MOD_EXPR
|
||||
+ || code == ROUND_MOD_EXPR
|
||||
+ || code == EXACT_DIV_EXPR)
|
||||
+ {
|
||||
+ /* Division by power of two is usually cheap, so we allow it.
|
||||
+ Forbid anything else. */
|
||||
+ if (!integer_pow2p (TREE_OPERAND (expr, 1)))
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ switch (TREE_CODE_CLASS (code))
|
||||
+ {
|
||||
+ case tcc_binary:
|
||||
+ case tcc_comparison:
|
||||
+ if (expression_expensive_p (TREE_OPERAND (expr, 1)))
|
||||
+ return true;
|
||||
+
|
||||
+ /* Fallthru. */
|
||||
+ case tcc_unary:
|
||||
+ return expression_expensive_p (TREE_OPERAND (expr, 0));
|
||||
+
|
||||
+ default:
|
||||
+ return true;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/* Replace ssa names for that scev can prove they are constant by the
|
||||
appropriate constants. Also perform final value replacement in loops,
|
||||
in case the replacement expressions are cheap.
|
||||
@@ -2802,12 +2846,6 @@
|
||||
continue;
|
||||
|
||||
niter = number_of_latch_executions (loop);
|
||||
- /* We used to check here whether the computation of NITER is expensive,
|
||||
- and avoided final value elimination if that is the case. The problem
|
||||
- is that it is hard to evaluate whether the expression is too
|
||||
- expensive, as we do not know what optimization opportunities the
|
||||
- the elimination of the final value may reveal. Therefore, we now
|
||||
- eliminate the final values of induction variables unconditionally. */
|
||||
if (niter == chrec_dont_know)
|
||||
continue;
|
||||
|
||||
@@ -2838,7 +2876,15 @@
|
||||
/* Moving the computation from the loop may prolong life range
|
||||
of some ssa names, which may cause problems if they appear
|
||||
on abnormal edges. */
|
||||
- || contains_abnormal_ssa_name_p (def))
|
||||
+ || contains_abnormal_ssa_name_p (def)
|
||||
+ /* Do not emit expensive expressions. The rationale is that
|
||||
+ when someone writes a code like
|
||||
+
|
||||
+ while (n > 45) n -= 45;
|
||||
+
|
||||
+ he probably knows that n is not large, and does not want it
|
||||
+ to be turned into n %= 45. */
|
||||
+ || expression_expensive_p (def))
|
||||
continue;
|
||||
|
||||
/* Eliminate the PHI node and replace it by a computation outside
|
||||
Index: gcc-4.3.2/gcc/tree-scalar-evolution.h
|
||||
===================================================================
|
||||
--- gcc-4.3.2.orig/gcc/tree-scalar-evolution.h 2009-01-28 10:22:47.000000000 +0100
|
||||
+++ gcc-4.3.2/gcc/tree-scalar-evolution.h 2009-01-28 10:23:10.000000000 +0100
|
||||
@@ -35,6 +35,7 @@
|
||||
extern void scev_analysis (void);
|
||||
unsigned int scev_const_prop (void);
|
||||
|
||||
+bool expression_expensive_p (tree);
|
||||
extern bool simple_iv (struct loop *, tree, tree, affine_iv *, bool);
|
||||
|
||||
/* Returns the loop of the polynomial chrec CHREC. */
|
||||
Index: gcc-4.3.2/gcc/testsuite/gcc.dg/pr34027-1.c
|
||||
===================================================================
|
||||
--- gcc-4.3.2.orig/gcc/testsuite/gcc.dg/pr34027-1.c 2009-01-28 10:24:09.000000000 +0100
|
||||
+++ gcc-4.3.2/gcc/testsuite/gcc.dg/pr34027-1.c 2009-01-28 10:24:43.000000000 +0100
|
||||
@@ -8,5 +8,9 @@
|
||||
return ns;
|
||||
}
|
||||
|
||||
-/* { dg-final { scan-tree-dump "ns % 10000" "optimized" } } */
|
||||
+/* This test was originally introduced to test that we transform
|
||||
+ to ns % 10000. See the discussion of PR 32044 why we do not do
|
||||
+ that anymore. */
|
||||
+/* { dg-final { scan-tree-dump-times "%" 0 "optimized" } } */
|
||||
+/* { dg-final { scan-tree-dump-times "/" 0 "optimized" } } */
|
||||
/* { dg-final { cleanup-tree-dump "optimized" } } */
|
||||
Index: gcc-4.3.2/gcc/testsuite/gcc.dg/tree-ssa/pr32044.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gcc-4.3.2/gcc/testsuite/gcc.dg/tree-ssa/pr32044.c 2009-01-28 10:25:50.000000000 +0100
|
||||
@@ -0,0 +1,55 @@
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O2 -fdump-tree-empty -fdump-tree-final_cleanup" } */
|
||||
+
|
||||
+int foo (int n)
|
||||
+{
|
||||
+ while (n >= 45)
|
||||
+ n -= 45;
|
||||
+
|
||||
+ return n;
|
||||
+}
|
||||
+
|
||||
+int bar (int n)
|
||||
+{
|
||||
+ while (n >= 64)
|
||||
+ n -= 64;
|
||||
+
|
||||
+ return n;
|
||||
+}
|
||||
+
|
||||
+int bla (int n)
|
||||
+{
|
||||
+ int i = 0;
|
||||
+
|
||||
+ while (n >= 45)
|
||||
+ {
|
||||
+ i++;
|
||||
+ n -= 45;
|
||||
+ }
|
||||
+
|
||||
+ return i;
|
||||
+}
|
||||
+
|
||||
+int baz (int n)
|
||||
+{
|
||||
+ int i = 0;
|
||||
+
|
||||
+ while (n >= 64)
|
||||
+ {
|
||||
+ i++;
|
||||
+ n -= 64;
|
||||
+ }
|
||||
+
|
||||
+ return i;
|
||||
+}
|
||||
+
|
||||
+/* The loops computing division/modulo by 64 should be eliminated. */
|
||||
+/* { dg-final { scan-tree-dump-times "Removing empty loop" 2 "empty" } } */
|
||||
+
|
||||
+/* There should be no division/modulo in the final dump (division and modulo
|
||||
+ by 64 are done using bit operations). */
|
||||
+/* { dg-final { scan-tree-dump-times "/" 0 "final_cleanup" } } */
|
||||
+/* { dg-final { scan-tree-dump-times "%" 0 "final_cleanup" } } */
|
||||
+
|
||||
+/* { dg-final { cleanup-tree-dump "empty" } } */
|
||||
+/* { dg-final { cleanup-tree-dump "final_cleanup" } } */
|
||||
Index: gcc-4.3.2/gcc/tree-ssa-loop-ivopts.c
|
||||
===================================================================
|
||||
--- gcc-4.3.2.orig/gcc/tree-ssa-loop-ivopts.c 2009-01-28 10:26:04.000000000 +0100
|
||||
+++ gcc-4.3.2/gcc/tree-ssa-loop-ivopts.c 2009-01-28 10:27:09.000000000 +0100
|
||||
@@ -3778,7 +3778,12 @@
|
||||
return false;
|
||||
|
||||
cand_value_at (loop, cand, use->stmt, nit, &bnd);
|
||||
+
|
||||
*bound = aff_combination_to_tree (&bnd);
|
||||
+ /* It is unlikely that computing the number of iterations using division
|
||||
+ would be more profitable than keeping the original induction variable. */
|
||||
+ if (expression_expensive_p (*bound))
|
||||
+ return false;
|
||||
return true;
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
gcc/ChangeLog
|
||||
2007-11-27 Bernhard Fischer <>
|
||||
|
||||
* config/arm/arm-protos.h (arm_vector_mode_supported_p,
|
||||
arm_hard_regno_mode_ok, const_ok_for_arm): Do not hide non-rtx related
|
||||
function prototypes in RTX_CODE.
|
||||
* genopinit.c: Include tm_p.h.
|
||||
|
||||
Index: gcc-4.3.0/gcc/config/arm/arm-protos.h
|
||||
===================================================================
|
||||
--- gcc-4.3.0/gcc/config/arm/arm-protos.h (revision 130463)
|
||||
+++ gcc-4.3.0/gcc/config/arm/arm-protos.h (working copy)
|
||||
@@ -40,15 +40,14 @@
|
||||
unsigned int);
|
||||
extern unsigned int arm_dbx_register_number (unsigned int);
|
||||
extern void arm_output_fn_unwind (FILE *, bool);
|
||||
-
|
||||
|
||||
#ifdef TREE_CODE
|
||||
extern int arm_return_in_memory (const_tree);
|
||||
#endif
|
||||
-#ifdef RTX_CODE
|
||||
extern bool arm_vector_mode_supported_p (enum machine_mode);
|
||||
extern int arm_hard_regno_mode_ok (unsigned int, enum machine_mode);
|
||||
extern int const_ok_for_arm (HOST_WIDE_INT);
|
||||
+#ifdef RTX_CODE
|
||||
extern int arm_split_constant (RTX_CODE, enum machine_mode, rtx,
|
||||
HOST_WIDE_INT, rtx, rtx, int);
|
||||
extern RTX_CODE arm_canonicalize_comparison (RTX_CODE, enum machine_mode,
|
||||
Index: gcc-4.3.0/gcc/genopinit.c
|
||||
===================================================================
|
||||
--- gcc-4.3.0/gcc/genopinit.c (revision 130463)
|
||||
+++ gcc-4.3.0/gcc/genopinit.c (working copy)
|
||||
@@ -486,6 +486,7 @@
|
||||
printf ("#include \"expr.h\"\n");
|
||||
printf ("#include \"optabs.h\"\n");
|
||||
printf ("#include \"reload.h\"\n\n");
|
||||
+ printf ("#include \"tm_p.h\"\n\n");
|
||||
|
||||
printf ("void\ninit_all_optabs (void)\n{\n");
|
||||
|
@ -1,15 +0,0 @@
|
||||
\\\\
|
||||
\\ gcc PR33200
|
||||
Index: gcc-4.3.0/gcc/config.gcc
|
||||
===================================================================
|
||||
--- gcc-4.3.0/gcc/config.gcc (revision 131628)
|
||||
+++ gcc-4.3.0/gcc/config.gcc (working copy)
|
||||
@@ -2302,7 +2305,7 @@ sh-*-symbianelf* | sh[12346l]*-*-symbian
|
||||
if test x${enable_incomplete_targets} = xyes ; then
|
||||
tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1 SUPPORT_SH5_32MEDIA=1 SUPPORT_SH5_32MEDIA_NOFPU=1 SUPPORT_SH5_64MEDIA=1 SUPPORT_SH5_64MEDIA_NOFPU=1"
|
||||
fi
|
||||
- use_fixproto=yes
|
||||
+ # XXX: why? use_fixproto=yes
|
||||
;;
|
||||
sh-*-rtemscoff*)
|
||||
tmake_file="sh/t-sh t-rtems sh/t-rtems"
|
@ -1,86 +0,0 @@
|
||||
gcc svn 142778:
|
||||
|
||||
PR target/37436
|
||||
* arm.c (arm_legitimate_index): Only accept addresses that are in
|
||||
canonical form.
|
||||
* predicates.md (arm_reg_or_extendqisi_mem_op): New predicate.
|
||||
* arm.md (extendqihi2): Use arm_reg_or_extendqisi_mem_op predicate
|
||||
for operand1.
|
||||
(extendqisi2): Likewise.
|
||||
(arm_extendqisi, arm_extendqisi_v6): Use arm_extendqisi_mem_op
|
||||
predicate for operand1.
|
||||
|
||||
diff -Nura gcc-4.3.3.orig/gcc/config/arm/arm.c gcc-4.3.3/gcc/config/arm/arm.c
|
||||
--- gcc-4.3.3.orig/gcc/config/arm/arm.c 2008-06-11 07:52:55.000000000 -0300
|
||||
+++ gcc-4.3.3/gcc/config/arm/arm.c 2009-05-21 16:06:45.000000000 -0300
|
||||
@@ -3769,6 +3769,7 @@
|
||||
rtx xop1 = XEXP (x, 1);
|
||||
|
||||
return ((arm_address_register_rtx_p (xop0, strict_p)
|
||||
+ && GET_CODE(xop1) == CONST_INT
|
||||
&& arm_legitimate_index_p (mode, xop1, outer, strict_p))
|
||||
|| (arm_address_register_rtx_p (xop1, strict_p)
|
||||
&& arm_legitimate_index_p (mode, xop0, outer, strict_p)));
|
||||
diff -Nura gcc-4.3.3.orig/gcc/config/arm/arm.md gcc-4.3.3/gcc/config/arm/arm.md
|
||||
--- gcc-4.3.3.orig/gcc/config/arm/arm.md 2007-09-04 01:44:47.000000000 -0300
|
||||
+++ gcc-4.3.3/gcc/config/arm/arm.md 2009-05-21 16:06:45.000000000 -0300
|
||||
@@ -4199,7 +4199,7 @@
|
||||
|
||||
(define_expand "extendqihi2"
|
||||
[(set (match_dup 2)
|
||||
- (ashift:SI (match_operand:QI 1 "general_operand" "")
|
||||
+ (ashift:SI (match_operand:QI 1 "arm_reg_or_extendqisi_mem_op" "")
|
||||
(const_int 24)))
|
||||
(set (match_operand:HI 0 "s_register_operand" "")
|
||||
(ashiftrt:SI (match_dup 2)
|
||||
@@ -4224,7 +4224,7 @@
|
||||
|
||||
(define_insn "*arm_extendqihi_insn"
|
||||
[(set (match_operand:HI 0 "s_register_operand" "=r")
|
||||
- (sign_extend:HI (match_operand:QI 1 "memory_operand" "Uq")))]
|
||||
+ (sign_extend:HI (match_operand:QI 1 "arm_extendqisi_mem_op" "Uq")))]
|
||||
"TARGET_ARM && arm_arch4"
|
||||
"ldr%(sb%)\\t%0, %1"
|
||||
[(set_attr "type" "load_byte")
|
||||
@@ -4235,7 +4235,7 @@
|
||||
|
||||
(define_expand "extendqisi2"
|
||||
[(set (match_dup 2)
|
||||
- (ashift:SI (match_operand:QI 1 "general_operand" "")
|
||||
+ (ashift:SI (match_operand:QI 1 "arm_reg_or_extendqisi_mem_op" "")
|
||||
(const_int 24)))
|
||||
(set (match_operand:SI 0 "s_register_operand" "")
|
||||
(ashiftrt:SI (match_dup 2)
|
||||
@@ -4267,7 +4267,7 @@
|
||||
|
||||
(define_insn "*arm_extendqisi"
|
||||
[(set (match_operand:SI 0 "s_register_operand" "=r")
|
||||
- (sign_extend:SI (match_operand:QI 1 "memory_operand" "Uq")))]
|
||||
+ (sign_extend:SI (match_operand:QI 1 "arm_extendqisi_mem_op" "Uq")))]
|
||||
"TARGET_ARM && arm_arch4 && !arm_arch6"
|
||||
"ldr%(sb%)\\t%0, %1"
|
||||
[(set_attr "type" "load_byte")
|
||||
@@ -4278,7 +4278,8 @@
|
||||
|
||||
(define_insn "*arm_extendqisi_v6"
|
||||
[(set (match_operand:SI 0 "s_register_operand" "=r,r")
|
||||
- (sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,Uq")))]
|
||||
+ (sign_extend:SI
|
||||
+ (match_operand:QI 1 "arm_reg_or_extendqisi_mem_op" "r,Uq")))]
|
||||
"TARGET_ARM && arm_arch6"
|
||||
"@
|
||||
sxtb%?\\t%0, %1
|
||||
diff -Nura gcc-4.3.3.orig/gcc/config/arm/predicates.md gcc-4.3.3/gcc/config/arm/predicates.md
|
||||
--- gcc-4.3.3.orig/gcc/config/arm/predicates.md 2007-08-02 07:49:31.000000000 -0300
|
||||
+++ gcc-4.3.3/gcc/config/arm/predicates.md 2009-05-21 16:06:45.000000000 -0300
|
||||
@@ -234,6 +234,10 @@
|
||||
(match_test "arm_legitimate_address_p (mode, XEXP (op, 0), SIGN_EXTEND,
|
||||
0)")))
|
||||
|
||||
+(define_special_predicate "arm_reg_or_extendqisi_mem_op"
|
||||
+ (ior (match_operand 0 "arm_extendqisi_mem_op")
|
||||
+ (match_operand 0 "s_register_operand")))
|
||||
+
|
||||
(define_predicate "power_of_two_operand"
|
||||
(match_code "const_int")
|
||||
{
|
@ -1,18 +0,0 @@
|
||||
\\\\ followup of PR34205; trying to use aapcs-linux
|
||||
\\ gcc/ChangeLog
|
||||
\\
|
||||
\\ 2008-09-18 Bernhard Reutner-Fischer <aldot@>
|
||||
\\
|
||||
\\ * config.gcc (arm*-*-*): Add aapcs-linux to supported ABIs.
|
||||
\\
|
||||
--- gcc-4.3.2.orig/gcc/config.gcc 2008-09-18 20:33:55.000000000 +0200
|
||||
+++ gcc-4.3.2/gcc/config.gcc 2008-09-18 21:38:52.000000000 +0200
|
||||
@@ -2921,7 +2921,7 @@
|
||||
|
||||
case "$with_abi" in
|
||||
"" \
|
||||
- | apcs-gnu | atpcs | aapcs | iwmmxt )
|
||||
+ | apcs-gnu | atpcs | aapcs | iwmmxt | aapcs-linux )
|
||||
#OK
|
||||
;;
|
||||
*)
|
@ -1,13 +0,0 @@
|
||||
diff -urN gcc-4.3.1.orig/gcc/config/cris/cris.h gcc-4.3.1/gcc/config/cris/cris.h
|
||||
--- gcc-4.3.1.orig/gcc/config/cris/cris.h 2008-02-22 12:11:01.000000000 +0100
|
||||
+++ gcc-4.3.1/gcc/config/cris/cris.h 2008-07-02 10:42:42.000000000 +0200
|
||||
@@ -1529,9 +1529,6 @@
|
||||
|
||||
#define NO_IMPLICIT_EXTERN_C
|
||||
|
||||
-/* No specific purpose other than warningless compatibility. */
|
||||
-#define HANDLE_PRAGMA_PACK_PUSH_POP 1
|
||||
-
|
||||
/*
|
||||
* Local variables:
|
||||
* eval: (c-set-style "gnu")
|
@ -1,33 +0,0 @@
|
||||
--- gcc/gcc/config/--- gcc/contrib/regression/objs-gcc.sh
|
||||
+++ gcc/contrib/regression/objs-gcc.sh
|
||||
@@ -105,6 +105,10 @@
|
||||
then
|
||||
make all-gdb all-dejagnu all-ld || exit 1
|
||||
make install-gdb install-dejagnu install-ld || exit 1
|
||||
+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
|
||||
+ then
|
||||
+ make all-gdb all-dejagnu all-ld || exit 1
|
||||
+ make install-gdb install-dejagnu install-ld || exit 1
|
||||
elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
|
||||
make bootstrap || exit 1
|
||||
make install || exit 1
|
||||
--- gcc/libjava/classpath/ltconfig
|
||||
+++ gcc/libjava/classpath/ltconfig
|
||||
@@ -603,7 +603,7 @@
|
||||
|
||||
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
|
||||
case $host_os in
|
||||
-linux-gnu*) ;;
|
||||
+linux-gnu*|linux-uclibc*) ;;
|
||||
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
|
||||
esac
|
||||
|
||||
@@ -1251,7 +1251,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
version_type=linux
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
@ -1,13 +0,0 @@
|
||||
diff -rdup gcc-4.2.1.oorig/gcc/config.gcc gcc-4.2.1/gcc/config.gcc
|
||||
--- gcc-4.2.1.oorig/gcc/config.gcc 2007-10-01 11:52:52.000000000 +0200
|
||||
+++ gcc-4.2.1/gcc/config.gcc 2007-10-01 13:22:12.000000000 +0200
|
||||
@@ -494,6 +494,9 @@ case ${target} in
|
||||
alpha*)
|
||||
tm_file="${cpu_type}/${cpu_type}.h alpha/elf.h alpha/linux.h alpha/linux-elf.h gnu.h ${tm_file}"
|
||||
;;
|
||||
+ i[34567]86-*hurd*-*)
|
||||
+ tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/gnu.h gnu.h ${tm_file}"
|
||||
+ ;;
|
||||
i[34567]86-*-*)
|
||||
tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h gnu.h ${tm_file}"
|
||||
;;
|
@ -1,11 +0,0 @@
|
||||
--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
|
||||
+++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
|
||||
@@ -500,7 +500,7 @@
|
||||
#ifdef __linux__
|
||||
# include <features.h>
|
||||
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
|
||||
- && !defined(__ia64__)
|
||||
+ && !defined(__ia64__) && !defined(__UCLIBC__)
|
||||
# ifndef GC_HAVE_BUILTIN_BACKTRACE
|
||||
# define GC_HAVE_BUILTIN_BACKTRACE
|
||||
# endif
|
@ -1,13 +0,0 @@
|
||||
Index: gcc-4.3.0/libstdc++-v3/include/c_global/cstdio
|
||||
===================================================================
|
||||
--- gcc-4.3.0/libstdc++-v3/include/c_global/cstdio (revision 129202)
|
||||
+++ gcc-4.3.0/libstdc++-v3/include/c_global/cstdio (working copy)
|
||||
@@ -144,7 +144,7 @@
|
||||
|
||||
_GLIBCXX_END_NAMESPACE
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if _GLIBCXX_USE_C99 || defined __UCLIBC__
|
||||
|
||||
#undef snprintf
|
||||
#undef vfscanf
|
@ -1,49 +0,0 @@
|
||||
Index: gcc-4.2/libmudflap/mf-hooks2.c
|
||||
===================================================================
|
||||
--- gcc-4.2/libmudflap/mf-hooks2.c (revision 119834)
|
||||
+++ gcc-4.2/libmudflap/mf-hooks2.c (working copy)
|
||||
@@ -427,7 +427,7 @@
|
||||
{
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
|
||||
- bzero (s, n);
|
||||
+ memset (s, 0, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -437,7 +437,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
|
||||
MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
|
||||
- bcopy (src, dest, n);
|
||||
+ memmove (dest, src, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -447,7 +447,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
|
||||
MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
|
||||
- return bcmp (s1, s2, n);
|
||||
+ return n == 0 ? 0 : memcmp (s1, s2, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
|
||||
- return index (s, c);
|
||||
+ return strchr (s, c);
|
||||
}
|
||||
|
||||
|
||||
@@ -465,7 +465,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
|
||||
- return rindex (s, c);
|
||||
+ return strrchr (s, c);
|
||||
}
|
||||
|
||||
/* XXX: stpcpy, memccpy */
|
@ -1,29 +0,0 @@
|
||||
Index: gcc-4.3.0/gcc/config/arm/t-linux
|
||||
===================================================================
|
||||
--- gcc-4.3.0/gcc/config/arm/t-linux (revision 129896)
|
||||
+++ gcc-4.3.0/gcc/config/arm/t-linux (working copy)
|
||||
@@ -3,7 +3,10 @@
|
||||
TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC
|
||||
|
||||
LIB1ASMSRC = arm/lib1funcs.asm
|
||||
-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
|
||||
+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
|
||||
+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
|
||||
+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
|
||||
+ _fixsfsi _fixunssfsi _floatdidf _floatundidf _floatdisf _floatundisf
|
||||
|
||||
# MULTILIB_OPTIONS = mhard-float/msoft-float
|
||||
# MULTILIB_DIRNAMES = hard-float soft-float
|
||||
Index: gcc-4.3.0/gcc/config/arm/linux-elf.h
|
||||
===================================================================
|
||||
--- gcc-4.3.0/gcc/config/arm/linux-elf.h (revision 129896)
|
||||
+++ gcc-4.3.0/gcc/config/arm/linux-elf.h (working copy)
|
||||
@@ -48,7 +62,7 @@
|
||||
%{shared:-lc} \
|
||||
%{!shared:%{profile:-lc_p}%{!profile:-lc}}"
|
||||
|
||||
-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
|
||||
+#define LIBGCC_SPEC "-lgcc"
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- gcc-4.3.2.orig/gcc/regrename.c 2007-09-09 04:23:47.000000000 +0200
|
||||
+++ gcc-4.3.2/gcc/regrename.c 2009-02-05 10:23:59.000000000 +0100
|
||||
@@ -813,7 +813,7 @@
|
||||
OP_IN, 0);
|
||||
|
||||
for (i = 0; i < recog_data.n_dups; i++)
|
||||
- *recog_data.dup_loc[i] = copy_rtx (old_dups[i]);
|
||||
+ *recog_data.dup_loc[i] = old_dups[i];
|
||||
for (i = 0; i < n_ops; i++)
|
||||
*recog_data.operand_loc[i] = old_operands[i];
|
||||
if (recog_data.n_dups)
|
@ -1,188 +0,0 @@
|
||||
Index: gcc-4.3.2/gcc/tree-scalar-evolution.c
|
||||
===================================================================
|
||||
--- gcc-4.3.2.orig/gcc/tree-scalar-evolution.c 2009-01-28 10:14:37.000000000 +0100
|
||||
+++ gcc-4.3.2/gcc/tree-scalar-evolution.c 2009-01-28 10:17:50.000000000 +0100
|
||||
@@ -2716,6 +2716,50 @@
|
||||
scalar_evolution_info = NULL;
|
||||
}
|
||||
|
||||
+/* Returns true if the expression EXPR is considered to be too expensive
|
||||
+ for scev_const_prop. */
|
||||
+
|
||||
+bool
|
||||
+expression_expensive_p (tree expr)
|
||||
+{
|
||||
+ enum tree_code code;
|
||||
+
|
||||
+ if (is_gimple_val (expr))
|
||||
+ return false;
|
||||
+
|
||||
+ code = TREE_CODE (expr);
|
||||
+ if (code == TRUNC_DIV_EXPR
|
||||
+ || code == CEIL_DIV_EXPR
|
||||
+ || code == FLOOR_DIV_EXPR
|
||||
+ || code == ROUND_DIV_EXPR
|
||||
+ || code == TRUNC_MOD_EXPR
|
||||
+ || code == CEIL_MOD_EXPR
|
||||
+ || code == FLOOR_MOD_EXPR
|
||||
+ || code == ROUND_MOD_EXPR
|
||||
+ || code == EXACT_DIV_EXPR)
|
||||
+ {
|
||||
+ /* Division by power of two is usually cheap, so we allow it.
|
||||
+ Forbid anything else. */
|
||||
+ if (!integer_pow2p (TREE_OPERAND (expr, 1)))
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ switch (TREE_CODE_CLASS (code))
|
||||
+ {
|
||||
+ case tcc_binary:
|
||||
+ case tcc_comparison:
|
||||
+ if (expression_expensive_p (TREE_OPERAND (expr, 1)))
|
||||
+ return true;
|
||||
+
|
||||
+ /* Fallthru. */
|
||||
+ case tcc_unary:
|
||||
+ return expression_expensive_p (TREE_OPERAND (expr, 0));
|
||||
+
|
||||
+ default:
|
||||
+ return true;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/* Replace ssa names for that scev can prove they are constant by the
|
||||
appropriate constants. Also perform final value replacement in loops,
|
||||
in case the replacement expressions are cheap.
|
||||
@@ -2802,12 +2846,6 @@
|
||||
continue;
|
||||
|
||||
niter = number_of_latch_executions (loop);
|
||||
- /* We used to check here whether the computation of NITER is expensive,
|
||||
- and avoided final value elimination if that is the case. The problem
|
||||
- is that it is hard to evaluate whether the expression is too
|
||||
- expensive, as we do not know what optimization opportunities the
|
||||
- the elimination of the final value may reveal. Therefore, we now
|
||||
- eliminate the final values of induction variables unconditionally. */
|
||||
if (niter == chrec_dont_know)
|
||||
continue;
|
||||
|
||||
@@ -2838,7 +2876,15 @@
|
||||
/* Moving the computation from the loop may prolong life range
|
||||
of some ssa names, which may cause problems if they appear
|
||||
on abnormal edges. */
|
||||
- || contains_abnormal_ssa_name_p (def))
|
||||
+ || contains_abnormal_ssa_name_p (def)
|
||||
+ /* Do not emit expensive expressions. The rationale is that
|
||||
+ when someone writes a code like
|
||||
+
|
||||
+ while (n > 45) n -= 45;
|
||||
+
|
||||
+ he probably knows that n is not large, and does not want it
|
||||
+ to be turned into n %= 45. */
|
||||
+ || expression_expensive_p (def))
|
||||
continue;
|
||||
|
||||
/* Eliminate the PHI node and replace it by a computation outside
|
||||
Index: gcc-4.3.2/gcc/tree-scalar-evolution.h
|
||||
===================================================================
|
||||
--- gcc-4.3.2.orig/gcc/tree-scalar-evolution.h 2009-01-28 10:22:47.000000000 +0100
|
||||
+++ gcc-4.3.2/gcc/tree-scalar-evolution.h 2009-01-28 10:23:10.000000000 +0100
|
||||
@@ -35,6 +35,7 @@
|
||||
extern void scev_analysis (void);
|
||||
unsigned int scev_const_prop (void);
|
||||
|
||||
+bool expression_expensive_p (tree);
|
||||
extern bool simple_iv (struct loop *, tree, tree, affine_iv *, bool);
|
||||
|
||||
/* Returns the loop of the polynomial chrec CHREC. */
|
||||
Index: gcc-4.3.2/gcc/testsuite/gcc.dg/pr34027-1.c
|
||||
===================================================================
|
||||
--- gcc-4.3.2.orig/gcc/testsuite/gcc.dg/pr34027-1.c 2009-01-28 10:24:09.000000000 +0100
|
||||
+++ gcc-4.3.2/gcc/testsuite/gcc.dg/pr34027-1.c 2009-01-28 10:24:43.000000000 +0100
|
||||
@@ -8,5 +8,9 @@
|
||||
return ns;
|
||||
}
|
||||
|
||||
-/* { dg-final { scan-tree-dump "ns % 10000" "optimized" } } */
|
||||
+/* This test was originally introduced to test that we transform
|
||||
+ to ns % 10000. See the discussion of PR 32044 why we do not do
|
||||
+ that anymore. */
|
||||
+/* { dg-final { scan-tree-dump-times "%" 0 "optimized" } } */
|
||||
+/* { dg-final { scan-tree-dump-times "/" 0 "optimized" } } */
|
||||
/* { dg-final { cleanup-tree-dump "optimized" } } */
|
||||
Index: gcc-4.3.2/gcc/testsuite/gcc.dg/tree-ssa/pr32044.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ gcc-4.3.2/gcc/testsuite/gcc.dg/tree-ssa/pr32044.c 2009-01-28 10:25:50.000000000 +0100
|
||||
@@ -0,0 +1,55 @@
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O2 -fdump-tree-empty -fdump-tree-final_cleanup" } */
|
||||
+
|
||||
+int foo (int n)
|
||||
+{
|
||||
+ while (n >= 45)
|
||||
+ n -= 45;
|
||||
+
|
||||
+ return n;
|
||||
+}
|
||||
+
|
||||
+int bar (int n)
|
||||
+{
|
||||
+ while (n >= 64)
|
||||
+ n -= 64;
|
||||
+
|
||||
+ return n;
|
||||
+}
|
||||
+
|
||||
+int bla (int n)
|
||||
+{
|
||||
+ int i = 0;
|
||||
+
|
||||
+ while (n >= 45)
|
||||
+ {
|
||||
+ i++;
|
||||
+ n -= 45;
|
||||
+ }
|
||||
+
|
||||
+ return i;
|
||||
+}
|
||||
+
|
||||
+int baz (int n)
|
||||
+{
|
||||
+ int i = 0;
|
||||
+
|
||||
+ while (n >= 64)
|
||||
+ {
|
||||
+ i++;
|
||||
+ n -= 64;
|
||||
+ }
|
||||
+
|
||||
+ return i;
|
||||
+}
|
||||
+
|
||||
+/* The loops computing division/modulo by 64 should be eliminated. */
|
||||
+/* { dg-final { scan-tree-dump-times "Removing empty loop" 2 "empty" } } */
|
||||
+
|
||||
+/* There should be no division/modulo in the final dump (division and modulo
|
||||
+ by 64 are done using bit operations). */
|
||||
+/* { dg-final { scan-tree-dump-times "/" 0 "final_cleanup" } } */
|
||||
+/* { dg-final { scan-tree-dump-times "%" 0 "final_cleanup" } } */
|
||||
+
|
||||
+/* { dg-final { cleanup-tree-dump "empty" } } */
|
||||
+/* { dg-final { cleanup-tree-dump "final_cleanup" } } */
|
||||
Index: gcc-4.3.2/gcc/tree-ssa-loop-ivopts.c
|
||||
===================================================================
|
||||
--- gcc-4.3.2.orig/gcc/tree-ssa-loop-ivopts.c 2009-01-28 10:26:04.000000000 +0100
|
||||
+++ gcc-4.3.2/gcc/tree-ssa-loop-ivopts.c 2009-01-28 10:27:09.000000000 +0100
|
||||
@@ -3778,7 +3778,12 @@
|
||||
return false;
|
||||
|
||||
cand_value_at (loop, cand, use->stmt, nit, &bnd);
|
||||
+
|
||||
*bound = aff_combination_to_tree (&bnd);
|
||||
+ /* It is unlikely that computing the number of iterations using division
|
||||
+ would be more profitable than keeping the original induction variable. */
|
||||
+ if (expression_expensive_p (*bound))
|
||||
+ return false;
|
||||
return true;
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
gcc/ChangeLog
|
||||
2007-11-27 Bernhard Fischer <>
|
||||
|
||||
* config/arm/arm-protos.h (arm_vector_mode_supported_p,
|
||||
arm_hard_regno_mode_ok, const_ok_for_arm): Do not hide non-rtx related
|
||||
function prototypes in RTX_CODE.
|
||||
* genopinit.c: Include tm_p.h.
|
||||
|
||||
Index: gcc-4.3.0/gcc/config/arm/arm-protos.h
|
||||
===================================================================
|
||||
--- gcc-4.3.0/gcc/config/arm/arm-protos.h (revision 130463)
|
||||
+++ gcc-4.3.0/gcc/config/arm/arm-protos.h (working copy)
|
||||
@@ -40,15 +40,14 @@
|
||||
unsigned int);
|
||||
extern unsigned int arm_dbx_register_number (unsigned int);
|
||||
extern void arm_output_fn_unwind (FILE *, bool);
|
||||
-
|
||||
|
||||
#ifdef TREE_CODE
|
||||
extern int arm_return_in_memory (const_tree);
|
||||
#endif
|
||||
-#ifdef RTX_CODE
|
||||
extern bool arm_vector_mode_supported_p (enum machine_mode);
|
||||
extern int arm_hard_regno_mode_ok (unsigned int, enum machine_mode);
|
||||
extern int const_ok_for_arm (HOST_WIDE_INT);
|
||||
+#ifdef RTX_CODE
|
||||
extern int arm_split_constant (RTX_CODE, enum machine_mode, rtx,
|
||||
HOST_WIDE_INT, rtx, rtx, int);
|
||||
extern RTX_CODE arm_canonicalize_comparison (RTX_CODE, enum machine_mode,
|
||||
Index: gcc-4.3.0/gcc/genopinit.c
|
||||
===================================================================
|
||||
--- gcc-4.3.0/gcc/genopinit.c (revision 130463)
|
||||
+++ gcc-4.3.0/gcc/genopinit.c (working copy)
|
||||
@@ -486,6 +486,7 @@
|
||||
printf ("#include \"expr.h\"\n");
|
||||
printf ("#include \"optabs.h\"\n");
|
||||
printf ("#include \"reload.h\"\n\n");
|
||||
+ printf ("#include \"tm_p.h\"\n\n");
|
||||
|
||||
printf ("void\ninit_all_optabs (void)\n{\n");
|
||||
|
@ -1,15 +0,0 @@
|
||||
\\\\
|
||||
\\ gcc PR33200
|
||||
Index: gcc-4.3.0/gcc/config.gcc
|
||||
===================================================================
|
||||
--- gcc-4.3.0/gcc/config.gcc (revision 131628)
|
||||
+++ gcc-4.3.0/gcc/config.gcc (working copy)
|
||||
@@ -2302,7 +2305,7 @@ sh-*-symbianelf* | sh[12346l]*-*-symbian
|
||||
if test x${enable_incomplete_targets} = xyes ; then
|
||||
tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1 SUPPORT_SH5_32MEDIA=1 SUPPORT_SH5_32MEDIA_NOFPU=1 SUPPORT_SH5_64MEDIA=1 SUPPORT_SH5_64MEDIA_NOFPU=1"
|
||||
fi
|
||||
- use_fixproto=yes
|
||||
+ # XXX: why? use_fixproto=yes
|
||||
;;
|
||||
sh-*-rtemscoff*)
|
||||
tmake_file="sh/t-sh t-rtems sh/t-rtems"
|
@ -1,18 +0,0 @@
|
||||
\\\\ followup of PR34205; trying to use aapcs-linux
|
||||
\\ gcc/ChangeLog
|
||||
\\
|
||||
\\ 2008-09-18 Bernhard Reutner-Fischer <aldot@>
|
||||
\\
|
||||
\\ * config.gcc (arm*-*-*): Add aapcs-linux to supported ABIs.
|
||||
\\
|
||||
--- gcc-4.3.2.orig/gcc/config.gcc 2008-09-18 20:33:55.000000000 +0200
|
||||
+++ gcc-4.3.2/gcc/config.gcc 2008-09-18 21:38:52.000000000 +0200
|
||||
@@ -2921,7 +2921,7 @@
|
||||
|
||||
case "$with_abi" in
|
||||
"" \
|
||||
- | apcs-gnu | atpcs | aapcs | iwmmxt )
|
||||
+ | apcs-gnu | atpcs | aapcs | iwmmxt | aapcs-linux )
|
||||
#OK
|
||||
;;
|
||||
*)
|
@ -1,86 +0,0 @@
|
||||
gcc svn 142778:
|
||||
|
||||
PR target/37436
|
||||
* arm.c (arm_legitimate_index): Only accept addresses that are in
|
||||
canonical form.
|
||||
* predicates.md (arm_reg_or_extendqisi_mem_op): New predicate.
|
||||
* arm.md (extendqihi2): Use arm_reg_or_extendqisi_mem_op predicate
|
||||
for operand1.
|
||||
(extendqisi2): Likewise.
|
||||
(arm_extendqisi, arm_extendqisi_v6): Use arm_extendqisi_mem_op
|
||||
predicate for operand1.
|
||||
|
||||
diff -Nura gcc-4.3.3.orig/gcc/config/arm/arm.c gcc-4.3.3/gcc/config/arm/arm.c
|
||||
--- gcc-4.3.3.orig/gcc/config/arm/arm.c 2008-06-11 07:52:55.000000000 -0300
|
||||
+++ gcc-4.3.3/gcc/config/arm/arm.c 2009-05-21 16:06:45.000000000 -0300
|
||||
@@ -3769,6 +3769,7 @@
|
||||
rtx xop1 = XEXP (x, 1);
|
||||
|
||||
return ((arm_address_register_rtx_p (xop0, strict_p)
|
||||
+ && GET_CODE(xop1) == CONST_INT
|
||||
&& arm_legitimate_index_p (mode, xop1, outer, strict_p))
|
||||
|| (arm_address_register_rtx_p (xop1, strict_p)
|
||||
&& arm_legitimate_index_p (mode, xop0, outer, strict_p)));
|
||||
diff -Nura gcc-4.3.3.orig/gcc/config/arm/arm.md gcc-4.3.3/gcc/config/arm/arm.md
|
||||
--- gcc-4.3.3.orig/gcc/config/arm/arm.md 2007-09-04 01:44:47.000000000 -0300
|
||||
+++ gcc-4.3.3/gcc/config/arm/arm.md 2009-05-21 16:06:45.000000000 -0300
|
||||
@@ -4199,7 +4199,7 @@
|
||||
|
||||
(define_expand "extendqihi2"
|
||||
[(set (match_dup 2)
|
||||
- (ashift:SI (match_operand:QI 1 "general_operand" "")
|
||||
+ (ashift:SI (match_operand:QI 1 "arm_reg_or_extendqisi_mem_op" "")
|
||||
(const_int 24)))
|
||||
(set (match_operand:HI 0 "s_register_operand" "")
|
||||
(ashiftrt:SI (match_dup 2)
|
||||
@@ -4224,7 +4224,7 @@
|
||||
|
||||
(define_insn "*arm_extendqihi_insn"
|
||||
[(set (match_operand:HI 0 "s_register_operand" "=r")
|
||||
- (sign_extend:HI (match_operand:QI 1 "memory_operand" "Uq")))]
|
||||
+ (sign_extend:HI (match_operand:QI 1 "arm_extendqisi_mem_op" "Uq")))]
|
||||
"TARGET_ARM && arm_arch4"
|
||||
"ldr%(sb%)\\t%0, %1"
|
||||
[(set_attr "type" "load_byte")
|
||||
@@ -4235,7 +4235,7 @@
|
||||
|
||||
(define_expand "extendqisi2"
|
||||
[(set (match_dup 2)
|
||||
- (ashift:SI (match_operand:QI 1 "general_operand" "")
|
||||
+ (ashift:SI (match_operand:QI 1 "arm_reg_or_extendqisi_mem_op" "")
|
||||
(const_int 24)))
|
||||
(set (match_operand:SI 0 "s_register_operand" "")
|
||||
(ashiftrt:SI (match_dup 2)
|
||||
@@ -4267,7 +4267,7 @@
|
||||
|
||||
(define_insn "*arm_extendqisi"
|
||||
[(set (match_operand:SI 0 "s_register_operand" "=r")
|
||||
- (sign_extend:SI (match_operand:QI 1 "memory_operand" "Uq")))]
|
||||
+ (sign_extend:SI (match_operand:QI 1 "arm_extendqisi_mem_op" "Uq")))]
|
||||
"TARGET_ARM && arm_arch4 && !arm_arch6"
|
||||
"ldr%(sb%)\\t%0, %1"
|
||||
[(set_attr "type" "load_byte")
|
||||
@@ -4278,7 +4278,8 @@
|
||||
|
||||
(define_insn "*arm_extendqisi_v6"
|
||||
[(set (match_operand:SI 0 "s_register_operand" "=r,r")
|
||||
- (sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,Uq")))]
|
||||
+ (sign_extend:SI
|
||||
+ (match_operand:QI 1 "arm_reg_or_extendqisi_mem_op" "r,Uq")))]
|
||||
"TARGET_ARM && arm_arch6"
|
||||
"@
|
||||
sxtb%?\\t%0, %1
|
||||
diff -Nura gcc-4.3.3.orig/gcc/config/arm/predicates.md gcc-4.3.3/gcc/config/arm/predicates.md
|
||||
--- gcc-4.3.3.orig/gcc/config/arm/predicates.md 2007-08-02 07:49:31.000000000 -0300
|
||||
+++ gcc-4.3.3/gcc/config/arm/predicates.md 2009-05-21 16:06:45.000000000 -0300
|
||||
@@ -234,6 +234,10 @@
|
||||
(match_test "arm_legitimate_address_p (mode, XEXP (op, 0), SIGN_EXTEND,
|
||||
0)")))
|
||||
|
||||
+(define_special_predicate "arm_reg_or_extendqisi_mem_op"
|
||||
+ (ior (match_operand 0 "arm_extendqisi_mem_op")
|
||||
+ (match_operand 0 "s_register_operand")))
|
||||
+
|
||||
(define_predicate "power_of_two_operand"
|
||||
(match_code "const_int")
|
||||
{
|
@ -1,13 +0,0 @@
|
||||
diff -urN gcc-4.3.1.orig/gcc/config/cris/cris.h gcc-4.3.1/gcc/config/cris/cris.h
|
||||
--- gcc-4.3.1.orig/gcc/config/cris/cris.h 2008-02-22 12:11:01.000000000 +0100
|
||||
+++ gcc-4.3.1/gcc/config/cris/cris.h 2008-07-02 10:42:42.000000000 +0200
|
||||
@@ -1529,9 +1529,6 @@
|
||||
|
||||
#define NO_IMPLICIT_EXTERN_C
|
||||
|
||||
-/* No specific purpose other than warningless compatibility. */
|
||||
-#define HANDLE_PRAGMA_PACK_PUSH_POP 1
|
||||
-
|
||||
/*
|
||||
* Local variables:
|
||||
* eval: (c-set-style "gnu")
|
@ -1,125 +0,0 @@
|
||||
See: http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00237.html
|
||||
Patch by: Bernhard Reutner-Fischer
|
||||
|
||||
--- gcc-4.3.3/gcc/config/t-slibgcc-elf-ver 2005-02-20 00:44:10.000000000 +1300
|
||||
+++ gcc-4.3.3-p/gcc/config/t-slibgcc-elf-ver 2009-05-06 07:05:50.000000000 +1200
|
||||
@@ -9,7 +9,7 @@
|
||||
SHLIB_OBJS = @shlib_objs@
|
||||
SHLIB_DIR = @multilib_dir@
|
||||
SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
|
||||
-SHLIB_LC = -lc
|
||||
+SHLIB_LC = @libgcc_libm@ -lc
|
||||
|
||||
SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
|
||||
-Wl,--soname=$(SHLIB_SONAME) \
|
||||
--- gcc-4.3.3/libgcc/configure 2008-11-21 06:09:53.000000000 +1300
|
||||
+++ gcc-4.3.3-p/libgcc/configure 2009-05-06 07:05:50.000000000 +1200
|
||||
@@ -272,7 +272,7 @@
|
||||
PACKAGE_BUGREPORT=''
|
||||
|
||||
ac_unique_file="static-object.mk"
|
||||
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libgcc_topdir enable_shared slibdir INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK build build_cpu build_vendor build_os host host_cpu host_vendor host_os host_noncanonical build_libsubdir build_subdir host_subdir target_subdir AR ac_ct_AR LIPO ac_ct_LIPO NM ac_ct_NM RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP decimal_float enable_decimal_float fixed_point vis_hide set_have_cc_tls tmake_file extra_parts asm_hidden_op LIBOBJS LTLIBOBJS'
|
||||
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libgcc_topdir enable_shared slibdir INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK build build_cpu build_vendor build_os host host_cpu host_vendor host_os host_noncanonical build_libsubdir build_subdir host_subdir target_subdir AR ac_ct_AR LIPO ac_ct_LIPO NM ac_ct_NM RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP decimal_float enable_decimal_float fixed_point vis_hide set_have_cc_tls LIBGCC_LIBM tmake_file extra_parts asm_hidden_op LIBOBJS LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
|
||||
# Initialize some variables set by options.
|
||||
@@ -3505,6 +3505,39 @@
|
||||
fi
|
||||
|
||||
|
||||
+# On powerpc libgcc_s references copysignl which is a libm function but
|
||||
+# glibc apparently also provides it via libc as opposed to uClibc where
|
||||
+# it lives in libm.
|
||||
+echo "$as_me:$LINENO: checking for library containing copysignl" >&5
|
||||
+echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6
|
||||
+if test "${libgcc_cv_copysignl_lib+set}" = set; then
|
||||
+ echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
+else
|
||||
+
|
||||
+ echo '#include <features.h>' > conftest.c
|
||||
+ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c
|
||||
+ libgcc_cv_copysignl_lib="-lc"
|
||||
+ if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5'
|
||||
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
+ (eval $ac_try) 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; }
|
||||
+ then
|
||||
+ libgcc_cv_copysignl_lib="-lm"
|
||||
+ fi
|
||||
+ rm -f conftest.*
|
||||
+
|
||||
+fi
|
||||
+echo "$as_me:$LINENO: result: $libgcc_cv_copysignl_lib" >&5
|
||||
+echo "${ECHO_T}$libgcc_cv_copysignl_lib" >&6
|
||||
+
|
||||
+case /${libgcc_cv_copysignl_lib}/ in
|
||||
+ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;;
|
||||
+ *) LIBGCC_LIBM= ;;
|
||||
+esac
|
||||
+
|
||||
+
|
||||
# Conditionalize the makefile for this target machine.
|
||||
tmake_file_=
|
||||
for f in ${tmake_file}
|
||||
@@ -4225,6 +4258,7 @@
|
||||
s,@fixed_point@,$fixed_point,;t t
|
||||
s,@vis_hide@,$vis_hide,;t t
|
||||
s,@set_have_cc_tls@,$set_have_cc_tls,;t t
|
||||
+s,@LIBGCC_LIBM@,$LIBGCC_LIBM,;t t
|
||||
s,@tmake_file@,$tmake_file,;t t
|
||||
s,@extra_parts@,$extra_parts,;t t
|
||||
s,@asm_hidden_op@,$asm_hidden_op,;t t
|
||||
--- gcc-4.3.3/libgcc/configure.ac 2008-11-21 06:09:53.000000000 +1300
|
||||
+++ gcc-4.3.3-p/libgcc/configure.ac 2009-05-06 07:05:50.000000000 +1200
|
||||
@@ -207,6 +207,27 @@
|
||||
fi
|
||||
AC_SUBST(set_have_cc_tls)
|
||||
|
||||
+# On powerpc libgcc_s references copysignl which is a libm function but
|
||||
+# glibc apparently also provides it via libc as opposed to uClibc where
|
||||
+# it lives in libm.
|
||||
+AC_CACHE_CHECK([for library containing copysignl],
|
||||
+ libgcc_cv_copysignl_lib, [
|
||||
+ echo '#include <features.h>' > conftest.c
|
||||
+ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c
|
||||
+ libgcc_cv_copysignl_lib="-lc"
|
||||
+ if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD)
|
||||
+ then
|
||||
+ libgcc_cv_copysignl_lib="-lm"
|
||||
+ fi
|
||||
+ rm -f conftest.*
|
||||
+ ])
|
||||
+
|
||||
+case /${libgcc_cv_copysignl_lib}/ in
|
||||
+ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;;
|
||||
+ *) LIBGCC_LIBM= ;;
|
||||
+esac
|
||||
+AC_SUBST(LIBGCC_LIBM)
|
||||
+
|
||||
# Conditionalize the makefile for this target machine.
|
||||
tmake_file_=
|
||||
for f in ${tmake_file}
|
||||
--- gcc-4.3.3/libgcc/Makefile.in 2008-06-17 21:32:34.000000000 +1200
|
||||
+++ gcc-4.3.3-p/libgcc/Makefile.in 2009-05-06 07:05:50.000000000 +1200
|
||||
@@ -40,6 +40,7 @@
|
||||
decimal_float = @decimal_float@
|
||||
enable_decimal_float = @enable_decimal_float@
|
||||
fixed_point = @fixed_point@
|
||||
+LIBGCC_LIBM = @LIBGCC_LIBM@
|
||||
|
||||
host_noncanonical = @host_noncanonical@
|
||||
|
||||
@@ -738,9 +739,10 @@
|
||||
@multilib_dir@,$(MULTIDIR),$(subst \
|
||||
@shlib_objs@,$(objects),$(subst \
|
||||
@shlib_base_name@,libgcc_s,$(subst \
|
||||
+ @libgcc_libm@,$(LIBGCC_LIBM),$(subst \
|
||||
@shlib_map_file@,$(mapfile),$(subst \
|
||||
@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \
|
||||
- @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))
|
||||
+ @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))))
|
||||
|
||||
libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts)
|
||||
# @multilib_flags@ is still needed because this may use
|
@ -1,33 +0,0 @@
|
||||
--- gcc/gcc/config/--- gcc/contrib/regression/objs-gcc.sh
|
||||
+++ gcc/contrib/regression/objs-gcc.sh
|
||||
@@ -105,6 +105,10 @@
|
||||
then
|
||||
make all-gdb all-dejagnu all-ld || exit 1
|
||||
make install-gdb install-dejagnu install-ld || exit 1
|
||||
+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
|
||||
+ then
|
||||
+ make all-gdb all-dejagnu all-ld || exit 1
|
||||
+ make install-gdb install-dejagnu install-ld || exit 1
|
||||
elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
|
||||
make bootstrap || exit 1
|
||||
make install || exit 1
|
||||
--- gcc/libjava/classpath/ltconfig
|
||||
+++ gcc/libjava/classpath/ltconfig
|
||||
@@ -603,7 +603,7 @@
|
||||
|
||||
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
|
||||
case $host_os in
|
||||
-linux-gnu*) ;;
|
||||
+linux-gnu*|linux-uclibc*) ;;
|
||||
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
|
||||
esac
|
||||
|
||||
@@ -1251,7 +1251,7 @@
|
||||
;;
|
||||
|
||||
# This must be Linux ELF.
|
||||
-linux-gnu*)
|
||||
+linux*)
|
||||
version_type=linux
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
@ -1,13 +0,0 @@
|
||||
diff -rdup gcc-4.2.1.oorig/gcc/config.gcc gcc-4.2.1/gcc/config.gcc
|
||||
--- gcc-4.2.1.oorig/gcc/config.gcc 2007-10-01 11:52:52.000000000 +0200
|
||||
+++ gcc-4.2.1/gcc/config.gcc 2007-10-01 13:22:12.000000000 +0200
|
||||
@@ -494,6 +494,9 @@ case ${target} in
|
||||
alpha*)
|
||||
tm_file="${cpu_type}/${cpu_type}.h alpha/elf.h alpha/linux.h alpha/linux-elf.h gnu.h ${tm_file}"
|
||||
;;
|
||||
+ i[34567]86-*hurd*-*)
|
||||
+ tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/gnu.h gnu.h ${tm_file}"
|
||||
+ ;;
|
||||
i[34567]86-*-*)
|
||||
tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h gnu.h ${tm_file}"
|
||||
;;
|
@ -1,11 +0,0 @@
|
||||
--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
|
||||
+++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
|
||||
@@ -500,7 +500,7 @@
|
||||
#ifdef __linux__
|
||||
# include <features.h>
|
||||
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
|
||||
- && !defined(__ia64__)
|
||||
+ && !defined(__ia64__) && !defined(__UCLIBC__)
|
||||
# ifndef GC_HAVE_BUILTIN_BACKTRACE
|
||||
# define GC_HAVE_BUILTIN_BACKTRACE
|
||||
# endif
|
@ -1,13 +0,0 @@
|
||||
Index: gcc-4.3.0/libstdc++-v3/include/c_global/cstdio
|
||||
===================================================================
|
||||
--- gcc-4.3.0/libstdc++-v3/include/c_global/cstdio (revision 129202)
|
||||
+++ gcc-4.3.0/libstdc++-v3/include/c_global/cstdio (working copy)
|
||||
@@ -144,7 +144,7 @@
|
||||
|
||||
_GLIBCXX_END_NAMESPACE
|
||||
|
||||
-#if _GLIBCXX_USE_C99
|
||||
+#if _GLIBCXX_USE_C99 || defined __UCLIBC__
|
||||
|
||||
#undef snprintf
|
||||
#undef vfscanf
|
@ -1,49 +0,0 @@
|
||||
Index: gcc-4.2/libmudflap/mf-hooks2.c
|
||||
===================================================================
|
||||
--- gcc-4.2/libmudflap/mf-hooks2.c (revision 119834)
|
||||
+++ gcc-4.2/libmudflap/mf-hooks2.c (working copy)
|
||||
@@ -427,7 +427,7 @@
|
||||
{
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
|
||||
- bzero (s, n);
|
||||
+ memset (s, 0, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -437,7 +437,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
|
||||
MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
|
||||
- bcopy (src, dest, n);
|
||||
+ memmove (dest, src, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -447,7 +447,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
|
||||
MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
|
||||
- return bcmp (s1, s2, n);
|
||||
+ return n == 0 ? 0 : memcmp (s1, s2, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
|
||||
- return index (s, c);
|
||||
+ return strchr (s, c);
|
||||
}
|
||||
|
||||
|
||||
@@ -465,7 +465,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
|
||||
- return rindex (s, c);
|
||||
+ return strrchr (s, c);
|
||||
}
|
||||
|
||||
/* XXX: stpcpy, memccpy */
|
@ -1,29 +0,0 @@
|
||||
Index: gcc-4.3.0/gcc/config/arm/t-linux
|
||||
===================================================================
|
||||
--- gcc-4.3.0/gcc/config/arm/t-linux (revision 129896)
|
||||
+++ gcc-4.3.0/gcc/config/arm/t-linux (working copy)
|
||||
@@ -3,7 +3,10 @@
|
||||
TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC
|
||||
|
||||
LIB1ASMSRC = arm/lib1funcs.asm
|
||||
-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
|
||||
+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
|
||||
+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
|
||||
+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
|
||||
+ _fixsfsi _fixunssfsi _floatdidf _floatundidf _floatdisf _floatundisf
|
||||
|
||||
# MULTILIB_OPTIONS = mhard-float/msoft-float
|
||||
# MULTILIB_DIRNAMES = hard-float soft-float
|
||||
Index: gcc-4.3.0/gcc/config/arm/linux-elf.h
|
||||
===================================================================
|
||||
--- gcc-4.3.0/gcc/config/arm/linux-elf.h (revision 129896)
|
||||
+++ gcc-4.3.0/gcc/config/arm/linux-elf.h (working copy)
|
||||
@@ -48,7 +62,7 @@
|
||||
%{shared:-lc} \
|
||||
%{!shared:%{profile:-lc_p}%{!profile:-lc}}"
|
||||
|
||||
-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
|
||||
+#define LIBGCC_SPEC "-lgcc"
|
||||
|
||||
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
||||
|
@ -1,41 +0,0 @@
|
||||
gcc/ChangeLog
|
||||
2007-11-27 Bernhard Fischer <>
|
||||
|
||||
* config/arm/arm-protos.h (arm_vector_mode_supported_p,
|
||||
arm_hard_regno_mode_ok, const_ok_for_arm): Do not hide non-rtx related
|
||||
function prototypes in RTX_CODE.
|
||||
* genopinit.c: Include tm_p.h.
|
||||
|
||||
Index: gcc-4.3.0/gcc/config/arm/arm-protos.h
|
||||
===================================================================
|
||||
--- gcc-4.3.0/gcc/config/arm/arm-protos.h (revision 130463)
|
||||
+++ gcc-4.3.0/gcc/config/arm/arm-protos.h (working copy)
|
||||
@@ -40,15 +40,14 @@
|
||||
unsigned int);
|
||||
extern unsigned int arm_dbx_register_number (unsigned int);
|
||||
extern void arm_output_fn_unwind (FILE *, bool);
|
||||
-
|
||||
|
||||
#ifdef TREE_CODE
|
||||
extern int arm_return_in_memory (const_tree);
|
||||
#endif
|
||||
-#ifdef RTX_CODE
|
||||
extern bool arm_vector_mode_supported_p (enum machine_mode);
|
||||
extern int arm_hard_regno_mode_ok (unsigned int, enum machine_mode);
|
||||
extern int const_ok_for_arm (HOST_WIDE_INT);
|
||||
+#ifdef RTX_CODE
|
||||
extern int arm_split_constant (RTX_CODE, enum machine_mode, rtx,
|
||||
HOST_WIDE_INT, rtx, rtx, int);
|
||||
extern RTX_CODE arm_canonicalize_comparison (RTX_CODE, enum machine_mode,
|
||||
Index: gcc-4.3.0/gcc/genopinit.c
|
||||
===================================================================
|
||||
--- gcc-4.3.0/gcc/genopinit.c (revision 130463)
|
||||
+++ gcc-4.3.0/gcc/genopinit.c (working copy)
|
||||
@@ -486,6 +486,7 @@
|
||||
printf ("#include \"expr.h\"\n");
|
||||
printf ("#include \"optabs.h\"\n");
|
||||
printf ("#include \"reload.h\"\n\n");
|
||||
+ printf ("#include \"tm_p.h\"\n\n");
|
||||
|
||||
printf ("void\ninit_all_optabs (void)\n{\n");
|
||||
|
@ -1,15 +0,0 @@
|
||||
\\\\
|
||||
\\ gcc PR33200
|
||||
Index: gcc-4.3.0/gcc/config.gcc
|
||||
===================================================================
|
||||
--- gcc-4.3.0/gcc/config.gcc (revision 131628)
|
||||
+++ gcc-4.3.0/gcc/config.gcc (working copy)
|
||||
@@ -2302,7 +2305,7 @@ sh-*-symbianelf* | sh[12346l]*-*-symbian
|
||||
if test x${enable_incomplete_targets} = xyes ; then
|
||||
tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1 SUPPORT_SH5_32MEDIA=1 SUPPORT_SH5_32MEDIA_NOFPU=1 SUPPORT_SH5_64MEDIA=1 SUPPORT_SH5_64MEDIA_NOFPU=1"
|
||||
fi
|
||||
- use_fixproto=yes
|
||||
+ # XXX: why? use_fixproto=yes
|
||||
;;
|
||||
sh-*-rtemscoff*)
|
||||
tmake_file="sh/t-sh t-rtems sh/t-rtems"
|
@ -1,18 +0,0 @@
|
||||
\\\\ followup of PR34205; trying to use aapcs-linux
|
||||
\\ gcc/ChangeLog
|
||||
\\
|
||||
\\ 2008-09-18 Bernhard Reutner-Fischer <aldot@>
|
||||
\\
|
||||
\\ * config.gcc (arm*-*-*): Add aapcs-linux to supported ABIs.
|
||||
\\
|
||||
--- gcc-4.3.2.orig/gcc/config.gcc 2008-09-18 20:33:55.000000000 +0200
|
||||
+++ gcc-4.3.2/gcc/config.gcc 2008-09-18 21:38:52.000000000 +0200
|
||||
@@ -2921,7 +2921,7 @@
|
||||
|
||||
case "$with_abi" in
|
||||
"" \
|
||||
- | apcs-gnu | atpcs | aapcs | iwmmxt )
|
||||
+ | apcs-gnu | atpcs | aapcs | iwmmxt | aapcs-linux )
|
||||
#OK
|
||||
;;
|
||||
*)
|
@ -1,86 +0,0 @@
|
||||
gcc svn 142778:
|
||||
|
||||
PR target/37436
|
||||
* arm.c (arm_legitimate_index): Only accept addresses that are in
|
||||
canonical form.
|
||||
* predicates.md (arm_reg_or_extendqisi_mem_op): New predicate.
|
||||
* arm.md (extendqihi2): Use arm_reg_or_extendqisi_mem_op predicate
|
||||
for operand1.
|
||||
(extendqisi2): Likewise.
|
||||
(arm_extendqisi, arm_extendqisi_v6): Use arm_extendqisi_mem_op
|
||||
predicate for operand1.
|
||||
|
||||
diff -Nura gcc-4.3.3.orig/gcc/config/arm/arm.c gcc-4.3.3/gcc/config/arm/arm.c
|
||||
--- gcc-4.3.3.orig/gcc/config/arm/arm.c 2008-06-11 07:52:55.000000000 -0300
|
||||
+++ gcc-4.3.3/gcc/config/arm/arm.c 2009-05-21 16:06:45.000000000 -0300
|
||||
@@ -3769,6 +3769,7 @@
|
||||
rtx xop1 = XEXP (x, 1);
|
||||
|
||||
return ((arm_address_register_rtx_p (xop0, strict_p)
|
||||
+ && GET_CODE(xop1) == CONST_INT
|
||||
&& arm_legitimate_index_p (mode, xop1, outer, strict_p))
|
||||
|| (arm_address_register_rtx_p (xop1, strict_p)
|
||||
&& arm_legitimate_index_p (mode, xop0, outer, strict_p)));
|
||||
diff -Nura gcc-4.3.3.orig/gcc/config/arm/arm.md gcc-4.3.3/gcc/config/arm/arm.md
|
||||
--- gcc-4.3.3.orig/gcc/config/arm/arm.md 2007-09-04 01:44:47.000000000 -0300
|
||||
+++ gcc-4.3.3/gcc/config/arm/arm.md 2009-05-21 16:06:45.000000000 -0300
|
||||
@@ -4199,7 +4199,7 @@
|
||||
|
||||
(define_expand "extendqihi2"
|
||||
[(set (match_dup 2)
|
||||
- (ashift:SI (match_operand:QI 1 "general_operand" "")
|
||||
+ (ashift:SI (match_operand:QI 1 "arm_reg_or_extendqisi_mem_op" "")
|
||||
(const_int 24)))
|
||||
(set (match_operand:HI 0 "s_register_operand" "")
|
||||
(ashiftrt:SI (match_dup 2)
|
||||
@@ -4224,7 +4224,7 @@
|
||||
|
||||
(define_insn "*arm_extendqihi_insn"
|
||||
[(set (match_operand:HI 0 "s_register_operand" "=r")
|
||||
- (sign_extend:HI (match_operand:QI 1 "memory_operand" "Uq")))]
|
||||
+ (sign_extend:HI (match_operand:QI 1 "arm_extendqisi_mem_op" "Uq")))]
|
||||
"TARGET_ARM && arm_arch4"
|
||||
"ldr%(sb%)\\t%0, %1"
|
||||
[(set_attr "type" "load_byte")
|
||||
@@ -4235,7 +4235,7 @@
|
||||
|
||||
(define_expand "extendqisi2"
|
||||
[(set (match_dup 2)
|
||||
- (ashift:SI (match_operand:QI 1 "general_operand" "")
|
||||
+ (ashift:SI (match_operand:QI 1 "arm_reg_or_extendqisi_mem_op" "")
|
||||
(const_int 24)))
|
||||
(set (match_operand:SI 0 "s_register_operand" "")
|
||||
(ashiftrt:SI (match_dup 2)
|
||||
@@ -4267,7 +4267,7 @@
|
||||
|
||||
(define_insn "*arm_extendqisi"
|
||||
[(set (match_operand:SI 0 "s_register_operand" "=r")
|
||||
- (sign_extend:SI (match_operand:QI 1 "memory_operand" "Uq")))]
|
||||
+ (sign_extend:SI (match_operand:QI 1 "arm_extendqisi_mem_op" "Uq")))]
|
||||
"TARGET_ARM && arm_arch4 && !arm_arch6"
|
||||
"ldr%(sb%)\\t%0, %1"
|
||||
[(set_attr "type" "load_byte")
|
||||
@@ -4278,7 +4278,8 @@
|
||||
|
||||
(define_insn "*arm_extendqisi_v6"
|
||||
[(set (match_operand:SI 0 "s_register_operand" "=r,r")
|
||||
- (sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,Uq")))]
|
||||
+ (sign_extend:SI
|
||||
+ (match_operand:QI 1 "arm_reg_or_extendqisi_mem_op" "r,Uq")))]
|
||||
"TARGET_ARM && arm_arch6"
|
||||
"@
|
||||
sxtb%?\\t%0, %1
|
||||
diff -Nura gcc-4.3.3.orig/gcc/config/arm/predicates.md gcc-4.3.3/gcc/config/arm/predicates.md
|
||||
--- gcc-4.3.3.orig/gcc/config/arm/predicates.md 2007-08-02 07:49:31.000000000 -0300
|
||||
+++ gcc-4.3.3/gcc/config/arm/predicates.md 2009-05-21 16:06:45.000000000 -0300
|
||||
@@ -234,6 +234,10 @@
|
||||
(match_test "arm_legitimate_address_p (mode, XEXP (op, 0), SIGN_EXTEND,
|
||||
0)")))
|
||||
|
||||
+(define_special_predicate "arm_reg_or_extendqisi_mem_op"
|
||||
+ (ior (match_operand 0 "arm_extendqisi_mem_op")
|
||||
+ (match_operand 0 "s_register_operand")))
|
||||
+
|
||||
(define_predicate "power_of_two_operand"
|
||||
(match_code "const_int")
|
||||
{
|
@ -1,13 +0,0 @@
|
||||
diff -urN gcc-4.3.1.orig/gcc/config/cris/cris.h gcc-4.3.1/gcc/config/cris/cris.h
|
||||
--- gcc-4.3.1.orig/gcc/config/cris/cris.h 2008-02-22 12:11:01.000000000 +0100
|
||||
+++ gcc-4.3.1/gcc/config/cris/cris.h 2008-07-02 10:42:42.000000000 +0200
|
||||
@@ -1529,9 +1529,6 @@
|
||||
|
||||
#define NO_IMPLICIT_EXTERN_C
|
||||
|
||||
-/* No specific purpose other than warningless compatibility. */
|
||||
-#define HANDLE_PRAGMA_PACK_PUSH_POP 1
|
||||
-
|
||||
/*
|
||||
* Local variables:
|
||||
* eval: (c-set-style "gnu")
|
@ -1,125 +0,0 @@
|
||||
See: http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00237.html
|
||||
Patch by: Bernhard Reutner-Fischer
|
||||
|
||||
--- gcc-4.3.3/gcc/config/t-slibgcc-elf-ver 2005-02-20 00:44:10.000000000 +1300
|
||||
+++ gcc-4.3.3-p/gcc/config/t-slibgcc-elf-ver 2009-05-06 07:05:50.000000000 +1200
|
||||
@@ -9,7 +9,7 @@
|
||||
SHLIB_OBJS = @shlib_objs@
|
||||
SHLIB_DIR = @multilib_dir@
|
||||
SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
|
||||
-SHLIB_LC = -lc
|
||||
+SHLIB_LC = @libgcc_libm@ -lc
|
||||
|
||||
SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
|
||||
-Wl,--soname=$(SHLIB_SONAME) \
|
||||
--- gcc-4.3.3/libgcc/configure 2008-11-21 06:09:53.000000000 +1300
|
||||
+++ gcc-4.3.3-p/libgcc/configure 2009-05-06 07:05:50.000000000 +1200
|
||||
@@ -272,7 +272,7 @@
|
||||
PACKAGE_BUGREPORT=''
|
||||
|
||||
ac_unique_file="static-object.mk"
|
||||
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libgcc_topdir enable_shared slibdir INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK build build_cpu build_vendor build_os host host_cpu host_vendor host_os host_noncanonical build_libsubdir build_subdir host_subdir target_subdir AR ac_ct_AR LIPO ac_ct_LIPO NM ac_ct_NM RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP decimal_float enable_decimal_float fixed_point vis_hide set_have_cc_tls tmake_file extra_parts asm_hidden_op LIBOBJS LTLIBOBJS'
|
||||
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libgcc_topdir enable_shared slibdir INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK build build_cpu build_vendor build_os host host_cpu host_vendor host_os host_noncanonical build_libsubdir build_subdir host_subdir target_subdir AR ac_ct_AR LIPO ac_ct_LIPO NM ac_ct_NM RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP decimal_float enable_decimal_float fixed_point vis_hide set_have_cc_tls LIBGCC_LIBM tmake_file extra_parts asm_hidden_op LIBOBJS LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
|
||||
# Initialize some variables set by options.
|
||||
@@ -3505,6 +3505,39 @@
|
||||
fi
|
||||
|
||||
|
||||
+# On powerpc libgcc_s references copysignl which is a libm function but
|
||||
+# glibc apparently also provides it via libc as opposed to uClibc where
|
||||
+# it lives in libm.
|
||||
+echo "$as_me:$LINENO: checking for library containing copysignl" >&5
|
||||
+echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6
|
||||
+if test "${libgcc_cv_copysignl_lib+set}" = set; then
|
||||
+ echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
+else
|
||||
+
|
||||
+ echo '#include <features.h>' > conftest.c
|
||||
+ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c
|
||||
+ libgcc_cv_copysignl_lib="-lc"
|
||||
+ if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5'
|
||||
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
+ (eval $ac_try) 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; }
|
||||
+ then
|
||||
+ libgcc_cv_copysignl_lib="-lm"
|
||||
+ fi
|
||||
+ rm -f conftest.*
|
||||
+
|
||||
+fi
|
||||
+echo "$as_me:$LINENO: result: $libgcc_cv_copysignl_lib" >&5
|
||||
+echo "${ECHO_T}$libgcc_cv_copysignl_lib" >&6
|
||||
+
|
||||
+case /${libgcc_cv_copysignl_lib}/ in
|
||||
+ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;;
|
||||
+ *) LIBGCC_LIBM= ;;
|
||||
+esac
|
||||
+
|
||||
+
|
||||
# Conditionalize the makefile for this target machine.
|
||||
tmake_file_=
|
||||
for f in ${tmake_file}
|
||||
@@ -4225,6 +4258,7 @@
|
||||
s,@fixed_point@,$fixed_point,;t t
|
||||
s,@vis_hide@,$vis_hide,;t t
|
||||
s,@set_have_cc_tls@,$set_have_cc_tls,;t t
|
||||
+s,@LIBGCC_LIBM@,$LIBGCC_LIBM,;t t
|
||||
s,@tmake_file@,$tmake_file,;t t
|
||||
s,@extra_parts@,$extra_parts,;t t
|
||||
s,@asm_hidden_op@,$asm_hidden_op,;t t
|
||||
--- gcc-4.3.3/libgcc/configure.ac 2008-11-21 06:09:53.000000000 +1300
|
||||
+++ gcc-4.3.3-p/libgcc/configure.ac 2009-05-06 07:05:50.000000000 +1200
|
||||
@@ -207,6 +207,27 @@
|
||||
fi
|
||||
AC_SUBST(set_have_cc_tls)
|
||||
|
||||
+# On powerpc libgcc_s references copysignl which is a libm function but
|
||||
+# glibc apparently also provides it via libc as opposed to uClibc where
|
||||
+# it lives in libm.
|
||||
+AC_CACHE_CHECK([for library containing copysignl],
|
||||
+ libgcc_cv_copysignl_lib, [
|
||||
+ echo '#include <features.h>' > conftest.c
|
||||
+ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c
|
||||
+ libgcc_cv_copysignl_lib="-lc"
|
||||
+ if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD)
|
||||
+ then
|
||||
+ libgcc_cv_copysignl_lib="-lm"
|
||||
+ fi
|
||||
+ rm -f conftest.*
|
||||
+ ])
|
||||
+
|
||||
+case /${libgcc_cv_copysignl_lib}/ in
|
||||
+ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;;
|
||||
+ *) LIBGCC_LIBM= ;;
|
||||
+esac
|
||||
+AC_SUBST(LIBGCC_LIBM)
|
||||
+
|
||||
# Conditionalize the makefile for this target machine.
|
||||
tmake_file_=
|
||||
for f in ${tmake_file}
|
||||
--- gcc-4.3.3/libgcc/Makefile.in 2008-06-17 21:32:34.000000000 +1200
|
||||
+++ gcc-4.3.3-p/libgcc/Makefile.in 2009-05-06 07:05:50.000000000 +1200
|
||||
@@ -40,6 +40,7 @@
|
||||
decimal_float = @decimal_float@
|
||||
enable_decimal_float = @enable_decimal_float@
|
||||
fixed_point = @fixed_point@
|
||||
+LIBGCC_LIBM = @LIBGCC_LIBM@
|
||||
|
||||
host_noncanonical = @host_noncanonical@
|
||||
|
||||
@@ -738,9 +739,10 @@
|
||||
@multilib_dir@,$(MULTIDIR),$(subst \
|
||||
@shlib_objs@,$(objects),$(subst \
|
||||
@shlib_base_name@,libgcc_s,$(subst \
|
||||
+ @libgcc_libm@,$(LIBGCC_LIBM),$(subst \
|
||||
@shlib_map_file@,$(mapfile),$(subst \
|
||||
@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \
|
||||
- @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))
|
||||
+ @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))))
|
||||
|
||||
libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts)
|
||||
# @multilib_flags@ is still needed because this may use
|
@ -5,29 +5,14 @@ comment "GCC Options"
|
||||
choice
|
||||
prompt "GCC compiler Version"
|
||||
default BR2_GCC_VERSION_4_3_X if !BR2_avr32
|
||||
default BR2_GCC_VERSION_4_2_3 if BR2_avr32
|
||||
default BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 if BR2_avr32
|
||||
help
|
||||
Select the version of gcc you wish to use.
|
||||
|
||||
config BR2_GCC_VERSION_4_2_1
|
||||
depends on !BR2_avr32
|
||||
depends on BR2_DEPRECATED
|
||||
bool "gcc 4.2.1"
|
||||
|
||||
config BR2_GCC_VERSION_4_2_2
|
||||
depends on !BR2_avr32
|
||||
depends on BR2_DEPRECATED
|
||||
bool "gcc 4.2.2"
|
||||
|
||||
config BR2_GCC_VERSION_4_2_2_AVR32_2_1_5
|
||||
depends on BR2_avr32
|
||||
bool "gcc 4.2.2-avr32-2.1.5"
|
||||
|
||||
config BR2_GCC_VERSION_4_2_3
|
||||
depends on !BR2_avr32
|
||||
depends on BR2_DEPRECATED
|
||||
bool "gcc 4.2.3"
|
||||
|
||||
config BR2_GCC_VERSION_4_2_4
|
||||
depends on !BR2_avr32
|
||||
bool "gcc 4.2.4"
|
||||
@ -59,10 +44,7 @@ config BR2_GCC_SNAP_DATE
|
||||
|
||||
config BR2_GCC_VERSION
|
||||
string
|
||||
default "4.2.1" if BR2_GCC_VERSION_4_2_1
|
||||
default "4.2.2" if BR2_GCC_VERSION_4_2_2
|
||||
default "4.2.2-avr32-2.1.5" if BR2_GCC_VERSION_4_2_2_AVR32_2_1_5
|
||||
default "4.2.3" if BR2_GCC_VERSION_4_2_3
|
||||
default "4.2.4" if BR2_GCC_VERSION_4_2_4
|
||||
default "4.3.5" if BR2_GCC_VERSION_4_3_X
|
||||
default "4.4.4" if BR2_GCC_VERSION_4_4_X
|
||||
|
Loading…
Reference in New Issue
Block a user