summaryrefslogtreecommitdiffstats
path: root/package/gcc
diff options
context:
space:
mode:
authorPeter Korsgaard <peter@korsgaard.com>2016-06-01 17:55:16 +0200
committerPeter Korsgaard <peter@korsgaard.com>2016-06-01 17:55:16 +0200
commit577021e81b0bf894d26d8127822410267b2bb411 (patch)
tree8b93cd2342bc73294c9a7695cf8d558da7f16503 /package/gcc
parent206ce569269a4b0b7d3ae60f9162d40b290726d8 (diff)
parent5386c61796feb30a02ec287ad769a6754aa525dd (diff)
downloadbuildroot-577021e81b0bf894d26d8127822410267b2bb411.tar.gz
buildroot-577021e81b0bf894d26d8127822410267b2bb411.zip
Merge branch 'next'
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/gcc')
-rw-r--r--package/gcc/4.8.5/130-fix_build_with_gcc-6.patch153
-rw-r--r--package/gcc/4.9.3/130-fix_build_with_gcc-6.patch153
-rw-r--r--package/gcc/5.3.0/130-fix_build_with_gcc-6.patch153
-rw-r--r--package/gcc/Config.in.host4
-rw-r--r--package/gcc/arc-2015.12/130-fix_build_with_gcc-6.patch153
-rw-r--r--package/gcc/arc-2015.12/900-UPDATE-Fix-handling-complex-PIC-moves.patch103
-rw-r--r--package/gcc/arc-2015.12/901-UPDATE1-Fix-handling-complex-PIC-moves.patch83
-rw-r--r--package/gcc/arc-2015.12/950-Don-t-allow-mcompact-casesi-for-ARCv2.patch100
-rw-r--r--package/gcc/arc-2016.03/130-pr43538.patch25
-rw-r--r--package/gcc/arc-2016.03/301-missing-execinfo_h.patch13
-rw-r--r--package/gcc/arc-2016.03/305-libmudflap-susv3-legacy.patch49
-rw-r--r--package/gcc/arc-2016.03/842-PR60155.patch111
-rw-r--r--package/gcc/arc-2016.03/850-libstdcxx-uclibc-c99.patch (renamed from package/gcc/arc-2015.12/100-libstdcxx-uclibc-c99.patch)4
-rw-r--r--package/gcc/arc-2016.03/851-PR-other-56780.patch (renamed from package/gcc/arc-2015.12/851-PR-other-56780.patch)0
-rw-r--r--package/gcc/arc-2016.03/930-libgcc-disable-split-stack-nothreads.patch14
-rw-r--r--package/gcc/gcc.hash5
16 files changed, 831 insertions, 292 deletions
diff --git a/package/gcc/4.8.5/130-fix_build_with_gcc-6.patch b/package/gcc/4.8.5/130-fix_build_with_gcc-6.patch
new file mode 100644
index 0000000000..62ac3cbd65
--- /dev/null
+++ b/package/gcc/4.8.5/130-fix_build_with_gcc-6.patch
@@ -0,0 +1,153 @@
+From 1e5f1089dec3af328fd03125d6778f666d0bd4e4 Mon Sep 17 00:00:00 2001
+From: edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Thu, 25 Feb 2016 15:33:50 +0000
+Subject: [PATCH 1/1] 2016-02-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ Backported from mainline
+ 2016-02-19 Jakub Jelinek <jakub@redhat.com>
+ Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * Make-lang.in: Invoke gperf with -L C++.
+ * cfns.gperf: Remove prototypes for hash and libc_name_p
+ inlines.
+ * cfns.h: Regenerated.
+ * except.c (nothrow_libfn_p): Adjust.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@233720 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ gcc/cp/Make-lang.in | 2 +-
+ gcc/cp/cfns.gperf | 10 ++--------
+ gcc/cp/cfns.h | 41 ++++++++++++++---------------------------
+ gcc/cp/except.c | 3 ++-
+ 5 files changed, 31 insertions(+), 37 deletions(-)
+
+diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
+index e98beb1..b09fb02 100644
+--- a/gcc/cp/Make-lang.in
++++ b/gcc/cp/Make-lang.in
+@@ -111,7 +111,7 @@ else
+ # deleting the $(srcdir)/cp/cfns.h file.
+ $(srcdir)/cp/cfns.h:
+ endif
+- gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
++ gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
+ $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
+
+ #
+diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf
+index 68acd3d..214ecf6 100644
+--- a/gcc/cp/cfns.gperf
++++ b/gcc/cp/cfns.gperf
+@@ -1,3 +1,5 @@
++%language=C++
++%define class-name libc_name
+ %{
+ /* Copyright (C) 2000-2015 Free Software Foundation, Inc.
+
+@@ -16,14 +18,6 @@ for more details.
+ 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/>. */
+-#ifdef __GNUC__
+-__inline
+-#endif
+-static unsigned int hash (const char *, unsigned int);
+-#ifdef __GNUC__
+-__inline
+-#endif
+-const char * libc_name_p (const char *, unsigned int);
+ %}
+ %%
+ # The standard C library functions, for feeding to gperf; the result is used
+diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h
+index 1c6665d..596f413 100644
+--- a/gcc/cp/cfns.h
++++ b/gcc/cp/cfns.h
+@@ -1,5 +1,5 @@
+-/* ANSI-C code produced by gperf version 3.0.3 */
+-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
++/* C++ code produced by gperf version 3.0.4 */
++/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */
+
+ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+@@ -28,7 +28,7 @@
+ #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
+ #endif
+
+-#line 1 "cfns.gperf"
++#line 3 "cfns.gperf"
+
+ /* Copyright (C) 2000-2015 Free Software Foundation, Inc.
+
+@@ -47,25 +47,18 @@ for more details.
+ 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/>. */
+-#ifdef __GNUC__
+-__inline
+-#endif
+-static unsigned int hash (const char *, unsigned int);
+-#ifdef __GNUC__
+-__inline
+-#endif
+-const char * libc_name_p (const char *, unsigned int);
+ /* maximum key range = 391, duplicates = 0 */
+
+-#ifdef __GNUC__
+-__inline
+-#else
+-#ifdef __cplusplus
+-inline
+-#endif
+-#endif
+-static unsigned int
+-hash (register const char *str, register unsigned int len)
++class libc_name
++{
++private:
++ static inline unsigned int hash (const char *str, unsigned int len);
++public:
++ static const char *libc_name_p (const char *str, unsigned int len);
++};
++
++inline unsigned int
++libc_name::hash (register const char *str, register unsigned int len)
+ {
+ static const unsigned short asso_values[] =
+ {
+@@ -122,14 +115,8 @@ hash (register const char *str, register unsigned int len)
+ return hval + asso_values[(unsigned char)str[len - 1]];
+ }
+
+-#ifdef __GNUC__
+-__inline
+-#ifdef __GNUC_STDC_INLINE__
+-__attribute__ ((__gnu_inline__))
+-#endif
+-#endif
+ const char *
+-libc_name_p (register const char *str, register unsigned int len)
++libc_name::libc_name_p (register const char *str, register unsigned int len)
+ {
+ enum
+ {
+diff --git a/gcc/cp/except.c b/gcc/cp/except.c
+index 3ff1ce6..2f2e396 100644
+--- a/gcc/cp/except.c
++++ b/gcc/cp/except.c
+@@ -1040,7 +1040,8 @@ nothrow_libfn_p (const_tree fn)
+ unless the system headers are playing rename tricks, and if
+ they are, we don't want to be confused by them. */
+ id = DECL_NAME (fn);
+- return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
++ return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
++ IDENTIFIER_LENGTH (id));
+ }
+
+ /* Returns nonzero if an exception of type FROM will be caught by a
+--
+1.7.1
diff --git a/package/gcc/4.9.3/130-fix_build_with_gcc-6.patch b/package/gcc/4.9.3/130-fix_build_with_gcc-6.patch
new file mode 100644
index 0000000000..62ac3cbd65
--- /dev/null
+++ b/package/gcc/4.9.3/130-fix_build_with_gcc-6.patch
@@ -0,0 +1,153 @@
+From 1e5f1089dec3af328fd03125d6778f666d0bd4e4 Mon Sep 17 00:00:00 2001
+From: edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Thu, 25 Feb 2016 15:33:50 +0000
+Subject: [PATCH 1/1] 2016-02-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ Backported from mainline
+ 2016-02-19 Jakub Jelinek <jakub@redhat.com>
+ Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * Make-lang.in: Invoke gperf with -L C++.
+ * cfns.gperf: Remove prototypes for hash and libc_name_p
+ inlines.
+ * cfns.h: Regenerated.
+ * except.c (nothrow_libfn_p): Adjust.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@233720 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ gcc/cp/Make-lang.in | 2 +-
+ gcc/cp/cfns.gperf | 10 ++--------
+ gcc/cp/cfns.h | 41 ++++++++++++++---------------------------
+ gcc/cp/except.c | 3 ++-
+ 5 files changed, 31 insertions(+), 37 deletions(-)
+
+diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
+index e98beb1..b09fb02 100644
+--- a/gcc/cp/Make-lang.in
++++ b/gcc/cp/Make-lang.in
+@@ -111,7 +111,7 @@ else
+ # deleting the $(srcdir)/cp/cfns.h file.
+ $(srcdir)/cp/cfns.h:
+ endif
+- gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
++ gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
+ $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
+
+ #
+diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf
+index 68acd3d..214ecf6 100644
+--- a/gcc/cp/cfns.gperf
++++ b/gcc/cp/cfns.gperf
+@@ -1,3 +1,5 @@
++%language=C++
++%define class-name libc_name
+ %{
+ /* Copyright (C) 2000-2015 Free Software Foundation, Inc.
+
+@@ -16,14 +18,6 @@ for more details.
+ 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/>. */
+-#ifdef __GNUC__
+-__inline
+-#endif
+-static unsigned int hash (const char *, unsigned int);
+-#ifdef __GNUC__
+-__inline
+-#endif
+-const char * libc_name_p (const char *, unsigned int);
+ %}
+ %%
+ # The standard C library functions, for feeding to gperf; the result is used
+diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h
+index 1c6665d..596f413 100644
+--- a/gcc/cp/cfns.h
++++ b/gcc/cp/cfns.h
+@@ -1,5 +1,5 @@
+-/* ANSI-C code produced by gperf version 3.0.3 */
+-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
++/* C++ code produced by gperf version 3.0.4 */
++/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */
+
+ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+@@ -28,7 +28,7 @@
+ #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
+ #endif
+
+-#line 1 "cfns.gperf"
++#line 3 "cfns.gperf"
+
+ /* Copyright (C) 2000-2015 Free Software Foundation, Inc.
+
+@@ -47,25 +47,18 @@ for more details.
+ 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/>. */
+-#ifdef __GNUC__
+-__inline
+-#endif
+-static unsigned int hash (const char *, unsigned int);
+-#ifdef __GNUC__
+-__inline
+-#endif
+-const char * libc_name_p (const char *, unsigned int);
+ /* maximum key range = 391, duplicates = 0 */
+
+-#ifdef __GNUC__
+-__inline
+-#else
+-#ifdef __cplusplus
+-inline
+-#endif
+-#endif
+-static unsigned int
+-hash (register const char *str, register unsigned int len)
++class libc_name
++{
++private:
++ static inline unsigned int hash (const char *str, unsigned int len);
++public:
++ static const char *libc_name_p (const char *str, unsigned int len);
++};
++
++inline unsigned int
++libc_name::hash (register const char *str, register unsigned int len)
+ {
+ static const unsigned short asso_values[] =
+ {
+@@ -122,14 +115,8 @@ hash (register const char *str, register unsigned int len)
+ return hval + asso_values[(unsigned char)str[len - 1]];
+ }
+
+-#ifdef __GNUC__
+-__inline
+-#ifdef __GNUC_STDC_INLINE__
+-__attribute__ ((__gnu_inline__))
+-#endif
+-#endif
+ const char *
+-libc_name_p (register const char *str, register unsigned int len)
++libc_name::libc_name_p (register const char *str, register unsigned int len)
+ {
+ enum
+ {
+diff --git a/gcc/cp/except.c b/gcc/cp/except.c
+index 3ff1ce6..2f2e396 100644
+--- a/gcc/cp/except.c
++++ b/gcc/cp/except.c
+@@ -1040,7 +1040,8 @@ nothrow_libfn_p (const_tree fn)
+ unless the system headers are playing rename tricks, and if
+ they are, we don't want to be confused by them. */
+ id = DECL_NAME (fn);
+- return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
++ return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
++ IDENTIFIER_LENGTH (id));
+ }
+
+ /* Returns nonzero if an exception of type FROM will be caught by a
+--
+1.7.1
diff --git a/package/gcc/5.3.0/130-fix_build_with_gcc-6.patch b/package/gcc/5.3.0/130-fix_build_with_gcc-6.patch
new file mode 100644
index 0000000000..62ac3cbd65
--- /dev/null
+++ b/package/gcc/5.3.0/130-fix_build_with_gcc-6.patch
@@ -0,0 +1,153 @@
+From 1e5f1089dec3af328fd03125d6778f666d0bd4e4 Mon Sep 17 00:00:00 2001
+From: edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Thu, 25 Feb 2016 15:33:50 +0000
+Subject: [PATCH 1/1] 2016-02-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ Backported from mainline
+ 2016-02-19 Jakub Jelinek <jakub@redhat.com>
+ Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * Make-lang.in: Invoke gperf with -L C++.
+ * cfns.gperf: Remove prototypes for hash and libc_name_p
+ inlines.
+ * cfns.h: Regenerated.
+ * except.c (nothrow_libfn_p): Adjust.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@233720 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ gcc/cp/Make-lang.in | 2 +-
+ gcc/cp/cfns.gperf | 10 ++--------
+ gcc/cp/cfns.h | 41 ++++++++++++++---------------------------
+ gcc/cp/except.c | 3 ++-
+ 5 files changed, 31 insertions(+), 37 deletions(-)
+
+diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
+index e98beb1..b09fb02 100644
+--- a/gcc/cp/Make-lang.in
++++ b/gcc/cp/Make-lang.in
+@@ -111,7 +111,7 @@ else
+ # deleting the $(srcdir)/cp/cfns.h file.
+ $(srcdir)/cp/cfns.h:
+ endif
+- gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
++ gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
+ $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
+
+ #
+diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf
+index 68acd3d..214ecf6 100644
+--- a/gcc/cp/cfns.gperf
++++ b/gcc/cp/cfns.gperf
+@@ -1,3 +1,5 @@
++%language=C++
++%define class-name libc_name
+ %{
+ /* Copyright (C) 2000-2015 Free Software Foundation, Inc.
+
+@@ -16,14 +18,6 @@ for more details.
+ 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/>. */
+-#ifdef __GNUC__
+-__inline
+-#endif
+-static unsigned int hash (const char *, unsigned int);
+-#ifdef __GNUC__
+-__inline
+-#endif
+-const char * libc_name_p (const char *, unsigned int);
+ %}
+ %%
+ # The standard C library functions, for feeding to gperf; the result is used
+diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h
+index 1c6665d..596f413 100644
+--- a/gcc/cp/cfns.h
++++ b/gcc/cp/cfns.h
+@@ -1,5 +1,5 @@
+-/* ANSI-C code produced by gperf version 3.0.3 */
+-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
++/* C++ code produced by gperf version 3.0.4 */
++/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */
+
+ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+@@ -28,7 +28,7 @@
+ #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
+ #endif
+
+-#line 1 "cfns.gperf"
++#line 3 "cfns.gperf"
+
+ /* Copyright (C) 2000-2015 Free Software Foundation, Inc.
+
+@@ -47,25 +47,18 @@ for more details.
+ 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/>. */
+-#ifdef __GNUC__
+-__inline
+-#endif
+-static unsigned int hash (const char *, unsigned int);
+-#ifdef __GNUC__
+-__inline
+-#endif
+-const char * libc_name_p (const char *, unsigned int);
+ /* maximum key range = 391, duplicates = 0 */
+
+-#ifdef __GNUC__
+-__inline
+-#else
+-#ifdef __cplusplus
+-inline
+-#endif
+-#endif
+-static unsigned int
+-hash (register const char *str, register unsigned int len)
++class libc_name
++{
++private:
++ static inline unsigned int hash (const char *str, unsigned int len);
++public:
++ static const char *libc_name_p (const char *str, unsigned int len);
++};
++
++inline unsigned int
++libc_name::hash (register const char *str, register unsigned int len)
+ {
+ static const unsigned short asso_values[] =
+ {
+@@ -122,14 +115,8 @@ hash (register const char *str, register unsigned int len)
+ return hval + asso_values[(unsigned char)str[len - 1]];
+ }
+
+-#ifdef __GNUC__
+-__inline
+-#ifdef __GNUC_STDC_INLINE__
+-__attribute__ ((__gnu_inline__))
+-#endif
+-#endif
+ const char *
+-libc_name_p (register const char *str, register unsigned int len)
++libc_name::libc_name_p (register const char *str, register unsigned int len)
+ {
+ enum
+ {
+diff --git a/gcc/cp/except.c b/gcc/cp/except.c
+index 3ff1ce6..2f2e396 100644
+--- a/gcc/cp/except.c
++++ b/gcc/cp/except.c
+@@ -1040,7 +1040,8 @@ nothrow_libfn_p (const_tree fn)
+ unless the system headers are playing rename tricks, and if
+ they are, we don't want to be confused by them. */
+ id = DECL_NAME (fn);
+- return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
++ return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
++ IDENTIFIER_LENGTH (id));
+ }
+
+ /* Returns nonzero if an exception of type FROM will be caught by a
+--
+1.7.1
diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index ee4d0eb9f4..cfb0958ff0 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -100,7 +100,7 @@ config BR2_GCC_VERSION
default "4.9.3" if BR2_GCC_VERSION_4_9_X
default "5.3.0" if BR2_GCC_VERSION_5_X
default "6.1.0" if BR2_GCC_VERSION_6_X
- default "arc-2015.12" if BR2_GCC_VERSION_4_8_ARC
+ default "arc-2016.03" if BR2_GCC_VERSION_4_8_ARC
config BR2_EXTRA_GCC_CONFIG_OPTIONS
string "Additional gcc options"
@@ -128,7 +128,7 @@ config BR2_TOOLCHAIN_BUILDROOT_FORTRAN
config BR2_GCC_ENABLE_TLS
bool "Enable compiler tls support" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC
default y
- depends on BR2_PTHREADS_NATIVE || BR2_TOOLCHAIN_BUILDROOT_EGLIBC || BR2_TOOLCHAIN_BUILDROOT_GLIBC
+ depends on BR2_PTHREADS_NATIVE || BR2_TOOLCHAIN_BUILDROOT_GLIBC
help
Enable the compiler to generate code for accessing
thread local storage variables
diff --git a/package/gcc/arc-2015.12/130-fix_build_with_gcc-6.patch b/package/gcc/arc-2015.12/130-fix_build_with_gcc-6.patch
new file mode 100644
index 0000000000..62ac3cbd65
--- /dev/null
+++ b/package/gcc/arc-2015.12/130-fix_build_with_gcc-6.patch
@@ -0,0 +1,153 @@
+From 1e5f1089dec3af328fd03125d6778f666d0bd4e4 Mon Sep 17 00:00:00 2001
+From: edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Thu, 25 Feb 2016 15:33:50 +0000
+Subject: [PATCH 1/1] 2016-02-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ Backported from mainline
+ 2016-02-19 Jakub Jelinek <jakub@redhat.com>
+ Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * Make-lang.in: Invoke gperf with -L C++.
+ * cfns.gperf: Remove prototypes for hash and libc_name_p
+ inlines.
+ * cfns.h: Regenerated.
+ * except.c (nothrow_libfn_p): Adjust.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@233720 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ gcc/cp/Make-lang.in | 2 +-
+ gcc/cp/cfns.gperf | 10 ++--------
+ gcc/cp/cfns.h | 41 ++++++++++++++---------------------------
+ gcc/cp/except.c | 3 ++-
+ 5 files changed, 31 insertions(+), 37 deletions(-)
+
+diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
+index e98beb1..b09fb02 100644
+--- a/gcc/cp/Make-lang.in
++++ b/gcc/cp/Make-lang.in
+@@ -111,7 +111,7 @@ else
+ # deleting the $(srcdir)/cp/cfns.h file.
+ $(srcdir)/cp/cfns.h:
+ endif
+- gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
++ gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
+ $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
+
+ #
+diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf
+index 68acd3d..214ecf6 100644
+--- a/gcc/cp/cfns.gperf
++++ b/gcc/cp/cfns.gperf
+@@ -1,3 +1,5 @@
++%language=C++
++%define class-name libc_name
+ %{
+ /* Copyright (C) 2000-2015 Free Software Foundation, Inc.
+
+@@ -16,14 +18,6 @@ for more details.
+ 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/>. */
+-#ifdef __GNUC__
+-__inline
+-#endif
+-static unsigned int hash (const char *, unsigned int);
+-#ifdef __GNUC__
+-__inline
+-#endif
+-const char * libc_name_p (const char *, unsigned int);
+ %}
+ %%
+ # The standard C library functions, for feeding to gperf; the result is used
+diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h
+index 1c6665d..596f413 100644
+--- a/gcc/cp/cfns.h
++++ b/gcc/cp/cfns.h
+@@ -1,5 +1,5 @@
+-/* ANSI-C code produced by gperf version 3.0.3 */
+-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
++/* C++ code produced by gperf version 3.0.4 */
++/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */
+
+ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+@@ -28,7 +28,7 @@
+ #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
+ #endif
+
+-#line 1 "cfns.gperf"
++#line 3 "cfns.gperf"
+
+ /* Copyright (C) 2000-2015 Free Software Foundation, Inc.
+
+@@ -47,25 +47,18 @@ for more details.
+ 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/>. */
+-#ifdef __GNUC__
+-__inline
+-#endif
+-static unsigned int hash (const char *, unsigned int);
+-#ifdef __GNUC__
+-__inline
+-#endif
+-const char * libc_name_p (const char *, unsigned int);
+ /* maximum key range = 391, duplicates = 0 */
+
+-#ifdef __GNUC__
+-__inline
+-#else
+-#ifdef __cplusplus
+-inline
+-#endif
+-#endif
+-static unsigned int
+-hash (register const char *str, register unsigned int len)
++class libc_name
++{
++private:
++ static inline unsigned int hash (const char *str, unsigned int len);
++public:
++ static const char *libc_name_p (const char *str, unsigned int len);
++};
++
++inline unsigned int
++libc_name::hash (register const char *str, register unsigned int len)
+ {
+ static const unsigned short asso_values[] =
+ {
+@@ -122,14 +115,8 @@ hash (register const char *str, register unsigned int len)
+ return hval + asso_values[(unsigned char)str[len - 1]];
+ }
+
+-#ifdef __GNUC__
+-__inline
+-#ifdef __GNUC_STDC_INLINE__
+-__attribute__ ((__gnu_inline__))
+-#endif
+-#endif
+ const char *
+-libc_name_p (register const char *str, register unsigned int len)
++libc_name::libc_name_p (register const char *str, register unsigned int len)
+ {
+ enum
+ {
+diff --git a/gcc/cp/except.c b/gcc/cp/except.c
+index 3ff1ce6..2f2e396 100644
+--- a/gcc/cp/except.c
++++ b/gcc/cp/except.c
+@@ -1040,7 +1040,8 @@ nothrow_libfn_p (const_tree fn)
+ unless the system headers are playing rename tricks, and if
+ they are, we don't want to be confused by them. */
+ id = DECL_NAME (fn);
+- return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
++ return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
++ IDENTIFIER_LENGTH (id));
+ }
+
+ /* Returns nonzero if an exception of type FROM will be caught by a
+--
+1.7.1
diff --git a/package/gcc/arc-2015.12/900-UPDATE-Fix-handling-complex-PIC-moves.patch b/package/gcc/arc-2015.12/900-UPDATE-Fix-handling-complex-PIC-moves.patch
deleted file mode 100644
index 48228dcb6f..0000000000
--- a/package/gcc/arc-2015.12/900-UPDATE-Fix-handling-complex-PIC-moves.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From b55922d45fd16f5e8fc7c3885da42b2b9b37754d Mon Sep 17 00:00:00 2001
-From: Claudiu Zissulescu <claziss@synopsys.com>
-Date: Mon, 18 Jan 2016 16:43:18 +0100
-Subject: [PATCH] UPDATE: Fix handling complex PIC moves.
-
-fwprop is putting in the REG_EQUIV notes which are involving the
-constant pic unspecs. Then, loop may use those notes for
-optimizations rezulting in complex patterns that are not supported by
-the current implementation. The following piece of code tries to
-convert the complex instruction in simpler ones.
-
-The fix is done in development tree: [arc-4.8-dev b55922d]
-and will be a part of the next release of ARC GNU tools.
-Once that new release happens this patch must be removed.
-
-
-gcc/
-2016-01-18 Claudiu Zissulescu <claziss@synopsys.com>
-
- * config/arc/arc.c (arc_legitimize_pic_address): Handle MINUS
- operations when doing PIC moves. Make this function static.
- (arc_legitimate_pc_offset_p): Use
- arc_raw_symbolic_reference_mentioned_p.
- * config/arc/arc-protos.h (arc_legitimize_pic_address): Remove.
-
- gcc/config/arc/arc-protos.h | 1 -
- gcc/config/arc/arc.c | 33 +++++++++++++++++++--------------
- 2 files changed, 19 insertions(+), 15 deletions(-)
-
- * config/arc/arc.c (arc_legitimize_pic_address): Handle complex
-diff --git a/gcc/config/arc/arc-protos.h b/gcc/config/arc/arc-protos.h
-index 464e0ab..5986e06 100644
---- a/gcc/config/arc/arc-protos.h
-+++ b/gcc/config/arc/arc-protos.h
-@@ -53,7 +53,6 @@ extern unsigned int arc_compute_frame_size ();
- extern bool arc_ccfsm_branch_deleted_p (void);
- extern void arc_ccfsm_record_branch_deleted (void);
-
--extern rtx arc_legitimize_pic_address (rtx, rtx);
- void arc_asm_output_aligned_decl_local (FILE *, tree, const char *,
- unsigned HOST_WIDE_INT,
- unsigned HOST_WIDE_INT,
-diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
-index a89c8ee..f7cae9f 100644
---- a/gcc/config/arc/arc.c
-+++ b/gcc/config/arc/arc.c
-@@ -5243,19 +5243,7 @@ arc_legitimate_pc_offset_p (rtx addr)
- if (GET_CODE (addr) != CONST)
- return false;
- addr = XEXP (addr, 0);
-- if (GET_CODE (addr) == PLUS)
-- {
-- if (GET_CODE (XEXP (addr, 1)) != CONST_INT)
-- return false;
-- addr = XEXP (addr, 0);
-- }
-- return (GET_CODE (addr) == UNSPEC
-- && XVECLEN (addr, 0) == 1
-- && (XINT (addr, 1) == ARC_UNSPEC_GOT
-- || XINT (addr, 1) == ARC_UNSPEC_GOTOFFPC
-- || XINT (addr, 1) == UNSPEC_TLS_GD
-- || XINT (addr, 1) == UNSPEC_TLS_IE)
-- && GET_CODE (XVECEXP (addr, 0, 0)) == SYMBOL_REF);
-+ return flag_pic && !arc_raw_symbolic_reference_mentioned_p (addr, false);
- }
-
- /* Return true if ADDR is a valid pic address.
-@@ -5522,7 +5510,7 @@ arc_legitimize_tls_address (rtx addr, enum tls_model model)
- The return value is the legitimated address.
- If OLDX is non-zero, it is the target to assign the address to first. */
-
--rtx
-+static rtx
- arc_legitimize_pic_address (rtx orig, rtx oldx)
- {
- rtx addr = orig;
-@@ -5569,6 +5557,23 @@ arc_legitimize_pic_address (rtx orig, rtx oldx)
- /* Check that the unspec is one of the ones we generate? */
- return orig;
- }
-+ else if (GET_CODE (addr) == MINUS)
-+ {
-+ /* The same story with fwprop. */
-+ rtx op0 = XEXP (addr, 0);
-+ rtx op1 = XEXP (addr, 1);
-+ gcc_assert (oldx);
-+ gcc_assert (GET_CODE (op1) == UNSPEC);
-+
-+ emit_move_insn (oldx,
-+ gen_rtx_CONST (SImode,
-+ arc_legitimize_pic_address (op1,
-+ NULL_RTX)));
-+ emit_insn (gen_rtx_SET (VOIDmode, oldx,
-+ gen_rtx_MINUS (SImode, op0, oldx)));
-+ return oldx;
-+
-+ }
- else if (GET_CODE (addr) != PLUS)
- {
- /* fwprop is putting in the REG_EQUIV notes which are
---
-2.5.0
-
diff --git a/package/gcc/arc-2015.12/901-UPDATE1-Fix-handling-complex-PIC-moves.patch b/package/gcc/arc-2015.12/901-UPDATE1-Fix-handling-complex-PIC-moves.patch
deleted file mode 100644
index 28cb7c1913..0000000000
--- a/package/gcc/arc-2015.12/901-UPDATE1-Fix-handling-complex-PIC-moves.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From f00b0f17d6889d811468c2c77508fbea8bfc377d Mon Sep 17 00:00:00 2001
-From: Claudiu Zissulescu <claziss@synopsys.com>
-Date: Tue, 19 Jan 2016 14:40:16 +0100
-Subject: [PATCH] UPDATE1: Fix handling complex PIC moves.
-
-The arc_legitimate_pc_offset_p condition is too lax. Updated it.
-
-The fix is done in development tree: [arc-4.8-dev f00b0f1]
-and will be a part of the next release of ARC GNU tools.
-Once that new release happens this patch must be removed.
-
-gcc/
-2016-01-18 Claudiu Zissulescu <claziss@synopsys.com>
-
- * config/arc/arc.c (arc_needs_pcl_p ): New function
- (arc_legitimate_pc_offset_p): Use arc_needs_pcl_p.
----
- gcc/config/arc/arc.c | 42 ++++++++++++++++++++++++++++++++++++++++--
- 1 file changed, 40 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
-index f7cae9f..18d88a3 100644
---- a/gcc/config/arc/arc.c
-+++ b/gcc/config/arc/arc.c
-@@ -5234,6 +5234,45 @@ arc_rtx_costs (rtx x, int code, int outer_code, int opno ATTRIBUTE_UNUSED,
- }
- }
-
-+/* Helper used by arc_legitimate_pc_offset_p. */
-+
-+static bool
-+arc_needs_pcl_p (rtx x)
-+{
-+ register const char *fmt;
-+ register int i, j;
-+
-+ if ((GET_CODE (x) == UNSPEC)
-+ && (XVECLEN (x, 0) == 1)
-+ && (GET_CODE (XVECEXP (x, 0, 0)) == SYMBOL_REF))
-+ switch (XINT (x, 1))
-+ {
-+ case ARC_UNSPEC_GOT:
-+ case ARC_UNSPEC_GOTOFFPC:
-+ case UNSPEC_TLS_GD:
-+ case UNSPEC_TLS_IE:
-+ return true;
-+ default:
-+ break;
-+ }
-+
-+ fmt = GET_RTX_FORMAT (GET_CODE (x));
-+ for (i = GET_RTX_LENGTH (GET_CODE (x)) - 1; i >= 0; i--)
-+ {
-+ if (fmt[i] == 'e')
-+ {
-+ if (arc_needs_pcl_p (XEXP (x, i)))
-+ return true;
-+ }
-+ else if (fmt[i] == 'E')
-+ for (j = XVECLEN (x, i) - 1; j >= 0; j--)
-+ if (arc_needs_pcl_p (XVECEXP (x, i, j)))
-+ return true;
-+ }
-+
-+ return false;
-+}
-+
- /* Return true if ADDR is an address that needs to be expressed as an
- explicit sum of pcl + offset. */
-
-@@ -5242,8 +5281,7 @@ arc_legitimate_pc_offset_p (rtx addr)
- {
- if (GET_CODE (addr) != CONST)
- return false;
-- addr = XEXP (addr, 0);
-- return flag_pic && !arc_raw_symbolic_reference_mentioned_p (addr, false);
-+ return arc_needs_pcl_p (addr);
- }
-
- /* Return true if ADDR is a valid pic address.
---
-2.5.0
-
diff --git a/package/gcc/arc-2015.12/950-Don-t-allow-mcompact-casesi-for-ARCv2.patch b/package/gcc/arc-2015.12/950-Don-t-allow-mcompact-casesi-for-ARCv2.patch
deleted file mode 100644
index dc03a028ed..0000000000
--- a/package/gcc/arc-2015.12/950-Don-t-allow-mcompact-casesi-for-ARCv2.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From 09463827001a7b8094f4b9460514370a1876d908 Mon Sep 17 00:00:00 2001
-From: Claudiu Zissulescu <claziss@synopsys.com>
-Date: Wed, 20 Jan 2016 16:32:40 +0100
-Subject: [PATCH] Don't allow mcompact-casesi for ARCv2
-
-The compact casesi is not working for arcv2 processors family as it
-makes use of the add_s rx,rx,pcl instruction which is only valid for
-arc6xx and arc700 processors. Also not having this instruction makes
-no much sens to change the compact-casesi pattern to use normal add
-instructions as it nullifies the advantage of short instruction use.
-The default casesi pattern betters suits the arcv2 architecture.
-
-The fix is done in development tree: [arc-4.8-dev 0946382]
-and will be a part of the next release of ARC GNU tools.
-Once that new release happens this patch must be removed.
-
-gcc/
-2016-01-20 Claudiu Zissulescu <claziss@synopsys.com>
-
- * common/config/arc/arc-common.c (arc_option_optimization_table):
- Remove mcompact-casesi option.
- * config/arc/arc.c (arc_override_options): Use compact-casesi only
- for arcv1.
- * config/arc/arc.md (casesi_load): Use short instructions.
----
- gcc/common/config/arc/arc-common.c | 1 -
- gcc/config/arc/arc.c | 9 +++++----
- gcc/config/arc/arc.md | 10 ++++++++--
- 3 files changed, 13 insertions(+), 7 deletions(-)
-
- * config/arc/arc.c (arc_legitimize_pic_address): Handle MINUS
-diff --git a/gcc/common/config/arc/arc-common.c b/gcc/common/config/arc/arc-common.c
-index e2e36fa..310bc80 100644
---- a/gcc/common/config/arc/arc-common.c
-+++ b/gcc/common/config/arc/arc-common.c
-@@ -58,7 +58,6 @@ static const struct default_options arc_option_optimization_table[] =
- { OPT_LEVELS_ALL, OPT_mbbit_peephole, NULL, 1 },
- { OPT_LEVELS_SIZE, OPT_mq_class, NULL, 1 },
- { OPT_LEVELS_SIZE, OPT_mcase_vector_pcrel, NULL, 1 },
-- { OPT_LEVELS_SIZE, OPT_mcompact_casesi, NULL, 1 },
- { OPT_LEVELS_NONE, 0, NULL, 0 }
- };
-
-diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
-index 18d88a3..f828398 100644
---- a/gcc/config/arc/arc.c
-+++ b/gcc/config/arc/arc.c
-@@ -1151,6 +1151,11 @@ arc_override_options (void)
- if (arc_size_opt_level == 3)
- optimize_size = 1;
-
-+ if (TARGET_V2)
-+ TARGET_COMPACT_CASESI = 0;
-+ else if (optimize_size == 1)
-+ TARGET_COMPACT_CASESI = 1;
-+
- if (flag_pic)
- target_flags |= MASK_NO_SDATA_SET;
-
-@@ -1163,10 +1168,6 @@ arc_override_options (void)
- if (!TARGET_Q_CLASS)
- TARGET_COMPACT_CASESI = 0;
-
-- /* For the time being don't support COMPACT_CASESI for ARCv2. */
-- if (TARGET_V2)
-- TARGET_COMPACT_CASESI = 0;
--
- if (TARGET_COMPACT_CASESI)
- TARGET_CASE_VECTOR_PC_RELATIVE = 1;
-
-diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md
-index bc4ac38..ba7c8bc 100644
---- a/gcc/config/arc/arc.md
-+++ b/gcc/config/arc/arc.md
-@@ -3837,14 +3837,20 @@
- switch (GET_MODE (diff_vec))
- {
- case SImode:
-- return \"ld.as %0,[%1,%2]%&\";
-+ if ((which_alternative == 0) && TARGET_CODE_DENSITY)
-+ return \"ld_s.as %0,[%1,%2]%&\";
-+ else
-+ return \"ld.as %0,[%1,%2]%&\";
- case HImode:
- if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
- return \"ldw.as %0,[%1,%2]\";
- return \"ldw.x.as %0,[%1,%2]\";
- case QImode:
- if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
-- return \"ldb%? %0,[%1,%2]%&\";
-+ if (which_alternative == 0)
-+ return \"ldb_s %0,[%1,%2]%&\";
-+ else
-+ return \"ldb %0,[%1,%2]%&\";
- return \"ldb.x %0,[%1,%2]\";
- default:
- gcc_unreachable ();
---
-2.5.0
-
diff --git a/package/gcc/arc-2016.03/130-pr43538.patch b/package/gcc/arc-2016.03/130-pr43538.patch
new file mode 100644
index 0000000000..19e57bb059
--- /dev/null
+++ b/package/gcc/arc-2016.03/130-pr43538.patch
@@ -0,0 +1,25 @@
+From c037df1be41f8daf4d581d7ffa4ec8cfa640bccf Mon Sep 17 00:00:00 2001
+From: glisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 25 Apr 2014 08:03:08 +0000
+Subject: [PATCH] 2014-04-25 Marc Glisse <marc.glisse@inria.fr>
+
+ PR target/43538
+ * mt-gnu: Don't reset CXXFLAGS_FOR_TARGET.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209784 138bc75d-0d04-0410-961f-82ee72b054a4
+Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
+---
+ config/mt-gnu | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/config/mt-gnu b/config/mt-gnu
+index 15bf417..5c696f5 100644
+--- a/config/mt-gnu
++++ b/config/mt-gnu
+@@ -1 +1 @@
+-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE
++CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE
+--
+2.1.4
+
diff --git a/package/gcc/arc-2016.03/301-missing-execinfo_h.patch b/package/gcc/arc-2016.03/301-missing-execinfo_h.patch
new file mode 100644
index 0000000000..00efda24aa
--- /dev/null
+++ b/package/gcc/arc-2016.03/301-missing-execinfo_h.patch
@@ -0,0 +1,13 @@
+Index: gcc-4.8.0/boehm-gc/include/gc.h
+===================================================================
+--- gcc-4.8.0.orig/boehm-gc/include/gc.h 2007-04-23 23:10:09.000000000 +0200
++++ gcc-4.8.0/boehm-gc/include/gc.h 2013-03-23 17:39:20.000000000 +0100
+@@ -503,7 +503,7 @@
+ #if defined(__linux__) || defined(__GLIBC__)
+ # include <features.h>
+ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
+- && !defined(__ia64__)
++ && !defined(__ia64__) && !defined(__UCLIBC__)
+ # ifndef GC_HAVE_BUILTIN_BACKTRACE
+ # define GC_HAVE_BUILTIN_BACKTRACE
+ # endif
diff --git a/package/gcc/arc-2016.03/305-libmudflap-susv3-legacy.patch b/package/gcc/arc-2016.03/305-libmudflap-susv3-legacy.patch
new file mode 100644
index 0000000000..35d5f50207
--- /dev/null
+++ b/package/gcc/arc-2016.03/305-libmudflap-susv3-legacy.patch
@@ -0,0 +1,49 @@
+Index: gcc-4.8.0/libmudflap/mf-hooks2.c
+===================================================================
+--- gcc-4.8.0.orig/libmudflap/mf-hooks2.c 2013-02-03 18:48:05.000000000 +0100
++++ gcc-4.8.0/libmudflap/mf-hooks2.c 2013-03-23 17:39:43.000000000 +0100
+@@ -424,7 +424,7 @@
+ {
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
+- bzero (s, n);
++ memset (s, 0, n);
+ }
+
+
+@@ -434,7 +434,7 @@
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
+ MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
+- bcopy (src, dest, n);
++ memmove (dest, src, n);
+ }
+
+
+@@ -444,7 +444,7 @@
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
+ MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
+- return bcmp (s1, s2, n);
++ return n == 0 ? 0 : memcmp (s1, s2, n);
+ }
+
+
+@@ -453,7 +453,7 @@
+ size_t n = strlen (s);
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
+- return index (s, c);
++ return strchr (s, c);
+ }
+
+
+@@ -462,7 +462,7 @@
+ size_t n = strlen (s);
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
+- return rindex (s, c);
++ return strrchr (s, c);
+ }
+
+ /* XXX: stpcpy, memccpy */
diff --git a/package/gcc/arc-2016.03/842-PR60155.patch b/package/gcc/arc-2016.03/842-PR60155.patch
new file mode 100644
index 0000000000..7bc2122fd4
--- /dev/null
+++ b/package/gcc/arc-2016.03/842-PR60155.patch
@@ -0,0 +1,111 @@
+From gcc bugzilla https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60155
+Upstream status: in trunk.
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+--- trunk/gcc/gcse.c 2014/02/12 14:50:06 207726
++++ trunk/gcc/gcse.c 2014/04/04 22:25:51 209134
+@@ -2502,6 +2502,65 @@
+ }
+ }
+
++struct set_data
++{
++ rtx insn;
++ const_rtx set;
++ int nsets;
++};
++
++/* Increment number of sets and record set in DATA. */
++
++static void
++record_set_data (rtx dest, const_rtx set, void *data)
++{
++ struct set_data *s = (struct set_data *)data;
++
++ if (GET_CODE (set) == SET)
++ {
++ /* We allow insns having multiple sets, where all but one are
++ dead as single set insns. In the common case only a single
++ set is present, so we want to avoid checking for REG_UNUSED
++ notes unless necessary. */
++ if (s->nsets == 1
++ && find_reg_note (s->insn, REG_UNUSED, SET_DEST (s->set))
++ && !side_effects_p (s->set))
++ s->nsets = 0;
++
++ if (!s->nsets)
++ {
++ /* Record this set. */
++ s->nsets += 1;
++ s->set = set;
++ }
++ else if (!find_reg_note (s->insn, REG_UNUSED, dest)
++ || side_effects_p (set))
++ s->nsets += 1;
++ }
++}
++
++static const_rtx
++single_set_gcse (rtx insn)
++{
++ struct set_data s;
++ rtx pattern;
++
++ gcc_assert (INSN_P (insn));
++
++ /* Optimize common case. */
++ pattern = PATTERN (insn);
++ if (GET_CODE (pattern) == SET)
++ return pattern;
++
++ s.insn = insn;
++ s.nsets = 0;
++ note_stores (pattern, record_set_data, &s);
++
++ /* Considered invariant insns have exactly one set. */
++ gcc_assert (s.nsets == 1);
++ return s.set;
++}
++
+ /* Emit move from SRC to DEST noting the equivalence with expression computed
+ in INSN. */
+
+@@ -2509,7 +2568,8 @@
+ gcse_emit_move_after (rtx dest, rtx src, rtx insn)
+ {
+ rtx new_rtx;
+- rtx set = single_set (insn), set2;
++ const_rtx set = single_set_gcse (insn);
++ rtx set2;
+ rtx note;
+ rtx eqv = NULL_RTX;
+
+@@ -3369,13 +3429,12 @@
+ FOR_EACH_VEC_ELT (occrs_to_hoist, j, occr)
+ {
+ rtx insn;
+- rtx set;
++ const_rtx set;
+
+ gcc_assert (!occr->deleted_p);
+
+ insn = occr->insn;
+- set = single_set (insn);
+- gcc_assert (set);
++ set = single_set_gcse (insn);
+
+ /* Create a pseudo-reg to store the result of reaching
+ expressions into. Get the mode for the new pseudo
+@@ -3456,10 +3515,8 @@
+ {
+ rtx reg;
+ enum reg_class pressure_class;
+- rtx set = single_set (insn);
++ const_rtx set = single_set_gcse (insn);
+
+- /* Considered invariant insns have only one set. */
+- gcc_assert (set != NULL_RTX);
+ reg = SET_DEST (set);
+ if (GET_CODE (reg) == SUBREG)
+ reg = SUBREG_REG (reg);
diff --git a/package/gcc/arc-2015.12/100-libstdcxx-uclibc-c99.patch b/package/gcc/arc-2016.03/850-libstdcxx-uclibc-c99.patch
index 0d02ef0fb6..792976fd51 100644
--- a/package/gcc/arc-2015.12/100-libstdcxx-uclibc-c99.patch
+++ b/package/gcc/arc-2016.03/850-libstdcxx-uclibc-c99.patch
@@ -45,7 +45,7 @@ Index: b/libstdc++-v3/include/bits/basic_string.h
===================================================================
--- a/libstdc++-v3/include/bits/basic_string.h
+++ b/libstdc++-v3/include/bits/basic_string.h
-@@ -2811,7 +2811,7 @@
+@@ -2809,7 +2809,7 @@
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
@@ -262,7 +262,7 @@ Index: b/libstdc++-v3/include/c_global/cstdio
===================================================================
--- a/libstdc++-v3/include/c_global/cstdio
+++ b/libstdc++-v3/include/c_global/cstdio
-@@ -138,7 +138,7 @@
+@@ -139,7 +139,7 @@
using ::vsprintf;
} // namespace
diff --git a/package/gcc/arc-2015.12/851-PR-other-56780.patch b/package/gcc/arc-2016.03/851-PR-other-56780.patch
index feb433920d..feb433920d 100644
--- a/package/gcc/arc-2015.12/851-PR-other-56780.patch
+++ b/package/gcc/arc-2016.03/851-PR-other-56780.patch
diff --git a/package/gcc/arc-2016.03/930-libgcc-disable-split-stack-nothreads.patch b/package/gcc/arc-2016.03/930-libgcc-disable-split-stack-nothreads.patch
new file mode 100644
index 0000000000..7799c1286e
--- /dev/null
+++ b/package/gcc/arc-2016.03/930-libgcc-disable-split-stack-nothreads.patch
@@ -0,0 +1,14 @@
+disable split-stack for non-thread builds
+
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+
+diff -Nur gcc-4.8.5.orig/libgcc/config/t-stack gcc-4.8.5/libgcc/config/t-stack
+--- gcc-4.8.5.orig/libgcc/config/t-stack 2010-10-01 21:31:49.000000000 +0200
++++ gcc-4.8.5/libgcc/config/t-stack 2016-03-07 05:28:12.000000000 +0100
+@@ -1,4 +1,6 @@
+ # Makefile fragment to provide generic support for -fsplit-stack.
+ # This should be used in config.host for any host which supports
+ # -fsplit-stack.
++ifeq ($(enable_threads),yes)
+ LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c
++endif
diff --git a/package/gcc/gcc.hash b/package/gcc/gcc.hash
index 8d2feaf1a4..1bed7709e7 100644
--- a/package/gcc/gcc.hash
+++ b/package/gcc/gcc.hash
@@ -10,5 +10,6 @@ sha512 9ac57377a6975fc7adac704ec81355262b9f537def6955576753b87715470a20ee6a2a31
sha512 d619847383405fd389f5a2d7225f97fedb01f81478dbb8339047ccba7561a5c20045ab500a8744bffd19ea51892ce09fc37f862f2cfcb42de0f0f8cd8f8da37a gcc-5.3.0.tar.bz2
# From ftp://gcc.gnu.org/pub/gcc/releases/gcc-6.1.0/sha512.sum
sha512 eeed3e2018b8c012aabce419e8d718fde701e5c3c179b4486c61ba46e5736eecc8fccdd18b01fcd973a42c6ad3116dbbe2ee247fe3757d622d373f93ebaf8d2e gcc-6.1.0.tar.bz2
-# No hash for the ARC variant, comes from the github-helper:
-none xxx gcc-arc-2015.12.tar.gz
+
+# Locally calculated (fetched from Github)
+sha512 65b1eef5f8ca26941dd9b5e1bcaf4ce285cc95429eeb92b4088663577bcdb2392f9712925f38666d94207fecd244579336f753a13de1f90e5169b21d8a73bef3 gcc-arc-2016.03.tar.gz
OpenPOWER on IntegriCloud