aboutsummaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorElvis Dowson <elvis.dowson@gmail.com>2013-03-29 12:23:09 +0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-22 14:43:46 +0100
commit16ab55220c4b602a8406c7a4405c737caae5907b (patch)
treea3bd1a0d5a636143a9c1d56703ba9d424ce0067d /meta
parentc850415a1bdbb9268114d90fd0fc4cb3479de9c5 (diff)
downloadopenembedded-core-16ab55220c4b602a8406c7a4405c737caae5907b.tar.gz
gcc-4.8: Refactor gcc-4.8.0 patch files.
Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8.inc70
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch)31
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0002-uclibc-conf.patch53
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0003-gcc-uclibc-locale-ctype_touplow_t.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/gcc-uclibc-locale-ctype_touplow_t.patch)67
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0004-uclibc-locale.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/200-uclibc-locale.patch)192
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0005-uclibc-locale-no__x.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/203-uclibc-locale-no__x.patch)178
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0006-uclibc-locale-wchar_fix.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/204-uclibc-locale-wchar_fix.patch)30
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0007-uclibc-locale-update.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/205-uclibc-locale-update.patch)319
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0008-missing-execinfo_h.patch28
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0009-c99-snprintf.patch28
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0010-c99-complex-ugly-hack.patch29
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0011-index_macro.patch44
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0012-libmudflap-susv3-legacy.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/305-libmudflap-susv3-legacy.patch)31
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0013-libstdc-namespace.patch54
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0014-sh-pr24836.patch45
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch29
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0016-gcc-poison-system-directories.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/gcc-poison-system-directories.patch)249
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0017-gcc-poison-dir-extend.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/gcc-poison-dir-extend.patch)24
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch)79
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0019-64-bit-multilib-hack.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/64bithack.patch)46
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0020-optional-libstdc.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/optional_libstdc.patch)88
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/disable_relax_pic_calls_flag.patch)37
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0022-COLLECT_GCC_OPTIONS.patch38
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/use-defaults.h-and-t-oe-in-B.patch)57
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0024-PR-target-32219.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/pr32219.patch)53
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0025-fortran-cross-compile-hack.patch46
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0026-libgcc-sjlj-check.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/libgcc-sjlj-check.patch)33
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0027-cpp-honor-sysroot.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/cpp-honor-sysroot.patch)56
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0028-MIPS64-Default-to-N64-ABI.patch31
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/GLIBC_DYNAMIC_LINKER.patch)133
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0030-gcc-Fix-argument-list-too-long-error.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/gcc-argument-list-too-long.patch)11
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0031-Disable-sdt.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/disablesdt.patch)25
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0032-libtool.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/libtool.patch)25
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/gcc-armv4-pass-fix-v4bx-to-ld.patch)30
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/use-ml-conf-files-from-B.patch)41
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0035-wcast-qual-PR-55383.patch (renamed from meta/recipes-devtools/gcc/gcc-4.8/wcast-qual-PR55383.patch)40
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/100-uclibc-conf.patch39
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/301-missing-execinfo_h.patch15
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/302-c99-snprintf.patch15
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/303-c99-complex-ugly-hack.patch16
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/304-index_macro.patch30
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/306-libstdc++-namespace.patch40
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/740-sh-pr24836.patch31
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/800-arm-bigendian.patch20
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/COLLECT_GCC_OPTIONS.patch25
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/fortran-cross-compile-hack.patch32
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/mips64-default-n64.patch19
47 files changed, 1537 insertions, 1115 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.8.inc b/meta/recipes-devtools/gcc/gcc-4.8.inc
index 25b5f2caf7..87af783e2c 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.8.inc
@@ -30,41 +30,41 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
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://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://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://COLLECT_GCC_OPTIONS.patch \
- file://use-defaults.h-and-t-oe-in-B.patch \
- file://pr32219.patch \
- file://fortran-cross-compile-hack.patch \
- file://libgcc-sjlj-check.patch \
- file://cpp-honor-sysroot.patch \
- file://mips64-default-n64.patch \
- file://GLIBC_DYNAMIC_LINKER.patch \
- file://gcc-argument-list-too-long.patch \
- file://disablesdt.patch \
- file://libtool.patch \
- file://gcc-armv4-pass-fix-v4bx-to-ld.patch \
- file://use-ml-conf-files-from-B.patch \
- file://wcast-qual-PR55383.patch \
+ file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
+ file://0002-uclibc-conf.patch \
+ file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \
+ file://0004-uclibc-locale.patch \
+ file://0005-uclibc-locale-no__x.patch \
+ file://0006-uclibc-locale-wchar_fix.patch \
+ file://0007-uclibc-locale-update.patch \
+ file://0008-missing-execinfo_h.patch \
+ file://0009-c99-snprintf.patch \
+ file://0010-c99-complex-ugly-hack.patch \
+ file://0011-index_macro.patch \
+ file://0012-libmudflap-susv3-legacy.patch \
+ file://0013-libstdc-namespace.patch \
+ file://0014-sh-pr24836.patch \
+ file://0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch \
+ file://0016-gcc-poison-system-directories.patch \
+ file://0017-gcc-poison-dir-extend.patch \
+ file://0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
+ file://0019-64-bit-multilib-hack.patch \
+ file://0020-optional-libstdc.patch \
+ file://0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
+ file://0022-COLLECT_GCC_OPTIONS.patch \
+ file://0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
+ file://0024-PR-target-32219.patch \
+ file://0025-fortran-cross-compile-hack.patch \
+ file://0026-libgcc-sjlj-check.patch \
+ file://0027-cpp-honor-sysroot.patch \
+ file://0028-MIPS64-Default-to-N64-ABI.patch \
+ file://0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
+ file://0030-gcc-Fix-argument-list-too-long-error.patch \
+ file://0031-Disable-sdt.patch \
+ file://0032-libtool.patch \
+ file://0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
+ file://0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
+ file://0035-wcast-qual-PR-55383.patch \
"
SRC_URI[md5sum] = "e6040024eb9e761c3bea348d1fa5abb0"
SRC_URI[sha256sum] = "b037fe5132b71ecad2ea7141ec92292b5d32427bf90fd90cde432b1d5abacc2c"
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/meta/recipes-devtools/gcc/gcc-4.8/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
index 964c4bbbf2..e588011678 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
@@ -1,15 +1,21 @@
-Upstream-Status: Inappropriate [embedded specific]
+From bf3d96ae58fa180b8b468d25dc2e0209daca2751 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:37:11 +0400
+Subject: [PATCH 01/35] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Inappropriate [embedded specific]
---
configure | 2 +-
configure.ac | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
-Index: gcc-4_7-branch/configure.ac
-===================================================================
---- gcc-4_7-branch.orig/configure.ac 2012-04-10 10:19:50.923337154 -0700
-+++ gcc-4_7-branch/configure.ac 2012-04-10 10:19:54.911337344 -0700
-@@ -2825,7 +2825,7 @@
+diff --git a/configure b/configure
+index d809535..1b76c90 100755
+--- a/configure
++++ b/configure
+@@ -7439,7 +7439,7 @@ fi
# for target_alias and gcc doesn't manage it consistently.
target_configargs="--cache-file=./config.cache ${target_configargs}"
@@ -18,11 +24,11 @@ Index: gcc-4_7-branch/configure.ac
case " $target_configdirs " in
*" newlib "*)
case " $target_configargs " in
-Index: gcc-4_7-branch/configure
-===================================================================
---- gcc-4_7-branch.orig/configure 2012-04-10 10:19:50.911337153 -0700
-+++ gcc-4_7-branch/configure 2012-04-10 10:19:54.915337349 -0700
-@@ -7368,7 +7368,7 @@
+diff --git a/configure.ac b/configure.ac
+index 48ec1aa..89d1d3f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2873,7 +2873,7 @@ fi
# for target_alias and gcc doesn't manage it consistently.
target_configargs="--cache-file=./config.cache ${target_configargs}"
@@ -31,3 +37,6 @@ Index: gcc-4_7-branch/configure
case " $target_configdirs " in
*" newlib "*)
case " $target_configargs " in
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0002-uclibc-conf.patch b/meta/recipes-devtools/gcc/gcc-4.8/0002-uclibc-conf.patch
new file mode 100644
index 0000000000..dda3b1041b
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0002-uclibc-conf.patch
@@ -0,0 +1,53 @@
+From d030973c872c00d916921d84deee0af2c0d38081 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:38:25 +0400
+Subject: [PATCH 02/35] uclibc-conf
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ contrib/regression/objs-gcc.sh | 4 ++++
+ libjava/classpath/ltconfig | 4 ++--
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/contrib/regression/objs-gcc.sh b/contrib/regression/objs-gcc.sh
+index 60b0497..6dc7ead 100755
+--- a/contrib/regression/objs-gcc.sh
++++ b/contrib/regression/objs-gcc.sh
+@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ]
+ 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
+diff --git a/libjava/classpath/ltconfig b/libjava/classpath/ltconfig
+index 743d951..ae4ea60 100755
+--- a/libjava/classpath/ltconfig
++++ b/libjava/classpath/ltconfig
+@@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+ # 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
+
+@@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/gcc-uclibc-locale-ctype_touplow_t.patch b/meta/recipes-devtools/gcc/gcc-4.8/0003-gcc-uclibc-locale-ctype_touplow_t.patch
index 1648b3b98c..7098e99502 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/gcc-uclibc-locale-ctype_touplow_t.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0003-gcc-uclibc-locale-ctype_touplow_t.patch
@@ -1,10 +1,37 @@
+From d2d9dd756c4356d14dd7ae003856344cb4f37985 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:40:12 +0400
+Subject: [PATCH 03/35] gcc-uclibc-locale-ctype_touplow_t
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
Upstream-Status: Pending
+---
+ libstdc++-v3/config/locale/generic/c_locale.cc | 5 +++++
+ libstdc++-v3/config/locale/generic/c_locale.h | 9 +++++++++
+ libstdc++-v3/config/os/gnu-linux/ctype_base.h | 9 +++++++++
+ 3 files changed, 23 insertions(+)
-Index: gcc-4.6.0/libstdc++-v3/config/locale/generic/c_locale.h
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/generic/c_locale.h
-+++ gcc-4.6.0/libstdc++-v3/config/locale/generic/c_locale.h
-@@ -41,13 +41,22 @@
+diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc
+index 0d309a5..f2f1e1f 100644
+--- a/libstdc++-v3/config/locale/generic/c_locale.cc
++++ b/libstdc++-v3/config/locale/generic/c_locale.cc
+@@ -263,5 +263,10 @@ _GLIBCXX_END_NAMESPACE_VERSION
+ #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
+diff --git a/libstdc++-v3/config/locale/generic/c_locale.h b/libstdc++-v3/config/locale/generic/c_locale.h
+index b5fd989..3da9a5d 100644
+--- a/libstdc++-v3/config/locale/generic/c_locale.h
++++ b/libstdc++-v3/config/locale/generic/c_locale.h
+@@ -40,13 +40,22 @@
#include <clocale>
@@ -27,11 +54,11 @@ Index: gcc-4.6.0/libstdc++-v3/config/locale/generic/c_locale.h
// 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.6.0/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-+++ gcc-4.6.0/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-@@ -34,6 +34,11 @@
+diff --git a/libstdc++-v3/config/os/gnu-linux/ctype_base.h b/libstdc++-v3/config/os/gnu-linux/ctype_base.h
+index 2d8e978..14eb08f 100644
+--- a/libstdc++-v3/config/os/gnu-linux/ctype_base.h
++++ b/libstdc++-v3/config/os/gnu-linux/ctype_base.h
+@@ -33,6 +33,11 @@
// Information as gleaned from /usr/include/ctype.h
@@ -43,7 +70,7 @@ Index: gcc-4.6.0/libstdc++-v3/config/os/gnu-linux/ctype_base.h
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
-@@ -42,7 +47,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+@@ -41,7 +46,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct ctype_base
{
// Non-standard typedefs.
@@ -55,18 +82,6 @@ Index: gcc-4.6.0/libstdc++-v3/config/os/gnu-linux/ctype_base.h
// 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.6.0/libstdc++-v3/config/locale/generic/c_locale.cc
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/generic/c_locale.cc
-+++ gcc-4.6.0/libstdc++-v3/config/locale/generic/c_locale.cc
-@@ -264,5 +264,10 @@ _GLIBCXX_END_NAMESPACE_VERSION
- #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
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/200-uclibc-locale.patch b/meta/recipes-devtools/gcc/gcc-4.8/0004-uclibc-locale.patch
index df22c54406..49f5f338e3 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/200-uclibc-locale.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0004-uclibc-locale.patch
@@ -1,10 +1,47 @@
+From a55c751a449c2cbf0b3fcc07aab1b86bf9661510 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:41:39 +0400
+Subject: [PATCH 04/35] uclibc-locale
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
Upstream-Status: Pending
+---
+ libstdc++-v3/acinclude.m4 | 37 ++
+ .../config/locale/uclibc/c++locale_internal.h | 63 ++
+ libstdc++-v3/config/locale/uclibc/c_locale.cc | 160 +++++
+ libstdc++-v3/config/locale/uclibc/c_locale.h | 117 ++++
+ .../config/locale/uclibc/codecvt_members.cc | 308 +++++++++
+ .../config/locale/uclibc/collate_members.cc | 80 +++
+ libstdc++-v3/config/locale/uclibc/ctype_members.cc | 300 +++++++++
+ .../config/locale/uclibc/messages_members.cc | 100 +++
+ .../config/locale/uclibc/messages_members.h | 118 ++++
+ .../config/locale/uclibc/monetary_members.cc | 692 ++++++++++++++++++++
+ .../config/locale/uclibc/numeric_members.cc | 160 +++++
+ libstdc++-v3/config/locale/uclibc/time_members.cc | 406 ++++++++++++
+ libstdc++-v3/config/locale/uclibc/time_members.h | 68 ++
+ libstdc++-v3/configure | 75 +++
+ libstdc++-v3/include/c_compatibility/wchar.h | 2 +
+ libstdc++-v3/include/c_std/cwchar | 2 +
+ 16 files changed, 2688 insertions(+)
+ create mode 100644 libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+ create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.h
+ create mode 100644 libstdc++-v3/config/locale/uclibc/codecvt_members.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/collate_members.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/ctype_members.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.h
+ create mode 100644 libstdc++-v3/config/locale/uclibc/monetary_members.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/numeric_members.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.h
-Index: gcc-4_7-branch/libstdc++-v3/acinclude.m4
-===================================================================
---- gcc-4_7-branch.orig/libstdc++-v3/acinclude.m4 2012-04-10 10:19:50.395337128 -0700
-+++ gcc-4_7-branch/libstdc++-v3/acinclude.m4 2012-04-10 10:30:37.327368356 -0700
-@@ -1924,6 +1924,9 @@
+diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
+index 0871a6a..326d7ef 100644
+--- a/libstdc++-v3/acinclude.m4
++++ b/libstdc++-v3/acinclude.m4
+@@ -1905,6 +1905,9 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
# Default to "generic".
if test $enable_clocale_flag = auto; then
case ${target_os} in
@@ -14,7 +51,7 @@ Index: gcc-4_7-branch/libstdc++-v3/acinclude.m4
linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
enable_clocale_flag=gnu
;;
-@@ -2085,6 +2088,40 @@
+@@ -2069,6 +2072,40 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
CTIME_CC=config/locale/generic/time_members.cc
CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
;;
@@ -55,10 +92,11 @@ Index: gcc-4_7-branch/libstdc++-v3/acinclude.m4
esac
# This is where the testsuite looks for locale catalogs, using the
-Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2012-04-10 10:30:37.327368356 -0700
+diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+new file mode 100644
+index 0000000..2ae3e4a
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
@@ -0,0 +1,63 @@
+// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
+
@@ -123,10 +161,11 @@ Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+#endif
+
+#endif // GLIBC 2.3 and later
-Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/c_locale.cc
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/c_locale.cc 2012-04-10 10:30:37.327368356 -0700
+diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
+new file mode 100644
+index 0000000..5081dc1
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
@@ -0,0 +1,160 @@
+// Wrapper for underlying C-language localization -*- C++ -*-
+
@@ -288,10 +327,11 @@ Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/c_locale.cc
+{
+ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
+} // namespace std
-Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/c_locale.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/c_locale.h 2012-04-10 10:30:37.327368356 -0700
+diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
+new file mode 100644
+index 0000000..da07c1f
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
@@ -0,0 +1,117 @@
+// Wrapper for underlying C-language localization -*- C++ -*-
+
@@ -410,10 +450,11 @@ Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/c_locale.h
+}
+
+#endif
-Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 2012-04-10 10:30:37.327368356 -0700
+diff --git a/libstdc++-v3/config/locale/uclibc/codecvt_members.cc b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
+new file mode 100644
+index 0000000..64aa962
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
@@ -0,0 +1,308 @@
+// std::codecvt implementation details, GNU version -*- C++ -*-
+
@@ -723,10 +764,11 @@ Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
+ }
+#endif
+}
-Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/collate_members.cc
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/collate_members.cc 2012-04-10 10:30:37.327368356 -0700
+diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc
+new file mode 100644
+index 0000000..c2664a7
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc
@@ -0,0 +1,80 @@
+// std::collate implementation details, GNU version -*- C++ -*-
+
@@ -808,10 +850,11 @@ Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/collate_members.cc
+ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
+#endif
+}
-Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2012-04-10 10:30:37.331368420 -0700
+diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+new file mode 100644
+index 0000000..7294e3a
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
@@ -0,0 +1,300 @@
+// std::ctype implementation details, GNU version -*- C++ -*-
+
@@ -1113,10 +1156,11 @@ Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+ }
+#endif // _GLIBCXX_USE_WCHAR_T
+}
-Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/messages_members.cc
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/messages_members.cc 2012-04-10 10:30:37.331368420 -0700
+diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc
+new file mode 100644
+index 0000000..13594d9
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc
@@ -0,0 +1,100 @@
+// std::messages implementation details, GNU version -*- C++ -*-
+
@@ -1218,10 +1262,11 @@ Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/messages_members.cc
+ }
+#endif
+}
-Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/messages_members.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/messages_members.h 2012-04-10 10:30:37.331368420 -0700
+diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
+new file mode 100644
+index 0000000..1424078
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
@@ -0,0 +1,118 @@
+// std::messages implementation details, GNU version -*- C++ -*-
+
@@ -1341,10 +1386,11 @@ Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/messages_members.h
+ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
+ }
+ }
-Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2012-04-10 10:30:37.331368420 -0700
+diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+new file mode 100644
+index 0000000..aa52731
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
@@ -0,0 +1,692 @@
+// std::moneypunct implementation details, GNU version -*- C++ -*-
+
@@ -2038,10 +2084,11 @@ Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+ }
+#endif
+}
-Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2012-04-10 10:30:37.331368420 -0700
+diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+new file mode 100644
+index 0000000..883ec1a
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
@@ -0,0 +1,160 @@
+// std::numpunct implementation details, GNU version -*- C++ -*-
+
@@ -2203,10 +2250,11 @@ Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+ { delete _M_data; }
+ #endif
+}
-Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/time_members.cc
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/time_members.cc 2012-04-10 10:30:37.331368420 -0700
+diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
+new file mode 100644
+index 0000000..e0707d7
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
@@ -0,0 +1,406 @@
+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
+
@@ -2614,10 +2662,11 @@ Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/time_members.cc
+ }
+#endif
+}
-Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/time_members.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/time_members.h 2012-04-10 10:30:37.331368420 -0700
+diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h
+new file mode 100644
+index 0000000..ba8e858
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/time_members.h
@@ -0,0 +1,68 @@
+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
+
@@ -2687,11 +2736,11 @@ Index: gcc-4_7-branch/libstdc++-v3/config/locale/uclibc/time_members.h
+ delete _M_data;
+ _S_destroy_c_locale(_M_c_locale_timepunct);
+ }
-Index: gcc-4_7-branch/libstdc++-v3/configure
-===================================================================
---- gcc-4_7-branch.orig/libstdc++-v3/configure 2012-04-10 10:19:50.383337127 -0700
-+++ gcc-4_7-branch/libstdc++-v3/configure 2012-04-10 10:30:37.347368481 -0700
-@@ -15736,6 +15736,9 @@
+diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
+index f40ddcf..c57a751 100755
+--- a/libstdc++-v3/configure
++++ b/libstdc++-v3/configure
+@@ -15822,6 +15822,9 @@ fi
# Default to "generic".
if test $enable_clocale_flag = auto; then
case ${target_os} in
@@ -2701,7 +2750,7 @@ Index: gcc-4_7-branch/libstdc++-v3/configure
linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
enable_clocale_flag=gnu
;;
-@@ -15990,6 +15993,78 @@
+@@ -16079,6 +16082,78 @@ $as_echo "newlib" >&6; }
CTIME_CC=config/locale/generic/time_members.cc
CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
;;
@@ -2780,11 +2829,11 @@ Index: gcc-4_7-branch/libstdc++-v3/configure
esac
# This is where the testsuite looks for locale catalogs, using the
-Index: gcc-4_7-branch/libstdc++-v3/include/c_compatibility/wchar.h
-===================================================================
---- gcc-4_7-branch.orig/libstdc++-v3/include/c_compatibility/wchar.h 2012-04-10 10:19:50.303337124 -0700
-+++ gcc-4_7-branch/libstdc++-v3/include/c_compatibility/wchar.h 2012-04-10 10:30:37.347368481 -0700
-@@ -101,7 +101,9 @@
+diff --git a/libstdc++-v3/include/c_compatibility/wchar.h b/libstdc++-v3/include/c_compatibility/wchar.h
+index 580d725..3fe61b8 100644
+--- a/libstdc++-v3/include/c_compatibility/wchar.h
++++ b/libstdc++-v3/include/c_compatibility/wchar.h
+@@ -101,7 +101,9 @@ using std::wmemcmp;
using std::wmemcpy;
using std::wmemmove;
using std::wmemset;
@@ -2794,11 +2843,11 @@ Index: gcc-4_7-branch/libstdc++-v3/include/c_compatibility/wchar.h
#if _GLIBCXX_USE_C99
using std::wcstold;
-Index: gcc-4_7-branch/libstdc++-v3/include/c_std/cwchar
-===================================================================
---- gcc-4_7-branch.orig/libstdc++-v3/include/c_std/cwchar 2012-04-10 10:19:50.295337124 -0700
-+++ gcc-4_7-branch/libstdc++-v3/include/c_std/cwchar 2012-04-10 10:30:37.347368481 -0700
-@@ -177,7 +177,9 @@
+diff --git a/libstdc++-v3/include/c_std/cwchar b/libstdc++-v3/include/c_std/cwchar
+index 0e6b1fc..405aee2 100644
+--- a/libstdc++-v3/include/c_std/cwchar
++++ b/libstdc++-v3/include/c_std/cwchar
+@@ -175,7 +175,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
using ::wcscoll;
using ::wcscpy;
using ::wcscspn;
@@ -2808,3 +2857,6 @@ Index: gcc-4_7-branch/libstdc++-v3/include/c_std/cwchar
using ::wcslen;
using ::wcsncat;
using ::wcsncmp;
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/203-uclibc-locale-no__x.patch b/meta/recipes-devtools/gcc/gcc-4.8/0005-uclibc-locale-no__x.patch
index c602e913e9..dcbbfe4545 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/203-uclibc-locale-no__x.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0005-uclibc-locale-no__x.patch
@@ -1,10 +1,29 @@
+From 6a3e8506a12c12728d8b29901defd738be43757f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:42:36 +0400
+Subject: [PATCH 05/35] uclibc-locale-no__x
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
Upstream-Status: Pending
+---
+ .../config/locale/uclibc/c++locale_internal.h | 45 ++++++++++++++++++++
+ libstdc++-v3/config/locale/uclibc/c_locale.cc | 14 ------
+ libstdc++-v3/config/locale/uclibc/c_locale.h | 1 +
+ .../config/locale/uclibc/collate_members.cc | 7 ---
+ libstdc++-v3/config/locale/uclibc/ctype_members.cc | 7 ---
+ .../config/locale/uclibc/messages_members.cc | 7 +--
+ .../config/locale/uclibc/messages_members.h | 18 +++-----
+ .../config/locale/uclibc/monetary_members.cc | 4 --
+ .../config/locale/uclibc/numeric_members.cc | 3 --
+ libstdc++-v3/config/locale/uclibc/time_members.cc | 3 --
+ 10 files changed, 55 insertions(+), 54 deletions(-)
-Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-@@ -60,4 +60,49 @@ extern "C" __typeof(wcsxfrm_l) __wcsxfrm
+diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+index 2ae3e4a..e74fddf 100644
+--- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
++++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+@@ -60,4 +60,49 @@ extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
extern "C" __typeof(wctype_l) __wctype_l;
#endif
@@ -54,10 +73,10 @@ Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+# endif
+
#endif // GLIBC 2.3 and later
-Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/c_locale.cc
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc
-+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/c_locale.cc
+diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
+index 5081dc1..21430d0 100644
+--- a/libstdc++-v3/config/locale/uclibc/c_locale.cc
++++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
@@ -39,20 +39,6 @@
#include <langinfo.h>
#include <bits/c++locale_internal.h>
@@ -79,10 +98,22 @@ Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/c_locale.cc
namespace std
{
template<>
-Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/collate_members.cc
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/collate_members.cc
-+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/collate_members.cc
+diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
+index da07c1f..4bca5f1 100644
+--- a/libstdc++-v3/config/locale/uclibc/c_locale.h
++++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
+@@ -68,6 +68,7 @@ namespace __gnu_cxx
+ {
+ extern "C" __typeof(uselocale) __uselocale;
+ }
++#define __uselocale uselocale
+ #endif
+
+ namespace std
+diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc
+index c2664a7..ec5c329 100644
+--- a/libstdc++-v3/config/locale/uclibc/collate_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc
@@ -36,13 +36,6 @@
#include <locale>
#include <bits/c++locale_internal.h>
@@ -97,53 +128,10 @@ Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/collate_members.cc
namespace std
{
// These are basically extensions to char_traits, and perhaps should
-Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -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.6.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -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.6.0/libstdc++-v3/config/locale/uclibc/time_members.cc
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/time_members.cc
-+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/time_members.cc
-@@ -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.6.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+index 7294e3a..7b12861 100644
+--- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
@@ -38,13 +38,6 @@
#undef _LIBC
#include <bits/c++locale_internal.h>
@@ -158,10 +146,10 @@ Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc
namespace std
{
// NB: The other ctype<char> specializations are in src/locale.cc and
-Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/messages_members.cc
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/messages_members.cc
-+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/messages_members.cc
+diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc
+index 13594d9..d7693b4 100644
+--- a/libstdc++-v3/config/locale/uclibc/messages_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc
@@ -39,13 +39,10 @@
#ifdef __UCLIBC_MJN3_ONLY__
#warning fix gettext stuff
@@ -178,10 +166,10 @@ Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/messages_members.cc
#define gettext(msgid) (msgid)
#endif
-Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/messages_members.h
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/messages_members.h
-+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/messages_members.h
+diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
+index 1424078..d89da33 100644
+--- a/libstdc++-v3/config/locale/uclibc/messages_members.h
++++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
@@ -36,15 +36,11 @@
#ifdef __UCLIBC_MJN3_ONLY__
#warning fix prototypes for *textdomain funcs
@@ -203,7 +191,7 @@ Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/messages_members.h
#endif
// Non-virtual member functions.
-@@ -70,7 +66,7 @@ extern "C" char *__bindtextdomain(const
+@@ -70,7 +66,7 @@ extern "C" char *__bindtextdomain(const char *domainname,
messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
const char* __dir) const
{
@@ -212,7 +200,7 @@ Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/messages_members.h
return this->do_open(__s, __loc);
}
-@@ -90,7 +86,7 @@ extern "C" char *__bindtextdomain(const
+@@ -90,7 +86,7 @@ extern "C" char *__bindtextdomain(const char *domainname,
{
// No error checking is done, assume the catalog exists and can
// be used.
@@ -221,15 +209,49 @@ Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/messages_members.h
return 0;
}
-Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/c_locale.h
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/c_locale.h
-+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/c_locale.h
-@@ -68,6 +68,7 @@ namespace __gnu_cxx
+diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+index aa52731..2e6f80a 100644
+--- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+@@ -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
{
- extern "C" __typeof(uselocale) __uselocale;
- }
-+#define __uselocale uselocale
+ // Construct and return valid pattern consisting of some combination of:
+diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+index 883ec1a..2c70642 100644
+--- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+@@ -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
+ {
+diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
+index e0707d7..d848ed5 100644
+--- a/libstdc++-v3/config/locale/uclibc/time_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
+@@ -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
+ {
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/204-uclibc-locale-wchar_fix.patch b/meta/recipes-devtools/gcc/gcc-4.8/0006-uclibc-locale-wchar_fix.patch
index 896d2a57c7..3406859e11 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/204-uclibc-locale-wchar_fix.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0006-uclibc-locale-wchar_fix.patch
@@ -1,9 +1,20 @@
+From 225511a3aeb193a916b3999f0b640a392caa67cd Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:45:57 +0400
+Subject: [PATCH 06/35] uclibc-locale-wchar_fix
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
Upstream-Status: Pending
+---
+ libstdc++-v3/config/locale/uclibc/monetary_members.cc | 4 ++--
+ libstdc++-v3/config/locale/uclibc/numeric_members.cc | 13 +++++++++++++
+ 2 files changed, 15 insertions(+), 2 deletions(-)
-Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+index 2e6f80a..31ebb9f 100644
+--- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
@@ -401,7 +401,7 @@ namespace std
# ifdef __UCLIBC_HAS_XLOCALE__
_M_data->_M_decimal_point = __cloc->decimal_point_wc;
@@ -22,10 +33,10 @@ Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
_M_data->_M_decimal_point = __global_locale->decimal_point_wc;
_M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
# endif
-Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+index 2c70642..d5c8961 100644
+--- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
@@ -127,12 +127,25 @@ namespace std
{
// Named locale.
@@ -52,3 +63,6 @@ Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
if (_M_data->_M_thousands_sep == L'\0')
_M_data->_M_grouping = "";
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/205-uclibc-locale-update.patch b/meta/recipes-devtools/gcc/gcc-4.8/0007-uclibc-locale-update.patch
index 743017b4d3..58511233d7 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/205-uclibc-locale-update.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0007-uclibc-locale-update.patch
@@ -1,9 +1,41 @@
+From 6ffe7c46f52d27864c3df3663e16ec9ddee71e8f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:46:58 +0400
+Subject: [PATCH 07/35] uclibc-locale-update
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
Upstream-Status: Pending
+---
+ .../config/locale/uclibc/c++locale_internal.h | 3 +
+ libstdc++-v3/config/locale/uclibc/c_locale.cc | 74 +++++++++-----------
+ libstdc++-v3/config/locale/uclibc/c_locale.h | 42 ++++++-----
+ libstdc++-v3/config/locale/uclibc/ctype_members.cc | 51 ++++++++++----
+ .../config/locale/uclibc/messages_members.h | 12 ++--
+ .../config/locale/uclibc/monetary_members.cc | 34 +++++----
+ .../config/locale/uclibc/numeric_members.cc | 5 ++
+ libstdc++-v3/config/locale/uclibc/time_members.cc | 18 +++--
+ libstdc++-v3/config/locale/uclibc/time_members.h | 17 +++--
+ 9 files changed, 158 insertions(+), 98 deletions(-)
-Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/c_locale.cc
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc
-+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/c_locale.cc
+diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+index e74fddf..971a6b4 100644
+--- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
++++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+@@ -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
+diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
+index 21430d0..1b9d8e1 100644
+--- a/libstdc++-v3/config/locale/uclibc/c_locale.cc
++++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
@@ -39,23 +39,20 @@
#include <langinfo.h>
#include <bits/c++locale_internal.h>
@@ -124,10 +156,92 @@ Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/c_locale.cc
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE
-Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
+index 4bca5f1..64a6d46 100644
+--- a/libstdc++-v3/config/locale/uclibc/c_locale.h
++++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
+@@ -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 @@ namespace std
+ #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 @@ namespace std
+ # 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);
+diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+index 7b12861..13e011d 100644
+--- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
@@ -33,16 +33,20 @@
// Written by Benjamin Kosnik <bkoz@redhat.com>
@@ -212,10 +326,10 @@ Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-}
+
+_GLIBCXX_END_NAMESPACE
-Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/messages_members.h
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/messages_members.h
-+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/messages_members.h
+diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
+index d89da33..067657a 100644
+--- a/libstdc++-v3/config/locale/uclibc/messages_members.h
++++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
@@ -53,12 +53,16 @@
template<typename _CharT>
messages<_CharT>::messages(__c_locale __cloc, const char* __s,
@@ -237,10 +351,10 @@ Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/messages_members.h
}
template<typename _CharT>
-Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+index 31ebb9f..7679b9c 100644
+--- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
@@ -33,9 +33,14 @@
// Written by Benjamin Kosnik <bkoz@redhat.com>
@@ -334,10 +448,10 @@ Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
#endif
}
}
-Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+index d5c8961..8ae8969 100644
+--- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
@@ -33,9 +33,14 @@
// Written by Benjamin Kosnik <bkoz@redhat.com>
@@ -353,122 +467,10 @@ Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
#include <bits/c++locale_internal.h>
#ifdef __UCLIBC_MJN3_ONLY__
-Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/time_members.h
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/time_members.h
-+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/time_members.h
-@@ -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.6.0/libstdc++-v3/config/locale/uclibc/c_locale.h
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/c_locale.h
-+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/c_locale.h
-@@ -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 @@ namespace std
- #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 @@ namespace std
- # 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.6.0/libstdc++-v3/config/locale/uclibc/time_members.cc
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/time_members.cc
-+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/time_members.cc
+diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
+index d848ed5..f24d53e 100644
+--- a/libstdc++-v3/config/locale/uclibc/time_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
@@ -53,11 +53,14 @@ namespace std
const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
_M_c_locale_timepunct);
@@ -505,17 +507,36 @@ Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/time_members.cc
#endif
// Make sure __s is null terminated.
if (__len == 0)
-Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-@@ -31,6 +31,9 @@
-
- #include <bits/c++config.h>
- #include <clocale>
-+#include <cstdlib>
-+#include <cstring>
-+#include <cstddef>
+diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h
+index ba8e858..1665dde 100644
+--- a/libstdc++-v3/config/locale/uclibc/time_members.h
++++ b/libstdc++-v3/config/locale/uclibc/time_members.h
+@@ -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;
++ }
++
+ }
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning clean this up
+ template<typename _CharT>
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0008-missing-execinfo_h.patch b/meta/recipes-devtools/gcc/gcc-4.8/0008-missing-execinfo_h.patch
new file mode 100644
index 0000000000..282380934a
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0008-missing-execinfo_h.patch
@@ -0,0 +1,28 @@
+From 9f2158451981cf0a80cfabdc79ae31bb6976a801 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:48:10 +0400
+Subject: [PATCH 08/35] missing-execinfo_h
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ boehm-gc/include/gc.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/boehm-gc/include/gc.h b/boehm-gc/include/gc.h
+index c51e017..a7ba8dc 100644
+--- a/boehm-gc/include/gc.h
++++ b/boehm-gc/include/gc.h
+@@ -503,7 +503,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb));
+ #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
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0009-c99-snprintf.patch b/meta/recipes-devtools/gcc/gcc-4.8/0009-c99-snprintf.patch
new file mode 100644
index 0000000000..7168778df4
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0009-c99-snprintf.patch
@@ -0,0 +1,28 @@
+From e393e076f1ab82d25e1aa04d6edea27b41d3eb06 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:49:03 +0400
+Subject: [PATCH 09/35] c99-snprintf
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ libstdc++-v3/include/c_std/cstdio | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio
+index e85bd83..6af839a 100644
+--- a/libstdc++-v3/include/c_std/cstdio
++++ b/libstdc++-v3/include/c_std/cstdio
+@@ -139,7 +139,7 @@ namespace std
+ using ::vsprintf;
+ } // namespace std
+
+-#if _GLIBCXX_USE_C99
++#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
+
+ #undef snprintf
+ #undef vfscanf
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0010-c99-complex-ugly-hack.patch b/meta/recipes-devtools/gcc/gcc-4.8/0010-c99-complex-ugly-hack.patch
new file mode 100644
index 0000000000..b628571e5d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0010-c99-complex-ugly-hack.patch
@@ -0,0 +1,29 @@
+From 73f69d806e2c9561a54995223431a1076cfd6164 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:49:57 +0400
+Subject: [PATCH 10/35] c99-complex-ugly-hack
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ libstdc++-v3/configure | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
+index c57a751..a1333e2 100755
+--- a/libstdc++-v3/configure
++++ b/libstdc++-v3/configure
+@@ -18734,6 +18734,9 @@ $as_echo_n "checking for ISO C99 support to TR1 in <complex.h>... " >&6; }
+ 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 ()
+ {
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0011-index_macro.patch b/meta/recipes-devtools/gcc/gcc-4.8/0011-index_macro.patch
new file mode 100644
index 0000000000..8ee79b09b4
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0011-index_macro.patch
@@ -0,0 +1,44 @@
+From b037953e40312b45ab84ed0a3ad882bb5e413101 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:51:02 +0400
+Subject: [PATCH 11/35] index_macro
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ libstdc++-v3/include/ext/rope | 3 +++
+ libstdc++-v3/include/ext/ropeimpl.h | 3 +++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/libstdc++-v3/include/ext/rope b/libstdc++-v3/include/ext/rope
+index 38eb1e8..158d21a 100644
+--- a/libstdc++-v3/include/ext/rope
++++ b/libstdc++-v3/include/ext/rope
+@@ -55,6 +55,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
+diff --git a/libstdc++-v3/include/ext/ropeimpl.h b/libstdc++-v3/include/ext/ropeimpl.h
+index d7b5cbd..b9b3acb 100644
+--- a/libstdc++-v3/include/ext/ropeimpl.h
++++ b/libstdc++-v3/include/ext/ropeimpl.h
+@@ -48,6 +48,9 @@
+ #include <ext/memory> // For uninitialized_copy_n
+ #include <ext/numeric> // For power
+
++/* cope w/ index defined as macro, SuSv3 proposal */
++#undef index
++
+ namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
+ {
+ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/305-libmudflap-susv3-legacy.patch b/meta/recipes-devtools/gcc/gcc-4.8/0012-libmudflap-susv3-legacy.patch
index 10d09a7fb9..968d45e84d 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/305-libmudflap-susv3-legacy.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0012-libmudflap-susv3-legacy.patch
@@ -1,10 +1,20 @@
+From a0cb13bdd98a941b81fdafe4cd96e4c569feb651 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:52:36 +0400
+Subject: [PATCH 12/35] libmudflap-susv3-legacy
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
Upstream-Status: Inappropriate [embedded specific]
+---
+ libmudflap/mf-hooks2.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
-Index: gcc-4_7-branch/libmudflap/mf-hooks2.c
-===================================================================
---- gcc-4_7-branch.orig/libmudflap/mf-hooks2.c 2012-04-10 10:19:49.391337079 -0700
-+++ gcc-4_7-branch/libmudflap/mf-hooks2.c 2012-04-10 10:31:53.191372119 -0700
-@@ -424,7 +424,7 @@
+diff --git a/libmudflap/mf-hooks2.c b/libmudflap/mf-hooks2.c
+index 4af17df..a3c6b2f 100644
+--- a/libmudflap/mf-hooks2.c
++++ b/libmudflap/mf-hooks2.c
+@@ -424,7 +424,7 @@ WRAPPER2(void, bzero, void *s, size_t n)
{
TRACE ("%s\n", __PRETTY_FUNCTION__);
MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
@@ -13,7 +23,7 @@ Index: gcc-4_7-branch/libmudflap/mf-hooks2.c
}
-@@ -434,7 +434,7 @@
+@@ -434,7 +434,7 @@ WRAPPER2(void, bcopy, const void *src, void *dest, size_t n)
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");
@@ -22,7 +32,7 @@ Index: gcc-4_7-branch/libmudflap/mf-hooks2.c
}
-@@ -444,7 +444,7 @@
+@@ -444,7 +444,7 @@ WRAPPER2(int, bcmp, const void *s1, const void *s2, size_t n)
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");
@@ -31,7 +41,7 @@ Index: gcc-4_7-branch/libmudflap/mf-hooks2.c
}
-@@ -453,7 +453,7 @@
+@@ -453,7 +453,7 @@ WRAPPER2(char *, index, const char *s, int c)
size_t n = strlen (s);
TRACE ("%s\n", __PRETTY_FUNCTION__);
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
@@ -40,7 +50,7 @@ Index: gcc-4_7-branch/libmudflap/mf-hooks2.c
}
-@@ -462,7 +462,7 @@
+@@ -462,7 +462,7 @@ WRAPPER2(char *, rindex, const char *s, int c)
size_t n = strlen (s);
TRACE ("%s\n", __PRETTY_FUNCTION__);
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
@@ -49,3 +59,6 @@ Index: gcc-4_7-branch/libmudflap/mf-hooks2.c
}
/* XXX: stpcpy, memccpy */
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0013-libstdc-namespace.patch b/meta/recipes-devtools/gcc/gcc-4.8/0013-libstdc-namespace.patch
new file mode 100644
index 0000000000..4a3efdebd8
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0013-libstdc-namespace.patch
@@ -0,0 +1,54 @@
+From 104e4d66208f2726b14d2f5eebce90700cbc83c8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:54:02 +0400
+Subject: [PATCH 13/35] libstdc++-namespace
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ libstdc++-v3/config/locale/uclibc/messages_members.h | 4 +++-
+ libstdc++-v3/config/locale/uclibc/time_members.h | 4 +++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
+index 067657a..dd76a6c 100644
+--- a/libstdc++-v3/config/locale/uclibc/messages_members.h
++++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
+@@ -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);
+ }
+ }
++}
+diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h
+index 1665dde..905c433 100644
+--- a/libstdc++-v3/config/locale/uclibc/time_members.h
++++ b/libstdc++-v3/config/locale/uclibc/time_members.h
+@@ -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);
+ }
++}
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0014-sh-pr24836.patch b/meta/recipes-devtools/gcc/gcc-4.8/0014-sh-pr24836.patch
new file mode 100644
index 0000000000..cb8fd525b2
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0014-sh-pr24836.patch
@@ -0,0 +1,45 @@
+From edc9acb181810f234b6b9f7d2820b0e4f6a1eeaf Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:54:48 +0400
+Subject: [PATCH 14/35] sh-pr24836
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+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
+---
+ gcc/configure | 2 +-
+ gcc/configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/configure b/gcc/configure
+index e12a180..135bbf5 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -23378,7 +23378,7 @@ foo: .long 25
+ 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
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index eba3577..6363a21 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -3141,7 +3141,7 @@ foo: .long 25
+ 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
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch b/meta/recipes-devtools/gcc/gcc-4.8/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch
new file mode 100644
index 0000000000..1081222f61
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch
@@ -0,0 +1,29 @@
+From 50e5366005b0f6af27378e2a5c3cb9f9936a7e62 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:58:36 +0400
+Subject: [PATCH 15/35] arm: Use TARGET_ENDIAN_OPTION for determining
+ MULTILIB_DEFAULTS
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/config/arm/linux-elf.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
+index 488efa4..753dc3a 100644
+--- a/gcc/config/arm/linux-elf.h
++++ b/gcc/config/arm/linux-elf.h
+@@ -46,7 +46,7 @@
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mfloat-abi=hard", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mfloat-abi=hard", "mno-thumb-interwork" }
+
+ /* Now we define the strings used to build the spec file. */
+ #undef LIB_SPEC
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/gcc-poison-system-directories.patch b/meta/recipes-devtools/gcc/gcc-4.8/0016-gcc-poison-system-directories.patch
index afb98d7336..1e2a9e1009 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/gcc-poison-system-directories.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0016-gcc-poison-system-directories.patch
@@ -1,37 +1,40 @@
-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.
+From 160397ef3c3331099af028f1b8d3e085b07d88ad Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:59:00 +0400
+Subject: [PATCH 16/35] gcc: 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).
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
- 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.
+Upstream-Status: Inappropriate [distribution: codesourcery]
+---
+ gcc/Makefile.in | 2 +-
+ gcc/common.opt | 4 ++++
+ gcc/config.in | 6 ++++++
+ gcc/configure | 20 ++++++++++++++++++--
+ gcc/configure.ac | 10 ++++++++++
+ gcc/doc/invoke.texi | 9 +++++++++
+ gcc/gcc.c | 2 ++
+ gcc/incpath.c | 19 +++++++++++++++++++
+ 8 files changed, 69 insertions(+), 3 deletions(-)
-Index: gcc-4.8.0/gcc/common.opt
-===================================================================
---- gcc-4.8.0.orig/gcc/common.opt 2013-03-26 14:10:58.485914988 -0700
-+++ gcc-4.8.0/gcc/common.opt 2013-03-26 14:11:01.893915049 -0700
-@@ -595,6 +595,10 @@
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 54ea04f..90a2bba 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -2018,7 +2018,7 @@ attribs.o : attribs.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
+
+ 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
+
+ CFLAGS-prefix.o += -DPREFIX=\"$(prefix)\" -DBASEVER=$(BASEVER_s)
+ prefix.o: prefix.c $(CONFIG_H) $(SYSTEM_H) coretypes.h prefix.h \
+diff --git a/gcc/common.opt b/gcc/common.opt
+index bdbd3b6..ab86b00 100644
+--- a/gcc/common.opt
++++ b/gcc/common.opt
+@@ -595,6 +595,10 @@ Wpedantic
Common Var(pedantic) Warning
Issue warnings needed for strict compliance to the standard
@@ -42,10 +45,10 @@ Index: gcc-4.8.0/gcc/common.opt
Wshadow
Common Var(warn_shadow) Warning
Warn when one local variable shadows another
-Index: gcc-4.8.0/gcc/config.in
-===================================================================
---- gcc-4.8.0.orig/gcc/config.in 2013-03-26 14:10:58.485914988 -0700
-+++ gcc-4.8.0/gcc/config.in 2013-03-26 14:11:01.893915049 -0700
+diff --git a/gcc/config.in b/gcc/config.in
+index d80fb9f..0524af7 100644
+--- a/gcc/config.in
++++ b/gcc/config.in
@@ -138,6 +138,12 @@
#endif
@@ -59,11 +62,70 @@ Index: gcc-4.8.0/gcc/config.in
/* 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.8.0/gcc/configure.ac
-===================================================================
---- gcc-4.8.0.orig/gcc/configure.ac 2013-03-26 14:11:01.553915046 -0700
-+++ gcc-4.8.0/gcc/configure.ac 2013-03-26 14:19:57.317925096 -0700
-@@ -5063,6 +5063,16 @@
+diff --git a/gcc/configure b/gcc/configure
+index 135bbf5..b65d21d 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -917,6 +917,7 @@ with_gc
+ with_system_zlib
+ enable_maintainer_mode
+ enable_version_specific_runtime_libs
++enable_poison_system_directories
+ enable_plugin
+ enable_libquadmath_support
+ with_linker_hash_style
+@@ -1630,6 +1631,8 @@ Optional Features:
+ --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
+ --disable-libquadmath-support
+ disable libquadmath support for Fortran
+@@ -17828,7 +17831,7 @@ else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 17831 "configure"
++#line 17834 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -17934,7 +17937,7 @@ else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 17937 "configure"
++#line 17940 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -27103,6 +27106,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
+ fi
+
+
++# 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
+
+
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 6363a21..e226b85 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -5063,6 +5063,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
[specify that runtime libraries should be
installed in a compiler-specific directory])])
@@ -80,11 +142,11 @@ Index: gcc-4.8.0/gcc/configure.ac
# Substitute configuration variables
AC_SUBST(subdirs)
AC_SUBST(srcdir)
-Index: gcc-4.8.0/gcc/doc/invoke.texi
-===================================================================
---- gcc-4.8.0.orig/gcc/doc/invoke.texi 2013-03-26 14:10:58.485914988 -0700
-+++ gcc-4.8.0/gcc/doc/invoke.texi 2013-03-26 14:19:57.437925099 -0700
-@@ -258,6 +258,7 @@
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index 9273d7d..a022622 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -258,6 +258,7 @@ Objective-C and Objective-C++ Dialects}.
-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
@@ -92,7 +154,7 @@ Index: gcc-4.8.0/gcc/doc/invoke.texi
-Wredundant-decls -Wno-return-local-addr @gol
-Wreturn-type -Wsequence-point -Wshadow @gol
-Wsign-compare -Wsign-conversion -Wsizeof-pointer-memaccess @gol
-@@ -4007,6 +4008,14 @@
+@@ -4007,6 +4008,14 @@ headers---for that, @option{-Wunknown-pragmas} must also be used.
for most targets, it is made up of code and thus requires the stack
to be made executable in order for the program to work properly.
@@ -107,11 +169,11 @@ Index: gcc-4.8.0/gcc/doc/invoke.texi
@item -Wfloat-equal
@opindex Wfloat-equal
@opindex Wno-float-equal
-Index: gcc-4.8.0/gcc/gcc.c
-===================================================================
---- gcc-4.8.0.orig/gcc/gcc.c 2013-03-26 14:10:58.485914988 -0700
-+++ gcc-4.8.0/gcc/gcc.c 2013-03-26 14:19:57.425925095 -0700
-@@ -740,6 +740,8 @@
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 86077f8..efdb625 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -740,6 +740,8 @@ proper position among the other output files. */
"%{fuse-ld=*:-fuse-ld=%*}\
%X %{o*} %{e*} %{N} %{n} %{r}\
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}}\
@@ -120,10 +182,10 @@ Index: gcc-4.8.0/gcc/gcc.c
%{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\
%{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\
%{fgnu-tm:%:include(libitm.spec)%(link_itm)}\
-Index: gcc-4.8.0/gcc/incpath.c
-===================================================================
---- gcc-4.8.0.orig/gcc/incpath.c 2013-03-26 14:10:58.485914988 -0700
-+++ gcc-4.8.0/gcc/incpath.c 2013-03-26 14:43:10.397951230 -0700
+diff --git a/gcc/incpath.c b/gcc/incpath.c
+index 018da98..cd41c78 100644
+--- a/gcc/incpath.c
++++ b/gcc/incpath.c
@@ -28,6 +28,7 @@
#include "intl.h"
#include "incpath.h"
@@ -132,7 +194,7 @@ Index: gcc-4.8.0/gcc/incpath.c
/* Microsoft Windows does not natively support inodes.
VMS has non-numeric inodes. */
-@@ -382,6 +383,24 @@
+@@ -382,6 +383,24 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
}
fprintf (stderr, _("End of search list.\n"));
}
@@ -157,75 +219,6 @@ Index: gcc-4.8.0/gcc/incpath.c
}
/* Use given -I paths for #include "..." but not #include <...>, and
-Index: gcc-4.8.0/gcc/Makefile.in
-===================================================================
---- gcc-4.8.0.orig/gcc/Makefile.in 2013-03-26 14:10:58.485914988 -0700
-+++ gcc-4.8.0/gcc/Makefile.in 2013-03-26 14:19:57.165925091 -0700
-@@ -2018,7 +2018,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
-
- CFLAGS-prefix.o += -DPREFIX=\"$(prefix)\" -DBASEVER=$(BASEVER_s)
- prefix.o: prefix.c $(CONFIG_H) $(SYSTEM_H) coretypes.h prefix.h \
-Index: gcc-4.8.0/gcc/configure
-===================================================================
---- gcc-4.8.0.orig/gcc/configure 2013-03-26 14:11:01.561915044 -0700
-+++ gcc-4.8.0/gcc/configure 2013-03-26 14:19:57.301925093 -0700
-@@ -917,6 +917,7 @@
- with_system_zlib
- enable_maintainer_mode
- enable_version_specific_runtime_libs
-+enable_poison_system_directories
- enable_plugin
- enable_libquadmath_support
- with_linker_hash_style
-@@ -1630,6 +1631,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
- --disable-libquadmath-support
- disable libquadmath support for Fortran
-@@ -17828,7 +17831,7 @@
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 17831 "configure"
-+#line 17834 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -17934,7 +17937,7 @@
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 17937 "configure"
-+#line 17940 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -27103,6 +27106,19 @@
- fi
-
-
-+# 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
-
-
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/gcc-poison-dir-extend.patch b/meta/recipes-devtools/gcc/gcc-4.8/0017-gcc-poison-dir-extend.patch
index 607129a6fe..9e81efd4d5 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/gcc-poison-dir-extend.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0017-gcc-poison-dir-extend.patch
@@ -1,4 +1,7 @@
-Upstream-Status: Pending
+From e99c9c97266d6d3e8cac798aa91408250c4d60cf Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:00:34 +0400
+Subject: [PATCH 17/35] gcc-poison-dir-extend
Add /sw/include and /opt/include based on the original
zecke-no-host-includes.patch patch. The original patch checked for
@@ -9,12 +12,18 @@ 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>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/incpath.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
-Index: gcc-4_7-branch/gcc/incpath.c
-===================================================================
---- gcc-4_7-branch.orig/gcc/incpath.c 2012-04-10 10:37:09.343387385 -0700
-+++ gcc-4_7-branch/gcc/incpath.c 2012-04-10 10:37:18.975387919 -0700
-@@ -371,7 +371,9 @@
+diff --git a/gcc/incpath.c b/gcc/incpath.c
+index cd41c78..eac4a92 100644
+--- a/gcc/incpath.c
++++ b/gcc/incpath.c
+@@ -393,7 +393,9 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
{
if ((!strncmp (p->name, "/usr/include", 12))
|| (!strncmp (p->name, "/usr/local/include", 18))
@@ -25,3 +34,6 @@ Index: gcc-4_7-branch/gcc/incpath.c
warning (OPT_Wpoison_system_directories,
"include location \"%s\" is unsafe for "
"cross-compilation",
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/meta/recipes-devtools/gcc/gcc-4.8/0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
index ff136e19aa..a28cafdf95 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
@@ -1,4 +1,7 @@
-Upstream-Status: Pending
+From 56207fa2923e8edf774e98ffac82666091076be3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:08:31 +0400
+Subject: [PATCH 18/35] gcc-4.3.3: SYSROOT_CFLAGS_FOR_TARGET
Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it.
@@ -14,68 +17,19 @@ I also stopped passing LIBCFLAGS to configure scripts since they are unused in t
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.
-
+Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
---
- 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_7-branch/configure
-===================================================================
---- gcc-4_7-branch.orig/configure 2012-04-10 10:22:05.807343683 -0700
-+++ gcc-4_7-branch/configure 2012-04-10 10:37:24.243388086 -0700
-@@ -6695,6 +6695,38 @@
+ configure | 32 ++++++++++++++++++++++++++++++++
+ 1 file changed, 32 insertions(+)
+
+diff --git a/configure b/configure
+index 1b76c90..e4dce7c 100755
+--- a/configure
++++ b/configure
+@@ -6772,6 +6772,38 @@ fi
@@ -114,3 +68,6 @@ Index: gcc-4_7-branch/configure
# 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
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/64bithack.patch b/meta/recipes-devtools/gcc/gcc-4.8/0019-64-bit-multilib-hack.patch
index f10df4ae37..51f4dba396 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/64bithack.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0019-64-bit-multilib-hack.patch
@@ -1,11 +1,14 @@
-Upstream-Status: Inappropriate [embedded specific]
+From 18fde5740b09324dfb9cf41e9849672573ff5fa0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:10:06 +0400
+Subject: [PATCH 19/35] 64-bit multilib hack.
GCC has internal multilib handling code but it assumes a very specific rigid directory
layout. The build system implementation of multilib layout is very generic and allows
complete customisation of the library directories.
This patch is a partial solution to allow any custom directories to be passed into gcc
-and handled correctly. It forces gcc to use the base_libdir (which is the current
+and handled correctly. It forces gcc to use the base_libdir (which is the current
directory, "."). We need to do this for each multilib that is configured as we don't
know which compiler options may be being passed into the compiler. Since we have a compiler
per mulitlib at this point that isn't an issue.
@@ -13,15 +16,25 @@ per mulitlib at this point that isn't an issue.
The one problem is the target compiler is only going to work for the default multlilib at
this point. Ideally we'd figure out which multilibs were being enabled with which paths
and be able to patch these entries with a complete set of correct paths but this we
-don't have such code at this point. This is something the target gcc recipe should do
+don't have such code at this point. This is something the target gcc recipe should do
and override these platform defaults in its build config.
RP 15/8/11
-Index: gcc-4.8.0/gcc/config/i386/t-linux64
-===================================================================
---- gcc-4.8.0.orig/gcc/config/i386/t-linux64 2013-01-10 12:38:27.000000000 -0800
-+++ gcc-4.8.0/gcc/config/i386/t-linux64 2013-03-26 11:59:28.381766975 -0700
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/config/i386/t-linux64 | 6 ++----
+ gcc/config/mips/t-linux64 | 10 +++-------
+ gcc/config/rs6000/t-linux64 | 5 ++---
+ 3 files changed, 7 insertions(+), 14 deletions(-)
+
+diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
+index bcea0c6..eb004d7 100644
+--- a/gcc/config/i386/t-linux64
++++ b/gcc/config/i386/t-linux64
@@ -32,7 +32,5 @@
#
comma=,
@@ -32,10 +45,10 @@ Index: gcc-4.8.0/gcc/config/i386/t-linux64
-MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
+MULTILIB_DIRNAMES = . .
+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-Index: gcc-4.8.0/gcc/config/mips/t-linux64
-===================================================================
---- gcc-4.8.0.orig/gcc/config/mips/t-linux64 2013-01-10 12:38:27.000000000 -0800
-+++ gcc-4.8.0/gcc/config/mips/t-linux64 2013-03-26 12:00:56.973768645 -0700
+diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64
+index bdbbd4f..16a6366 100644
+--- a/gcc/config/mips/t-linux64
++++ b/gcc/config/mips/t-linux64
@@ -17,10 +17,6 @@
# <http://www.gnu.org/licenses/>.
@@ -50,10 +63,10 @@ Index: gcc-4.8.0/gcc/config/mips/t-linux64
+MULTILIB_DIRNAMES = . . .
+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
+
-Index: gcc-4.8.0/gcc/config/rs6000/t-linux64
-===================================================================
---- gcc-4.8.0.orig/gcc/config/rs6000/t-linux64 2013-01-10 12:38:27.000000000 -0800
-+++ gcc-4.8.0/gcc/config/rs6000/t-linux64 2013-03-26 12:04:10.885772283 -0700
+diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
+index 9175de2..3971019 100644
+--- a/gcc/config/rs6000/t-linux64
++++ b/gcc/config/rs6000/t-linux64
@@ -26,7 +26,6 @@
# MULTILIB_OSDIRNAMES according to what is found on the target.
@@ -64,3 +77,6 @@ Index: gcc-4.8.0/gcc/config/rs6000/t-linux64
-MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:powerpc64-linux-gnu)
-MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/optional_libstdc.patch b/meta/recipes-devtools/gcc/gcc-4.8/0020-optional-libstdc.patch
index 2ea23e850a..eff021eb99 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/optional_libstdc.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0020-optional-libstdc.patch
@@ -1,21 +1,49 @@
-Upstream-Status: Inappropriate [embedded specific]
+From 307c8ff3ef666b7bd5ac733863f2fbb27a9d521e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:12:56 +0400
+Subject: [PATCH 20/35] optional libstdc
-gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++
+gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++
will not run correctly since by default the linker will try to link against libstdc++
which shouldn't exist yet. We need an option to disable -lstdc++
-option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc
+option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc
driver. This patch adds such an option which only disables the -lstdc++.
-A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to
+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.8.0/gcc/cp/g++spec.c
-===================================================================
---- gcc-4.8.0.orig/gcc/cp/g++spec.c 2013-01-10 12:38:27.000000000 -0800
-+++ gcc-4.8.0/gcc/cp/g++spec.c 2013-03-26 12:06:42.305775104 -0700
-@@ -126,6 +126,7 @@
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ gcc/c-family/c.opt | 4 ++++
+ gcc/cp/g++spec.c | 1 +
+ gcc/doc/invoke.texi | 9 +++++++--
+ gcc/gcc.c | 1 +
+ 4 files changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
+index 10ae84d..dc3ffdf 100644
+--- a/gcc/c-family/c.opt
++++ b/gcc/c-family/c.opt
+@@ -1299,6 +1299,10 @@ nostdinc++
+ C++ ObjC++
+ Do not search standard system include directories for C++
+
++nostdlib++
++Driver
++Do not link standard C++ runtime library
++
+ o
+ C ObjC C++ ObjC++ Joined Separate
+ ; Documented in common.opt
+diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c
+index b896eea..f55216b 100644
+--- a/gcc/cp/g++spec.c
++++ b/gcc/cp/g++spec.c
+@@ -126,6 +126,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
switch (decoded_options[i].opt_index)
{
case OPT_nostdlib:
@@ -23,11 +51,11 @@ Index: gcc-4.8.0/gcc/cp/g++spec.c
case OPT_nodefaultlibs:
library = -1;
break;
-Index: gcc-4.8.0/gcc/doc/invoke.texi
-===================================================================
---- gcc-4.8.0.orig/gcc/doc/invoke.texi 2013-03-26 12:05:41.000000000 -0700
-+++ gcc-4.8.0/gcc/doc/invoke.texi 2013-03-26 12:07:56.905776503 -0700
-@@ -190,7 +190,7 @@
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index a022622..f15c991 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -190,7 +190,7 @@ in the following sections.
-frepo -fno-rtti -fstats -ftemplate-backtrace-limit=@var{n} @gol
-ftemplate-depth=@var{n} @gol
-fno-threadsafe-statics -fuse-cxa-atexit -fno-weak -nostdinc++ @gol
@@ -36,7 +64,7 @@ Index: gcc-4.8.0/gcc/doc/invoke.texi
-fvisibility-ms-compat @gol
-fext-numeric-literals @gol
-Wabi -Wconversion-null -Wctor-dtor-privacy @gol
-@@ -453,7 +453,7 @@
+@@ -453,7 +453,7 @@ Objective-C and Objective-C++ Dialects}.
-nostartfiles -nodefaultlibs -nostdlib -pie -rdynamic @gol
-s -static -static-libgcc -static-libstdc++ @gol
-static-libasan -static-libtsan @gol
@@ -45,7 +73,7 @@ Index: gcc-4.8.0/gcc/doc/invoke.texi
-T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol
-u @var{symbol}}
-@@ -9886,6 +9886,11 @@
+@@ -9886,6 +9886,11 @@ These entries are usually resolved by entries in
libc. These entry points should be supplied through some other
mechanism when this option is specified.
@@ -57,26 +85,11 @@ Index: gcc-4.8.0/gcc/doc/invoke.texi
@cindex @option{-lgcc}, use with @option{-nostdlib}
@cindex @option{-nostdlib} and unresolved references
@cindex unresolved references and @option{-nostdlib}
-Index: gcc-4.8.0/gcc/c-family/c.opt
-===================================================================
---- gcc-4.8.0.orig/gcc/c-family/c.opt 2013-01-18 21:25:25.000000000 -0800
-+++ gcc-4.8.0/gcc/c-family/c.opt 2013-03-26 12:06:42.321775104 -0700
-@@ -1299,6 +1299,10 @@
- C++ ObjC++
- Do not search standard system include directories for C++
-
-+nostdlib++
-+Driver
-+Do not link standard C++ runtime library
-+
- o
- C ObjC C++ ObjC++ Joined Separate
- ; Documented in common.opt
-Index: gcc-4.8.0/gcc/gcc.c
-===================================================================
---- gcc-4.8.0.orig/gcc/gcc.c 2013-03-26 12:05:41.000000000 -0700
-+++ gcc-4.8.0/gcc/gcc.c 2013-03-26 12:06:42.325775102 -0700
-@@ -748,6 +748,7 @@
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index efdb625..477752f 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -748,6 +748,7 @@ proper position among the other output files. */
%(mflib) " STACK_SPLIT_SPEC "\
%{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \
%{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
@@ -84,3 +97,6 @@ Index: gcc-4.8.0/gcc/gcc.c
%{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}"
#endif
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/disable_relax_pic_calls_flag.patch b/meta/recipes-devtools/gcc/gcc-4.8/0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
index bc01cd9103..eb3c61f127 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/disable_relax_pic_calls_flag.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
@@ -1,6 +1,7 @@
-Upstream-Status: Inappropriate [configuration]
-
-GCC: disable MASK_RELAX_PIC_CALLS bit
+From 004696e054ae9dc71d512cc755ccc4074fc62b2d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:14:20 +0400
+Subject: [PATCH 21/35] 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"
@@ -9,12 +10,19 @@ 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>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: gcc-4_7-branch/gcc/configure
-===================================================================
---- gcc-4_7-branch.orig/gcc/configure 2012-04-10 10:37:09.351387437 -0700
-+++ gcc-4_7-branch/gcc/configure 2012-04-10 10:37:57.211389779 -0700
-@@ -25837,13 +25837,6 @@
+Upstream-Status: Inappropriate [configuration]
+---
+ gcc/configure | 7 -------
+ gcc/configure.ac | 7 -------
+ 2 files changed, 14 deletions(-)
+
+diff --git a/gcc/configure b/gcc/configure
+index b65d21d..bdab45a 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -25829,13 +25829,6 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6;
rm -f conftest.*
fi
fi
@@ -28,11 +36,11 @@ Index: gcc-4_7-branch/gcc/configure
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5
$as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; }
-Index: gcc-4_7-branch/gcc/configure.ac
-===================================================================
---- gcc-4_7-branch.orig/gcc/configure.ac 2012-04-10 10:37:09.339387366 -0700
-+++ gcc-4_7-branch/gcc/configure.ac 2012-04-10 10:37:57.215389769 -0700
-@@ -4027,13 +4027,6 @@
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index e226b85..5f5c909 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -4099,13 +4099,6 @@ x:
rm -f conftest.*
fi
fi
@@ -46,3 +54,6 @@ Index: gcc-4_7-branch/gcc/configure.ac
AC_MSG_RESULT($gcc_cv_as_ld_jalr_reloc)
AC_CACHE_CHECK([linker for .eh_frame personality relaxation],
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0022-COLLECT_GCC_OPTIONS.patch b/meta/recipes-devtools/gcc/gcc-4.8/0022-COLLECT_GCC_OPTIONS.patch
new file mode 100644
index 0000000000..40c8abffae
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0022-COLLECT_GCC_OPTIONS.patch
@@ -0,0 +1,38 @@
+From 7f5c9dcc71c8b83a0b5596266cc4bdf0936e8e00 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:16:28 +0400
+Subject: [PATCH 22/35] COLLECT_GCC_OPTIONS
+
+This patch adds --sysroot into COLLECT_GCC_OPTIONS which is used to
+invoke collect2.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/gcc.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 477752f..51062aa 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -4098,6 +4098,15 @@ set_collect_gcc_options (void)
+ 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;
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/use-defaults.h-and-t-oe-in-B.patch b/meta/recipes-devtools/gcc/gcc-4.8/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
index 212c26324c..9e4435cf59 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/use-defaults.h-and-t-oe-in-B.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
@@ -1,8 +1,16 @@
-Upstream-Status: Pending
+From 46d52439052f0876a92dcf8a0ab9c60d75c8030b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:17:25 +0400
+Subject: [PATCH 23/35] Use the defaults.h in ${B} instead of ${S}, and t-oe
+ in ${B}
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.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
---
gcc/Makefile.in | 2 +-
gcc/configure | 4 ++--
@@ -10,12 +18,12 @@ gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
gcc/mkconfig.sh | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
-Index: gcc-4_7-branch/gcc/Makefile.in
-===================================================================
---- gcc-4_7-branch.orig/gcc/Makefile.in 2012-04-10 10:37:09.347387424 -0700
-+++ gcc-4_7-branch/gcc/Makefile.in 2012-04-10 10:39:24.019393881 -0700
-@@ -481,7 +481,7 @@
- TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 90a2bba..2320497 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -469,7 +469,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
+ TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
xmake_file=@xmake_file@
-tmake_file=@tmake_file@
@@ -23,11 +31,11 @@ Index: gcc-4_7-branch/gcc/Makefile.in
TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@
TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
-Index: gcc-4_7-branch/gcc/configure
-===================================================================
---- gcc-4_7-branch.orig/gcc/configure 2012-04-10 10:37:57.211389779 -0700
-+++ gcc-4_7-branch/gcc/configure 2012-04-10 10:39:24.027393938 -0700
-@@ -11692,8 +11692,8 @@
+diff --git a/gcc/configure b/gcc/configure
+index bdab45a..d587993 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -11539,8 +11539,8 @@ for f in $tm_file; do
tm_include_list="${tm_include_list} $f"
;;
defaults.h )
@@ -38,11 +46,11 @@ Index: gcc-4_7-branch/gcc/configure
;;
* )
tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
-Index: gcc-4_7-branch/gcc/configure.ac
-===================================================================
---- gcc-4_7-branch.orig/gcc/configure.ac 2012-04-10 10:37:57.215389769 -0700
-+++ gcc-4_7-branch/gcc/configure.ac 2012-04-10 10:39:24.027393938 -0700
-@@ -1699,8 +1699,8 @@
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 5f5c909..5e5e84f 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1720,8 +1720,8 @@ for f in $tm_file; do
tm_include_list="${tm_include_list} $f"
;;
defaults.h )
@@ -53,11 +61,11 @@ Index: gcc-4_7-branch/gcc/configure.ac
;;
* )
tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
-Index: gcc-4_7-branch/gcc/mkconfig.sh
-===================================================================
---- gcc-4_7-branch.orig/gcc/mkconfig.sh 2012-04-10 10:17:24.383330061 -0700
-+++ gcc-4_7-branch/gcc/mkconfig.sh 2012-04-10 10:39:24.027393938 -0700
-@@ -78,7 +78,7 @@
+diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
+index 29fdfc7..e048dce 100644
+--- a/gcc/mkconfig.sh
++++ b/gcc/mkconfig.sh
+@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
if [ $# -ge 1 ]; then
echo '#ifdef IN_GCC' >> ${output}T
for file in "$@"; do
@@ -66,7 +74,7 @@ Index: gcc-4_7-branch/gcc/mkconfig.sh
postpone_defaults_h="yes"
else
echo "# include \"$file\"" >> ${output}T
-@@ -104,7 +104,7 @@
+@@ -103,7 +103,7 @@ esac
# If we postponed including defaults.h, add the #include now.
if test x"$postpone_defaults_h" = x"yes"; then
@@ -75,3 +83,6 @@ Index: gcc-4_7-branch/gcc/mkconfig.sh
fi
# Add multiple inclusion protection guard, part two.
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/pr32219.patch b/meta/recipes-devtools/gcc/gcc-4.8/0024-PR-target-32219.patch
index bea2063049..b47d841a7f 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/pr32219.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0024-PR-target-32219.patch
@@ -1,33 +1,25 @@
-Upstream-Status:Backport
-Hi,
+From e0d15f4f8bf28c351b9215ca37f1caa24df0e1fd Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:18:54 +0400
+Subject: [PATCH 24/35] PR target/32219
-As suggested by richi.
-regtested on i686-linux-gnu with all default languages and no regressions.
-Ok for trunk?
-
-gcc/ChangeLog
-2010-03-15 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
-
- PR target/32219
- * varasm.c (default_binds_local_p_1): Weak data is not local.
-
-gcc/testsuite/ChangeLog
-2010-03-15 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
-
- PR target/32219
- * gcc.dg/visibility-21.c: New test.
+* varasm.c (default_binds_local_p_1): Weak data is not local.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Backport
---
gcc/testsuite/gcc.dg/visibility-21.c | 14 ++++++++++++++
- gcc/varasm.c | 8 ++++----
- 2 files changed, 18 insertions(+), 4 deletions(-)
+ gcc/varasm.c | 9 ++++-----
+ 2 files changed, 18 insertions(+), 5 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/visibility-21.c
-Index: gcc-4_7-branch/gcc/testsuite/gcc.dg/visibility-21.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ gcc-4_7-branch/gcc/testsuite/gcc.dg/visibility-21.c 2012-04-10 10:39:38.083396738 -0700
+diff --git a/gcc/testsuite/gcc.dg/visibility-21.c b/gcc/testsuite/gcc.dg/visibility-21.c
+new file mode 100644
+index 0000000..be7deda
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/visibility-21.c
@@ -0,0 +1,14 @@
+/* PR target/32219 */
+/* { dg-do run } */
@@ -43,11 +35,11 @@ Index: gcc-4_7-branch/gcc/testsuite/gcc.dg/visibility-21.c
+ return 0;
+}
+
-Index: gcc-4_7-branch/gcc/varasm.c
-===================================================================
---- gcc-4_7-branch.orig/gcc/varasm.c 2012-04-10 10:17:24.127330049 -0700
-+++ gcc-4_7-branch/gcc/varasm.c 2012-04-10 10:39:38.087396414 -0700
-@@ -6937,6 +6937,10 @@
+diff --git a/gcc/varasm.c b/gcc/varasm.c
+index 6648103..fadba78 100644
+--- a/gcc/varasm.c
++++ b/gcc/varasm.c
+@@ -6675,6 +6675,10 @@ default_binds_local_p_1 (const_tree exp, int shlib)
/* Static variables are always local. */
else if (! TREE_PUBLIC (exp))
local_p = true;
@@ -58,7 +50,7 @@ Index: gcc-4_7-branch/gcc/varasm.c
/* A variable is local if the user has said explicitly that it will
be. */
else if ((DECL_VISIBILITY_SPECIFIED (exp)
-@@ -6950,11 +6954,6 @@
+@@ -6688,11 +6692,6 @@ default_binds_local_p_1 (const_tree exp, int shlib)
local. */
else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
local_p = true;
@@ -70,3 +62,6 @@ Index: gcc-4_7-branch/gcc/varasm.c
/* If PIC, then assume that any global name can be overridden by
symbols resolved from other modules. */
else if (shlib)
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0025-fortran-cross-compile-hack.patch b/meta/recipes-devtools/gcc/gcc-4.8/0025-fortran-cross-compile-hack.patch
new file mode 100644
index 0000000000..0e7914d5c7
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0025-fortran-cross-compile-hack.patch
@@ -0,0 +1,46 @@
+From af8a56ea4e17b2909eff2c57704ab43ef24f28d3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:20:01 +0400
+Subject: [PATCH 25/35] fortran cross-compile hack.
+
+* 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.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ libgfortran/configure | 2 +-
+ libgfortran/configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libgfortran/configure b/libgfortran/configure
+index 8385e96..b8f7a92 100755
+--- a/libgfortran/configure
++++ b/libgfortran/configure
+@@ -12704,7 +12704,7 @@ esac
+
+ # 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'
+diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
+index 7d97fed..3f9f484 100644
+--- a/libgfortran/configure.ac
++++ b/libgfortran/configure.ac
+@@ -227,7 +227,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
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/libgcc-sjlj-check.patch b/meta/recipes-devtools/gcc/gcc-4.8/0026-libgcc-sjlj-check.patch
index c2fe79217c..d4efab956a 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/libgcc-sjlj-check.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0026-libgcc-sjlj-check.patch
@@ -1,3 +1,8 @@
+From 08c2398445e6cac282488f64ae6bf29cbcd8db23 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:20:50 +0400
+Subject: [PATCH 26/35] libgcc-sjlj-check
+
ac_fn_c_try_compile doesnt seem to keep the intermediate files
which are needed for sjlj test to pass since it greps into the
generated file. So we run the compiler command using AC_TRY_COMMAND
@@ -6,11 +11,16 @@ which then generates the needed .s file
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
-Index: trunk/libgcc/configure
-===================================================================
---- trunk.orig/libgcc/configure 2012-03-01 22:59:10.112444433 -0800
-+++ trunk/libgcc/configure 2012-03-01 22:59:50.424446325 -0800
-@@ -4525,17 +4525,19 @@
+---
+ libgcc/configure | 10 ++++++----
+ libgcc/configure.ac | 10 ++++------
+ 2 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/libgcc/configure b/libgcc/configure
+index 1425df6..d18e3cb 100644
+--- a/libgcc/configure
++++ b/libgcc/configure
+@@ -4208,17 +4208,19 @@ void foo ()
}
_ACEOF
@@ -34,11 +44,11 @@ Index: trunk/libgcc/configure
rm -f conftest*
fi
-Index: trunk/libgcc/configure.ac
-===================================================================
---- trunk.orig/libgcc/configure.ac 2012-03-01 22:59:10.128444406 -0800
-+++ trunk/libgcc/configure.ac 2012-03-01 22:59:50.428446373 -0800
-@@ -209,16 +209,14 @@
+diff --git a/libgcc/configure.ac b/libgcc/configure.ac
+index 8b7aba5..c7c9644 100644
+--- a/libgcc/configure.ac
++++ b/libgcc/configure.ac
+@@ -216,16 +216,14 @@ void foo ()
bar();
}
])])
@@ -59,3 +69,6 @@ Index: trunk/libgcc/configure.ac
rm -f conftest*
])
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/cpp-honor-sysroot.patch b/meta/recipes-devtools/gcc/gcc-4.8/0027-cpp-honor-sysroot.patch
index 731067741d..05e95219f8 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/cpp-honor-sysroot.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0027-cpp-honor-sysroot.patch
@@ -1,24 +1,46 @@
+From a0f9bd09c816ad29ecf7c29d6c27f7df97710364 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:22:00 +0400
+Subject: [PATCH 27/35] cpp: honor sysroot.
+
Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile
-preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location
-rather than the --sysroot option specified on the commandline. If access to that directory is
+preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location
+rather than the --sysroot option specified on the commandline. If access to that directory is
permission denied (unreadable), gcc will error.
This happens when ccache is in use due to the fact it uses preprocessed source files.
-The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix,
+The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix,
-isystem, -isysroot happen and the correct sysroot is used.
[YOCTO #2074]
-Upstream-Status: Pending
-
RP 2012/04/13
-Index: gcc-4_6-branch/gcc/gcc.c
-===================================================================
---- gcc-4_6-branch.orig/gcc/gcc.c 2012-04-13 12:24:37.939671140 +0000
-+++ gcc-4_6-branch/gcc/gcc.c 2012-04-13 12:24:54.439670688 +0000
-@@ -953,7 +953,7 @@
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/cp/lang-specs.h | 2 +-
+ gcc/gcc.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h
+index a001c3e..1aae1e4 100644
+--- a/gcc/cp/lang-specs.h
++++ b/gcc/cp/lang-specs.h
+@@ -63,5 +63,5 @@ along with GCC; see the file COPYING3. If not see
+ {".ii", "@c++-cpp-output", 0, 0, 0},
+ {"@c++-cpp-output",
+ "%{!M:%{!MM:%{!E:\
+- cc1plus -fpreprocessed %i %(cc1_options) %2\
++ cc1plus -fpreprocessed %i %I %(cc1_options) %2\
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 51062aa..cf6b99e 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -1042,7 +1042,7 @@ static const struct compiler default_compilers[] =
%W{o*:--output-pch=%*}}%V}}}}}}", 0, 0, 0},
{".i", "@cpp-output", 0, 0, 0},
{"@cpp-output",
@@ -27,14 +49,6 @@ Index: gcc-4_6-branch/gcc/gcc.c
{".s", "@assembler", 0, 0, 0},
{"@assembler",
"%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0},
-Index: gcc-4_6-branch/gcc/cp/lang-specs.h
-===================================================================
---- gcc-4_6-branch.orig/gcc/cp/lang-specs.h 2012-04-13 12:25:01.019670594 +0000
-+++ gcc-4_6-branch/gcc/cp/lang-specs.h 2012-04-13 12:25:07.567670180 +0000
-@@ -64,5 +64,5 @@
- {".ii", "@c++-cpp-output", 0, 0, 0},
- {"@c++-cpp-output",
- "%{!M:%{!MM:%{!E:\
-- cc1plus -fpreprocessed %i %(cc1_options) %2\
-+ cc1plus -fpreprocessed %i %I %(cc1_options) %2\
- %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0028-MIPS64-Default-to-N64-ABI.patch b/meta/recipes-devtools/gcc/gcc-4.8/0028-MIPS64-Default-to-N64-ABI.patch
new file mode 100644
index 0000000000..263872069c
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0028-MIPS64-Default-to-N64-ABI.patch
@@ -0,0 +1,31 @@
+From 301e18d4711db5925e767fad08dffa9cfe0a2f1f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:23:08 +0400
+Subject: [PATCH 28/35] MIPS64: Default to N64 ABI
+
+MIPS64 defaults to n32 ABI, this patch makes it
+so that it defaults to N64 ABI
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [OE config specific]
+---
+ gcc/config.gcc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index 1a0be50..989c2fb 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -1797,7 +1797,7 @@ mips*-mti-linux*)
+ mips64*-*-linux* | mipsisa64*-*-linux*)
+ tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/gnu-user64.h mips/linux64.h mips/linux-common.h"
+ tmake_file="${tmake_file} mips/t-linux64"
+- tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
++ tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_64"
+ case ${target} in
+ mips64el-st-linux-gnu)
+ tm_file="${tm_file} mips/st.h"
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/GLIBC_DYNAMIC_LINKER.patch b/meta/recipes-devtools/gcc/gcc-4.8/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
index 180b2393e6..0e8fffcd8b 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/GLIBC_DYNAMIC_LINKER.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
@@ -1,19 +1,39 @@
+From 29d12344fb682a053de53eb08b95704cf3b67af2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:24:50 +0400
+Subject: [PATCH 29/35] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
+ relative to SYSTEMLIBS_DIR
+
This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
relative to SYSTEMLIBS_DIR which can be set in generated headers
This breaks the assumption of hardcoded multilib in gcc
Change is only for the supported architectures in OE including
-SH, spart, alpha for possible future support (if any)
+SH, sparc, alpha for possible future support (if any)
Removes the do_headerfix task in metadata
-Signed-off-by: Khem Raj
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
Upstream-Status: Inappropriate [OE configuration]
+---
+ gcc/config/alpha/linux-elf.h | 4 ++--
+ gcc/config/arm/linux-eabi.h | 4 ++--
+ gcc/config/arm/linux-elf.h | 2 +-
+ gcc/config/i386/linux.h | 2 +-
+ gcc/config/i386/linux64.h | 6 +++---
+ gcc/config/mips/linux.h | 2 +-
+ gcc/config/mips/linux64.h | 8 ++++----
+ gcc/config/rs6000/linux64.h | 8 ++++----
+ gcc/config/sh/linux.h | 2 +-
+ gcc/config/sparc/linux.h | 2 +-
+ gcc/config/sparc/linux64.h | 4 ++--
+ 11 files changed, 22 insertions(+), 22 deletions(-)
-Index: gcc-4.8.0/gcc/config/alpha/linux-elf.h
-===================================================================
---- gcc-4.8.0.orig/gcc/config/alpha/linux-elf.h 2013-01-10 12:38:27.000000000 -0800
-+++ gcc-4.8.0/gcc/config/alpha/linux-elf.h 2013-03-26 13:55:08.825897207 -0700
-@@ -23,8 +23,8 @@
+diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
+index 84e0596..3a59d71 100644
+--- a/gcc/config/alpha/linux-elf.h
++++ b/gcc/config/alpha/linux-elf.h
+@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see
#define EXTRA_SPECS \
{ "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
@@ -24,10 +44,10 @@ Index: gcc-4.8.0/gcc/config/alpha/linux-elf.h
#if DEFAULT_LIBC == LIBC_UCLIBC
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
#elif DEFAULT_LIBC == LIBC_GLIBC
-Index: gcc-4.8.0/gcc/config/arm/linux-eabi.h
-===================================================================
---- gcc-4.8.0.orig/gcc/config/arm/linux-eabi.h 2013-01-10 12:38:27.000000000 -0800
-+++ gcc-4.8.0/gcc/config/arm/linux-eabi.h 2013-03-26 13:56:14.901898372 -0700
+diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
+index 4a425c8..80f454d 100644
+--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h
@@ -68,8 +68,8 @@
GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */
@@ -39,10 +59,10 @@ Index: gcc-4.8.0/gcc/config/arm/linux-eabi.h
#define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
#define GLIBC_DYNAMIC_LINKER \
-Index: gcc-4.8.0/gcc/config/arm/linux-elf.h
-===================================================================
---- gcc-4.8.0.orig/gcc/config/arm/linux-elf.h 2013-03-26 13:54:13.000000000 -0700
-+++ gcc-4.8.0/gcc/config/arm/linux-elf.h 2013-03-26 13:55:08.825897207 -0700
+diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
+index 753dc3a..d593967 100644
+--- a/gcc/config/arm/linux-elf.h
++++ b/gcc/config/arm/linux-elf.h
@@ -57,7 +57,7 @@
#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
@@ -52,21 +72,21 @@ Index: gcc-4.8.0/gcc/config/arm/linux-elf.h
#define LINUX_TARGET_LINK_SPEC "%{h*} \
%{static:-Bstatic} \
-Index: gcc-4.8.0/gcc/config/i386/linux.h
-===================================================================
---- gcc-4.8.0.orig/gcc/config/i386/linux.h 2013-01-10 12:38:27.000000000 -0800
-+++ gcc-4.8.0/gcc/config/i386/linux.h 2013-03-26 13:55:08.825897207 -0700
-@@ -20,4 +20,4 @@
+diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
+index 3c95ee0..33b8acd 100644
+--- a/gcc/config/i386/linux.h
++++ b/gcc/config/i386/linux.h
+@@ -20,4 +20,4 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#define GNU_USER_LINK_EMULATION "elf_i386"
-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-Index: gcc-4.8.0/gcc/config/i386/linux64.h
-===================================================================
---- gcc-4.8.0.orig/gcc/config/i386/linux64.h 2013-01-10 12:38:27.000000000 -0800
-+++ gcc-4.8.0/gcc/config/i386/linux64.h 2013-03-26 13:55:08.825897207 -0700
-@@ -27,6 +27,6 @@
+diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
+index b793e08..da788b8 100644
+--- a/gcc/config/i386/linux64.h
++++ b/gcc/config/i386/linux64.h
+@@ -27,6 +27,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define GNU_USER_LINK_EMULATION64 "elf_x86_64"
#define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
@@ -76,21 +96,21 @@ Index: gcc-4.8.0/gcc/config/i386/linux64.h
+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
+#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2"
-Index: gcc-4.8.0/gcc/config/mips/linux.h
-===================================================================
---- gcc-4.8.0.orig/gcc/config/mips/linux.h 2013-01-10 12:38:27.000000000 -0800
-+++ gcc-4.8.0/gcc/config/mips/linux.h 2013-03-26 13:55:08.825897207 -0700
-@@ -17,4 +17,4 @@
+diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
+index 9b4c68d..7ee5ba8 100644
+--- a/gcc/config/mips/linux.h
++++ b/gcc/config/mips/linux.h
+@@ -17,4 +17,4 @@ You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld.so.1"
-Index: gcc-4.8.0/gcc/config/mips/linux64.h
-===================================================================
---- gcc-4.8.0.orig/gcc/config/mips/linux64.h 2013-01-10 12:38:27.000000000 -0800
-+++ gcc-4.8.0/gcc/config/mips/linux64.h 2013-03-26 13:55:08.825897207 -0700
-@@ -22,10 +22,10 @@
+diff --git a/gcc/config/mips/linux64.h b/gcc/config/mips/linux64.h
+index dbba47a..c7ed573 100644
+--- a/gcc/config/mips/linux64.h
++++ b/gcc/config/mips/linux64.h
+@@ -22,10 +22,10 @@ along with GCC; see the file COPYING3. If not see
#define GNU_USER_LINK_EMULATION64 "elf64%{EB:b}%{EL:l}tsmip"
#define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
@@ -105,11 +125,11 @@ Index: gcc-4.8.0/gcc/config/mips/linux64.h
#define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
#define GNU_USER_DYNAMIC_LINKERN32 \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
-Index: gcc-4.8.0/gcc/config/rs6000/linux64.h
-===================================================================
---- gcc-4.8.0.orig/gcc/config/rs6000/linux64.h 2013-01-10 12:38:27.000000000 -0800
-+++ gcc-4.8.0/gcc/config/rs6000/linux64.h 2013-03-26 13:55:08.825897207 -0700
-@@ -360,10 +360,10 @@
+diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
+index dc6f67f..bc60769 100644
+--- a/gcc/config/rs6000/linux64.h
++++ b/gcc/config/rs6000/linux64.h
+@@ -360,10 +360,10 @@ extern int dot_symbols;
#undef LINK_OS_DEFAULT_SPEC
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
@@ -124,11 +144,11 @@ Index: gcc-4.8.0/gcc/config/rs6000/linux64.h
#if DEFAULT_LIBC == LIBC_UCLIBC
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
#elif DEFAULT_LIBC == LIBC_GLIBC
-Index: gcc-4.8.0/gcc/config/sh/linux.h
-===================================================================
---- gcc-4.8.0.orig/gcc/config/sh/linux.h 2013-03-13 20:01:53.000000000 -0700
-+++ gcc-4.8.0/gcc/config/sh/linux.h 2013-03-26 13:55:08.829897236 -0700
-@@ -43,7 +43,7 @@
+diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h
+index 9e8f32d..86bf81e 100644
+--- a/gcc/config/sh/linux.h
++++ b/gcc/config/sh/linux.h
+@@ -43,7 +43,7 @@ along with GCC; see the file COPYING3. If not see
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
@@ -137,11 +157,11 @@ Index: gcc-4.8.0/gcc/config/sh/linux.h
#undef SUBTARGET_LINK_EMUL_SUFFIX
#define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
-Index: gcc-4.8.0/gcc/config/sparc/linux.h
-===================================================================
---- gcc-4.8.0.orig/gcc/config/sparc/linux.h 2013-01-10 12:38:27.000000000 -0800
-+++ gcc-4.8.0/gcc/config/sparc/linux.h 2013-03-26 13:55:08.829897236 -0700
-@@ -83,7 +83,7 @@
+diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
+index 49283d3..6f0b03a 100644
+--- a/gcc/config/sparc/linux.h
++++ b/gcc/config/sparc/linux.h
+@@ -83,7 +83,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
When the -shared link option is used a final link is not being
done. */
@@ -150,11 +170,11 @@ Index: gcc-4.8.0/gcc/config/sparc/linux.h
#undef LINK_SPEC
#define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
-Index: gcc-4.8.0/gcc/config/sparc/linux64.h
-===================================================================
---- gcc-4.8.0.orig/gcc/config/sparc/linux64.h 2013-01-10 12:38:27.000000000 -0800
-+++ gcc-4.8.0/gcc/config/sparc/linux64.h 2013-03-26 13:55:08.829897236 -0700
-@@ -92,8 +92,8 @@
+diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
+index 7d48e96..b01993f 100644
+--- a/gcc/config/sparc/linux64.h
++++ b/gcc/config/sparc/linux64.h
+@@ -92,8 +92,8 @@ along with GCC; see the file COPYING3. If not see
When the -shared link option is used a final link is not being
done. */
@@ -165,3 +185,6 @@ Index: gcc-4.8.0/gcc/config/sparc/linux64.h
#ifdef SPARC_BI_ARCH
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/gcc-argument-list-too-long.patch b/meta/recipes-devtools/gcc/gcc-4.8/0030-gcc-Fix-argument-list-too-long-error.patch
index 70d3c53a84..2ceaff64f7 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/gcc-argument-list-too-long.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0030-gcc-Fix-argument-list-too-long-error.patch
@@ -1,3 +1,8 @@
+From c1816c160156f99c34e6a0a0311bb0219326804e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:26:37 +0400
+Subject: [PATCH 30/35] gcc: Fix argument list too long error.
+
There would be an "Argument list too long" error when the
build directory is longer than 200, this is caused by:
@@ -10,6 +15,7 @@ The "tr ' ' '\012'" was used for translating the space to "\n", the
$(sort list) doesn't need this.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
---
@@ -17,9 +23,10 @@ Upstream-Status: Pending
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 2320497..8562a62 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
-@@ -4553,7 +4553,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
+@@ -4627,7 +4627,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
# We keep the directory structure for files in config or c-family and .def
# files. All other files are flattened to a single directory.
$(mkinstalldirs) $(DESTDIR)$(plugin_includedir)
@@ -29,5 +36,5 @@ diff --git a/gcc/Makefile.in b/gcc/Makefile.in
for file in $$headers; do \
if [ -f $$file ] ; then \
--
-1.7.10.2
+1.7.10.4
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/disablesdt.patch b/meta/recipes-devtools/gcc/gcc-4.8/0031-Disable-sdt.patch
index 8946afc11a..c714239bea 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/disablesdt.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0031-Disable-sdt.patch
@@ -1,17 +1,27 @@
-We don't list dtrace in DEPENDS so we shouldn't be depending on this header.
+From eb70cb2785af7171897f363298bbfcd83de5ec57 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:28:10 +0400
+Subject: [PATCH 31/35] Disable sdt.
+
+We don't list dtrace in DEPENDS so we shouldn't be depending on this header.
It may or may not exist from preivous builds though. To be determinstic, disable
sdt.h usage always. This avoids build failures if the header is removed after configure
but before libgcc is compiled for example.
RP 2012/8/7
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
Upstream-Status: Inappropriate [hack]
+---
+ gcc/configure | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
-Index: git/gcc/configure
-===================================================================
---- git.orig/gcc/configure 2012-08-07 21:18:42.319247701 +0000
-+++ git/gcc/configure 2012-08-07 21:19:08.939247082 +0000
-@@ -26758,12 +26758,12 @@
+diff --git a/gcc/configure b/gcc/configure
+index d587993..8bc0c98 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -26792,12 +26792,12 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5
$as_echo_n "checking sys/sdt.h in the target C library... " >&6; }
have_sys_sdt_h=no
@@ -30,3 +40,6 @@ Index: git/gcc/configure
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5
$as_echo "$have_sys_sdt_h" >&6; }
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/libtool.patch b/meta/recipes-devtools/gcc/gcc-4.8/0032-libtool.patch
index 9580b23d8e..3b3d1b621b 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/libtool.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0032-libtool.patch
@@ -1,8 +1,13 @@
+From 6c715fcfa262adadca81c68a1f3f69aa3187a501 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:29:11 +0400
+Subject: [PATCH 32/35] libtool
+
libstdc++ from gcc-runtime gets created with -rpath=/usr/lib/../lib for qemux86-64
when running on am x86_64 build host.
This patch stops this speading to libdir in the libstdc++.la file within libtool.
-Aguably, it shouldn't be passing this into libtool in the first place but
+Arguably, it shouldn't be passing this into libtool in the first place but
for now this resolves the nastiest problems this causes.
func_normal_abspath would resolve an empty path to `pwd` so we need
@@ -10,13 +15,18 @@ to filter the zero case.
RP 2012/8/24
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
Upstream-Status: Pending
+---
+ ltmain.sh | 4 ++++
+ 1 file changed, 4 insertions(+)
-Index: git/ltmain.sh
-===================================================================
---- git.orig/ltmain.sh 2012-08-24 11:45:58.597087961 +0000
-+++ git/ltmain.sh 2012-08-24 12:18:37.961042581 +0000
-@@ -6359,6 +6359,10 @@
+diff --git a/ltmain.sh b/ltmain.sh
+index a03433f..46f47c2 100644
+--- a/ltmain.sh
++++ b/ltmain.sh
+@@ -6359,6 +6359,10 @@ func_mode_link ()
func_warning "ignoring multiple \`-rpath's for a libtool library"
install_libdir="$1"
@@ -27,3 +37,6 @@ Index: git/ltmain.sh
oldlibs=
if test -z "$rpath"; then
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/gcc-armv4-pass-fix-v4bx-to-ld.patch b/meta/recipes-devtools/gcc/gcc-4.8/0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
index 7e03a3a8a8..199984d655 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/gcc-armv4-pass-fix-v4bx-to-ld.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
@@ -1,21 +1,30 @@
+From 97e4591c20310425e7aca0e6712a8d9480e7744c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:30:32 +0400
+Subject: [PATCH 33/35] gcc: armv4: pass fix-v4bx to linker to support EABI.
+
The LINK_SPEC for linux gets overwritten by linux-eabi.h which
means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result
the option is not passed to linker when chosing march=armv4
This patch redefines this in linux-eabi.h and reinserts it
for eabi defaulting toolchains.
-We might want to send it upstream
+We might want to send it upstream.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
+---
+ gcc/config/arm/linux-eabi.h | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
--Khem
-Index: gcc-4_7-branch/gcc/config/arm/linux-eabi.h
-===================================================================
---- gcc-4_7-branch.orig/gcc/config/arm/linux-eabi.h 2012-08-21 22:54:12.448453417 -0700
-+++ gcc-4_7-branch/gcc/config/arm/linux-eabi.h 2012-08-21 23:05:18.008478722 -0700
-@@ -78,10 +78,14 @@
- %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
- %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
+diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
+index 80f454d..4db3eb9 100644
+--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h
+@@ -77,10 +77,14 @@
+ %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
+ %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
+/* For armv4 we pass --fix-v4bx to linker to support EABI */
+#undef TARGET_FIX_V4BX_SPEC
@@ -29,3 +38,6 @@ Index: gcc-4_7-branch/gcc/config/arm/linux-eabi.h
LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \
LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/use-ml-conf-files-from-B.patch b/meta/recipes-devtools/gcc/gcc-4.8/0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch
index 4d229247a4..66b9f89a13 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/use-ml-conf-files-from-B.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch
@@ -1,15 +1,27 @@
+From fc5e4beaea856a2b486c770ad3addc0f5bb3100e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:33:04 +0400
+Subject: [PATCH 34/35] Use the multilib config files from ${B} instead of
+ using the ones from ${S}
+
Use the multilib config files from ${B} instead of using the ones from ${S}
so that the source can be shared between gcc-cross-initial,
gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
-Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-Index: gcc-4.7.2/gcc/configure
-===================================================================
---- gcc-4.7.2.orig/gcc/configure
-+++ gcc-4.7.2/gcc/configure
-@@ -11717,10 +11717,20 @@ done
+Upstream-Status: Inappropriate [configuration]
+---
+ gcc/configure | 22 ++++++++++++++++++----
+ gcc/configure.ac | 22 ++++++++++++++++++----
+ 2 files changed, 36 insertions(+), 8 deletions(-)
+
+diff --git a/gcc/configure b/gcc/configure
+index 8bc0c98..3cd0817 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -11519,10 +11519,20 @@ done
tmake_file_=
for f in ${tmake_file}
do
@@ -34,7 +46,7 @@ Index: gcc-4.7.2/gcc/configure
done
tmake_file="${tmake_file_}"
-@@ -11731,6 +11741,10 @@ tm_file_list="options.h"
+@@ -11533,6 +11543,10 @@ tm_file_list="options.h"
tm_include_list="options.h insn-constants.h"
for f in $tm_file; do
case $f in
@@ -45,11 +57,11 @@ Index: gcc-4.7.2/gcc/configure
./* )
f=`echo $f | sed 's/^..//'`
tm_file_list="${tm_file_list} $f"
-Index: gcc-4.7.2/gcc/configure.ac
-===================================================================
---- gcc-4.7.2.orig/gcc/configure.ac
-+++ gcc-4.7.2/gcc/configure.ac
-@@ -1701,10 +1701,20 @@ done
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 5e5e84f..415a6df 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1700,10 +1700,20 @@ done
tmake_file_=
for f in ${tmake_file}
do
@@ -74,7 +86,7 @@ Index: gcc-4.7.2/gcc/configure.ac
done
tmake_file="${tmake_file_}"
-@@ -1715,6 +1725,10 @@ tm_file_list="options.h"
+@@ -1714,6 +1724,10 @@ tm_file_list="options.h"
tm_include_list="options.h insn-constants.h"
for f in $tm_file; do
case $f in
@@ -85,3 +97,6 @@ Index: gcc-4.7.2/gcc/configure.ac
./* )
f=`echo $f | sed 's/^..//'`
tm_file_list="${tm_file_list} $f"
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/wcast-qual-PR55383.patch b/meta/recipes-devtools/gcc/gcc-4.8/0035-wcast-qual-PR-55383.patch
index 1c22bd8dbf..be4cf4a737 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8/wcast-qual-PR55383.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0035-wcast-qual-PR-55383.patch
@@ -1,19 +1,28 @@
+From deffdb0b2497a106061d3ea2c6a3fef4fba3445e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:39:51 +0400
+Subject: [PATCH 35/35] wcast-qual PR/55383
+
This is a backport from gcc bugzilla
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55383
-fixes wrong warning behavior which has no workaround
-other than disabling the warning
-
-Upstream-Status: Backport
+This commit fixes a wrong warning behavior. This bug which has no
+workaround other than disabling the warning.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: gcc-4.8.0/gcc/c/c-typeck.c
-===================================================================
---- gcc-4.8.0.orig/gcc/c/c-typeck.c 2013-01-24 08:59:44.000000000 -0800
-+++ gcc-4.8.0/gcc/c/c-typeck.c 2013-03-26 17:28:30.286137332 -0700
-@@ -4464,7 +4464,7 @@
+Upstream-Status: Backport
+---
+ gcc/c/c-typeck.c | 2 +-
+ gcc/testsuite/c-c++-common/Wcast-qual-1.c | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
+index ddb6d39..c624120 100644
+--- a/gcc/c/c-typeck.c
++++ b/gcc/c/c-typeck.c
+@@ -4464,7 +4464,7 @@ handle_warn_cast_qual (location_t loc, tree type, tree otype)
/* There are qualifiers present in IN_OTYPE that are not present
in IN_TYPE. */
warning_at (loc, OPT_Wcast_qual,
@@ -22,11 +31,11 @@ Index: gcc-4.8.0/gcc/c/c-typeck.c
discarded);
if (added || discarded)
-Index: gcc-4.8.0/gcc/testsuite/c-c++-common/Wcast-qual-1.c
-===================================================================
---- gcc-4.8.0.orig/gcc/testsuite/c-c++-common/Wcast-qual-1.c 2011-04-07 14:47:38.000000000 -0700
-+++ gcc-4.8.0/gcc/testsuite/c-c++-common/Wcast-qual-1.c 2013-03-26 17:31:56.454141202 -0700
-@@ -85,11 +85,11 @@
+diff --git a/gcc/testsuite/c-c++-common/Wcast-qual-1.c b/gcc/testsuite/c-c++-common/Wcast-qual-1.c
+index 640e4f0..56382c7 100644
+--- a/gcc/testsuite/c-c++-common/Wcast-qual-1.c
++++ b/gcc/testsuite/c-c++-common/Wcast-qual-1.c
+@@ -85,11 +85,11 @@ f3 (void ***bar)
void
f4 (void * const **bar)
{
@@ -41,3 +50,6 @@ Index: gcc-4.8.0/gcc/testsuite/c-c++-common/Wcast-qual-1.c
void * const * const * p19 = (void * const * const *) bar;
const void * const * const *p21 = (const void * const * const *) bar;
}
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/100-uclibc-conf.patch b/meta/recipes-devtools/gcc/gcc-4.8/100-uclibc-conf.patch
deleted file mode 100644
index b2981e0791..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.8/100-uclibc-conf.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Upstream-Status: Pending
-
-Index: gcc-4.6.0/contrib/regression/objs-gcc.sh
-===================================================================
---- gcc-4.6.0.orig/contrib/regression/objs-gcc.sh
-+++ gcc-4.6.0/contrib/regression/objs-gcc.sh
-@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H
- 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.6.0/libjava/classpath/ltconfig
-===================================================================
---- gcc-4.6.0.orig/libjava/classpath/ltconfig
-+++ gcc-4.6.0/libjava/classpath/ltconfig
-@@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-
-
- # 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
-
-@@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux
- ;;
-
- # This must be Linux ELF.
--linux-gnu*)
-+linux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/301-missing-execinfo_h.patch b/meta/recipes-devtools/gcc/gcc-4.8/301-missing-execinfo_h.patch
deleted file mode 100644
index 9589822b8d..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.8/301-missing-execinfo_h.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Index: gcc-4.6.0/boehm-gc/include/gc.h
-===================================================================
---- gcc-4.6.0.orig/boehm-gc/include/gc.h
-+++ gcc-4.6.0/boehm-gc/include/gc.h
-@@ -503,7 +503,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_of
- #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
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/302-c99-snprintf.patch b/meta/recipes-devtools/gcc/gcc-4.8/302-c99-snprintf.patch
deleted file mode 100644
index 9becc15e11..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.8/302-c99-snprintf.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Index: gcc-4_7-branch/libstdc++-v3/include/c_std/cstdio
-===================================================================
---- gcc-4_7-branch.orig/libstdc++-v3/include/c_std/cstdio 2012-04-10 10:19:49.603337089 -0700
-+++ gcc-4_7-branch/libstdc++-v3/include/c_std/cstdio 2012-04-10 10:30:59.863369565 -0700
-@@ -140,7 +140,7 @@
- using ::vsprintf;
- } // namespace std
-
--#if _GLIBCXX_USE_C99
-+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
-
- #undef snprintf
- #undef vfscanf
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/303-c99-complex-ugly-hack.patch b/meta/recipes-devtools/gcc/gcc-4.8/303-c99-complex-ugly-hack.patch
deleted file mode 100644
index d69c54696a..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.8/303-c99-complex-ugly-hack.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-Index: gcc-4_7-branch/libstdc++-v3/configure
-===================================================================
---- gcc-4_7-branch.orig/libstdc++-v3/configure 2012-04-10 10:30:37.347368481 -0700
-+++ gcc-4_7-branch/libstdc++-v3/configure 2012-04-10 10:31:22.787370652 -0700
-@@ -18767,6 +18767,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 ()
- {
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/304-index_macro.patch b/meta/recipes-devtools/gcc/gcc-4.8/304-index_macro.patch
deleted file mode 100644
index f103765233..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.8/304-index_macro.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Upstream-Status: Pending
-
-Index: gcc-4.6.0/libstdc++-v3/include/ext/rope
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/include/ext/rope
-+++ gcc-4.6.0/libstdc++-v3/include/ext/rope
-@@ -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.6.0/libstdc++-v3/include/ext/ropeimpl.h
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/include/ext/ropeimpl.h
-+++ gcc-4.6.0/libstdc++-v3/include/ext/ropeimpl.h
-@@ -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
-+
- namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
- {
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/306-libstdc++-namespace.patch b/meta/recipes-devtools/gcc/gcc-4.8/306-libstdc++-namespace.patch
deleted file mode 100644
index e99bf9602d..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.8/306-libstdc++-namespace.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Upstream-Status: Pending
-
-Index: gcc-4.6.0/libstdc++-v3/config/locale/uclibc/messages_members.h
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/messages_members.h
-+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -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.6.0/libstdc++-v3/config/locale/uclibc/time_members.h
-===================================================================
---- gcc-4.6.0.orig/libstdc++-v3/config/locale/uclibc/time_members.h
-+++ gcc-4.6.0/libstdc++-v3/config/locale/uclibc/time_members.h
-@@ -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);
- }
-+}
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/740-sh-pr24836.patch b/meta/recipes-devtools/gcc/gcc-4.8/740-sh-pr24836.patch
deleted file mode 100644
index 1406f87f1c..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.8/740-sh-pr24836.patch
+++ /dev/null
@@ -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_7-branch/gcc/configure.ac
-===================================================================
---- gcc-4_7-branch.orig/gcc/configure.ac 2012-04-10 10:22:05.787343661 -0700
-+++ gcc-4_7-branch/gcc/configure.ac 2012-04-10 10:32:18.415373343 -0700
-@@ -3065,7 +3065,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_7-branch/gcc/configure
-===================================================================
---- gcc-4_7-branch.orig/gcc/configure 2012-04-10 10:22:05.803343691 -0700
-+++ gcc-4_7-branch/gcc/configure 2012-04-10 10:32:18.419373328 -0700
-@@ -23481,7 +23481,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
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/800-arm-bigendian.patch b/meta/recipes-devtools/gcc/gcc-4.8/800-arm-bigendian.patch
deleted file mode 100644
index 16b23070ab..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.8/800-arm-bigendian.patch
+++ /dev/null
@@ -1,20 +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.8.0/gcc/config/arm/linux-elf.h
-===================================================================
---- gcc-4.8.0.orig/gcc/config/arm/linux-elf.h 2013-03-26 11:38:59.000000000 -0700
-+++ gcc-4.8.0/gcc/config/arm/linux-elf.h 2013-03-26 11:40:03.277745106 -0700
-@@ -46,7 +46,7 @@
-
- #undef MULTILIB_DEFAULTS
- #define MULTILIB_DEFAULTS \
-- { "marm", "mlittle-endian", "mfloat-abi=hard", "mno-thumb-interwork" }
-+ { "marm", TARGET_ENDIAN_OPTION, "mfloat-abi=hard", "mno-thumb-interwork" }
-
- /* Now we define the strings used to build the spec file. */
- #undef LIB_SPEC
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/COLLECT_GCC_OPTIONS.patch b/meta/recipes-devtools/gcc/gcc-4.8/COLLECT_GCC_OPTIONS.patch
deleted file mode 100644
index f5982983f2..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.8/COLLECT_GCC_OPTIONS.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Upstream-Status: Pending
-
-#This patck added --sysroot into COLLECT_GCC_OPTIONS which is used to
-#invoke collect2.
-
-Index: gcc-4_7-branch/gcc/gcc.c
-===================================================================
---- gcc-4_7-branch.orig/gcc/gcc.c 2012-04-10 10:37:49.487389409 -0700
-+++ gcc-4_7-branch/gcc/gcc.c 2012-04-10 10:38:50.831392259 -0700
-@@ -3995,6 +3995,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;
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/fortran-cross-compile-hack.patch b/meta/recipes-devtools/gcc/gcc-4.8/fortran-cross-compile-hack.patch
deleted file mode 100644
index 2773b42cca..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.8/fortran-cross-compile-hack.patch
+++ /dev/null
@@ -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_7-branch/libgfortran/configure
-===================================================================
---- gcc-4_7-branch.orig/libgfortran/configure 2012-04-10 10:17:24.055330044 -0700
-+++ gcc-4_7-branch/libgfortran/configure 2012-04-10 10:42:26.159402591 -0700
-@@ -12689,7 +12689,7 @@
-
- # 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_7-branch/libgfortran/configure.ac
-===================================================================
---- gcc-4_7-branch.orig/libgfortran/configure.ac 2012-04-10 10:17:24.063330046 -0700
-+++ gcc-4_7-branch/libgfortran/configure.ac 2012-04-10 10:42:26.159402591 -0700
-@@ -227,7 +227,7 @@
-
- # 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
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/mips64-default-n64.patch b/meta/recipes-devtools/gcc/gcc-4.8/mips64-default-n64.patch
deleted file mode 100644
index a42569e058..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.8/mips64-default-n64.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-MIPS64 defaults to n32 ABI, this patch makes it
-so that it defaults to N64 ABI
-
-Upstream-Status: Inappropriate [OE config specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: gcc-4_7-branch/gcc/config.gcc
-===================================================================
---- gcc-4_7-branch.orig/gcc/config.gcc 2012-04-22 19:30:21.000000000 -0700
-+++ gcc-4_7-branch/gcc/config.gcc 2012-04-22 21:09:57.783403173 -0700
-@@ -1750,7 +1750,7 @@
- mips64*-*-linux* | mipsisa64*-*-linux*)
- tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/gnu-user64.h mips/linux64.h"
- tmake_file="${tmake_file} mips/t-linux64"
-- tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
-+ tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_64"
- case ${target} in
- mips64el-st-linux-gnu)
- tm_file="${tm_file} mips/st.h"