gcc: Drop old version 4.5.1

(From OE-Core rev: 59443380286010eda07f1434e918a3af8c8a31a9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2011-10-07 10:51:46 +01:00
parent 9167557fb9
commit d2b4818c5c
67 changed files with 0 additions and 10389 deletions

View File

@ -1,100 +0,0 @@
require gcc-common.inc
PR = "r12"
DEPENDS =+ "mpfr gmp libmpc elfutils"
NATIVEDEPS = "mpfr-native gmp-native gettext-native libmpc-native elfutils-native"
LICENSE="GPL-3.0-with-GCC-exception & GPLv2 & GPLv3 & LGPLv2.1 & LGPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8"
SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
file://100-uclibc-conf.patch \
file://gcc-uclibc-locale-ctype_touplow_t.patch \
file://cache-amnesia.patch \
file://gcc-flags-for-build.patch \
file://libstdc++-emit-__cxa_end_cleanup-in-text.patch \
file://arm-bswapsi2.patch \
\
file://fedora/gcc43-c++-builtin-redecl.patch;striplevel=0 \
file://fedora/gcc43-ia64-libunwind.patch;striplevel=0 \
file://fedora/gcc43-java-nomulti.patch;striplevel=0 \
file://fedora/gcc43-ppc32-retaddr.patch;striplevel=0 \
file://fedora/gcc43-pr32139.patch;striplevel=0 \
file://fedora/gcc43-pr33763.patch;striplevel=0 \
file://fedora/gcc43-rh330771.patch;striplevel=0 \
file://fedora/gcc43-rh341221.patch;striplevel=0 \
file://fedora/gcc43-java-debug-iface-type.patch;striplevel=0 \
file://fedora/gcc43-i386-libgomp.patch;striplevel=0 \
file://fedora/gcc45-no-add-needed.patch;striplevel=0 \
file://103-uclibc-conf-noupstream.patch \
file://200-uclibc-locale.patch \
file://203-uclibc-locale-no__x.patch; \
file://204-uclibc-locale-wchar_fix.patch; \
file://205-uclibc-locale-update.patch; \
file://301-missing-execinfo_h.patch \
file://302-c99-snprintf.patch \
file://303-c99-complex-ugly-hack.patch \
file://304-index_macro.patch \
file://305-libmudflap-susv3-legacy.patch \
file://306-libstdc++-namespace.patch \
file://740-sh-pr24836.patch \
file://800-arm-bigendian.patch \
file://904-flatten-switch-stmt-00.patch \
file://arm-nolibfloat.patch \
file://arm-softfloat.patch \
file://zecke-xgcc-cpp.patch \
file://gcc-poison-system-directories.patch \
file://gcc-poison-dir-extend.patch \
file://gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
file://64bithack.patch \
file://optional_libstdc.patch \
file://disable_relax_pic_calls_flag.patch \
file://GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch \
file://COLLECT_GCC_OPTIONS.patch \
file://use-defaults.h-and-t-oe-in-B.patch \
file://pr43810.patch \
file://pr44290.patch \
file://pr44606.patch \
file://pr45094.patch \
file://pr45052.patch \
file://pr45886.patch \
file://pr44618.patch \
"
SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch "
# Language Overrides
FORTRAN = ""
JAVA = ""
#EXTRA_OECONF_BASE = " --enable-cheaders=c_std \
# --enable-libssp \
# --disable-bootstrap \
# --disable-libgomp \
# --disable-libmudflap"
EXTRA_OECONF_BASE = " --enable-lto \
--enable-libssp \
--disable-bootstrap \
--disable-libgomp \
--disable-libmudflap \
--enable-cheaders=c_global "
EXTRA_OECONF_INITIAL = "--disable-libmudflap \
--disable-libgomp \
--disable-libssp \
--enable-decimal-float=no"
EXTRA_OECONF_INTERMEDIATE = "--disable-libmudflap \
--disable-libgomp \
--disable-libssp"
EXTRA_OECONF_append_linux-uclibc = " --disable-decimal-float "
EXTRA_OECONF_append_linux-uclibceabi = " --disable-decimal-float "
EXTRA_OECONF_append_linux-uclibcspe = " --disable-decimal-float "

View File

@ -1,39 +0,0 @@
Upstream-Status: Pending
Index: gcc-4.3.1/contrib/regression/objs-gcc.sh
===================================================================
--- gcc-4.3.1.orig/contrib/regression/objs-gcc.sh 2007-12-24 15:18:57.000000000 -0800
+++ gcc-4.3.1/contrib/regression/objs-gcc.sh 2008-08-16 01:15:12.000000000 -0700
@@ -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
Index: gcc-4.3.1/libjava/classpath/ltconfig
===================================================================
--- gcc-4.3.1.orig/libjava/classpath/ltconfig 2007-06-03 16:18:43.000000000 -0700
+++ gcc-4.3.1/libjava/classpath/ltconfig 2008-08-16 01:15:12.000000000 -0700
@@ -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

View File

@ -1,17 +0,0 @@
Upstream-Status: Pending
Corrects sub machine arch corectly
Index: gcc-4.5.0/gcc/config.gcc
===================================================================
--- gcc-4.5.0.orig/gcc/config.gcc 2010-06-25 10:17:43.809880847 -0700
+++ gcc-4.5.0/gcc/config.gcc 2010-06-25 10:38:09.689882136 -0700
@@ -2171,7 +2171,7 @@
;;
sh-*-elf* | sh[12346l]*-*-elf* | \
sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
- sh-*-linux* | sh[2346lbe]*-*-linux* | \
+ sh*-*-linux* | sh[2346lbe]*-*-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

View File

@ -1,235 +0,0 @@
Upstream-Status: Pending
Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
===================================================================
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-08-16 01:29:20.000000000 -0700
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-08-16 01:33:23.000000000 -0700
@@ -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
Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.cc
===================================================================
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-08-16 01:29:20.000000000 -0700
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-08-16 01:33:00.000000000 -0700
@@ -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<>
Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/collate_members.cc
===================================================================
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/collate_members.cc 2008-08-16 01:29:20.000000000 -0700
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/collate_members.cc 2008-08-16 01:30:31.000000000 -0700
@@ -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
Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc
===================================================================
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-08-16 01:29:20.000000000 -0700
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-08-16 01:30:31.000000000 -0700
@@ -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:
Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc
===================================================================
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-08-16 01:29:20.000000000 -0700
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-08-16 01:30:31.000000000 -0700
@@ -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
{
Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/time_members.cc
===================================================================
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-08-16 01:29:20.000000000 -0700
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-08-16 01:30:31.000000000 -0700
@@ -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
{
Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc
===================================================================
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-08-16 01:29:20.000000000 -0700
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-08-16 01:30:31.000000000 -0700
@@ -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
Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.cc
===================================================================
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.cc 2008-08-16 01:27:18.000000000 -0700
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.cc 2008-08-16 01:30:31.000000000 -0700
@@ -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
Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.h
===================================================================
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-08-16 01:29:20.000000000 -0700
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-08-16 01:31:43.000000000 -0700
@@ -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;
}
Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.h
===================================================================
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-08-16 01:29:20.000000000 -0700
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-08-16 01:30:31.000000000 -0700
@@ -68,6 +68,7 @@
{
extern "C" __typeof(uselocale) __uselocale;
}
+#define __uselocale uselocale
#endif
namespace std

View File

@ -1,50 +0,0 @@
Upstream-Status: Pending
--- 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 = "";

View File

@ -1,521 +0,0 @@
Upstream-Status: Pending
Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc
===================================================================
--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-09-17 22:35:28.000000000 -0700
+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-09-17 22:35:29.000000000 -0700
@@ -39,23 +39,20 @@
#include <langinfo.h>
#include <bits/c++locale_internal.h>
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
template<>
void
__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 +60,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 +74,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,17 +101,18 @@
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);
}
__c_locale
locale::facet::_S_clone_c_locale(__c_locale& __cloc)
{ return __duplocale(__cloc); }
-} // namespace std
-namespace __gnu_cxx
-{
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
{
"LC_CTYPE",
@@ -138,9 +130,11 @@
"LC_IDENTIFICATION"
#endif
};
-}
-namespace std
-{
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
const char* const* const locale::_S_categories = __gnu_cxx::category_names;
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc
===================================================================
--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-09-17 22:35:28.000000000 -0700
+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-09-17 23:09:49.000000000 -0700
@@ -33,16 +33,20 @@
// 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
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
// NB: The other ctype<char> specializations are in src/locale.cc and
// various /config/os/* files.
- template<>
ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
: ctype<char>(0, false, __refs)
{
@@ -57,6 +61,8 @@
#endif
}
}
+ ctype_byname<char>::~ctype_byname()
+ { }
#ifdef _GLIBCXX_USE_WCHAR_T
ctype<wchar_t>::__wmask_type
@@ -138,17 +144,33 @@
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;
}
@@ -290,4 +312,5 @@
#endif
}
#endif // _GLIBCXX_USE_WCHAR_T
-}
+
+_GLIBCXX_END_NAMESPACE
Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.h
===================================================================
--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-09-17 22:35:28.000000000 -0700
+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-09-17 23:13:34.000000000 -0700
@@ -53,12 +53,16 @@
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>
Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc
===================================================================
--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-09-17 22:35:28.000000000 -0700
+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-09-17 22:35:29.000000000 -0700
@@ -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;
}
@@ -390,7 +395,9 @@
__c_locale __old = __uselocale(__cloc);
#else
// Switch to named locale so that mbsrtowcs will work.
- char* __old = strdup(setlocale(LC_ALL, NULL));
+ char* __old = setlocale(LC_ALL, NULL);
+ const size_t __llen = strlen(__old) + 1;
+ char* __sav = new char[__llen];
setlocale(LC_ALL, __name);
#endif
@@ -477,8 +484,8 @@
#ifdef __UCLIBC_HAS_XLOCALE__
__uselocale(__old);
#else
- setlocale(LC_ALL, __old);
- free(__old);
+ setlocale(LC_ALL, __sav);
+ delete [] __sav;
#endif
__throw_exception_again;
}
@@ -498,8 +505,8 @@
#ifdef __UCLIBC_HAS_XLOCALE__
__uselocale(__old);
#else
- setlocale(LC_ALL, __old);
- free(__old);
+ setlocale(LC_ALL, __sav);
+ delete [] __sav;
#endif
}
}
@@ -545,8 +552,11 @@
__c_locale __old = __uselocale(__cloc);
#else
// Switch to named locale so that mbsrtowcs will work.
- char* __old = strdup(setlocale(LC_ALL, NULL));
- setlocale(LC_ALL, __name);
+ char* __old = setlocale(LC_ALL, NULL);
+ const size_t __llen = strlen(__old) + 1;
+ char* __sav = new char[__llen];
+ memcpy(__sav, __old, __llen);
+ setlocale(LC_ALL, __name);
#endif
#ifdef __UCLIBC_MJN3_ONLY__
@@ -633,8 +643,8 @@
#ifdef __UCLIBC_HAS_XLOCALE__
__uselocale(__old);
#else
- setlocale(LC_ALL, __old);
- free(__old);
+ setlocale(LC_ALL, __sav);
+ delete [] __sav;
#endif
__throw_exception_again;
}
@@ -653,8 +663,8 @@
#ifdef __UCLIBC_HAS_XLOCALE__
__uselocale(__old);
#else
- setlocale(LC_ALL, __old);
- free(__old);
+ setlocale(LC_ALL, __sav);
+ delete [] __sav;
#endif
}
}
Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc
===================================================================
--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-09-17 22:35:28.000000000 -0700
+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-09-17 22:35:29.000000000 -0700
@@ -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__
Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.h
===================================================================
--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2008-09-17 22:35:27.000000000 -0700
+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.h 2008-09-17 23:13:34.000000000 -0700
@@ -50,12 +50,21 @@
__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>
Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.h
===================================================================
--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-09-17 22:35:28.000000000 -0700
+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-09-17 22:35:29.000000000 -0700
@@ -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
@@ -78,23 +80,25 @@
#else
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);
Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.cc
===================================================================
--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-09-17 22:35:28.000000000 -0700
+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-09-17 22:35:29.000000000 -0700
@@ -53,11 +53,14 @@
const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
_M_c_locale_timepunct);
#else
- char* __old = strdup(setlocale(LC_ALL, NULL));
+ char* __old = setlocale(LC_ALL, NULL);
+ const size_t __llen = strlen(__old) + 1;
+ char* __sav = new char[__llen];
+ memcpy(__sav, __old, __llen);
setlocale(LC_ALL, _M_name_timepunct);
const size_t __len = strftime(__s, __maxlen, __format, __tm);
- setlocale(LC_ALL, __old);
- free(__old);
+ setlocale(LC_ALL, __sav);
+ delete [] __sav;
#endif
// Make sure __s is null terminated.
if (__len == 0)
@@ -207,11 +210,14 @@
const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
_M_c_locale_timepunct);
#else
- char* __old = strdup(setlocale(LC_ALL, NULL));
+ char* __old = setlocale(LC_ALL, NULL);
+ const size_t __llen = strlen(__old) + 1;
+ char* __sav = new char[__llen];
+ memcpy(__sav, __old, __llen);
setlocale(LC_ALL, _M_name_timepunct);
const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
- setlocale(LC_ALL, __old);
- free(__old);
+ setlocale(LC_ALL, __sav);
+ delete [] __sav;
#endif
// Make sure __s is null terminated.
if (__len == 0)
Index: gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
===================================================================
--- gcc-4.3.2.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-09-17 22:35:28.000000000 -0700
+++ gcc-4.3.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-09-17 22:35:29.000000000 -0700
@@ -31,6 +31,9 @@
#include <bits/c++config.h>
#include <clocale>
+#include <cstdlib>
+#include <cstring>
+#include <cstddef>
#ifdef __UCLIBC_MJN3_ONLY__
#warning clean this up

View File

@ -1,15 +0,0 @@
Upstream-Status: Pending
Index: gcc-4.5.0/boehm-gc/include/gc.h
===================================================================
--- gcc-4.5.0.orig/boehm-gc/include/gc.h 2007-04-23 14:10:09.000000000 -0700
+++ gcc-4.5.0/boehm-gc/include/gc.h 2010-06-25 10:49:12.768883509 -0700
@@ -503,7 +503,7 @@
#if defined(__linux__) || defined(__GLIBC__)
# 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

View File

@ -1,15 +0,0 @@
Upstream-Status: Pending
Index: gcc-4.5.0/libstdc++-v3/include/c_std/cstdio
===================================================================
--- gcc-4.5.0.orig/libstdc++-v3/include/c_std/cstdio 2010-02-04 10:20:34.000000000 -0800
+++ gcc-4.5.0/libstdc++-v3/include/c_std/cstdio 2010-06-25 10:51:12.712631679 -0700
@@ -139,7 +139,7 @@
_GLIBCXX_END_NAMESPACE
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
#undef snprintf
#undef vfscanf

View File

@ -1,16 +0,0 @@
Upstream-Status: Inappropriate [embedded specific]
Index: gcc-4.5.0/libstdc++-v3/configure
===================================================================
--- gcc-4.5.0.orig/libstdc++-v3/configure 2010-06-25 10:48:37.488384191 -0700
+++ gcc-4.5.0/libstdc++-v3/configure 2010-06-25 10:51:23.804380413 -0700
@@ -18262,6 +18262,9 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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 ()
{

View File

@ -1,30 +0,0 @@
Upstream-Status: Pending
Index: gcc-4.5.0/libstdc++-v3/include/ext/rope
===================================================================
--- gcc-4.5.0.orig/libstdc++-v3/include/ext/rope 2009-04-09 08:00:19.000000000 -0700
+++ gcc-4.5.0/libstdc++-v3/include/ext/rope 2010-06-25 10:51:33.613383077 -0700
@@ -54,6 +54,9 @@
#include <bits/gthr.h>
#include <tr1/functional>
+/* cope w/ index defined as macro, SuSv3 proposal */
+#undef index
+
# ifdef __GC
# define __GC_CONST const
# else
Index: gcc-4.5.0/libstdc++-v3/include/ext/ropeimpl.h
===================================================================
--- gcc-4.5.0.orig/libstdc++-v3/include/ext/ropeimpl.h 2009-04-09 08:00:19.000000000 -0700
+++ gcc-4.5.0/libstdc++-v3/include/ext/ropeimpl.h 2010-06-25 10:51:33.621381669 -0700
@@ -49,6 +49,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;

View File

@ -1,51 +0,0 @@
Upstream-Status: Inappropriate [embedded specific]
Index: gcc-4.5.0/libmudflap/mf-hooks2.c
===================================================================
--- gcc-4.5.0.orig/libmudflap/mf-hooks2.c 2009-04-09 08:00:19.000000000 -0700
+++ gcc-4.5.0/libmudflap/mf-hooks2.c 2010-06-25 10:52:13.937636901 -0700
@@ -421,7 +421,7 @@
{
TRACE ("%s\n", __PRETTY_FUNCTION__);
MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
- bzero (s, n);
+ memset (s, 0, n);
}
@@ -431,7 +431,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);
}
@@ -441,7 +441,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);
}
@@ -450,7 +450,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);
}
@@ -459,7 +459,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 */

View File

@ -1,40 +0,0 @@
Upstream-Status: Pending
Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/messages_members.h
===================================================================
--- gcc-4.5.0.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2010-06-25 10:49:07.024632961 -0700
+++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/messages_members.h 2010-06-25 10:52:33.980632645 -0700
@@ -32,7 +32,8 @@
//
// Written by Benjamin Kosnik <bkoz@redhat.com>
-
+namespace std
+{
#ifdef __UCLIBC_MJN3_ONLY__
#warning fix prototypes for *textdomain funcs
#endif
@@ -116,3 +117,4 @@
this->_S_create_c_locale(this->_M_c_locale_messages, __s);
}
}
+}
Index: gcc-4.5.0/libstdc++-v3/config/locale/uclibc/time_members.h
===================================================================
--- gcc-4.5.0.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2010-06-25 10:49:07.024632961 -0700
+++ gcc-4.5.0/libstdc++-v3/config/locale/uclibc/time_members.h 2010-06-25 10:52:33.980632645 -0700
@@ -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),
@@ -75,3 +76,4 @@
delete _M_data;
_S_destroy_c_locale(_M_c_locale_timepunct);
}
+}

View File

@ -1,22 +0,0 @@
Upstream-Status: Inappropriate [embedded specific]
By default gcc places 64 bit libs in a lib64 directory. This makes it use
"lib" instead.
RP 25/7/10
Index: gcc-4.5.0/gcc/config/i386/t-linux64
===================================================================
--- gcc-4.5.0.orig/gcc/config/i386/t-linux64 2010-08-10 15:47:42.000000000 +0100
+++ gcc-4.5.0/gcc/config/i386/t-linux64 2010-08-10 15:47:47.000000000 +0100
@@ -24,8 +24,8 @@
# MULTILIB_OSDIRNAMES according to what is found on the target.
MULTILIB_OPTIONS = m64/m32
-MULTILIB_DIRNAMES = 64 32
-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
+MULTILIB_DIRNAMES = . 32
+MULTILIB_OSDIRNAMES = . $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib

View File

@ -1,31 +0,0 @@
Upstream-Status: Pending
http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836
Index: gcc-4.5.0/gcc/configure.ac
===================================================================
--- gcc-4.5.0.orig/gcc/configure.ac 2010-03-25 22:40:32.000000000 -0700
+++ gcc-4.5.0/gcc/configure.ac 2010-06-25 11:02:48.489057877 -0700
@@ -2784,7 +2784,7 @@
tls_first_minor=14
tls_as_opt="-m64 -Aesame --fatal-warnings"
;;
- sh-*-* | sh[34]-*-*)
+ sh-*-* | sh[34]*-*-*)
conftest_s='
.section ".tdata","awT",@progbits
foo: .long 25
Index: gcc-4.5.0/gcc/configure
===================================================================
--- gcc-4.5.0.orig/gcc/configure 2010-03-25 22:40:32.000000000 -0700
+++ gcc-4.5.0/gcc/configure 2010-06-25 11:02:48.508381845 -0700
@@ -22156,7 +22156,7 @@
tls_first_minor=14
tls_as_opt="-m64 -Aesame --fatal-warnings"
;;
- sh-*-* | sh[34]-*-*)
+ sh-*-* | sh[34]*-*-*)
conftest_s='
.section ".tdata","awT",@progbits
foo: .long 25

View File

@ -1,36 +0,0 @@
Upstream-Status: Pending
By Lennert Buytenhek <buytenh@wantstofly.org>
Adds support for arm*b-linux* big-endian ARM targets
See http://gcc.gnu.org/PR16350
Index: gcc-4.5.0/gcc/config/arm/linux-elf.h
===================================================================
--- gcc-4.5.0.orig/gcc/config/arm/linux-elf.h 2009-11-05 06:47:45.000000000 -0800
+++ gcc-4.5.0/gcc/config/arm/linux-elf.h 2010-06-25 11:03:06.997132728 -0700
@@ -51,7 +51,7 @@
#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
Index: gcc-4.5.0/gcc/config.gcc
===================================================================
--- gcc-4.5.0.orig/gcc/config.gcc 2010-06-25 10:40:33.321880880 -0700
+++ gcc-4.5.0/gcc/config.gcc 2010-06-25 11:03:07.013133525 -0700
@@ -734,6 +734,11 @@
esac
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 t-slibgcc-libgcc"

View File

@ -1,76 +0,0 @@
Upstream-Status: Pending
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.5.0/gcc/stmt.c
===================================================================
--- gcc-4.5.0.orig/gcc/stmt.c 2010-02-19 01:53:51.000000000 -0800
+++ gcc-4.5.0/gcc/stmt.c 2010-06-25 11:05:31.816881094 -0700
@@ -2440,7 +2440,11 @@
default code is emitted. */
use_cost_table = 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);
if (default_label)
emit_jump (default_label);
@@ -3008,6 +3012,7 @@
{
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,

View File

@ -1,24 +0,0 @@
Upstream-Status: Pending
#This patck added --sysroot into COLLECT_GCC_OPTIONS which is used to
#invoke collect2.
diff -ruN gcc-4.5.1.orig/gcc/gcc.c gcc-4.5.1/gcc/gcc.c
--- gcc-4.5.1.orig/gcc/gcc.c 2011-03-09 16:43:39.127752586 +0800
+++ gcc-4.5.1/gcc/gcc.c 2011-03-09 16:47:15.894929459 +0800
@@ -4667,6 +4667,15 @@
sizeof ("COLLECT_GCC_OPTIONS=") - 1);
first_time = TRUE;
+#ifdef HAVE_LD_SYSROOT
+ if (target_system_root_changed && target_system_root)
+ {
+ obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1);
+ obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root));
+ obstack_grow (&collect_obstack, "'", 1);
+ first_time = FALSE;
+ }
+#endif
for (i = 0; (int) i < n_switches; i++)
{
const char *const *args;

View File

@ -1,35 +0,0 @@
Upstream-Status: Pending
# by default c++ include directories are not relative to "--sysroot"
# which brings one trouble when using the toolchain in an environment
# where the build directory generating that toolchain doesn't exist,
# e.g. in sstate, machine specific sysroot and relocatable SDK
# toolchain. This patch now enables c++ include paths under sysroot.
# This way it's enough as long as "--sysroot" is correctly enabled
# in the new environment.
#
# Signed-off-by Kevin Tian <kevin.tian@intel.com>, 2010-12-30
diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
index 5024f48..9b47d1c 100644
--- a/gcc/cppdefault.c
+++ b/gcc/cppdefault.c
@@ -48,15 +48,15 @@ const struct default_include cpp_include_defaults[]
= {
#ifdef GPLUSPLUS_INCLUDE_DIR
/* Pick up GNU C++ generic include files. */
- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 0, 0 },
+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 1, 0 },
#endif
#ifdef GPLUSPLUS_TOOL_INCLUDE_DIR
/* Pick up GNU C++ target-dependent include files. */
- { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, 0, 1 },
+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, 1, 1 },
#endif
#ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR
/* Pick up GNU C++ backward and deprecated include files. */
- { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, 0, 0 },
+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, 1, 0 },
#endif
#ifdef LOCAL_INCLUDE_DIR
/* /usr/local/include comes before the fixincluded header files. */

View File

@ -1,15 +0,0 @@
Upstream-Status: Pending
Index: gcc-4.5/gcc/config/arm/arm.md
===================================================================
--- gcc-4.5.orig/gcc/config/arm/arm.md 2010-06-17 09:13:07.000000000 -0700
+++ gcc-4.5/gcc/config/arm/arm.md 2010-06-22 08:08:45.397212002 -0700
@@ -11267,7 +11267,7 @@
(define_expand "bswapsi2"
[(set (match_operand:SI 0 "s_register_operand" "=r")
(bswap:SI (match_operand:SI 1 "s_register_operand" "r")))]
-"TARGET_EITHER"
+"TARGET_EITHER && (arm_arch6 || !optimize_size)"
"
if (!arm_arch6)
{

View File

@ -1,26 +0,0 @@
Upstream-Status: Pending
# Dimitry Andric <dimitry@andric.com>, 2004-05-01
#
# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
# anymore. (The required functions are now in libgcc.)
#
# Fixes errors like
# arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat
# collect2: ld returned 1 exit status
# make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1
# when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat
Index: gcc-4.5.0/gcc/config/arm/linux-elf.h
===================================================================
--- gcc-4.5.0.orig/gcc/config/arm/linux-elf.h 2010-06-25 11:04:49.572437901 -0700
+++ gcc-4.5.0/gcc/config/arm/linux-elf.h 2010-06-25 11:06:12.273162283 -0700
@@ -60,7 +60,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"

View File

@ -1,18 +0,0 @@
Upstream-Status: Pending
Index: gcc-4.5.0/gcc/config/arm/t-linux
===================================================================
--- gcc-4.5.0.orig/gcc/config/arm/t-linux 2009-04-21 12:03:23.000000000 -0700
+++ gcc-4.5.0/gcc/config/arm/t-linux 2010-06-25 11:11:06.836381365 -0700
@@ -23,7 +23,10 @@
LIB1ASMSRC = arm/lib1funcs.asm
LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
- _arm_addsubdf3 _arm_addsubsf3
+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
+ _fixsfsi _fixunssfsi _floatdidf _floatdisf _floatundisf _floatundidf
+# _arm_addsubdf3 _arm_addsubsf3
# MULTILIB_OPTIONS = mhard-float/msoft-float
# MULTILIB_DIRNAMES = hard-float soft-float

View File

@ -1,33 +0,0 @@
Upstream-Status: Inappropriate [embedded specific]
---
gcc/configure | 2 +-
gcc/configure.ac | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Index: gcc-4.5+svnr155514/gcc/configure
===================================================================
--- gcc-4.5+svnr155514.orig/gcc/configure 2009-12-29 22:00:40.000000000 -0800
+++ gcc-4.5+svnr155514/gcc/configure 2009-12-29 23:52:43.381592113 -0800
@@ -10467,7 +10467,7 @@ else
saved_CFLAGS="${CFLAGS}"
CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
LDFLAGS="${LDFLAGS_FOR_BUILD}" \
- ${realsrcdir}/configure \
+ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \
--enable-languages=${enable_languages-all} \
--target=$target_alias --host=$build_alias --build=$build_alias
CFLAGS="${saved_CFLAGS}"
Index: gcc-4.5+svnr155514/gcc/configure.ac
===================================================================
--- gcc-4.5+svnr155514.orig/gcc/configure.ac 2009-12-29 22:00:40.000000000 -0800
+++ gcc-4.5+svnr155514/gcc/configure.ac 2009-12-29 23:51:54.589091778 -0800
@@ -1458,7 +1458,7 @@ else
saved_CFLAGS="${CFLAGS}"
CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
LDFLAGS="${LDFLAGS_FOR_BUILD}" \
- ${realsrcdir}/configure \
+ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \
--enable-languages=${enable_languages-all} \
--target=$target_alias --host=$build_alias --build=$build_alias
CFLAGS="${saved_CFLAGS}"

View File

@ -1,46 +0,0 @@
Upstream-Status: Inappropriate [configuration]
GCC: disable MASK_RELAX_PIC_CALLS bit
The new feature added after 4.3.3
"http://www.pubbs.net/200909/gcc/94048-patch-add-support-for-rmipsjalr.html"
will cause cc1plus eat up all the system memory when build webkit-gtk.
The function mips_get_pic_call_symbol keeps on recursively calling itself.
Disable this feature to walk aside the bug.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
diff -ruN gcc-4.5.0-orig/gcc/configure gcc-4.5.0/gcc/configure
--- gcc-4.5.0-orig/gcc/configure 2010-09-17 23:30:21.000000000 +0800
+++ gcc-4.5.0/gcc/configure 2010-09-19 18:21:28.000000000 +0800
@@ -23945,13 +23945,6 @@
rm -f conftest.*
fi
fi
- if test $gcc_cv_as_ld_jalr_reloc = yes; then
- if test x$target_cpu_default = x; then
- target_cpu_default=MASK_RELAX_PIC_CALLS
- else
- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
- fi
- fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5
$as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; }
diff -ruN gcc-4.5.0-orig/gcc/configure.ac gcc-4.5.0/gcc/configure.ac
--- gcc-4.5.0-orig/gcc/configure.ac 2010-09-17 23:30:21.000000000 +0800
+++ gcc-4.5.0/gcc/configure.ac 2010-09-19 18:21:11.000000000 +0800
@@ -3467,13 +3467,6 @@
rm -f conftest.*
fi
fi
- if test $gcc_cv_as_ld_jalr_reloc = yes; then
- if test x$target_cpu_default = x; then
- target_cpu_default=MASK_RELAX_PIC_CALLS
- else
- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
- fi
- fi
AC_MSG_RESULT($gcc_cv_as_ld_jalr_reloc)
AC_CACHE_CHECK([linker for .eh_frame personality relaxation],

View File

@ -1,115 +0,0 @@
Upstream-Status: Inappropriate [distribution: fedora]
2007-10-02 Jakub Jelinek <jakub@redhat.com>
* decl.c (duplicate_decls): When redeclaring a builtin function,
keep the merged decl builtin whenever types match, even if new
decl defines a function.
* gcc.dg/builtins-65.c: New test.
* g++.dg/ext/builtin10.C: New test.
Index: gcc/cp/decl.c
===================================================================
--- gcc/cp/decl.c.orig 2010-04-01 11:48:46.000000000 -0700
+++ gcc/cp/decl.c 2010-06-25 10:10:54.749131719 -0700
@@ -2021,23 +2021,21 @@
DECL_ARGUMENTS (olddecl) = DECL_ARGUMENTS (newdecl);
DECL_RESULT (olddecl) = DECL_RESULT (newdecl);
}
+ /* If redeclaring a builtin function, it stays built in. */
+ if (types_match && DECL_BUILT_IN (olddecl))
+ {
+ DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
+ DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
+ /* If we're keeping the built-in definition, keep the rtl,
+ regardless of declaration matches. */
+ COPY_DECL_RTL (olddecl, newdecl);
+ }
if (new_defines_function)
/* If defining a function declared with other language
linkage, use the previously declared language linkage. */
SET_DECL_LANGUAGE (newdecl, DECL_LANGUAGE (olddecl));
else if (types_match)
{
- /* If redeclaring a builtin function, and not a definition,
- it stays built in. */
- if (DECL_BUILT_IN (olddecl))
- {
- DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
- DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
- /* If we're keeping the built-in definition, keep the rtl,
- regardless of declaration matches. */
- COPY_DECL_RTL (olddecl, newdecl);
- }
-
DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
/* Don't clear out the arguments if we're just redeclaring a
function. */
Index: gcc/testsuite/gcc.dg/builtins-65.c
===================================================================
--- gcc/testsuite/gcc.dg/builtins-65.c.orig 2009-06-26 02:02:04.000000000 -0700
+++ gcc/testsuite/gcc.dg/builtins-65.c 2010-06-25 10:10:54.784464429 -0700
@@ -1,3 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef __SIZE_TYPE__ size_t;
+extern void __chk_fail (void);
+extern int snprintf (char *, size_t, const char *, ...);
+extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...)
+{
+ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b)
+ __chk_fail ();
+ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ());
+}
+extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf");
+
+char buf[10];
+
+int
+main (void)
+{
+ snprintf (buf, 10, "%d%d\n", 10, 10);
+ return 0;
+}
+
+/* { dg-final { scan-assembler "mysnprintf" } } */
+/* { dg-final { scan-assembler-not "__chk_fail" } } */
/* { dg-do link } */
/* { dg-options "-O2 -ffast-math" } */
/* { dg-require-effective-target c99_runtime } */
Index: gcc/testsuite/g++.dg/ext/builtin10.C
===================================================================
--- gcc/testsuite/g++.dg/ext/builtin10.C.orig 2009-02-02 03:27:50.000000000 -0800
+++ gcc/testsuite/g++.dg/ext/builtin10.C 2010-06-25 10:10:54.816467202 -0700
@@ -1,3 +1,30 @@
+// { dg-do compile }
+// { dg-options "-O2" }
+
+typedef __SIZE_TYPE__ size_t;
+extern "C" {
+extern void __chk_fail (void);
+extern int snprintf (char *, size_t, const char *, ...);
+extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...)
+{
+ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b)
+ __chk_fail ();
+ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ());
+}
+extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf");
+}
+
+char buf[10];
+
+int
+main (void)
+{
+ snprintf (buf, 10, "%d%d\n", 10, 10);
+ return 0;
+}
+
+// { dg-final { scan-assembler "mysnprintf" } }
+// { dg-final { scan-assembler-not "__chk_fail" } }
// { dg-do compile { target correct_iso_cpp_string_wchar_protos } }
// { dg-options "-O2 -fdump-tree-optimized" }

View File

@ -1,285 +0,0 @@
Upstream-Status: Inappropriate [distribution: fedora]
2008-02-26 Jakub Jelinek <jakub@redhat.com>
* c-ppoutput.c (scan_translation_unit): Handle CPP_PRAGMA
and CPP_PRAGMA_EOL.
* c-pragma.c (pragma_ns_name): New typedef.
(registered_pp_pragmas): New variable.
(c_pp_lookup_pragma): New function.
(c_register_pragma_1): If flag_preprocess_only, do nothing
for non-expanded pragmas, for expanded ones push pragma's
namespace and name into registered_pp_pragmas vector.
(c_invoke_pragma_handler): Register OpenMP pragmas even when
flag_preprocess_only, don't register GCC pch_preprocess
pragma if flag_preprocess_only.
* c-opts.c (c_common_init): Call init_pragma even if
flag_preprocess_only.
* c-pragma.c (c_pp_lookup_pragma): New prototype.
* config/darwin.h (DARWIN_REGISTER_TARGET_PRAGMAS): Don't call
cpp_register_pragma if flag_preprocess_only.
* gcc.dg/gomp/preprocess-1.c: New test.
--- gcc/c-ppoutput.c.jj 2008-01-26 18:01:16.000000000 +0100
+++ gcc/c-ppoutput.c 2008-02-26 22:54:57.000000000 +0100
@@ -1,6 +1,6 @@
/* Preprocess only, using cpplib.
- Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007
- Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007,
+ 2008 Free Software Foundation, Inc.
Written by Per Bothner, 1994-95.
This program is free software; you can redistribute it and/or modify it
@@ -177,7 +177,24 @@ scan_translation_unit (cpp_reader *pfile
avoid_paste = false;
print.source = NULL;
print.prev = token;
- cpp_output_token (token, print.outf);
+ if (token->type == CPP_PRAGMA)
+ {
+ const char *space;
+ const char *name;
+
+ maybe_print_line (token->src_loc);
+ fputs ("#pragma ", print.outf);
+ c_pp_lookup_pragma (token->val.pragma, &space, &name);
+ if (space)
+ fprintf (print.outf, "%s %s", space, name);
+ else
+ fprintf (print.outf, "%s", name);
+ print.printed = 1;
+ }
+ else if (token->type == CPP_PRAGMA_EOL)
+ maybe_print_line (token->src_loc);
+ else
+ cpp_output_token (token, print.outf);
if (token->type == CPP_COMMENT)
account_for_newlines (token->val.str.text, token->val.str.len);
--- gcc/c-pragma.c.jj 2008-02-15 18:43:03.000000000 +0100
+++ gcc/c-pragma.c 2008-02-26 22:59:44.000000000 +0100
@@ -1,6 +1,6 @@
/* Handle #pragma, system V.4 style. Supports #pragma weak and #pragma pack.
Copyright (C) 1992, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007 Free Software Foundation, Inc.
+ 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of GCC.
@@ -872,6 +872,61 @@ DEF_VEC_ALLOC_O (pragma_handler, heap);
static VEC(pragma_handler, heap) *registered_pragmas;
+typedef struct
+{
+ const char *space;
+ const char *name;
+} pragma_ns_name;
+
+DEF_VEC_O (pragma_ns_name);
+DEF_VEC_ALLOC_O (pragma_ns_name, heap);
+
+static VEC(pragma_ns_name, heap) *registered_pp_pragmas;
+
+struct omp_pragma_def { const char *name; unsigned int id; };
+static const struct omp_pragma_def omp_pragmas[] = {
+ { "atomic", PRAGMA_OMP_ATOMIC },
+ { "barrier", PRAGMA_OMP_BARRIER },
+ { "critical", PRAGMA_OMP_CRITICAL },
+ { "flush", PRAGMA_OMP_FLUSH },
+ { "for", PRAGMA_OMP_FOR },
+ { "master", PRAGMA_OMP_MASTER },
+ { "ordered", PRAGMA_OMP_ORDERED },
+ { "parallel", PRAGMA_OMP_PARALLEL },
+ { "section", PRAGMA_OMP_SECTION },
+ { "sections", PRAGMA_OMP_SECTIONS },
+ { "single", PRAGMA_OMP_SINGLE },
+ { "threadprivate", PRAGMA_OMP_THREADPRIVATE }
+};
+
+void
+c_pp_lookup_pragma (unsigned int id, const char **space, const char **name)
+{
+ const int n_omp_pragmas = sizeof (omp_pragmas) / sizeof (*omp_pragmas);
+ int i;
+
+ for (i = 0; i < n_omp_pragmas; ++i)
+ if (omp_pragmas[i].id == id)
+ {
+ *space = "omp";
+ *name = omp_pragmas[i].name;
+ return;
+ }
+
+ if (id >= PRAGMA_FIRST_EXTERNAL
+ && (id < PRAGMA_FIRST_EXTERNAL
+ + VEC_length (pragma_ns_name, registered_pp_pragmas)))
+ {
+ *space = VEC_index (pragma_ns_name, registered_pp_pragmas,
+ id - PRAGMA_FIRST_EXTERNAL)->space;
+ *name = VEC_index (pragma_ns_name, registered_pp_pragmas,
+ id - PRAGMA_FIRST_EXTERNAL)->name;
+ return;
+ }
+
+ gcc_unreachable ();
+}
+
/* Front-end wrappers for pragma registration to avoid dragging
cpplib.h in almost everywhere. */
@@ -881,13 +936,29 @@ c_register_pragma_1 (const char *space,
{
unsigned id;
- VEC_safe_push (pragma_handler, heap, registered_pragmas, &handler);
- id = VEC_length (pragma_handler, registered_pragmas);
- id += PRAGMA_FIRST_EXTERNAL - 1;
-
- /* The C++ front end allocates 6 bits in cp_token; the C front end
- allocates 7 bits in c_token. At present this is sufficient. */
- gcc_assert (id < 64);
+ if (flag_preprocess_only)
+ {
+ pragma_ns_name ns_name;
+
+ if (!allow_expansion)
+ return;
+
+ ns_name.space = space;
+ ns_name.name = name;
+ VEC_safe_push (pragma_ns_name, heap, registered_pp_pragmas, &ns_name);
+ id = VEC_length (pragma_ns_name, registered_pp_pragmas);
+ id += PRAGMA_FIRST_EXTERNAL - 1;
+ }
+ else
+ {
+ VEC_safe_push (pragma_handler, heap, registered_pragmas, &handler);
+ id = VEC_length (pragma_handler, registered_pragmas);
+ id += PRAGMA_FIRST_EXTERNAL - 1;
+
+ /* The C++ front end allocates 6 bits in cp_token; the C front end
+ allocates 7 bits in c_token. At present this is sufficient. */
+ gcc_assert (id < 64);
+ }
cpp_register_deferred_pragma (parse_in, space, name, id,
allow_expansion, false);
@@ -921,24 +992,8 @@ c_invoke_pragma_handler (unsigned int id
void
init_pragma (void)
{
- if (flag_openmp && !flag_preprocess_only)
+ if (flag_openmp)
{
- struct omp_pragma_def { const char *name; unsigned int id; };
- static const struct omp_pragma_def omp_pragmas[] = {
- { "atomic", PRAGMA_OMP_ATOMIC },
- { "barrier", PRAGMA_OMP_BARRIER },
- { "critical", PRAGMA_OMP_CRITICAL },
- { "flush", PRAGMA_OMP_FLUSH },
- { "for", PRAGMA_OMP_FOR },
- { "master", PRAGMA_OMP_MASTER },
- { "ordered", PRAGMA_OMP_ORDERED },
- { "parallel", PRAGMA_OMP_PARALLEL },
- { "section", PRAGMA_OMP_SECTION },
- { "sections", PRAGMA_OMP_SECTIONS },
- { "single", PRAGMA_OMP_SINGLE },
- { "threadprivate", PRAGMA_OMP_THREADPRIVATE }
- };
-
const int n_omp_pragmas = sizeof (omp_pragmas) / sizeof (*omp_pragmas);
int i;
@@ -947,8 +1002,9 @@ init_pragma (void)
omp_pragmas[i].id, true, true);
}
- cpp_register_deferred_pragma (parse_in, "GCC", "pch_preprocess",
- PRAGMA_GCC_PCH_PREPROCESS, false, false);
+ if (!flag_preprocess_only)
+ cpp_register_deferred_pragma (parse_in, "GCC", "pch_preprocess",
+ PRAGMA_GCC_PCH_PREPROCESS, false, false);
#ifdef HANDLE_PRAGMA_PACK
#ifdef HANDLE_PRAGMA_PACK_WITH_EXPANSION
--- gcc/c-opts.c.jj 2008-02-26 22:53:23.000000000 +0100
+++ gcc/c-opts.c 2008-02-26 22:54:57.000000000 +0100
@@ -1,5 +1,5 @@
/* C/ObjC/C++ command line option handling.
- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
Contributed by Neil Booth.
@@ -1239,6 +1239,9 @@ c_common_init (void)
if (version_flag)
c_common_print_pch_checksum (stderr);
+ /* Has to wait until now so that cpplib has its hash table. */
+ init_pragma ();
+
if (flag_preprocess_only)
{
finish_options ();
@@ -1246,9 +1249,6 @@ c_common_init (void)
return false;
}
- /* Has to wait until now so that cpplib has its hash table. */
- init_pragma ();
-
return true;
}
--- gcc/c-pragma.h.jj 2008-01-26 18:01:16.000000000 +0100
+++ gcc/c-pragma.h 2008-02-26 22:54:57.000000000 +0100
@@ -1,6 +1,6 @@
/* Pragma related interfaces.
Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2007 Free Software Foundation, Inc.
+ 2007, 2008 Free Software Foundation, Inc.
This file is part of GCC.
@@ -124,4 +124,6 @@ extern enum cpp_ttype pragma_lex (tree *
extern enum cpp_ttype c_lex_with_flags (tree *, location_t *, unsigned char *,
int);
+extern void c_pp_lookup_pragma (unsigned int, const char **, const char **);
+
#endif /* GCC_C_PRAGMA_H */
--- gcc/config/darwin.h.jj 2008-02-11 14:48:12.000000000 +0100
+++ gcc/config/darwin.h 2008-02-26 22:54:57.000000000 +0100
@@ -892,8 +892,9 @@ enum machopic_addr_class {
#define DARWIN_REGISTER_TARGET_PRAGMAS() \
do { \
- cpp_register_pragma (parse_in, NULL, "mark", \
- darwin_pragma_ignore, false); \
+ if (!flag_preprocess_only) \
+ cpp_register_pragma (parse_in, NULL, "mark", \
+ darwin_pragma_ignore, false); \
c_register_pragma (0, "options", darwin_pragma_options); \
c_register_pragma (0, "segment", darwin_pragma_ignore); \
c_register_pragma (0, "unused", darwin_pragma_unused); \
--- gcc/testsuite/gcc.dg/gomp/preprocess-1.c.jj 2008-02-26 22:54:57.000000000 +0100
+++ gcc/testsuite/gcc.dg/gomp/preprocess-1.c 2008-02-26 22:54:57.000000000 +0100
@@ -0,0 +1,16 @@
+/* { dg-do preprocess } */
+
+void foo (void)
+{
+ int i1, j1, k1;
+#define p parallel
+#define P(x) private (x##1)
+#define S(x) shared (x##1)
+#define F(x) firstprivate (x##1)
+#pragma omp p P(i) \
+ S(j) \
+ F(k)
+ ;
+}
+
+/* { dg-final { scan-file preprocess-1.i "(^|\n)#pragma omp parallel private \\(i1\\) shared \\(j1\\) firstprivate \\(k1\\)($|\n)" } } */

View File

@ -1,66 +0,0 @@
Upstream-Status: Inappropriate [distribution: fedora]
Build i386.rpm libgomp and libsupc++.a(guard.o) as i486+, pre-i486
hardware isn't supported because NPTL doesn't support it anyway.
Index: libgomp/configure.tgt
===================================================================
--- libgomp/configure.tgt.orig 2010-01-28 13:47:59.000000000 -0800
+++ libgomp/configure.tgt 2010-06-25 10:32:26.706135558 -0700
@@ -48,14 +48,14 @@
;;
# Note that bare i386 is not included here. We need cmpxchg.
- i[456]86-*-linux*)
+ i[3456]86-*-linux*)
config_path="linux/x86 linux posix"
case " ${CC} ${CFLAGS} " in
*" -m64 "*)
;;
*)
if test -z "$with_arch"; then
- XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
fi
esac
;;
@@ -67,7 +67,7 @@
config_path="linux/x86 linux posix"
case " ${CC} ${CFLAGS} " in
*" -m32 "*)
- XCFLAGS="${XCFLAGS} -march=i486 -mtune=i686"
+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
;;
esac
;;
Index: libstdc++-v3/libsupc++/guard.cc
===================================================================
--- libstdc++-v3/libsupc++/guard.cc.orig 2009-11-09 14:09:30.000000000 -0800
+++ libstdc++-v3/libsupc++/guard.cc 2010-06-25 10:32:26.710135964 -0700
@@ -30,6 +30,27 @@
#include <new>
#include <ext/atomicity.h>
#include <ext/concurrence.h>
+#if defined __i386__ && !defined _GLIBCXX_ATOMIC_BUILTINS
+# define _GLIBCXX_ATOMIC_BUILTINS 1
+# define __sync_val_compare_and_swap(a, b, c) \
+ ({ \
+ typedef char sltast[sizeof (*a) == sizeof (int) ? 1 : -1]; \
+ int sltas; \
+ __asm __volatile ("lock; cmpxchgl %3, (%1)" \
+ : "=a" (sltas) \
+ : "r" (a), "0" (b), "r" (c) : "memory"); \
+ sltas; \
+ })
+# define __sync_lock_test_and_set(a, b) \
+ ({ \
+ typedef char sltast[sizeof (*a) == sizeof (int) ? 1 : -1]; \
+ int sltas; \
+ __asm __volatile ("xchgl (%1), %0" \
+ : "=r" (sltas) \
+ : "r" (a), "0" (b) : "memory"); \
+ sltas; \
+ })
+#endif
#if defined(__GTHREADS) && defined(__GTHREAD_HAS_COND) \
&& defined(_GLIBCXX_ATOMIC_BUILTINS_4) && defined(_GLIBCXX_HAVE_LINUX_FUTEX)
# include <climits>

View File

@ -1,551 +0,0 @@
Upstream-Status: Inappropriate [distribution: fedora]
2004-11-27 Jakub Jelinek <jakub@redhat.com>
* config.gcc (ia64*-*-linux*): If native and libelf is installed,
use ia64/t-glibc-no-libunwind instead of the other t-*unwind*
fragments.
* config/ia64/t-glibc-no-libunwind: New file.
* config/ia64/change-symver.c: New file.
* config/ia64/unwind-ia64.c: If USE_SYMVER_GLOBAL and SHARED,
define _Unwind_* to __symverglobal_Unwind_*.
(alias): Undefine.
(symverglobal): Define. Use it on _Unwind_*.
* config/ia64/mkmap-symver-multi.awk: New file.
* config/ia64/libgcc-ia64-no-libunwind.ver: New file.
Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc.orig 2010-04-07 03:34:00.000000000 -0700
+++ gcc/config.gcc 2010-06-25 10:15:25.133131055 -0700
@@ -1457,9 +1457,16 @@
;;
ia64*-*-linux*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h ia64/sysv4.h ia64/linux.h"
- tmake_file="${tmake_file} ia64/t-ia64 t-libunwind ia64/t-glibc"
- if test x$with_system_libunwind != xyes ; then
- tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
+ tmake_file="${tmake_file} ia64/t-ia64"
+ if test x${target} = x${host} && test x${target} = x${build} \
+ && grep gelf_getverdef /usr/include/gelf.h > /dev/null 2>&1 \
+ && test -f /usr/lib/libelf.so; then
+ tmake_file="${tmake_file} ia64/t-glibc-no-libunwind"
+ else
+ tmake_file="${tmake_file} t-libunwind ia64/t-glibc"
+ if test x$with_system_libunwind != xyes ; then
+ tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
+ fi
fi
target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
Index: gcc/config/ia64/t-glibc-no-libunwind
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gcc/config/ia64/t-glibc-no-libunwind 2010-06-25 10:14:32.521880765 -0700
@@ -0,0 +1,30 @@
+# Don't use system libunwind library on IA-64 GLIBC based system,
+# but make _Unwind_* symbols unversioned, so that created programs
+# are usable even when libgcc_s uses libunwind.
+LIB2ADDEH += $(srcdir)/config/ia64/fde-glibc.c
+SHLIB_MAPFILES += $(srcdir)/config/ia64/libgcc-ia64-no-libunwind.ver
+SHLIB_MKMAP = $(srcdir)/config/ia64/mkmap-symver-multi.awk
+
+SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
+ -Wl,--soname=$(SHLIB_SONAME) \
+ -Wl,--version-script=$(SHLIB_MAP) \
+ -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
+ rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
+ if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
+ mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
+ $(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
+ else true; fi && \
+ gcc -O2 -o $(SHLIB_DIR)/$(SHLIB_SONAME).tweak \
+ $$(gcc_srcdir)/config/ia64/change-symver.c -lelf && \
+ $(SHLIB_DIR)/$(SHLIB_SONAME).tweak $(SHLIB_DIR)/$(SHLIB_SONAME).tmp \
+ GCC_3.4.2 _GLOBAL_ \
+ _Unwind_GetGR _Unwind_RaiseException _Unwind_GetRegionStart _Unwind_SetIP \
+ _Unwind_GetIP _Unwind_GetLanguageSpecificData _Unwind_Resume \
+ _Unwind_DeleteException _Unwind_SetGR _Unwind_ForcedUnwind \
+ _Unwind_Backtrace _Unwind_FindEnclosingFunction _Unwind_GetCFA \
+ _Unwind_Resume_or_Rethrow _Unwind_GetBSP && \
+ rm -f $(SHLIB_DIR)/$(SHLIB_SONAME).tweak && \
+ mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
+ $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
+
+TARGET_LIBGCC2_CFLAGS += -DUSE_SYMVER_GLOBAL
Index: gcc/config/ia64/change-symver.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gcc/config/ia64/change-symver.c 2010-06-25 10:14:32.521880765 -0700
@@ -0,0 +1,211 @@
+#define _GNU_SOURCE 1
+#define _FILE_OFFSET_BITS 64
+#include <endian.h>
+#include <errno.h>
+#include <error.h>
+#include <fcntl.h>
+#include <fnmatch.h>
+#include <gelf.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+int
+compute_veridx (const char *name, Elf *elf, Elf_Data *verd, GElf_Shdr *verd_shdr)
+{
+ if (strcmp (name, "_GLOBAL_") == 0)
+ return 1;
+
+ int cnt;
+ size_t offset = 0;
+ for (cnt = verd_shdr->sh_info; --cnt >= 0; )
+ {
+ GElf_Verdef defmem;
+ GElf_Verdef *def;
+ GElf_Verdaux auxmem;
+ GElf_Verdaux *aux;
+ unsigned int auxoffset;
+
+ /* Get the data at the next offset. */
+ def = gelf_getverdef (verd, offset, &defmem);
+ if (def == NULL)
+ break;
+
+ auxoffset = offset + def->vd_aux;
+ aux = gelf_getverdaux (verd, auxoffset, &auxmem);
+ if (aux == NULL)
+ break;
+
+ if (strcmp (name, elf_strptr (elf, verd_shdr->sh_link,
+ aux->vda_name)) == 0)
+ return def->vd_ndx;
+
+ /* Find the next offset. */
+ offset += def->vd_next;
+ }
+
+ return -1;
+}
+
+int
+main (int argc, char **argv)
+{
+ if (argc < 4)
+ error (1, 0, "Usage: change_symver library from_symver to_symver symbol...\nExample: change_symver libfoo.so FOO_1.0 *global* bar baz");
+
+ const char *fname = argv[1];
+
+ /* Open the file. */
+ int fd;
+ fd = open (fname, O_RDWR);
+ if (fd == -1)
+ error (1, errno, fname);
+
+ elf_version (EV_CURRENT);
+
+ /* Now get the ELF descriptor. */
+ Elf *elf = elf_begin (fd, ELF_C_READ_MMAP, NULL);
+ if (elf == NULL || elf_kind (elf) != ELF_K_ELF)
+ error (1, 0, "Couldn't open %s: %s", fname, elf_errmsg (-1));
+
+ size_t shstrndx;
+ /* Get the section header string table index. */
+ if (elf_getshstrndx (elf, &shstrndx) < 0)
+ error (1, 0, "cannot get shstrndx from %s", fname);
+
+ GElf_Ehdr ehdr_mem;
+ GElf_Ehdr *ehdr;
+
+ /* We need the ELF header in a few places. */
+ ehdr = gelf_getehdr (elf, &ehdr_mem);
+ if (ehdr == NULL)
+ error (1, 0, "couldn't get ELF headers %s: %s", fname, elf_errmsg (-1));
+
+ Elf_Scn *scn = NULL;
+ GElf_Shdr shdr_mem, verd_shdr, ver_shdr, dynsym_shdr;
+ Elf_Data *ver = NULL, *verd = NULL, *dynsym = NULL;
+
+ while ((scn = elf_nextscn (elf, scn)) != NULL)
+ {
+ GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
+
+ if (shdr == NULL)
+ error (1, 0, "couldn't get shdr from %s", fname);
+
+ if ((shdr->sh_flags & SHF_ALLOC) != 0)
+ {
+ const char *name = elf_strptr (elf, shstrndx, shdr->sh_name);
+ Elf_Data **p;
+
+ if (strcmp (name, ".gnu.version") == 0)
+ {
+ p = &ver;
+ ver_shdr = *shdr;
+ }
+ else if (strcmp (name, ".gnu.version_d") == 0)
+ {
+ p = &verd;
+ verd_shdr = *shdr;
+ }
+ else if (strcmp (name, ".dynsym") == 0)
+ {
+ p = &dynsym;
+ dynsym_shdr = *shdr;
+ }
+ else
+ continue;
+
+ if (*p != NULL)
+ error (1, 0, "Two %s sections in %s", name, fname);
+ *p = elf_getdata (scn, NULL);
+ if (*p == NULL || elf_getdata (scn, *p) != NULL)
+ error (1, 0, "No data or non-contiguous data in %s section in %s",
+ name, fname);
+ }
+ }
+
+ if (ver == NULL || verd == NULL || dynsym == NULL)
+ error (1, 0, "Couldn't find one of the needed sections in %s", fname);
+
+ int from_idx = compute_veridx (argv[2], elf, verd, &verd_shdr);
+ if (from_idx == -1)
+ error (1, 0, "Could not find symbol version %s in %s", argv[2], fname);
+
+ int to_idx = compute_veridx (argv[3], elf, verd, &verd_shdr);
+ if (to_idx == -1)
+ error (1, 0, "Could not find symbol version %s in %s", argv[3], fname);
+
+ if (dynsym_shdr.sh_entsize != gelf_fsize (elf, ELF_T_SYM, 1, ehdr->e_version)
+ || dynsym_shdr.sh_size % dynsym_shdr.sh_entsize
+ || ver_shdr.sh_entsize != 2
+ || (ver_shdr.sh_size & 1)
+ || dynsym_shdr.sh_size / dynsym_shdr.sh_entsize != ver_shdr.sh_size / 2)
+ error (1, 0, "Unexpected sh_size or sh_entsize in %s", fname);
+
+ size_t nentries = ver_shdr.sh_size / 2;
+ size_t cnt;
+ GElf_Versym array[nentries];
+ for (cnt = 0; cnt < nentries; ++cnt)
+ {
+ GElf_Versym vsymmem;
+ GElf_Versym *vsym;
+
+ vsym = gelf_getversym (ver, cnt, &vsymmem);
+ if (vsym == NULL)
+ error (1, 0, "gelt_getversym failed in %s: %s", fname, elf_errmsg (-1));
+
+ array[cnt] = *vsym;
+ if (*vsym != from_idx)
+ continue;
+
+ GElf_Sym sym_mem;
+ GElf_Sym *sym;
+ sym = gelf_getsym (dynsym, cnt, &sym_mem);
+ if (sym == NULL)
+ error (1, 0, "gelt_getsym failed in %s: %s", fname, elf_errmsg (-1));
+
+ const char *name = elf_strptr (elf, dynsym_shdr.sh_link, sym->st_name);
+
+ int argn;
+ for (argn = 4; argn < argc; ++argn)
+ if (fnmatch (argv[argn], name, 0) == 0)
+ {
+ array[cnt] = to_idx;
+ break;
+ }
+ }
+
+ if (sizeof (array[0]) != 2)
+ abort ();
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
+ ;
+ else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
+#elif __BYTE_ORDER == __BIG_ENDIAN
+ if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
+ ;
+ else if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
+#else
+# error Unsupported endianity
+#endif
+ {
+ for (cnt = 0; cnt < nentries; ++cnt)
+ array[cnt] = ((array[cnt] & 0xff) << 8) | ((array[cnt] & 0xff00) >> 8);
+ }
+ else
+ error (1, 0, "Unknown EI_DATA %d in %s", ehdr->e_ident[EI_DATA], fname);
+
+ if (elf_end (elf) != 0)
+ error (1, 0, "couldn't close %s: %s", fname, elf_errmsg (-1));
+
+ if (lseek (fd, ver_shdr.sh_offset, SEEK_SET) != (off_t) ver_shdr.sh_offset)
+ error (1, 0, "failed to seek to %zd in %s", (size_t) ver_shdr.sh_offset,
+ fname);
+
+ if (write (fd, array, 2 * nentries) != (ssize_t) (2 * nentries))
+ error (1, 0, "failed to write .gnu.version section into %s", fname);
+
+ close (fd);
+ return 0;
+}
Index: gcc/config/ia64/unwind-ia64.c
===================================================================
--- gcc/config/ia64/unwind-ia64.c.orig 2009-09-07 08:41:52.000000000 -0700
+++ gcc/config/ia64/unwind-ia64.c 2010-06-25 10:14:32.521880765 -0700
@@ -48,6 +48,51 @@
#define MD_UNW_COMPATIBLE_PERSONALITY_P(HEADER) 1
#endif
+#if defined (USE_SYMVER_GLOBAL) && defined (SHARED)
+extern _Unwind_Reason_Code __symverglobal_Unwind_Backtrace
+ (_Unwind_Trace_Fn, void *);
+extern void __symverglobal_Unwind_DeleteException
+ (struct _Unwind_Exception *);
+extern void * __symverglobal_Unwind_FindEnclosingFunction (void *);
+extern _Unwind_Reason_Code __symverglobal_Unwind_ForcedUnwind
+ (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
+extern _Unwind_Word __symverglobal_Unwind_GetCFA
+ (struct _Unwind_Context *);
+extern _Unwind_Word __symverglobal_Unwind_GetBSP
+ (struct _Unwind_Context *);
+extern _Unwind_Word __symverglobal_Unwind_GetGR
+ (struct _Unwind_Context *, int );
+extern _Unwind_Ptr __symverglobal_Unwind_GetIP (struct _Unwind_Context *);
+extern void *__symverglobal_Unwind_GetLanguageSpecificData
+ (struct _Unwind_Context *);
+extern _Unwind_Ptr __symverglobal_Unwind_GetRegionStart
+ (struct _Unwind_Context *);
+extern _Unwind_Reason_Code __symverglobal_Unwind_RaiseException
+ (struct _Unwind_Exception *);
+extern void __symverglobal_Unwind_Resume (struct _Unwind_Exception *);
+extern _Unwind_Reason_Code __symverglobal_Unwind_Resume_or_Rethrow
+ (struct _Unwind_Exception *);
+extern void __symverglobal_Unwind_SetGR
+ (struct _Unwind_Context *, int, _Unwind_Word);
+extern void __symverglobal_Unwind_SetIP
+ (struct _Unwind_Context *, _Unwind_Ptr);
+#define _Unwind_Backtrace __symverglobal_Unwind_Backtrace
+#define _Unwind_DeleteException __symverglobal_Unwind_DeleteException
+#define _Unwind_FindEnclosingFunction __symverglobal_Unwind_FindEnclosingFunction
+#define _Unwind_ForcedUnwind __symverglobal_Unwind_ForcedUnwind
+#define _Unwind_GetBSP __symverglobal_Unwind_GetBSP
+#define _Unwind_GetCFA __symverglobal_Unwind_GetCFA
+#define _Unwind_GetGR __symverglobal_Unwind_GetGR
+#define _Unwind_GetIP __symverglobal_Unwind_GetIP
+#define _Unwind_GetLanguageSpecificData __symverglobal_Unwind_GetLanguageSpecificData
+#define _Unwind_GetRegionStart __symverglobal_Unwind_GetRegionStart
+#define _Unwind_RaiseException __symverglobal_Unwind_RaiseException
+#define _Unwind_Resume __symverglobal_Unwind_Resume
+#define _Unwind_Resume_or_Rethrow __symverglobal_Unwind_Resume_or_Rethrow
+#define _Unwind_SetGR __symverglobal_Unwind_SetGR
+#define _Unwind_SetIP __symverglobal_Unwind_SetIP
+#endif
+
enum unw_application_register
{
UNW_AR_BSP,
@@ -2457,4 +2502,44 @@
alias (_Unwind_SetIP);
#endif
+#if defined (USE_SYMVER_GLOBAL) && defined (SHARED)
+#undef alias
+#define symverglobal(name, version) \
+__typeof (__symverglobal##name) __symverlocal##name \
+ __attribute__ ((alias ("__symverglobal" #name))); \
+__asm__ (".symver __symverglobal" #name"," #name "@@GCC_3.4.2");\
+__asm__ (".symver __symverlocal" #name"," #name "@" #version)
+
+#undef _Unwind_Backtrace
+#undef _Unwind_DeleteException
+#undef _Unwind_FindEnclosingFunction
+#undef _Unwind_ForcedUnwind
+#undef _Unwind_GetBSP
+#undef _Unwind_GetCFA
+#undef _Unwind_GetGR
+#undef _Unwind_GetIP
+#undef _Unwind_GetLanguageSpecificData
+#undef _Unwind_GetRegionStart
+#undef _Unwind_RaiseException
+#undef _Unwind_Resume
+#undef _Unwind_Resume_or_Rethrow
+#undef _Unwind_SetGR
+#undef _Unwind_SetIP
+symverglobal (_Unwind_Backtrace, GCC_3.3);
+symverglobal (_Unwind_DeleteException, GCC_3.0);
+symverglobal (_Unwind_FindEnclosingFunction, GCC_3.3);
+symverglobal (_Unwind_ForcedUnwind, GCC_3.0);
+symverglobal (_Unwind_GetBSP, GCC_3.3.2);
+symverglobal (_Unwind_GetCFA, GCC_3.3);
+symverglobal (_Unwind_GetGR, GCC_3.0);
+symverglobal (_Unwind_GetIP, GCC_3.0);
+symverglobal (_Unwind_GetLanguageSpecificData, GCC_3.0);
+symverglobal (_Unwind_GetRegionStart, GCC_3.0);
+symverglobal (_Unwind_RaiseException, GCC_3.0);
+symverglobal (_Unwind_Resume, GCC_3.0);
+symverglobal (_Unwind_Resume_or_Rethrow, GCC_3.3);
+symverglobal (_Unwind_SetGR, GCC_3.0);
+symverglobal (_Unwind_SetIP, GCC_3.0);
+#endif
+
#endif
Index: gcc/config/ia64/mkmap-symver-multi.awk
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gcc/config/ia64/mkmap-symver-multi.awk 2010-06-25 10:14:32.521880765 -0700
@@ -0,0 +1,133 @@
+# Generate an ELF symbol version map a-la Solaris and GNU ld.
+# Contributed by Richard Henderson <rth@cygnus.com>
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# GCC is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING. If not, write to the Free
+# Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+BEGIN {
+ state = "nm";
+ sawsymbol = 0;
+}
+
+# Remove comment and blank lines.
+/^ *#/ || /^ *$/ {
+ next;
+}
+
+# We begin with nm input. Collect the set of symbols that are present
+# so that we can not emit them into the final version script -- Solaris
+# complains at us if we do.
+
+state == "nm" && /^%%/ {
+ state = "ver";
+ next;
+}
+
+state == "nm" && ($1 == "U" || $2 == "U") {
+ next;
+}
+
+state == "nm" && NF == 3 {
+ if ($3 ~ /^[^@]*@GCC_[0-9.]*$/) {
+ def[$3] = 1
+ tl=$3
+ sub(/^.*@/,"",tl)
+ ver[$3] = tl
+ } else {
+ sub(/@@?GCC_[0-9.]*$/,"",$3)
+ def[$3] = 1;
+ }
+ sawsymbol = 1;
+ next;
+}
+
+state == "nm" {
+ next;
+}
+
+# Now we process a simplified variant of the Solaris symbol version
+# script. We have one symbol per line, no semicolons, simple markers
+# for beginning and ending each section, and %inherit markers for
+# describing version inheritence. A symbol may appear in more than
+# one symbol version, and the last seen takes effect.
+
+NF == 3 && $1 == "%inherit" {
+ inherit[$2] = $3;
+ next;
+}
+
+NF == 2 && $2 == "{" {
+ libs[$1] = 1;
+ thislib = $1;
+ next;
+}
+
+$1 == "}" {
+ thislib = "";
+ next;
+}
+
+{
+ ver[$1] = thislib;
+ next;
+}
+
+END {
+ if (!sawsymbol)
+ {
+ print "No symbols seen -- broken or mis-installed nm?" | "cat 1>&2";
+ exit 1;
+ }
+ for (l in libs)
+ output(l);
+}
+
+function output(lib) {
+ if (done[lib])
+ return;
+ done[lib] = 1;
+ if (inherit[lib])
+ output(inherit[lib]);
+
+ empty=1
+ for (sym in ver)
+ if ((ver[sym] == lib) && (sym in def))
+ {
+ if (empty)
+ {
+ printf("%s {\n", lib);
+ printf(" global:\n");
+ empty = 0;
+ }
+ symp = sym;
+ sub(/@GCC_[0-9.]*$/,"",symp);
+ printf("\t%s;\n", symp);
+ if (dotsyms)
+ printf("\t.%s;\n", symp);
+ }
+
+ if (empty)
+ {
+ for (l in libs)
+ if (inherit[l] == lib)
+ inherit[l] = inherit[lib];
+ }
+ else if (inherit[lib])
+ printf("} %s;\n", inherit[lib]);
+ else
+ printf ("\n local:\n\t*;\n};\n");
+}
Index: gcc/config/ia64/libgcc-ia64-no-libunwind.ver
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gcc/config/ia64/libgcc-ia64-no-libunwind.ver 2010-06-25 10:14:32.525880902 -0700
@@ -0,0 +1,17 @@
+GCC_3.4.2 {
+ _Unwind_GetGR
+ _Unwind_RaiseException
+ _Unwind_GetRegionStart
+ _Unwind_SetIP
+ _Unwind_GetIP
+ _Unwind_GetLanguageSpecificData
+ _Unwind_Resume
+ _Unwind_DeleteException
+ _Unwind_SetGR
+ _Unwind_ForcedUnwind
+ _Unwind_Backtrace
+ _Unwind_FindEnclosingFunction
+ _Unwind_GetCFA
+ _Unwind_Resume_or_Rethrow
+ _Unwind_GetBSP
+}

View File

@ -1,20 +0,0 @@
Upstream-Status: Inappropriate [distribution: fedora]
2008-01-25 Jakub Jelinek <jakub@redhat.com>
* lang.c (java_classify_record): Revert 2007-12-20 change.
Index: gcc/java/lang.c
===================================================================
--- gcc/java/lang.c.orig 2010-01-20 00:17:00.000000000 -0800
+++ gcc/java/lang.c 2010-06-25 10:28:46.569383189 -0700
@@ -881,9 +881,7 @@
if (! CLASS_P (type))
return RECORD_IS_STRUCT;
- /* ??? GDB does not support DW_TAG_interface_type as of December,
- 2007. Re-enable this at a later time. */
- if (0 && CLASS_INTERFACE (TYPE_NAME (type)))
+ if (CLASS_INTERFACE (TYPE_NAME (type)))
return RECORD_IS_INTERFACE;
return RECORD_IS_CLASS;

View File

@ -1,49 +0,0 @@
Upstream-Status: Inappropriate [distribution: fedora]
Index: libjava/configure.ac
===================================================================
--- libjava/configure.ac.orig 2010-03-21 12:41:37.000000000 -0700
+++ libjava/configure.ac 2010-06-25 10:17:47.489886278 -0700
@@ -139,6 +139,13 @@
[allow rebuilding of .class and .h files]))
AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes)
+AC_ARG_ENABLE(libjava-multilib,
+ AS_HELP_STRING([--enable-libjava-multilib], [build libjava as multilib]))
+if test "$enable_libjava_multilib" = no; then
+ multilib=no
+ ac_configure_args="$ac_configure_args --disable-multilib"
+fi
+
# It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
GCC_NO_EXECUTABLES
Index: libjava/configure
===================================================================
--- libjava/configure.orig 2010-04-02 11:18:06.000000000 -0700
+++ libjava/configure 2010-06-25 10:17:47.516381209 -0700
@@ -1609,6 +1609,8 @@
default=yes
--enable-java-maintainer-mode
allow rebuilding of .class and .h files
+ --enable-libjava-multilib
+ build libjava as multilib
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--enable-maintainer-mode enable make rules and dependencies not useful
@@ -3346,6 +3348,16 @@
fi
+# Check whether --enable-libjava-multilib was given.
+if test "${enable_libjava_multilib+set}" = set; then
+ enableval=$enable_libjava_multilib;
+fi
+
+if test "$enable_libjava_multilib" = no; then
+ multilib=no
+ ac_configure_args="$ac_configure_args --disable-multilib"
+fi
+
# It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.

View File

@ -1,91 +0,0 @@
Upstream-Status: Inappropriate [distribution: fedora]
2005-11-28 Jakub Jelinek <jakub@redhat.com>
* config/rs6000/rs6000.c (rs6000_return_addr): If COUNT == 0,
read word RETURN_ADDRESS_OFFSET bytes above arg_pointer_rtx
instead of doing an extran indirection from frame_pointer_rtx.
* gcc.dg/20051128-1.c: New test.
Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c.orig 2010-03-27 03:27:39.000000000 -0700
+++ gcc/config/rs6000/rs6000.c 2010-06-25 10:18:04.053381930 -0700
@@ -17646,17 +17646,22 @@
don't try to be too clever here. */
if (count != 0 || (DEFAULT_ABI != ABI_AIX && flag_pic))
{
+ rtx x;
cfun->machine->ra_needs_full_frame = 1;
- return
- gen_rtx_MEM
- (Pmode,
- memory_address
- (Pmode,
- plus_constant (copy_to_reg
- (gen_rtx_MEM (Pmode,
- memory_address (Pmode, frame))),
- RETURN_ADDRESS_OFFSET)));
+ if (count == 0)
+ {
+ gcc_assert (frame == frame_pointer_rtx);
+ x = arg_pointer_rtx;
+ }
+ else
+ {
+ x = memory_address (Pmode, frame);
+ x = copy_to_reg (gen_rtx_MEM (Pmode, x));
+ }
+
+ x = plus_constant (x, RETURN_ADDRESS_OFFSET);
+ return gen_rtx_MEM (Pmode, memory_address (Pmode, x));
}
cfun->machine->ra_need_lr = 1;
Index: gcc/testsuite/gcc.dg/20051128-1.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gcc/testsuite/gcc.dg/20051128-1.c 2010-06-25 10:18:04.061382856 -0700
@@ -0,0 +1,41 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fpic" } */
+
+extern void exit (int);
+extern void abort (void);
+
+int b;
+
+struct A
+{
+ void *pad[147];
+ void *ra, *h;
+ long o;
+};
+
+void
+__attribute__((noinline))
+foo (struct A *a, void *x)
+{
+ __builtin_memset (a, 0, sizeof (a));
+ if (!b)
+ exit (0);
+}
+
+void
+__attribute__((noinline))
+bar (void)
+{
+ struct A a;
+
+ __builtin_unwind_init ();
+ foo (&a, __builtin_return_address (0));
+}
+
+int
+main (void)
+{
+ bar ();
+ abort ();
+ return 0;
+}

View File

@ -1,17 +0,0 @@
Upstream-Status: Inappropriate [distribution: fedora]
2006-08-18 Jakub Jelinek <jakub@redhat.com>
PR c/27898
* gcc.dg/pr27898.c: New test.
--- gcc/testsuite/gcc.dg/pr27898.c.jj 2006-08-18 09:19:33.000000000 +0200
+++ gcc/testsuite/gcc.dg/pr27898.c 2006-08-18 09:19:27.000000000 +0200
@@ -0,0 +1,8 @@
+/* PR c/27898 */
+/* { dg-do compile } */
+/* { dg-options "--combine" } */
+/* { dg-additional-sources "pr27898.c" } */
+
+union u { struct { int i; }; };
+
+extern int foo (union u *);

View File

@ -1,20 +0,0 @@
Upstream-Status: Inappropriate [distribution: fedora]
2007-06-01 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/32139
* gcc.c-torture/compile/20070531-1.c: New test.
--- gcc/testsuite/gcc.c-torture/compile/20070531-1.c.jj 2007-05-31 13:47:22.000000000 +0200
+++ gcc/testsuite/gcc.c-torture/compile/20070531-1.c 2007-06-01 10:57:15.000000000 +0200
@@ -0,0 +1,11 @@
+/* PR tree-optimization/32139 */
+int foo (void);
+int bar (void) __attribute__ ((const));
+
+int
+test (int x)
+{
+ int a = (x == 10000 ? foo : bar) ();
+ int b = (x == 10000 ? foo : bar) ();
+ return a + b;
+}

View File

@ -1,160 +0,0 @@
Upstream-Status: Inappropriate [distribution: fedora]
2007-11-06 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/33763
* gcc.dg/pr33763.c: New test.
* g++.dg/opt/inline13.C: New test.
2007-11-06 Jan Hubicka <jh@suse.cz>
PR tree-optimization/33763
* tree-inline.c (expand_call_inline): Silently ignore always_inline
attribute for redefined extern inline functions.
Index: gcc/tree-inline.c
===================================================================
--- gcc/tree-inline.c.orig 2010-03-18 13:07:13.000000000 -0700
+++ gcc/tree-inline.c 2010-06-25 10:18:51.230139825 -0700
@@ -3545,6 +3545,12 @@
goto egress;
if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn))
+ /* For extern inline functions that get redefined we always
+ silently ignored alway_inline flag. Better behaviour would
+ be to be able to keep both bodies and use extern inline body
+ for inlining, but we can't do that because frontends overwrite
+ the body. */
+ && !cg_edge->callee->local.redefined_extern_inline
/* Avoid warnings during early inline pass. */
&& cgraph_global_info_ready)
{
Index: gcc/testsuite/gcc.dg/pr33763.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gcc/testsuite/gcc.dg/pr33763.c 2010-06-25 10:18:51.234141302 -0700
@@ -0,0 +1,60 @@
+/* PR tree-optimization/33763 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef struct
+{
+ void *a;
+ void *b;
+} T;
+extern void *foo (const char *, const char *);
+extern void *bar (void *, const char *, T);
+extern int baz (const char *, int);
+
+extern inline __attribute__ ((always_inline, gnu_inline)) int
+baz (const char *x, int y)
+{
+ return 2;
+}
+
+int
+baz (const char *x, int y)
+{
+ return 1;
+}
+
+int xa, xb;
+
+static void *
+inl (const char *x, const char *y)
+{
+ T t = { &xa, &xb };
+ int *f = (int *) __builtin_malloc (sizeof (int));
+ const char *z;
+ int o = 0;
+ void *r = 0;
+
+ for (z = y; *z; z++)
+ {
+ if (*z == 'r')
+ o |= 1;
+ if (*z == 'w')
+ o |= 2;
+ }
+ if (o == 1)
+ *f = baz (x, 0);
+ if (o == 2)
+ *f = baz (x, 1);
+ if (o == 3)
+ *f = baz (x, 2);
+
+ if (o && *f > 0)
+ r = bar (f, "w", t);
+ return r;
+}
+
+void *
+foo (const char *x, const char *y)
+{
+ return inl (x, y);
+}
Index: gcc/testsuite/g++.dg/opt/inline13.C
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gcc/testsuite/g++.dg/opt/inline13.C 2010-06-25 10:18:51.261052137 -0700
@@ -0,0 +1,60 @@
+// PR tree-optimization/33763
+// { dg-do compile }
+// { dg-options "-O2" }
+
+typedef struct
+{
+ void *a;
+ void *b;
+} T;
+extern void *foo (const char *, const char *);
+extern void *bar (void *, const char *, T);
+extern int baz (const char *, int);
+
+extern inline __attribute__ ((always_inline, gnu_inline)) int
+baz (const char *x, int y)
+{
+ return 2;
+}
+
+int
+baz (const char *x, int y)
+{
+ return 1;
+}
+
+int xa, xb;
+
+static void *
+inl (const char *x, const char *y)
+{
+ T t = { &xa, &xb };
+ int *f = (int *) __builtin_malloc (sizeof (int));
+ const char *z;
+ int o = 0;
+ void *r = 0;
+
+ for (z = y; *z; z++)
+ {
+ if (*z == 'r')
+ o |= 1;
+ if (*z == 'w')
+ o |= 2;
+ }
+ if (o == 1)
+ *f = baz (x, 0);
+ if (o == 2)
+ *f = baz (x, 1);
+ if (o == 3)
+ *f = baz (x, 2);
+
+ if (o && *f > 0)
+ r = bar (f, "w", t);
+ return r;
+}
+
+void *
+foo (const char *x, const char *y)
+{
+ return inl (x, y);
+}

View File

@ -1,90 +0,0 @@
Upstream-Status: Inappropriate [distribution: fedora]
2008-04-01 Jakub Jelinek <jakub@redhat.com>
PR pch/13675
* files.c (struct _cpp_file): Remove pch field.
(pch_open_file): Don't set file->pch, just file->pchname.
(should_stack_file): After pfile->cb.read_pch call
free pchname and clear pchname, don't close file->fd.
Test file->pchname instead of file->pch. Don't close fd after cb.
(_cpp_stack_include): Test file->pchname instead of file->pch.
* c-pch.c (c_common_read_pch): On error close (fd) resp. fclose (f).
--- libcpp/files.c.jj 2008-02-18 23:50:17.000000000 +0100
+++ libcpp/files.c 2008-03-31 15:59:01.000000000 +0200
@@ -106,9 +106,6 @@ struct _cpp_file
/* If BUFFER above contains the true contents of the file. */
bool buffer_valid;
-
- /* File is a PCH (on return from find_include_file). */
- bool pch;
};
/* A singly-linked list for all searches for a given file name, with
@@ -322,9 +319,7 @@ pch_open_file (cpp_reader *pfile, _cpp_f
}
closedir (pchdir);
}
- if (valid)
- file->pch = true;
- else
+ if (!valid)
*invalid_pch = true;
}
@@ -703,11 +698,12 @@ should_stack_file (cpp_reader *pfile, _c
return false;
/* Handle PCH files immediately; don't stack them. */
- if (file->pch)
+ if (file->pchname)
{
pfile->cb.read_pch (pfile, file->pchname, file->fd, file->path);
- close (file->fd);
file->fd = -1;
+ free ((void *) file->pchname);
+ file->pchname = NULL;
return false;
}
@@ -916,7 +912,7 @@ _cpp_stack_include (cpp_reader *pfile, c
complicates LAST_SOURCE_LINE_LOCATION. This does not apply if we
found a PCH file (in which case linemap_add is not called) or we
were included from the command-line. */
- if (! file->pch && file->err_no == 0 && type != IT_CMDLINE)
+ if (file->pchname == NULL && file->err_no == 0 && type != IT_CMDLINE)
pfile->line_table->highest_location--;
return _cpp_stack_file (pfile, file, type == IT_IMPORT);
--- gcc/c-pch.c.jj 2008-02-18 23:46:08.000000000 +0100
+++ gcc/c-pch.c 2008-03-31 15:56:00.000000000 +0200
@@ -372,6 +372,7 @@ c_common_read_pch (cpp_reader *pfile, co
if (f == NULL)
{
cpp_errno (pfile, CPP_DL_ERROR, "calling fdopen");
+ close (fd);
return;
}
@@ -380,6 +381,7 @@ c_common_read_pch (cpp_reader *pfile, co
if (fread (&h, sizeof (h), 1, f) != 1)
{
cpp_errno (pfile, CPP_DL_ERROR, "reading");
+ fclose (f);
return;
}
@@ -425,7 +427,10 @@ c_common_read_pch (cpp_reader *pfile, co
gt_pch_restore (f);
if (cpp_read_state (pfile, name, f, smd) != 0)
- return;
+ {
+ fclose (f);
+ return;
+ }
fclose (f);

View File

@ -1,32 +0,0 @@
Upstream-Status: Inappropriate [distribution: fedora]
2007-10-16 Jakub Jelinek <jakub@redhat.com>
* Makefile.am (libgcj_tools_la_LIBADD): Add.
* Makefile.in: Regenerated.
Index: libjava/Makefile.am
===================================================================
--- libjava/Makefile.am.orig 2010-03-21 12:41:37.000000000 -0700
+++ libjava/Makefile.am 2010-06-25 10:22:11.394130458 -0700
@@ -507,6 +507,8 @@
libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch \
-fno-bootstrap-classes -fno-indirect-classes \
-fsource-filename=$(here)/classpath/tools/all-classes.lst
+## See jv_convert_LDADD.
+libgcj_tools_la_LIBADD = -L$(here)/.libs libgcj.la
libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
-version-info `grep -v '^\#' $(srcdir)/libtool-version` \
$(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBJAVA_LDFLAGS_NOUNDEF)
Index: libjava/Makefile.in
===================================================================
--- libjava/Makefile.in.orig 2010-04-02 11:18:06.000000000 -0700
+++ libjava/Makefile.in 2010-06-25 10:27:41.841708512 -0700
@@ -1190,7 +1190,7 @@
-version-info `grep -v '^\#' $(srcdir)/libtool-version` \
$(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBJAVA_LDFLAGS_NOUNDEF)
-libgcj_tools_la_LIBADD = libgcj.la -lm
+libgcj_tools_la_LIBADD = -L$(here)/.libs libgcj.la -lm
libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec $(am__append_22)
libgcj_tools_la_LINK = $(LIBLINK) $(libgcj_tools_la_LDFLAGS)
libjvm_la_SOURCES = jni-libjvm.cc

View File

@ -1,33 +0,0 @@
Upstream-Status: Inappropriate [distribution: fedora]
2007-10-21 Jakub Jelinek <jakub@redhat.com>
* doc/Makefile.am (POD2MAN): Set date from cp-tools.texinfo
timestamp rather than from current date.
* doc/Makefile.in: Regenerated.
Index: libjava/classpath/doc/Makefile.am
===================================================================
--- libjava/classpath/doc/Makefile.am.orig 2008-10-21 10:55:01.000000000 -0700
+++ libjava/classpath/doc/Makefile.am 2010-06-25 10:28:30.237631599 -0700
@@ -31,7 +31,7 @@
gtnameserv.1 \
gjdoc.1
-POD2MAN = pod2man --center="GNU" --release="$(VERSION)"
+POD2MAN = pod2man --center="GNU" --release="$(VERSION)" --date="$(shell ls --time-style=+%F -l $(srcdir)/cp-tools.texinfo | awk '{print $$6}')"
TEXI2POD = perl $(srcdir)/texi2pod.pl
STAMP = echo timestamp >
Index: libjava/classpath/doc/Makefile.in
===================================================================
--- libjava/classpath/doc/Makefile.in.orig 2010-04-02 11:18:06.000000000 -0700
+++ libjava/classpath/doc/Makefile.in 2010-06-25 10:28:30.245635728 -0700
@@ -376,7 +376,7 @@
gtnameserv.1 \
gjdoc.1
-POD2MAN = pod2man --center="GNU" --release="$(VERSION)"
+POD2MAN = pod2man --center="GNU" --release="$(VERSION)" --date="$(shell ls --time-style=+%F -l $(srcdir)/cp-tools.texinfo | awk '{print $$6}')"
TEXI2POD = perl $(srcdir)/texi2pod.pl
STAMP = echo timestamp >
@GENINSRC_FALSE@STAMP_GENINSRC =

View File

@ -1,53 +0,0 @@
Upstream-Status: Inappropriate [distribution: fedora]
2010-02-08 Roland McGrath <roland@redhat.com>
* config/rs6000/sysv4.h (LINK_EH_SPEC): Pass --no-add-needed to the
linker.
* config/linux.h (LINK_EH_SPEC): Likewise.
* config/alpha/elf.h (LINK_EH_SPEC): Likewise.
* config/ia64/linux.h (LINK_EH_SPEC): Likewise.
--- gcc/config/alpha/elf.h.~1~
+++ gcc/config/alpha/elf.h
@@ -421,7 +421,7 @@ extern int alpha_this_gpdisp_sequence_nu
I imagine that other systems will catch up. In the meantime, it
doesn't harm to make sure that the data exists to be used later. */
#if defined(HAVE_LD_EH_FRAME_HDR)
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+#define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} "
#endif
/* A C statement (sans semicolon) to output to the stdio stream STREAM
--- gcc/config/ia64/linux.h.~1~
+++ gcc/config/ia64/linux.h
@@ -58,7 +58,7 @@ do { \
Signalize that because we have fde-glibc, we don't need all C shared libs
linked against -lgcc_s. */
#undef LINK_EH_SPEC
-#define LINK_EH_SPEC ""
+#define LINK_EH_SPEC "--no-add-needed "
#define MD_UNWIND_SUPPORT "config/ia64/linux-unwind.h"
--- gcc/config/linux.h.~1~
+++ gcc/config/linux.h
@@ -89,7 +89,7 @@ see the files COPYING3 and COPYING.RUNTI
} while (0)
#if defined(HAVE_LD_EH_FRAME_HDR)
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+#define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} "
#endif
/* Define this so we can compile MS code for use with WINE. */
--- gcc/config/rs6000/sysv4.h.~1~
+++ gcc/config/rs6000/sysv4.h
@@ -917,7 +917,7 @@ SVR4_ASM_SPEC \
%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}}}"
#if defined(HAVE_LD_EH_FRAME_HDR)
-# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+# define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} "
#endif
#define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \

View File

@ -1,32 +0,0 @@
Upstream-Status: Inappropriate [embedded specific]
* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used
used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross
directory.
Index: gcc-4.5+svnr155514/libgfortran/configure
===================================================================
--- gcc-4.5+svnr155514.orig/libgfortran/configure 2009-12-29 22:02:01.000000000 -0800
+++ gcc-4.5+svnr155514/libgfortran/configure 2009-12-30 08:12:40.889091657 -0800
@@ -11655,7 +11655,7 @@ CC="$lt_save_CC"
# We need gfortran to compile parts of the library
#AC_PROG_FC(gfortran)
-FC="$GFORTRAN"
+#FC="$GFORTRAN"
ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
Index: gcc-4.5+svnr155514/libgfortran/configure.ac
===================================================================
--- gcc-4.5+svnr155514.orig/libgfortran/configure.ac 2009-12-29 22:02:01.000000000 -0800
+++ gcc-4.5+svnr155514/libgfortran/configure.ac 2009-12-30 08:12:13.453094218 -0800
@@ -187,7 +187,7 @@ AC_SUBST(enable_static)
# We need gfortran to compile parts of the library
#AC_PROG_FC(gfortran)
-FC="$GFORTRAN"
+#FC="$GFORTRAN"
AC_PROG_FC(gfortran)
# extra LD Flags which are required for targets

View File

@ -1,33 +0,0 @@
Upstream-Status: Inappropriate [embedded specific]
---
configure | 2 +-
configure.ac | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Index: gcc-4.3.1/configure.ac
===================================================================
--- gcc-4.3.1.orig/configure.ac 2008-07-21 12:29:18.000000000 -0700
+++ gcc-4.3.1/configure.ac 2008-07-21 12:29:35.000000000 -0700
@@ -2352,7 +2352,7 @@ fi
# for target_alias and gcc doesn't manage it consistently.
target_configargs="--cache-file=./config.cache ${target_configargs}"
-FLAGS_FOR_TARGET=
+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
case " $target_configdirs " in
*" newlib "*)
case " $target_configargs " in
Index: gcc-4.3.1/configure
===================================================================
--- gcc-4.3.1.orig/configure 2008-07-21 12:29:48.000000000 -0700
+++ gcc-4.3.1/configure 2008-07-21 12:29:59.000000000 -0700
@@ -5841,7 +5841,7 @@ fi
# for target_alias and gcc doesn't manage it consistently.
target_configargs="--cache-file=./config.cache ${target_configargs}"
-FLAGS_FOR_TARGET=
+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
case " $target_configdirs " in
*" newlib "*)
case " $target_configargs " in

View File

@ -1,116 +0,0 @@
Upstream-Status: Inappropriate [Backport]
Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it.
This alternative patch is better because it lets you just use CFLAGS_FOR_TARGET to set the compilation flags for libgcc. Since bootstrapped target libraries are never compiled with the native compiler, it makes little sense to use different flags for stage1 and later stages. And it also makes little sense to use a different variable than CFLAGS_FOR_TARGET.
Other changes I had to do include:
- moving the creation of default CFLAGS_FOR_TARGET from Makefile.am to configure.ac, because otherwise the BOOT_CFLAGS are substituted into CFLAGS_FOR_TARGET (which is "-O2 -g $(CFLAGS)") via $(CFLAGS). It is also cleaner this way though.
- passing the right CFLAGS to configure scripts as exported environment variables
I also stopped passing LIBCFLAGS to configure scripts since they are unused in the whole src tree. And I updated the documentation as H-P reminded me to do.
Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3?
Paolo
2008-02-19 Paolo Bonzini <bonzini@gnu.org>
PR bootstrap/32009
PR bootstrap/32161
* configure.ac (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Compute here.
* configure: Regenerate.
* Makefile.def: Define stage_libcflags for all bootstrap stages.
* Makefile.tpl (BOOT_LIBCFLAGS, STAGE2_LIBCFLAGS, STAGE3_LIBCFLAGS,
STAGE4_LIBCFLAGS): New.
(CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Subst from autoconf, without
$(SYSROOT_CFLAGS_FOR_TARGET) and $(DEBUG_PREFIX_CFLAGS_FOR_TARGET).
(BASE_TARGET_EXPORTS): Append them here to C{,XX}FLAGS.
(EXTRA_TARGET_FLAGS): Append them here to {LIB,}C{,XX}FLAGS.
(configure-stage[+id+]-[+prefix+][+module+]): Pass stage_libcflags
for target modules. Don't export LIBCFLAGS.
(all-stage[+id+]-[+prefix+][+module+]): Pass stage_libcflags; pass
$(BASE_FLAGS_TO_PASS) where [+args+] was passed, and [+args+] after
the overridden CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
(invocations of `all'): Replace $(TARGET_FLAGS_TO_PASS) with
$(EXTRA_TARGET_FLAGS), $(FLAGS_TO_PASS) with $(EXTRA_HOST_FLAGS).
* Makefile.in: Regenerate.
config:
2008-02-19 Paolo Bonzini <bonzini@gnu.org>
PR bootstrap/32009
* mh-ppc-darwin (BOOT_CFLAGS): Reenable.
gcc:
2008-02-19 Paolo Bonzini <bonzini@gnu.org>
PR bootstrap/32009
* doc/install.texi: Correct references to CFLAGS, replacing them
with BOOT_CFLAGS. Document flags used during bootstrap for
target libraries.
---
Makefile.def | 25
Makefile.in | 1845 ++++++++++++++++++++++++++++++-------------------
Makefile.tpl | 91 +-
config/mh-ppc-darwin | 3
configure | 36
configure.ac | 32
gcc/Makefile.in | 2
gcc/configure | 6
gcc/configure.ac | 3
gcc/doc/install.texi | 56 -
libiberty/Makefile.in | 162 ++--
libiberty/configure | 46 -
libiberty/configure.ac | 43 -
13 files changed, 1454 insertions(+), 896 deletions(-)
Index: gcc-4.5.0/configure
===================================================================
--- gcc-4.5.0.orig/configure 2010-06-25 14:51:59.409382073 -0700
+++ gcc-4.5.0/configure 2010-06-25 14:52:35.157132702 -0700
@@ -7130,6 +7130,38 @@
fi
+# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
+# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS
+# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
+# We want to ensure that TARGET libraries (which we know are built with
+# gcc) are built with "-O2 -g", so include those options when setting
+# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
+if test "x$CFLAGS_FOR_TARGET" = x; then
+ CFLAGS_FOR_TARGET=$CFLAGS
+ case " $CFLAGS " in
+ *" -O2 "*) ;;
+ *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
+ esac
+ case " $CFLAGS " in
+ *" -g "* | *" -g3 "*) ;;
+ *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
+ esac
+fi
+
+
+if test "x$CXXFLAGS_FOR_TARGET" = x; then
+ CXXFLAGS_FOR_TARGET=$CXXFLAGS
+ case " $CXXFLAGS " in
+ *" -O2 "*) ;;
+ *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
+ esac
+ case " $CXXFLAGS " in
+ *" -g "* | *" -g3 "*) ;;
+ *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
+ esac
+fi
+
+
# Handle --with-headers=XXX. If the value is not "yes", the contents of
# the named directory are copied to $(tooldir)/sys-include.
if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then

View File

@ -1,180 +0,0 @@
Upstream-Status: Pending
Index: gcc-4.5/Makefile.def
===================================================================
--- gcc-4.5.orig/Makefile.def
+++ gcc-4.5/Makefile.def
@@ -240,6 +240,7 @@ flags_to_pass = { flag= AWK ; };
flags_to_pass = { flag= BISON ; };
flags_to_pass = { flag= CC_FOR_BUILD ; };
flags_to_pass = { flag= CFLAGS_FOR_BUILD ; };
+flags_to_pass = { flag= CPPFLAGS_FOR_BUILD ; };
flags_to_pass = { flag= CXX_FOR_BUILD ; };
flags_to_pass = { flag= EXPECT ; };
flags_to_pass = { flag= FLEX ; };
Index: gcc-4.5/gcc/Makefile.in
===================================================================
--- gcc-4.5.orig/gcc/Makefile.in
+++ gcc-4.5/gcc/Makefile.in
@@ -766,7 +766,7 @@ BUILD_LINKERFLAGS = $(BUILD_CFLAGS)
# Native linker and preprocessor flags. For x-fragment overrides.
BUILD_LDFLAGS=@BUILD_LDFLAGS@
-BUILD_CPPFLAGS=$(ALL_CPPFLAGS)
+BUILD_CPPFLAGS=$(INCLUDES) @BUILD_CPPFLAGS@ $(X_CPPFLAGS)
# Actual name to use when installing a native compiler.
GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
Index: gcc-4.5/gcc/configure.ac
===================================================================
--- gcc-4.5.orig/gcc/configure.ac
+++ gcc-4.5/gcc/configure.ac
@@ -1798,16 +1798,18 @@ AC_SUBST(inhibit_libc)
# Also, we cannot run fixincludes.
# These are the normal (build=host) settings:
-CC_FOR_BUILD='$(CC)' AC_SUBST(CC_FOR_BUILD)
-BUILD_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(BUILD_CFLAGS)
-BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS)
-STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC)
+CC_FOR_BUILD='$(CC)' AC_SUBST(CC_FOR_BUILD)
+BUILD_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(BUILD_CFLAGS)
+BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS)
+BUILD_CPPFLAGS='$(ALL_CPPFLAGS)' AC_SUBST(BUILD_CPPFLAGS)
+STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC)
# And these apply if build != host, or we are generating coverage data
if test x$build != x$host || test "x$coverage_flags" != x
then
BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
+ BUILD_CPPFLAGS='$(CPPFLAGS_FOR_BUILD)'
fi
# Expand extra_headers to include complete path.
Index: gcc-4.5/Makefile.in
===================================================================
--- gcc-4.5.orig/Makefile.in
+++ gcc-4.5/Makefile.in
@@ -333,6 +333,7 @@ AR_FOR_BUILD = @AR_FOR_BUILD@
AS_FOR_BUILD = @AS_FOR_BUILD@
CC_FOR_BUILD = @CC_FOR_BUILD@
CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
+CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@
CXX_FOR_BUILD = @CXX_FOR_BUILD@
DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@
@@ -662,6 +663,7 @@ BASE_FLAGS_TO_PASS = \
"BISON=$(BISON)" \
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
+ "CPPFLAGS_FOR_BUILD=$(CPPFLAGS_FOR_BUILD)" \
"CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
"EXPECT=$(EXPECT)" \
"FLEX=$(FLEX)" \
Index: gcc-4.5/gcc/configure
===================================================================
--- gcc-4.5.orig/gcc/configure
+++ gcc-4.5/gcc/configure
@@ -707,6 +707,7 @@ SED
LIBTOOL
collect2
STMP_FIXINC
+BUILD_CPPFLAGS
BUILD_LDFLAGS
BUILD_CFLAGS
CC_FOR_BUILD
@@ -10982,6 +10983,7 @@ fi
CC_FOR_BUILD='$(CC)'
BUILD_CFLAGS='$(ALL_CFLAGS)'
BUILD_LDFLAGS='$(LDFLAGS)'
+BUILD_CPPFLAGS='$(ALL_CPPFLAGS)'
STMP_FIXINC=stmp-fixinc
# And these apply if build != host, or we are generating coverage data
@@ -10989,6 +10991,7 @@ if test x$build != x$host || test "x$cov
then
BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)'
+ BUILD_CPPFLAGS='$(CPPFLAGS_FOR_BUILD)'
fi
# Expand extra_headers to include complete path.
@@ -17108,7 +17111,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 17111 "configure"
+#line 17114 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -17214,7 +17217,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 17217 "configure"
+#line 17220 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
Index: gcc-4.5/Makefile.tpl
===================================================================
--- gcc-4.5.orig/Makefile.tpl
+++ gcc-4.5/Makefile.tpl
@@ -336,6 +336,7 @@ AR_FOR_BUILD = @AR_FOR_BUILD@
AS_FOR_BUILD = @AS_FOR_BUILD@
CC_FOR_BUILD = @CC_FOR_BUILD@
CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
+CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@
CXX_FOR_BUILD = @CXX_FOR_BUILD@
DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@
Index: gcc-4.5/configure
===================================================================
--- gcc-4.5.orig/configure
+++ gcc-4.5/configure
@@ -651,6 +651,7 @@ GCJ_FOR_BUILD
DLLTOOL_FOR_BUILD
CXX_FOR_BUILD
CXXFLAGS_FOR_BUILD
+CPPFLAGS_FOR_BUILD
CFLAGS_FOR_BUILD
CC_FOR_BUILD
AS_FOR_BUILD
@@ -8036,6 +8037,7 @@ esac
# our build compiler if desired.
if test x"${build}" = x"${host}" ; then
CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
+ CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-${CPPFLAGS}}
CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}}
LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}}
fi
@@ -8101,6 +8103,7 @@ done
+
Index: gcc-4.5/configure.ac
===================================================================
--- gcc-4.5.orig/configure.ac
+++ gcc-4.5/configure.ac
@@ -3089,6 +3089,7 @@ esac
# our build compiler if desired.
if test x"${build}" = x"${host}" ; then
CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
+ CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-${CPPFLAGS}}
CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}}
LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}}
fi
@@ -3155,6 +3156,7 @@ AC_SUBST(AR_FOR_BUILD)
AC_SUBST(AS_FOR_BUILD)
AC_SUBST(CC_FOR_BUILD)
AC_SUBST(CFLAGS_FOR_BUILD)
+AC_SUBST(CPPFLAGS_FOR_BUILD)
AC_SUBST(CXXFLAGS_FOR_BUILD)
AC_SUBST(CXX_FOR_BUILD)
AC_SUBST(DLLTOOL_FOR_BUILD)

View File

@ -1,26 +0,0 @@
Upstream-Status: Pending
Add /sw/include and /opt/include based on the original
zecke-no-host-includes.patch patch. The original patch checked for
/usr/include, /sw/include and /opt/include and then triggered a failure and
aborted.
Instead, we add the two missing items to the current scan. If the user
wants this to be a failure, they can add "-Werror=poison-system-directories".
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
diff -ur gcc-4.5.0.orig/gcc/incpath.c gcc-4.5.0/gcc/incpath.c
--- gcc-4.5.0.orig/gcc/incpath.c 2010-09-29 14:58:31.358975524 -0500
+++ gcc-4.5.0/gcc/incpath.c 2010-09-29 15:08:02.065975516 -0500
@@ -363,7 +363,9 @@
{
if ((!strncmp (p->name, "/usr/include", 12))
|| (!strncmp (p->name, "/usr/local/include", 18))
- || (!strncmp (p->name, "/usr/X11R6/include", 18)))
+ || (!strncmp (p->name, "/usr/X11R6/include", 18))
+ || (!strncmp (p->name, "/sw/include", 11))
+ || (!strncmp (p->name, "/opt/include", 12)))
warning (OPT_Wpoison_system_directories,
"include location \"%s\" is unsafe for "
"cross-compilation",

View File

@ -1,203 +0,0 @@
Upstream-Status: Inappropriate [distribution: codesourcery]
gcc/
2008-07-02 Joseph Myers <joseph@codesourcery.com>
* c-incpath.c: Include toplev.h.
(merge_include_chains): Use warning instead of cpp_error for
system directory poisoning diagnostic.
* Makefile.in (c-incpath.o): Depend on toplev.h.
* gcc.c (LINK_COMMAND_SPEC): Pass
--error-poison-system-directories if
-Werror=poison-system-directories.
2007-06-13 Joseph Myers <joseph@codesourcery.com>
* common.opt (--Wno-poison-system-directories): New.
* doc/invoke.texi (-Wno-poison-system-directories): Document.
* c-incpath.c: Include flags.h.
(merge_include_chains): Check flag_poison_system_directories.
* gcc.c (LINK_COMMAND_SPEC): Pass --no-poison-system-directories
to linker if -Wno-poison-system-directories.
* Makefile.in (c-incpath.o): Depend on $(FLAGS_H).
2007-03-20 Daniel Jacobowitz <dan@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
* configure.ac (--enable-poison-system-directories): New option.
* configure, config.in: Regenerate.
* c-incpath.c (merge_include_chains): If
ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of
/usr/include, /usr/local/include or /usr/X11R6/include.
Index: gcc-4.5.0/gcc/common.opt
===================================================================
--- gcc-4.5.0.orig/gcc/common.opt 2010-03-17 20:01:09.000000000 -0700
+++ gcc-4.5.0/gcc/common.opt 2010-06-25 11:35:39.965383734 -0700
@@ -152,6 +152,10 @@
Common Var(warn_padded) Warning
Warn when padding is required to align structure members
+Wpoison-system-directories
+Common Var(flag_poison_system_directories) Init(1) Warning
+Warn for -I and -L options using system directories if cross compiling
+
Wshadow
Common Var(warn_shadow) Warning
Warn when one local variable shadows another
Index: gcc-4.5.0/gcc/config.in
===================================================================
--- gcc-4.5.0.orig/gcc/config.in 2010-04-14 02:30:07.000000000 -0700
+++ gcc-4.5.0/gcc/config.in 2010-06-25 11:35:39.969383588 -0700
@@ -132,6 +132,12 @@
#endif
+/* Define to warn for use of native system header directories */
+#ifndef USED_FOR_TARGET
+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
+#endif
+
+
/* Define if you want all operations on RTL (the basic data structure of the
optimizer and back end) to be checked for dynamic type safety at runtime.
This is quite expensive. */
Index: gcc-4.5.0/gcc/configure.ac
===================================================================
--- gcc-4.5.0.orig/gcc/configure.ac 2010-06-25 11:34:01.433382161 -0700
+++ gcc-4.5.0/gcc/configure.ac 2010-06-25 11:35:39.969383588 -0700
@@ -4276,6 +4276,16 @@
fi)
AC_SUBST(slibdir)
+AC_ARG_ENABLE([poison-system-directories],
+ AS_HELP_STRING([--enable-poison-system-directories],
+ [warn for use of native system header directories]),,
+ [enable_poison_system_directories=no])
+if test "x${enable_poison_system_directories}" = "xyes"; then
+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
+ [1],
+ [Define to warn for use of native system header directories])
+fi
+
# Substitute configuration variables
AC_SUBST(subdirs)
AC_SUBST(srcdir)
Index: gcc-4.5.0/gcc/doc/invoke.texi
===================================================================
--- gcc-4.5.0.orig/gcc/doc/invoke.texi 2010-04-06 07:02:22.000000000 -0700
+++ gcc-4.5.0/gcc/doc/invoke.texi 2010-06-25 11:35:39.992666345 -0700
@@ -252,6 +252,7 @@
-Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol
-Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol
-Wpointer-arith -Wno-pointer-to-int-cast @gol
+-Wno-poison-system-directories @gol
-Wredundant-decls @gol
-Wreturn-type -Wsequence-point -Wshadow @gol
-Wsign-compare -Wsign-conversion -Wstack-protector @gol
@@ -3603,6 +3604,14 @@
option will @emph{not} warn about unknown pragmas in system
headers---for that, @option{-Wunknown-pragmas} must also be used.
+@item -Wno-poison-system-directories
+@opindex Wno-poison-system-directories
+Do not warn for @option{-I} or @option{-L} options using system
+directories such as @file{/usr/include} when cross compiling. This
+option is intended for use in chroot environments when such
+directories contain the correct headers and libraries for the target
+system rather than the host.
+
@item -Wfloat-equal
@opindex Wfloat-equal
@opindex Wno-float-equal
Index: gcc-4.5.0/gcc/gcc.c
===================================================================
--- gcc-4.5.0.orig/gcc/gcc.c 2010-02-11 04:23:08.000000000 -0800
+++ gcc-4.5.0/gcc/gcc.c 2010-06-25 11:35:40.009381858 -0700
@@ -792,6 +792,8 @@
%{flto} %{fwhopr} %l " LINK_PIE_SPEC \
"%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\
%{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
+ %{Wno-poison-system-directories:--no-poison-system-directories}\
+ %{Werror=poison-system-directories:--error-poison-system-directories}\
%{static:} %{L*} %(mfwrap) %(link_libgcc) %o\
%{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)} %(mflib)\
%{fprofile-arcs|fprofile-generate*|coverage:-lgcov}\
Index: gcc-4.5.0/gcc/incpath.c
===================================================================
--- gcc-4.5.0.orig/gcc/incpath.c 2009-11-25 02:55:54.000000000 -0800
+++ gcc-4.5.0/gcc/incpath.c 2010-06-25 11:35:40.017209818 -0700
@@ -353,6 +353,24 @@
}
fprintf (stderr, _("End of search list.\n"));
}
+
+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
+ if (flag_poison_system_directories)
+ {
+ struct cpp_dir *p;
+
+ for (p = heads[QUOTE]; p; p = p->next)
+ {
+ if ((!strncmp (p->name, "/usr/include", 12))
+ || (!strncmp (p->name, "/usr/local/include", 18))
+ || (!strncmp (p->name, "/usr/X11R6/include", 18)))
+ warning (OPT_Wpoison_system_directories,
+ "include location \"%s\" is unsafe for "
+ "cross-compilation",
+ p->name);
+ }
+ }
+#endif
}
/* Use given -I paths for #include "..." but not #include <...>, and
diff -ur gcc-4.5.0.orig/gcc/Makefile.in gcc-4.5.0/gcc/Makefile.in
--- gcc-4.5.0.orig/gcc/Makefile.in 2010-09-29 17:13:49.164088845 -0500
+++ gcc-4.5.0/gcc/Makefile.in 2010-09-29 18:48:19.300178501 -0500
@@ -1965,7 +1965,7 @@
incpath.o: incpath.c incpath.h $(CONFIG_H) $(SYSTEM_H) $(CPPLIB_H) \
intl.h prefix.h coretypes.h $(TM_H) cppdefault.h $(TARGET_H) \
- $(MACHMODE_H)
+ $(MACHMODE_H) $(FLAGS_H) toplev.h
c-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(RTL_H) $(C_TREE_H) $(GGC_H) $(TARGET_H) $(FLAGS_H) $(FUNCTION_H) output.h \
diff -ur gcc-4.5.0.orig/gcc/configure gcc-4.5.0/gcc/configure
--- gcc-4.5.0.orig/gcc/configure 2010-09-29 14:58:31.702054881 -0500
+++ gcc-4.5.0/gcc/configure 2010-09-29 18:46:31.486068500 -0500
@@ -913,6 +913,7 @@
enable_maintainer_mode
enable_version_specific_runtime_libs
with_slibdir
+enable_poison_system_directories
enable_plugin
enable_target_optspace
'
@@ -1621,6 +1622,8 @@
--enable-version-specific-runtime-libs
specify that runtime libraries should be
installed in a compiler-specific directory
+ --enable-poison-system-directories
+ warn for use of native system header directories
--enable-plugin enable plugin support
Optional Packages:
@@ -25339,6 +25377,19 @@
+# Check whether --enable-poison-system-directories was given.
+if test "${enable_poison_system_directories+set}" = set; then :
+ enableval=$enable_poison_system_directories;
+else
+ enable_poison_system_directories=no
+fi
+
+if test "x${enable_poison_system_directories}" = "xyes"; then
+
+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
+
+fi
+
# Substitute configuration variables

View File

@ -1,69 +0,0 @@
Upstream-Status: Pending
Index: gcc-4.5/libstdc++-v3/config/locale/generic/c_locale.h
===================================================================
--- gcc-4.5.orig/libstdc++-v3/config/locale/generic/c_locale.h 2010-06-30 22:30:53.993316002 -0700
+++ gcc-4.5/libstdc++-v3/config/locale/generic/c_locale.h 2010-06-30 22:31:26.043316001 -0700
@@ -41,12 +41,17 @@
#include <clocale>
#include <cstddef>
+#include <features.h>
+#include <ctype.h>
#define _GLIBCXX_NUM_CATEGORIES 0
_GLIBCXX_BEGIN_NAMESPACE(std)
-
- typedef int* __c_locale;
+#ifdef __UCLIBC__
+ typedef __ctype_touplow_t* __c_locale;
+#else
+ typedef int* __c_locale;
+#endif
// Convert numeric value of type double and long double to string and
// return length of string. If vsnprintf is available use it, otherwise
Index: gcc-4.5/libstdc++-v3/config/os/gnu-linux/ctype_base.h
===================================================================
--- gcc-4.5.orig/libstdc++-v3/config/os/gnu-linux/ctype_base.h 2010-06-30 22:30:54.013316002 -0700
+++ gcc-4.5/libstdc++-v3/config/os/gnu-linux/ctype_base.h 2010-06-30 22:31:26.053316001 -0700
@@ -33,14 +33,21 @@
*/
// Information as gleaned from /usr/include/ctype.h
-
+
+#include <features.h>
+#include <ctype.h>
+
_GLIBCXX_BEGIN_NAMESPACE(std)
/// @brief Base class for ctype.
struct ctype_base
{
// Non-standard typedefs.
- typedef const int* __to_type;
+#ifdef __UCLIBC__
+ typedef const __ctype_touplow_t* __to_type;
+#else
+ typedef const int* __to_type;
+#endif
// NB: Offsets into ctype<char>::_M_table force a particular size
// on the mask type. Because of this, we don't use an enum.
Index: gcc-4.5/libstdc++-v3/config/locale/generic/c_locale.cc
===================================================================
--- gcc-4.5.orig/libstdc++-v3/config/locale/generic/c_locale.cc 2010-06-28 12:12:42.000000000 -0700
+++ gcc-4.5/libstdc++-v3/config/locale/generic/c_locale.cc 2010-06-30 22:31:26.063316001 -0700
@@ -256,5 +256,10 @@ _GLIBCXX_END_NAMESPACE
#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
extern "C" void ldbl (void) __attribute__ ((alias (#dbl)))
+#ifdef __UCLIBC__
+// This is because __c_locale is of type __ctype_touplow_t* which is short on uclibc. for glibc its int*
+_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPs, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPs);
+#else
_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi);
+#endif
#endif // _GLIBCXX_LONG_DOUBLE_COMPAT

View File

@ -1,42 +0,0 @@
Upstream-Status: Pending
2010-06-07 Khem Raj <raj.khem@gmail.com>
* libsupc++/eh_arm.cc (__cxa_end_cleanup): Use .pushsection/.popsection
to emit inline assembly into .text section.
Index: gcc-4.5/libstdc++-v3/libsupc++/eh_arm.cc
===================================================================
--- gcc-4.5.orig/libstdc++-v3/libsupc++/eh_arm.cc 2010-06-04 23:20:18.000000000 -0700
+++ gcc-4.5/libstdc++-v3/libsupc++/eh_arm.cc 2010-06-08 11:27:34.247541722 -0700
@@ -157,22 +157,26 @@ __gnu_end_cleanup(void)
// Assembly wrapper to call __gnu_end_cleanup without clobbering r1-r3.
// Also push r4 to preserve stack alignment.
#ifdef __thumb__
-asm (".global __cxa_end_cleanup\n"
+asm (" .pushsection .text.__cxa_end_cleanup\n"
+" .global __cxa_end_cleanup\n"
" .type __cxa_end_cleanup, \"function\"\n"
" .thumb_func\n"
"__cxa_end_cleanup:\n"
" push\t{r1, r2, r3, r4}\n"
" bl\t__gnu_end_cleanup\n"
" pop\t{r1, r2, r3, r4}\n"
-" bl\t_Unwind_Resume @ Never returns\n");
+" bl\t_Unwind_Resume @ Never returns\n"
+" .popsection\n");
#else
-asm (".global __cxa_end_cleanup\n"
+asm (" .pushsection .text.__cxa_end_cleanup\n"
+" .global __cxa_end_cleanup\n"
" .type __cxa_end_cleanup, \"function\"\n"
"__cxa_end_cleanup:\n"
" stmfd\tsp!, {r1, r2, r3, r4}\n"
" bl\t__gnu_end_cleanup\n"
" ldmfd\tsp!, {r1, r2, r3, r4}\n"
-" bl\t_Unwind_Resume @ Never returns\n");
+" bl\t_Unwind_Resume @ Never returns\n"
+" .popsection\n");
#endif
#endif

View File

@ -1,25 +0,0 @@
Upstream-Status: Inappropriate [embedded specific]
gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++
will not run correctly since my default the linker will try and link against libstdc++
which shouldn't exist yet. We need an option to disable the automatically added -lstdc++
option whilst leaving -lc, -lgcc and other automatic library dependencies. This patch
adds such an option which only disables the -lstdc++ linkage.
A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to
do this officially, the likely answer is don't build libstdc++ separately.
RP 29/6/10
Index: gcc-4.3.3/gcc/cp/g++spec.c
===================================================================
--- gcc-4.3.3.orig/gcc/cp/g++spec.c 2010-06-29 00:06:03.901695025 +0100
+++ gcc-4.3.3/gcc/cp/g++spec.c 2010-06-29 00:06:58.800325439 +0100
@@ -131,6 +131,7 @@
if (argv[i][0] == '-')
{
if (strcmp (argv[i], "-nostdlib") == 0
+ || strcmp (argv[i], "-nostdlib++") == 0
|| strcmp (argv[i], "-nodefaultlibs") == 0)
{
library = -1;

View File

@ -1,57 +0,0 @@
From 33ba46dc9395d7a6b1496e9f273cf953d59a8d71 Mon Sep 17 00:00:00 2001
From: froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Wed, 23 Feb 2011 18:06:29 +0000
Subject: [PATCH 1/6] PR target/43810
Backport from mainline:
2010-07-23 Nathan Froyd <froydnj@codesourcery.com>
* config.host (powerpc*-eabispe*): Set tmake_file.
(powerpc*-eabi*): Likewise.
* config/rs6000/t-ppccomm (EXTRA_PARTS): Add crtbegin, crtend,
crtbeginS, crtendS, crtbeginT.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch@170443 138bc75d-0d04-0410-961f-82ee72b054a4
---
libgcc/config.host | 2 ++
libgcc/config/rs6000/t-ppccomm | 4 +++-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/libgcc/config.host b/libgcc/config.host
index fe3465e..f85c723 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -454,6 +454,7 @@ powerpc*-*-freebsd*)
powerpc-*-netbsd*)
;;
powerpc-*-eabispe*)
+ tmake_file="${tmake_file} rs6000/t-ppccomm"
;;
powerpc-*-eabisimaltivec*)
;;
@@ -464,6 +465,7 @@ powerpc-*-elf*)
powerpc-*-eabialtivec*)
;;
powerpc-*-eabi*)
+ tmake_file="${tmake_file} rs6000/t-ppccomm"
;;
powerpc-*-rtems*)
;;
diff --git a/libgcc/config/rs6000/t-ppccomm b/libgcc/config/rs6000/t-ppccomm
index 1a711eb..4548cd7 100644
--- a/libgcc/config/rs6000/t-ppccomm
+++ b/libgcc/config/rs6000/t-ppccomm
@@ -15,7 +15,9 @@ LIB2ADD_ST += crtsavfpr.S crtresfpr.S \
e500crtsavg64gpr.S \
e500crtsavg64gprctr.S
-EXTRA_PARTS += ecrti$(objext) ecrtn$(objext) ncrti$(objext) ncrtn$(objext)
+EXTRA_PARTS += crtbegin$(objext) crtend$(objext) \
+ crtbeginS$(objext) crtendS$(objext) crtbeginT$(objext) \
+ ecrti$(objext) ecrtn$(objext) ncrti$(objext) ncrtn$(objext)
# We build {e,n}crti.o and {e,n}crtn.o, which serve to add begin and
# end labels to all of the special sections used when we link using gcc.
--
1.7.4

View File

@ -1,119 +0,0 @@
From cb13264f07c419149b86e19c2187729bda8dd47d Mon Sep 17 00:00:00 2001
From: jiez <jiez@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri, 23 Jul 2010 14:47:46 +0000
Subject: [PATCH 2/6] PR target/44290 * attribs.c (decl_attributes): Insert "noinline" and "noclone" if "naked". * tree-sra.c (ipa_sra_preliminary_function_checks): Return false if ! tree_versionable_function_p.
testsuite/
PR target/44290
* gcc.dg/pr44290-1.c: New test.
* gcc.dg/pr44290-2.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162466 138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/attribs.c | 13 +++++++++++++
gcc/testsuite/gcc.dg/pr44290-1.c | 18 ++++++++++++++++++
gcc/testsuite/gcc.dg/pr44290-2.c | 24 ++++++++++++++++++++++++
gcc/tree-sra.c | 7 +++++++
4 files changed, 62 insertions(+), 0 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/pr44290-1.c
create mode 100644 gcc/testsuite/gcc.dg/pr44290-2.c
diff --git a/gcc/attribs.c b/gcc/attribs.c
index 4d91a0d..2e06608 100644
--- a/gcc/attribs.c
+++ b/gcc/attribs.c
@@ -278,6 +278,19 @@ decl_attributes (tree *node, tree attributes, int flags)
TREE_VALUE (cur_attr) = chainon (opts, TREE_VALUE (cur_attr));
}
+ /* A "naked" function attribute implies "noinline" and "noclone" for
+ those targets that support it. */
+ if (TREE_CODE (*node) == FUNCTION_DECL
+ && lookup_attribute_spec (get_identifier ("naked"))
+ && lookup_attribute ("naked", attributes) != NULL)
+ {
+ if (lookup_attribute ("noinline", attributes) == NULL)
+ attributes = tree_cons (get_identifier ("noinline"), NULL, attributes);
+
+ if (lookup_attribute ("noclone", attributes) == NULL)
+ attributes = tree_cons (get_identifier ("noclone"), NULL, attributes);
+ }
+
targetm.insert_attributes (*node, &attributes);
for (a = attributes; a; a = TREE_CHAIN (a))
diff --git a/gcc/testsuite/gcc.dg/pr44290-1.c b/gcc/testsuite/gcc.dg/pr44290-1.c
new file mode 100644
index 0000000..071a271
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr44290-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile { target arm*-*-* avr-*-* mcore-*-* rx-*-* spu-*-* } } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+static void __attribute__((naked))
+foo(void *from, void *to)
+{
+ asm volatile("dummy"::"r"(from), "r"(to));
+}
+
+unsigned int fie[2];
+
+void fum(void *to)
+{
+ foo(fie, to);
+}
+
+/* { dg-final { scan-tree-dump "foo \\\(void \\\* from, void \\\* to\\\)" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/pr44290-2.c b/gcc/testsuite/gcc.dg/pr44290-2.c
new file mode 100644
index 0000000..1951a51
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr44290-2.c
@@ -0,0 +1,24 @@
+/* { dg-do compile { target arm*-*-* avr-*-* mcore-*-* rx-*-* spu-*-* } } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+static unsigned long __attribute__((naked))
+foo (unsigned long base)
+{
+ asm volatile ("dummy");
+}
+unsigned long
+bar (void)
+{
+ static int start, set;
+
+ if (!set)
+ {
+ set = 1;
+ start = foo (0);
+ }
+
+ return foo (start);
+}
+
+/* { dg-final { scan-tree-dump "foo \\\(long unsigned int base\\\)" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 6a5b577..ea37d97 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -4126,6 +4126,13 @@ modify_function (struct cgraph_node *node, ipa_parm_adjustment_vec adjustments)
static bool
ipa_sra_preliminary_function_checks (struct cgraph_node *node)
{
+ if (!tree_versionable_function_p (current_function_decl))
+ {
+ if (dump_file)
+ fprintf (dump_file, "Function isn't allowed to be versioned.\n");
+ return false;
+ }
+
if (!cgraph_node_can_be_local_p (node))
{
if (dump_file)
--
1.7.4

View File

@ -1,106 +0,0 @@
From aff0ca6587a2f0849db55eef62a85bc8721869f2 Mon Sep 17 00:00:00 2001
From: froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Tue, 1 Feb 2011 02:11:54 +0000
Subject: [PATCH 3/6] gcc/ Backport from mainline: 2010-12-30 Nathan Froyd <froydnj@codesourcery.com>
PR target/44606
* reload1.c (choose_reload_regs): Don't look for equivalences for
output reloads of constant loads.
gcc/testsuite/
Backport from mainline:
2010-12-30 Nathan Froyd <froydnj@codesourcery.com>
PR target/44606
* gcc.dg/pr44606.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_4-branch@169465 138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/reload1.c | 11 --------
gcc/testsuite/gcc.dg/pr44606.c | 52 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 52 insertions(+), 11 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/pr44606.c
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 02fef2d..5732677 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -6273,17 +6273,6 @@ choose_reload_regs (struct insn_chain *chain)
&& (rld[r].nregs == max_group_size
|| ! reg_classes_intersect_p (rld[r].rclass, group_class)))
search_equiv = rld[r].in;
- /* If this is an output reload from a simple move insn, look
- if an equivalence for the input is available. */
- else if (inheritance && rld[r].in == 0 && rld[r].out != 0)
- {
- rtx set = single_set (insn);
-
- if (set
- && rtx_equal_p (rld[r].out, SET_DEST (set))
- && CONSTANT_P (SET_SRC (set)))
- search_equiv = SET_SRC (set);
- }
if (search_equiv)
{
diff --git a/gcc/testsuite/gcc.dg/pr44606.c b/gcc/testsuite/gcc.dg/pr44606.c
new file mode 100644
index 0000000..3929775
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr44606.c
@@ -0,0 +1,52 @@
+/* PR target/44606 */
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+#include <stdio.h>
+
+extern void abort (void);
+
+ typedef struct _PixelPacket { unsigned char r, g, b; }
+ PixelPacket;
+#define ARRAYLEN(X) (sizeof(X)/sizeof(X[0]))
+PixelPacket q[6];
+#define COLS (ARRAYLEN(q) - 1)
+PixelPacket p[2*COLS + 22];
+#define Minify(POS, WEIGHT) do { \
+ total_r += (WEIGHT)*(p[POS].r); \
+ total_g += (WEIGHT)*(p[POS].g); \
+ total_b += (WEIGHT)*(p[POS].b); \
+} while (0)
+unsigned long columns = COLS;
+int main(void)
+{
+ static const unsigned char answers[COLS] = { 31, 32, 34, 35, 36 };
+ unsigned long x;
+ for (x = 0; x < sizeof(p)/sizeof(p[0]); x++) {
+ p[x].b = (x + 34) | 1;
+ }
+ for (x = 0; x < columns; x++) {
+ double total_r = 0, total_g = 0, total_b = 0;
+ double saved_r = 0, saved_g = 0, saved_b = 0;
+ Minify(2*x + 0, 3.0);
+ Minify(2*x + 1, 7.0);
+ Minify(2*x + 2, 7.0);
+ saved_r = total_r;
+ saved_g = total_g;
+ Minify(2*x + 11, 15.0);
+ Minify(2*x + 12, 7.0);
+ Minify(2*x + 18, 7.0);
+ Minify(2*x + 19, 15.0);
+ Minify(2*x + 20, 15.0);
+ Minify(2*x + 21, 7.0);
+ q[x].r = (unsigned char)(total_r/128.0 + 0.5);
+ q[x].g = (unsigned char)(total_g/128.0 + 0.5);
+ q[x].b = (unsigned char)(total_b/128.0 + 0.5);
+ fprintf(stderr, "r:%f g:%f b:%f\n", saved_r, saved_g, saved_b);
+ }
+ for (x = 0; x < COLS; x++) {
+ if (answers[x] != q[x].b)
+ abort();
+ }
+ return 0;
+}
--
1.7.4

View File

@ -1,314 +0,0 @@
Upstream-Status: Pending
Backport of bugfix in gcc-4.6.x and mainline that address bug 44618 in
which we get wrong code generation with -Os -frename-registers.
2011-06-13 Edmar Wienskoski <edmar@freescale.com>
PR target/44618
* config/rs6000/rs6000.md (save_gpregs_<mode>): Replaced pattern
with a set of similar patterns, where the MATCH_OPERAND for the
function argument is replaced with individual references to hardware
registers.
(save_fpregs_<mode>): Ditto
(restore_gpregs_<mode>): Ditto
(return_and_restore_gpregs_<mode>): Ditto
(return_and_restore_fpregs_<mode>): Ditto
(return_and_restore_fpregs_aix_<mode>): Ditto
* gcc.target/powerpc/outofline_rnreg.c: New testcase.
Index: gcc-4.5.1/gcc/config/rs6000/rs6000.md
===================================================================
--- gcc-4.5.1.orig/gcc/config/rs6000/rs6000.md
+++ gcc-4.5.1/gcc/config/rs6000/rs6000.md
@@ -15256,25 +15256,88 @@
"{stm|stmw} %2,%1"
[(set_attr "type" "store_ux")])
-(define_insn "*save_gpregs_<mode>"
+; The following comment applies to:
+; save_gpregs_*
+; save_fpregs_*
+; restore_gpregs*
+; return_and_restore_gpregs*
+; return_and_restore_fpregs*
+; return_and_restore_fpregs_aix*
+;
+; The out-of-line save / restore functions expects one input argument.
+; Since those are not standard call_insn's, we must avoid using
+; MATCH_OPERAND for that argument. That way the register rename
+; optimization will not try to rename this register.
+; Each pattern is repeated for each possible register number used in
+; various ABIs (r11, r1, and for some functions r12)
+
+(define_insn "*save_gpregs_<mode>_r11"
+ [(match_parallel 0 "any_parallel_operand"
+ [(clobber (reg:P 65))
+ (use (match_operand:P 1 "symbol_ref_operand" "s"))
+ (use (reg:P 11))
+ (set (match_operand:P 2 "memory_operand" "=m")
+ (match_operand:P 3 "gpc_reg_operand" "r"))])]
+ ""
+ "bl %1"
+ [(set_attr "type" "branch")
+ (set_attr "length" "4")])
+
+(define_insn "*save_gpregs_<mode>_r12"
+ [(match_parallel 0 "any_parallel_operand"
+ [(clobber (reg:P 65))
+ (use (match_operand:P 1 "symbol_ref_operand" "s"))
+ (use (reg:P 12))
+ (set (match_operand:P 2 "memory_operand" "=m")
+ (match_operand:P 3 "gpc_reg_operand" "r"))])]
+ ""
+ "bl %1"
+ [(set_attr "type" "branch")
+ (set_attr "length" "4")])
+
+(define_insn "*save_gpregs_<mode>_r1"
+ [(match_parallel 0 "any_parallel_operand"
+ [(clobber (reg:P 65))
+ (use (match_operand:P 1 "symbol_ref_operand" "s"))
+ (use (reg:P 1))
+ (set (match_operand:P 2 "memory_operand" "=m")
+ (match_operand:P 3 "gpc_reg_operand" "r"))])]
+ ""
+ "bl %1"
+ [(set_attr "type" "branch")
+ (set_attr "length" "4")])
+
+(define_insn "*save_fpregs_<mode>_r11"
+ [(match_parallel 0 "any_parallel_operand"
+ [(clobber (reg:P 65))
+ (use (match_operand:P 1 "symbol_ref_operand" "s"))
+ (use (reg:P 11))
+ (set (match_operand:DF 2 "memory_operand" "=m")
+ (match_operand:DF 3 "gpc_reg_operand" "d"))])]
+ ""
+ "bl %1"
+ [(set_attr "type" "branch")
+ (set_attr "length" "4")])
+
+(define_insn "*save_fpregs_<mode>_r12"
[(match_parallel 0 "any_parallel_operand"
[(clobber (reg:P 65))
(use (match_operand:P 1 "symbol_ref_operand" "s"))
- (use (match_operand:P 2 "gpc_reg_operand" "r"))
- (set (match_operand:P 3 "memory_operand" "=m")
- (match_operand:P 4 "gpc_reg_operand" "r"))])]
+ (use (reg:P 12))
+ (set (match_operand:DF 2 "memory_operand" "=m")
+ (match_operand:DF 3 "gpc_reg_operand" "d"))])]
""
"bl %1"
[(set_attr "type" "branch")
(set_attr "length" "4")])
-(define_insn "*save_fpregs_<mode>"
+(define_insn "*save_fpregs_<mode>_r1"
[(match_parallel 0 "any_parallel_operand"
[(clobber (reg:P 65))
(use (match_operand:P 1 "symbol_ref_operand" "s"))
- (use (match_operand:P 2 "gpc_reg_operand" "r"))
- (set (match_operand:DF 3 "memory_operand" "=m")
- (match_operand:DF 4 "gpc_reg_operand" "d"))])]
+ (use (reg:P 1))
+ (set (match_operand:DF 2 "memory_operand" "=m")
+ (match_operand:DF 3 "gpc_reg_operand" "d"))])]
""
"bl %1"
[(set_attr "type" "branch")
@@ -15372,52 +15435,156 @@
; FIXME: This would probably be somewhat simpler if the Cygnus sibcall
; stuff was in GCC. Oh, and "any_parallel_operand" is a bit flexible...
-(define_insn "*restore_gpregs_<mode>"
+; The following comment applies to:
+; save_gpregs_*
+; save_fpregs_*
+; restore_gpregs*
+; return_and_restore_gpregs*
+; return_and_restore_fpregs*
+; return_and_restore_fpregs_aix*
+;
+; The out-of-line save / restore functions expects one input argument.
+; Since those are not standard call_insn's, we must avoid using
+; MATCH_OPERAND for that argument. That way the register rename
+; optimization will not try to rename this register.
+; Each pattern is repeated for each possible register number used in
+; various ABIs (r11, r1, and for some functions r12)
+
+(define_insn "*restore_gpregs_<mode>_r11"
+ [(match_parallel 0 "any_parallel_operand"
+ [(clobber (match_operand:P 1 "register_operand" "=l"))
+ (use (match_operand:P 2 "symbol_ref_operand" "s"))
+ (use (reg:P 11))
+ (set (match_operand:P 3 "gpc_reg_operand" "=r")
+ (match_operand:P 4 "memory_operand" "m"))])]
+ ""
+ "bl %2"
+ [(set_attr "type" "branch")
+ (set_attr "length" "4")])
+
+(define_insn "*restore_gpregs_<mode>_r12"
[(match_parallel 0 "any_parallel_operand"
[(clobber (match_operand:P 1 "register_operand" "=l"))
(use (match_operand:P 2 "symbol_ref_operand" "s"))
- (use (match_operand:P 3 "gpc_reg_operand" "r"))
- (set (match_operand:P 4 "gpc_reg_operand" "=r")
- (match_operand:P 5 "memory_operand" "m"))])]
+ (use (reg:P 12))
+ (set (match_operand:P 3 "gpc_reg_operand" "=r")
+ (match_operand:P 4 "memory_operand" "m"))])]
""
"bl %2"
[(set_attr "type" "branch")
(set_attr "length" "4")])
-(define_insn "*return_and_restore_gpregs_<mode>"
+(define_insn "*restore_gpregs_<mode>_r1"
+ [(match_parallel 0 "any_parallel_operand"
+ [(clobber (match_operand:P 1 "register_operand" "=l"))
+ (use (match_operand:P 2 "symbol_ref_operand" "s"))
+ (use (reg:P 1))
+ (set (match_operand:P 3 "gpc_reg_operand" "=r")
+ (match_operand:P 4 "memory_operand" "m"))])]
+ ""
+ "bl %2"
+ [(set_attr "type" "branch")
+ (set_attr "length" "4")])
+
+(define_insn "*return_and_restore_gpregs_<mode>_r11"
+ [(match_parallel 0 "any_parallel_operand"
+ [(return)
+ (clobber (match_operand:P 1 "register_operand" "=l"))
+ (use (match_operand:P 2 "symbol_ref_operand" "s"))
+ (use (reg:P 11))
+ (set (match_operand:P 3 "gpc_reg_operand" "=r")
+ (match_operand:P 4 "memory_operand" "m"))])]
+ ""
+ "b %2"
+ [(set_attr "type" "branch")
+ (set_attr "length" "4")])
+
+(define_insn "*return_and_restore_gpregs_<mode>_r12"
+ [(match_parallel 0 "any_parallel_operand"
+ [(return)
+ (clobber (match_operand:P 1 "register_operand" "=l"))
+ (use (match_operand:P 2 "symbol_ref_operand" "s"))
+ (use (reg:P 12))
+ (set (match_operand:P 3 "gpc_reg_operand" "=r")
+ (match_operand:P 4 "memory_operand" "m"))])]
+ ""
+ "b %2"
+ [(set_attr "type" "branch")
+ (set_attr "length" "4")])
+
+(define_insn "*return_and_restore_gpregs_<mode>_r1"
[(match_parallel 0 "any_parallel_operand"
[(return)
(clobber (match_operand:P 1 "register_operand" "=l"))
(use (match_operand:P 2 "symbol_ref_operand" "s"))
- (use (match_operand:P 3 "gpc_reg_operand" "r"))
- (set (match_operand:P 4 "gpc_reg_operand" "=r")
- (match_operand:P 5 "memory_operand" "m"))])]
+ (use (reg:P 1))
+ (set (match_operand:P 3 "gpc_reg_operand" "=r")
+ (match_operand:P 4 "memory_operand" "m"))])]
""
"b %2"
[(set_attr "type" "branch")
(set_attr "length" "4")])
-(define_insn "*return_and_restore_fpregs_<mode>"
+(define_insn "*return_and_restore_fpregs_<mode>_r11"
[(match_parallel 0 "any_parallel_operand"
[(return)
(clobber (match_operand:P 1 "register_operand" "=l"))
(use (match_operand:P 2 "symbol_ref_operand" "s"))
- (use (match_operand:P 3 "gpc_reg_operand" "r"))
- (set (match_operand:DF 4 "gpc_reg_operand" "=d")
- (match_operand:DF 5 "memory_operand" "m"))])]
+ (use (reg:P 11))
+ (set (match_operand:DF 3 "gpc_reg_operand" "=d")
+ (match_operand:DF 4 "memory_operand" "m"))])]
+ ""
+ "b %2"
+ [(set_attr "type" "branch")
+ (set_attr "length" "4")])
+
+(define_insn "*return_and_restore_fpregs_<mode>_r12"
+ [(match_parallel 0 "any_parallel_operand"
+ [(return)
+ (clobber (match_operand:P 1 "register_operand" "=l"))
+ (use (match_operand:P 2 "symbol_ref_operand" "s"))
+ (use (reg:P 12))
+ (set (match_operand:DF 3 "gpc_reg_operand" "=d")
+ (match_operand:DF 4 "memory_operand" "m"))])]
+ ""
+ "b %2"
+ [(set_attr "type" "branch")
+ (set_attr "length" "4")])
+
+(define_insn "*return_and_restore_fpregs_<mode>_r1"
+ [(match_parallel 0 "any_parallel_operand"
+ [(return)
+ (clobber (match_operand:P 1 "register_operand" "=l"))
+ (use (match_operand:P 2 "symbol_ref_operand" "s"))
+ (use (reg:P 1))
+ (set (match_operand:DF 3 "gpc_reg_operand" "=d")
+ (match_operand:DF 4 "memory_operand" "m"))])]
+ ""
+ "b %2"
+ [(set_attr "type" "branch")
+ (set_attr "length" "4")])
+
+(define_insn "*return_and_restore_fpregs_aix_<mode>_r11"
+ [(match_parallel 0 "any_parallel_operand"
+ [(return)
+ (use (match_operand:P 1 "register_operand" "l"))
+ (use (match_operand:P 2 "symbol_ref_operand" "s"))
+ (use (reg:P 11))
+ (set (match_operand:DF 3 "gpc_reg_operand" "=d")
+ (match_operand:DF 4 "memory_operand" "m"))])]
""
"b %2"
[(set_attr "type" "branch")
(set_attr "length" "4")])
-(define_insn "*return_and_restore_fpregs_aix_<mode>"
+(define_insn "*return_and_restore_fpregs_aix_<mode>_r1"
[(match_parallel 0 "any_parallel_operand"
[(return)
(use (match_operand:P 1 "register_operand" "l"))
(use (match_operand:P 2 "symbol_ref_operand" "s"))
- (use (match_operand:P 3 "gpc_reg_operand" "r"))
- (set (match_operand:DF 4 "gpc_reg_operand" "=d")
- (match_operand:DF 5 "memory_operand" "m"))])]
+ (use (reg:P 1))
+ (set (match_operand:DF 3 "gpc_reg_operand" "=d")
+ (match_operand:DF 4 "memory_operand" "m"))])]
""
"b %2"
[(set_attr "type" "branch")
Index: gcc-4.5.1/gcc/testsuite/gcc.target/powerpc/outofline_rnreg.c
===================================================================
--- /dev/null
+++ gcc-4.5.1/gcc/testsuite/gcc.target/powerpc/outofline_rnreg.c
@@ -0,0 +1,15 @@
+/* Test that registers used by out of line restore functions does not get renamed.
+ AIX, and 64 bit targets uses r1, which rnreg stays away from.
+ Linux 32 bits targets uses r11, which is susceptible to be renamed */
+/* { dg-do compile } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-Os -frename-registers -fdump-rtl-rnreg" } */
+/* "* renamed" or "* no available better choice" results are not acceptable */
+/* { dg-final { scan-rtl-dump-not "Register 11 in insn *" "rnreg" { target powerpc*-*-linux* } } } */
+/* { dg-final { cleanup-rtl-dump "rnreg" } } */
+int
+calc (int j)
+{
+ if (j<=1) return 1;
+ return calc(j-1)*(j+1);
+}

View File

@ -1,30 +0,0 @@
From 138f1af2d77d56762a2c2af4759efd53c275b67e Mon Sep 17 00:00:00 2001
From: Ilya Yanok <yanok@emcraft.com>
Date: Mon, 21 Mar 2011 00:49:43 +0100
Subject: [PATCH 5/6] PR45052
---
gcc/ipa-pure-const.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c
index 166dabb..da9d5d6 100644
--- a/gcc/ipa-pure-const.c
+++ b/gcc/ipa-pure-const.c
@@ -416,6 +416,13 @@ check_stmt (gimple_stmt_iterator *gsip, funct_state local, bool ipa)
print_gimple_stmt (dump_file, stmt, 0, 0);
}
+ if (gimple_has_volatile_ops (stmt))
+ {
+ local->pure_const_state = IPA_NEITHER;
+ if (dump_file)
+ fprintf (dump_file, " Volatile stmt is not const/pure\n");
+ }
+
/* Look for loads and stores. */
walk_stmt_load_store_ops (stmt, local, check_load, check_store);
--
1.7.4

View File

@ -1,75 +0,0 @@
From 34bd4baaa0f6583f9ff99544c732350c199ec0e2 Mon Sep 17 00:00:00 2001
From: qiyao <qiyao@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Wed, 18 Aug 2010 12:33:43 +0000
Subject: [PATCH 4/6] gcc/ PR target/45094 * config/arm/arm.c (output_move_double): Fix typo generating instructions ('ldr'->'str').
gcc/testsuite/
PR target/45094
* gcc.target/arm/pr45094.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163338 138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/config/arm/arm.c | 8 ++++----
gcc/testsuite/gcc.target/arm/pr45094.c | 27 +++++++++++++++++++++++++++
2 files changed, 31 insertions(+), 4 deletions(-)
create mode 100644 gcc/testsuite/gcc.target/arm/pr45094.c
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index a06a38b..0382b24 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -12182,13 +12182,13 @@ output_move_double (rtx *operands)
{
if (GET_CODE (XEXP (operands[0], 0)) == PRE_MODIFY)
{
- output_asm_insn ("ldr%?\t%0, [%1, %2]!", otherops);
- output_asm_insn ("ldr%?\t%H0, [%1, #4]", otherops);
+ output_asm_insn ("str%?\t%0, [%1, %2]!", otherops);
+ output_asm_insn ("str%?\t%H0, [%1, #4]", otherops);
}
else
{
- output_asm_insn ("ldr%?\t%H0, [%1, #4]", otherops);
- output_asm_insn ("ldr%?\t%0, [%1], %2", otherops);
+ output_asm_insn ("str%?\t%H0, [%1, #4]", otherops);
+ output_asm_insn ("str%?\t%0, [%1], %2", otherops);
}
}
else if (GET_CODE (XEXP (operands[0], 0)) == PRE_MODIFY)
diff --git a/gcc/testsuite/gcc.target/arm/pr45094.c b/gcc/testsuite/gcc.target/arm/pr45094.c
new file mode 100644
index 0000000..05f16d8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr45094.c
@@ -0,0 +1,27 @@
+/* { dg-do run } */
+/* { dg-require-effective-target arm_neon_hw } */
+/* { dg-options "-O2 -mcpu=cortex-a8" } */
+/* { dg-add-options arm_neon } */
+
+#include <stdlib.h>
+
+long long buffer[32];
+
+void __attribute__((noinline)) f(long long *p, int n)
+{
+ while (--n >= 0)
+ {
+ *p = 1;
+ p += 32;
+ }
+}
+
+int main(void)
+{
+ f(buffer, 1);
+
+ if (!buffer[0])
+ abort();
+
+ return 0;
+}
--
1.7.4

View File

@ -1,55 +0,0 @@
From d066d0682da4e60b811d9282b00128244caa5c29 Mon Sep 17 00:00:00 2001
From: Ilya Yanok <yanok@emcraft.com>
Date: Mon, 21 Mar 2011 00:55:25 +0100
Subject: [PATCH 6/6] PR45886
---
gcc/config/arm/arm.c | 2 +-
gcc/config/arm/arm.h | 11 ++++++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 0382b24..5634829 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -700,7 +700,7 @@ static int after_arm_reorg = 0;
/* The maximum number of insns to be used when loading a constant. */
static int arm_constant_limit = 3;
-static enum arm_pcs arm_pcs_default;
+enum arm_pcs arm_pcs_default;
/* For an explanation of these variables, see final_prescan_insn below. */
int arm_ccfsm_state;
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 26ffaf8..ac7bbb3 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -94,7 +94,13 @@ extern char arm_arch_name[];
if (arm_arch_iwmmxt) \
builtin_define ("__IWMMXT__"); \
if (TARGET_AAPCS_BASED) \
- builtin_define ("__ARM_EABI__"); \
+ { \
+ if (arm_pcs_default == ARM_PCS_AAPCS_VFP) \
+ builtin_define ("__ARM_PCS_VFP"); \
+ else if (arm_pcs_default == ARM_PCS_AAPCS) \
+ builtin_define ("__ARM_PCS"); \
+ builtin_define ("__ARM_EABI__"); \
+ } \
} while (0)
/* The various ARM cores. */
@@ -1648,6 +1654,9 @@ enum arm_pcs
ARM_PCS_UNKNOWN
};
+/* Default procedure calling standard of current compilation unit. */
+extern enum arm_pcs arm_pcs_default;
+
/* A C type for declaring a variable that is used as the first argument of
`FUNCTION_ARG' and other related values. */
typedef struct
--
1.7.4

View File

@ -1,57 +0,0 @@
Upstream-Status: Pending
Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that
the source can be shared between gcc-cross-initial,
gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
---
gcc/Makefile.in | 2 +-
gcc/configure | 4 ++--
gcc/configure.ac | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index d91f93a..03ee2bd 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -461,7 +461,7 @@ LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
xmake_file=@xmake_file@
-tmake_file=@tmake_file@
+tmake_file=@tmake_file@ ./t-oe
TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@
TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
diff --git a/gcc/configure b/gcc/configure
index f440fa2..dafb0c1 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -10838,8 +10838,8 @@ for f in $tm_file; do
tm_include_list="${tm_include_list} $f"
;;
defaults.h )
- tm_file_list="${tm_file_list} \$(srcdir)/$f"
- tm_include_list="${tm_include_list} $f"
+ tm_file_list="${tm_file_list} ./$f"
+ tm_include_list="${tm_include_list} ./$f"
;;
* )
tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
diff --git a/gcc/configure.ac b/gcc/configure.ac
index d003091..ba422e6 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1652,8 +1652,8 @@ for f in $tm_file; do
tm_include_list="${tm_include_list} $f"
;;
defaults.h )
- tm_file_list="${tm_file_list} \$(srcdir)/$f"
- tm_include_list="${tm_include_list} $f"
+ tm_file_list="${tm_file_list} ./$f"
+ tm_include_list="${tm_include_list} ./$f"
;;
* )
tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
--
1.7.1

View File

@ -1,29 +0,0 @@
Upstream-Status: Inappropriate [embedded specific]
upstream: n/a
comment: Use the preprocessor we have just compiled instead the one of
the system. There might be incompabilities between us and them.
Index: gcc-4.5.0/Makefile.in
===================================================================
--- gcc-4.5.0.orig/Makefile.in 2010-02-17 03:01:44.000000000 -0800
+++ gcc-4.5.0/Makefile.in 2010-06-25 11:22:08.421381364 -0700
@@ -266,6 +266,7 @@
AR="$(AR_FOR_TARGET)"; export AR; \
AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
CC="$(CC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CC; \
+ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
Index: gcc-4.5.0/Makefile.tpl
===================================================================
--- gcc-4.5.0.orig/Makefile.tpl 2010-02-17 03:01:44.000000000 -0800
+++ gcc-4.5.0/Makefile.tpl 2010-06-25 11:22:16.945631990 -0700
@@ -269,6 +269,7 @@
AR="$(AR_FOR_TARGET)"; export AR; \
AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
CC="$(CC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CC; \
+ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \

View File

@ -1,23 +0,0 @@
inherit cross-canadian
require gcc-${PV}.inc
require gcc-cross-canadian.inc
require gcc-configure-sdk.inc
require gcc-package-sdk.inc
DEPENDS += "gmp-nativesdk mpfr-nativesdk libmpc-nativesdk elfutils-nativesdk"
RDEPENDS_${PN} += "mpfr-nativesdk libmpc-nativesdk elfutils-nativesdk"
SYSTEMHEADERS = "/usr/include"
SYSTEMLIBS = "/lib/"
SYSTEMLIBS1 = "/usr/lib/"
EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
--disable-libgomp --disable-libmudflap \
--with-mpfr=${STAGING_DIR_HOST}${layout_exec_prefix} \
--with-mpc=${STAGING_DIR_HOST}${layout_exec_prefix}"
# to find libmpfr
# export LD_LIBRARY_PATH = "{STAGING_DIR_HOST}${layout_exec_prefix}"
PARALLEL_MAKE = ""

View File

@ -1,3 +0,0 @@
require gcc-cross_${PV}.bb
require gcc-cross-initial.inc

View File

@ -1,3 +0,0 @@
require gcc-cross_${PV}.bb
require gcc-cross-intermediate.inc

View File

@ -1,8 +0,0 @@
require gcc-${PV}.inc
require gcc-cross4.inc
EXTRA_OECONF += "--disable-libunwind-exceptions \
--with-mpfr=${STAGING_DIR_NATIVE}${prefix_native} \
--with-system-zlib "
ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}"

View File

@ -1,2 +0,0 @@
require gcc-cross-initial_${PV}.bb
require gcc-crosssdk-initial.inc

View File

@ -1,2 +0,0 @@
require gcc-cross-intermediate_${PV}.bb
require gcc-crosssdk-intermediate.inc

View File

@ -1,2 +0,0 @@
require gcc-cross_${PV}.bb
require gcc-crosssdk.inc

View File

@ -1,10 +0,0 @@
require gcc-${PV}.inc
require gcc-configure-runtime.inc
require gcc-package-runtime.inc
SRC_URI_append = "file://fortran-cross-compile-hack.patch"
ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
EXTRA_OECONF += "--disable-libunwind-exceptions"
EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"

View File

@ -1,11 +0,0 @@
require gcc-${PV}.inc
require gcc-configure-target.inc
require gcc-package-target.inc
SRC_URI_append = "file://fortran-cross-compile-hack.patch"
ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
SRC_URI[md5sum] = "48231a8e33ed6e058a341c53b819de1a"
SRC_URI[sha256sum] = "45fa81face89203ccbf3ec73f7a372769d855f3ba7446f50125b613d9c163e2c"

View File

@ -1,44 +0,0 @@
require gcc-${PV}.inc
INHIBIT_DEFAULT_DEPS = "1"
DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
PACKAGES = "\
${PN} \
${PN}-dev \
"
FILES_${PN} = "${base_libdir}/libgcc*.so.*"
FILES_${PN}-dev = " \
${base_libdir}/libgcc*.so \
${libdir}/${TARGET_SYS}/${BINV}/crt* \
${libdir}/${TARGET_SYS}/${BINV}/libgcov.a \
${libdir}/${TARGET_SYS}/${BINV}/libgcc*"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_install () {
target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##`
# Install libgcc from our gcc-cross saved data
install -d ${D}${base_libdir} ${D}${libdir}
cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${D}
# Move libgcc_s into /lib
mkdir -p ${D}${base_libdir}
if [ -f ${D}${libdir}/nof/libgcc_s.so ]; then
mv ${D}${libdir}/nof/libgcc* ${D}${base_libdir}
else
mv ${D}${libdir}/libgcc* ${D}${base_libdir} || true
fi
chown -R root:root ${D}
}
do_package_write_ipk[depends] += "virtual/libc:do_package"
do_package_write_deb[depends] += "virtual/libc:do_package"
do_package_write_rpm[depends] += "virtual/libc:do_package"
BBCLASSEXTEND = "nativesdk"