summaryrefslogtreecommitdiff
path: root/patches/gcc
diff options
context:
space:
mode:
authorkozyilmaz <kazim@monolytic.com>2016-08-24 08:33:24 (GMT)
committerkozyilmaz <kazim@monolytic.com>2016-08-24 08:33:24 (GMT)
commitdeaa4b8ded066f0b32b4d6be28756d2d7d68d7d6 (patch)
treee58f6f9b0bb442cf1b50b301bc73f7a1946724f2 /patches/gcc
parent11cb2ddd43fd1ff493f4b7cd63f1cf654294165f (diff)
xgcc: Update gcc 5 to 5.4.0
patches synced with buildroot trunk and: 110-xtensa-implement-trap-pattern.patch (copied to 5.4.0 patches) 130-build_gcc-5_with_gcc-6.patch (upstreamed in 5.4.0, dropped) 370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch (copied to 5.4.0 patches) 380-gcc-plugin-POSIX-include-sys-select-h.patch (copied to 5.4.0 patches) 910-nios2-bad-multilib-default.patch (copied to 5.4.0 patches)
Diffstat (limited to 'patches/gcc')
-rw-r--r--patches/gcc/5.3.0/130-build_gcc-5_with_gcc-6.patch151
-rw-r--r--patches/gcc/5.4.0/100-uclibc-conf.patch (renamed from patches/gcc/5.3.0/100-uclibc-conf.patch)0
-rw-r--r--patches/gcc/5.4.0/110-xtensa-implement-trap-pattern.patch (renamed from patches/gcc/5.3.0/110-xtensa-implement-trap-pattern.patch)0
-rw-r--r--patches/gcc/5.4.0/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch (renamed from patches/gcc/5.3.0/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch)0
-rw-r--r--patches/gcc/5.4.0/301-missing-execinfo_h.patch (renamed from patches/gcc/5.3.0/301-missing-execinfo_h.patch)0
-rw-r--r--patches/gcc/5.4.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch (renamed from patches/gcc/5.3.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch)0
-rw-r--r--patches/gcc/5.4.0/380-gcc-plugin-POSIX-include-sys-select-h.patch (renamed from patches/gcc/5.3.0/380-gcc-plugin-POSIX-include-sys-select-h.patch)0
-rw-r--r--patches/gcc/5.4.0/810-arm-softfloat-libgcc.patch (renamed from patches/gcc/5.3.0/810-arm-softfloat-libgcc.patch)0
-rw-r--r--patches/gcc/5.4.0/830-arm_unbreak_armv4t.patch (renamed from patches/gcc/5.3.0/830-arm_unbreak_armv4t.patch)0
-rw-r--r--patches/gcc/5.4.0/840-microblaze-enable-dwarf-eh-support.patch (renamed from patches/gcc/5.3.0/840-microblaze-enable-dwarf-eh-support.patch)0
-rw-r--r--patches/gcc/5.4.0/850-libstdcxx-uclibc-c99.patch (renamed from patches/gcc/5.3.0/850-libstdcxx-uclibc-c99.patch)0
-rw-r--r--patches/gcc/5.4.0/860-cilk-wchar.patch (renamed from patches/gcc/5.3.0/860-cilk-wchar.patch)0
-rw-r--r--patches/gcc/5.4.0/870-xtensa-add-mauto-litpools-option.patch (renamed from patches/gcc/5.3.0/870-xtensa-add-mauto-litpools-option.patch)0
-rw-r--r--patches/gcc/5.4.0/871-xtensa-reimplement-register-spilling.patch (renamed from patches/gcc/5.3.0/871-xtensa-reimplement-register-spilling.patch)0
-rw-r--r--patches/gcc/5.4.0/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch (renamed from patches/gcc/5.3.0/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch)0
-rw-r--r--patches/gcc/5.4.0/873-xtensa-fix-_Unwind_GetCFA.patch (renamed from patches/gcc/5.3.0/873-xtensa-fix-_Unwind_GetCFA.patch)0
-rw-r--r--patches/gcc/5.4.0/874-xtensa-add-uclinux-support.patch174
-rw-r--r--patches/gcc/5.4.0/890-fix-m68k-compile.patch15
-rw-r--r--patches/gcc/5.4.0/891-fix-m68k-uclinux.patch18
-rw-r--r--patches/gcc/5.4.0/892-microblaze-uclibc.patch24
-rw-r--r--patches/gcc/5.4.0/900-libitm-fixes-for-musl-support.patch (renamed from patches/gcc/5.3.0/900-libitm-fixes-for-musl-support.patch)0
-rw-r--r--patches/gcc/5.4.0/901-fixincludes-update-for-musl-support.patch (renamed from patches/gcc/5.3.0/901-fixincludes-update-for-musl-support.patch)0
-rw-r--r--patches/gcc/5.4.0/902-unwind-fix-for-musl.patch (renamed from patches/gcc/5.3.0/902-unwind-fix-for-musl.patch)0
-rw-r--r--patches/gcc/5.4.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch (renamed from patches/gcc/5.3.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch)0
-rw-r--r--patches/gcc/5.4.0/904-musl-libc-config.patch (renamed from patches/gcc/5.3.0/904-musl-libc-config.patch)0
-rw-r--r--patches/gcc/5.4.0/905-add-musl-support-to-gcc.patch (renamed from patches/gcc/5.3.0/905-add-musl-support-to-gcc.patch)0
-rw-r--r--patches/gcc/5.4.0/906-mips-musl-support.patch (renamed from patches/gcc/5.3.0/906-mips-musl-support.patch)0
-rw-r--r--patches/gcc/5.4.0/907-x86-musl-support.patch (renamed from patches/gcc/5.3.0/907-x86-musl-support.patch)0
-rw-r--r--patches/gcc/5.4.0/908-arm-musl-support.patch (renamed from patches/gcc/5.3.0/908-arm-musl-support.patch)0
-rw-r--r--patches/gcc/5.4.0/909-aarch64-musl-support.patch (renamed from patches/gcc/5.3.0/909-aarch64-musl-support.patch)0
-rw-r--r--patches/gcc/5.4.0/910-nios2-bad-multilib-default.patch (renamed from patches/gcc/5.3.0/910-nios2-bad-multilib-default.patch)0
-rw-r--r--patches/gcc/5.4.0/930-libgcc-disable-split-stack-nothreads.patch14
-rw-r--r--patches/gcc/5.4.0/940-uclinux-enable-threads.patch19
33 files changed, 264 insertions, 151 deletions
diff --git a/patches/gcc/5.3.0/130-build_gcc-5_with_gcc-6.patch b/patches/gcc/5.3.0/130-build_gcc-5_with_gcc-6.patch
deleted file mode 100644
index fbab9eb..0000000
--- a/patches/gcc/5.3.0/130-build_gcc-5_with_gcc-6.patch
+++ /dev/null
@@ -1,151 +0,0 @@
-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
----
- 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/patches/gcc/5.3.0/100-uclibc-conf.patch b/patches/gcc/5.4.0/100-uclibc-conf.patch
index 73d1f0d..73d1f0d 100644
--- a/patches/gcc/5.3.0/100-uclibc-conf.patch
+++ b/patches/gcc/5.4.0/100-uclibc-conf.patch
diff --git a/patches/gcc/5.3.0/110-xtensa-implement-trap-pattern.patch b/patches/gcc/5.4.0/110-xtensa-implement-trap-pattern.patch
index 3304532..3304532 100644
--- a/patches/gcc/5.3.0/110-xtensa-implement-trap-pattern.patch
+++ b/patches/gcc/5.4.0/110-xtensa-implement-trap-pattern.patch
diff --git a/patches/gcc/5.3.0/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch b/patches/gcc/5.4.0/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch
index c11ad35..c11ad35 100644
--- a/patches/gcc/5.3.0/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch
+++ b/patches/gcc/5.4.0/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch
diff --git a/patches/gcc/5.3.0/301-missing-execinfo_h.patch b/patches/gcc/5.4.0/301-missing-execinfo_h.patch
index 2d0e7ba..2d0e7ba 100644
--- a/patches/gcc/5.3.0/301-missing-execinfo_h.patch
+++ b/patches/gcc/5.4.0/301-missing-execinfo_h.patch
diff --git a/patches/gcc/5.3.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/patches/gcc/5.4.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
index d8986d5..d8986d5 100644
--- a/patches/gcc/5.3.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
+++ b/patches/gcc/5.4.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
diff --git a/patches/gcc/5.3.0/380-gcc-plugin-POSIX-include-sys-select-h.patch b/patches/gcc/5.4.0/380-gcc-plugin-POSIX-include-sys-select-h.patch
index 12ef48e..12ef48e 100644
--- a/patches/gcc/5.3.0/380-gcc-plugin-POSIX-include-sys-select-h.patch
+++ b/patches/gcc/5.4.0/380-gcc-plugin-POSIX-include-sys-select-h.patch
diff --git a/patches/gcc/5.3.0/810-arm-softfloat-libgcc.patch b/patches/gcc/5.4.0/810-arm-softfloat-libgcc.patch
index 5efa7fd..5efa7fd 100644
--- a/patches/gcc/5.3.0/810-arm-softfloat-libgcc.patch
+++ b/patches/gcc/5.4.0/810-arm-softfloat-libgcc.patch
diff --git a/patches/gcc/5.3.0/830-arm_unbreak_armv4t.patch b/patches/gcc/5.4.0/830-arm_unbreak_armv4t.patch
index b730059..b730059 100644
--- a/patches/gcc/5.3.0/830-arm_unbreak_armv4t.patch
+++ b/patches/gcc/5.4.0/830-arm_unbreak_armv4t.patch
diff --git a/patches/gcc/5.3.0/840-microblaze-enable-dwarf-eh-support.patch b/patches/gcc/5.4.0/840-microblaze-enable-dwarf-eh-support.patch
index 9d29090..9d29090 100644
--- a/patches/gcc/5.3.0/840-microblaze-enable-dwarf-eh-support.patch
+++ b/patches/gcc/5.4.0/840-microblaze-enable-dwarf-eh-support.patch
diff --git a/patches/gcc/5.3.0/850-libstdcxx-uclibc-c99.patch b/patches/gcc/5.4.0/850-libstdcxx-uclibc-c99.patch
index 9e97d94..9e97d94 100644
--- a/patches/gcc/5.3.0/850-libstdcxx-uclibc-c99.patch
+++ b/patches/gcc/5.4.0/850-libstdcxx-uclibc-c99.patch
diff --git a/patches/gcc/5.3.0/860-cilk-wchar.patch b/patches/gcc/5.4.0/860-cilk-wchar.patch
index 1d9916f..1d9916f 100644
--- a/patches/gcc/5.3.0/860-cilk-wchar.patch
+++ b/patches/gcc/5.4.0/860-cilk-wchar.patch
diff --git a/patches/gcc/5.3.0/870-xtensa-add-mauto-litpools-option.patch b/patches/gcc/5.4.0/870-xtensa-add-mauto-litpools-option.patch
index aa1376c..aa1376c 100644
--- a/patches/gcc/5.3.0/870-xtensa-add-mauto-litpools-option.patch
+++ b/patches/gcc/5.4.0/870-xtensa-add-mauto-litpools-option.patch
diff --git a/patches/gcc/5.3.0/871-xtensa-reimplement-register-spilling.patch b/patches/gcc/5.4.0/871-xtensa-reimplement-register-spilling.patch
index 4056f8b..4056f8b 100644
--- a/patches/gcc/5.3.0/871-xtensa-reimplement-register-spilling.patch
+++ b/patches/gcc/5.4.0/871-xtensa-reimplement-register-spilling.patch
diff --git a/patches/gcc/5.3.0/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch b/patches/gcc/5.4.0/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
index 9707f68..9707f68 100644
--- a/patches/gcc/5.3.0/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
+++ b/patches/gcc/5.4.0/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
diff --git a/patches/gcc/5.3.0/873-xtensa-fix-_Unwind_GetCFA.patch b/patches/gcc/5.4.0/873-xtensa-fix-_Unwind_GetCFA.patch
index 2d8eb7c..2d8eb7c 100644
--- a/patches/gcc/5.3.0/873-xtensa-fix-_Unwind_GetCFA.patch
+++ b/patches/gcc/5.4.0/873-xtensa-fix-_Unwind_GetCFA.patch
diff --git a/patches/gcc/5.4.0/874-xtensa-add-uclinux-support.patch b/patches/gcc/5.4.0/874-xtensa-add-uclinux-support.patch
new file mode 100644
index 0000000..23db3d8
--- /dev/null
+++ b/patches/gcc/5.4.0/874-xtensa-add-uclinux-support.patch
@@ -0,0 +1,174 @@
+From 70c2cb98fb129b4766b5da0f945dc41fd568c77a Mon Sep 17 00:00:00 2001
+From: Max Filippov <jcmvbkbc@gmail.com>
+Date: Sat, 22 Aug 2015 08:44:26 +0300
+Subject: [PATCH] xtensa: add uclinux support
+
+2015-10-03 Max Filippov <jcmvbkbc@gmail.com>
+gcc/
+ * config.gcc (xtensa*-*-uclinux*): New configuration.
+ * config/xtensa/uclinux.h: New file.
+ * config/xtensa/uclinux.opt: New file.
+
+libgcc/
+ * config.host (xtensa*-*-uclinux*): New configuration.
+
+Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
+---
+Backported from: r228450
+
+ gcc/config.gcc | 5 ++++
+ gcc/config/xtensa/uclinux.h | 69 +++++++++++++++++++++++++++++++++++++++++++
+ gcc/config/xtensa/uclinux.opt | 32 ++++++++++++++++++++
+ libgcc/config.host | 5 ++++
+ 4 files changed, 111 insertions(+)
+ create mode 100644 gcc/config/xtensa/uclinux.h
+ create mode 100644 gcc/config/xtensa/uclinux.opt
+
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index c52f5a8..56797bd 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -2995,6 +2995,11 @@ xtensa*-*-linux*)
+ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/linux.h"
+ tmake_file="${tmake_file} xtensa/t-xtensa"
+ ;;
++xtensa*-*-uclinux*)
++ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/uclinux.h"
++ tmake_file="${tmake_file} xtensa/t-xtensa"
++ extra_options="${extra_options} xtensa/uclinux.opt"
++ ;;
+ am33_2.0-*-linux*)
+ tm_file="mn10300/mn10300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h mn10300/linux.h"
+ gas=yes gnu_ld=yes
+diff --git a/gcc/config/xtensa/uclinux.h b/gcc/config/xtensa/uclinux.h
+new file mode 100644
+index 0000000..4606020
+--- /dev/null
++++ b/gcc/config/xtensa/uclinux.h
+@@ -0,0 +1,69 @@
++/* Xtensa uClinux configuration.
++ Derived from the configuration for GCC for Intel i386 running Linux.
++ Copyright (C) 2001-2015 Free Software Foundation, Inc.
++
++This file is part of GCC.
++
++GCC is free software; you can redistribute it and/or modify it under
++the terms of the GNU General Public License as published by the Free
++Software Foundation; either version 3, or (at your option) any later
++version.
++
++GCC is distributed in the hope that it will be useful, but WITHOUT ANY
++WARRANTY; without even the implied warranty of MERCHANTABILITY or
++FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++for more details.
++
++You should have received a copy of the GNU General Public License
++along with GCC; see the file COPYING3. If not see
++<http://www.gnu.org/licenses/>. */
++
++#undef TARGET_OS_CPP_BUILTINS
++#define TARGET_OS_CPP_BUILTINS() \
++ do \
++ { \
++ GNU_USER_TARGET_OS_CPP_BUILTINS (); \
++ builtin_define ("__uClinux__"); \
++ } \
++ while (0)
++
++#undef SUBTARGET_CPP_SPEC
++#define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
++
++#undef SIZE_TYPE
++#define SIZE_TYPE "unsigned int"
++
++#undef PTRDIFF_TYPE
++#define PTRDIFF_TYPE "int"
++
++#undef WCHAR_TYPE
++#define WCHAR_TYPE "long int"
++
++#undef WCHAR_TYPE_SIZE
++#define WCHAR_TYPE_SIZE 32
++
++#undef ASM_SPEC
++#define ASM_SPEC \
++ "%{mtext-section-literals:--text-section-literals} \
++ %{mno-text-section-literals:--no-text-section-literals} \
++ %{mtarget-align:--target-align} \
++ %{mno-target-align:--no-target-align} \
++ %{mlongcalls:--longcalls} \
++ %{mno-longcalls:--no-longcalls} \
++ %{mauto-litpools:--auto-litpools} \
++ %{mno-auto-litpools:--no-auto-litpools}"
++
++#undef LINK_SPEC
++#define LINK_SPEC "%{!no-elf2flt:%{!elf2flt*:-elf2flt}}"
++
++#undef LOCAL_LABEL_PREFIX
++#define LOCAL_LABEL_PREFIX "."
++
++/* Always enable "-fpic" for Xtensa Linux. */
++#define XTENSA_ALWAYS_PIC 1
++
++#undef TARGET_LIBC_HAS_FUNCTION
++#define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function
++
++#undef DBX_REGISTER_NUMBER
++
+diff --git a/gcc/config/xtensa/uclinux.opt b/gcc/config/xtensa/uclinux.opt
+new file mode 100644
+index 0000000..95ef777
+--- /dev/null
++++ b/gcc/config/xtensa/uclinux.opt
+@@ -0,0 +1,32 @@
++; Xtensa uClinux options.
++
++; Copyright (C) 2015 Free Software Foundation, Inc.
++;
++; This file is part of GCC.
++;
++; GCC is free software; you can redistribute it and/or modify it under
++; the terms of the GNU General Public License as published by the Free
++; Software Foundation; either version 3, or (at your option) any later
++; version.
++;
++; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
++; WARRANTY; without even the implied warranty of MERCHANTABILITY or
++; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++; for more details.
++;
++; You should have received a copy of the GNU General Public License
++; along with GCC; see the file COPYING3. If not see
++; <http://www.gnu.org/licenses/>.
++
++; See the GCC internals manual (options.texi) for a description of
++; this file's format.
++
++; Please try to keep this file in ASCII collating order.
++
++elf2flt
++Driver
++
++elf2flt=
++Driver JoinedOrMissing
++
++; This comment is to ensure we retain the blank line above.
+diff --git a/libgcc/config.host b/libgcc/config.host
+index 2c64756..2ee92c1 100644
+--- a/libgcc/config.host
++++ b/libgcc/config.host
+@@ -1295,6 +1295,11 @@ xtensa*-*-linux*)
+ tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-linux t-slibgcc-libgcc"
+ md_unwind_header=xtensa/linux-unwind.h
+ ;;
++xtensa*-*-uclinux*)
++ tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-linux t-slibgcc-libgcc"
++ md_unwind_header=xtensa/linux-unwind.h
++ extra_parts="$extra_parts crtbeginS.o crtbeginT.o crtendS.o"
++ ;;
+ am33_2.0-*-linux*)
+ # Don't need crtbeginT.o from *-*-linux* default.
+ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
+--
+1.8.1.4
+
diff --git a/patches/gcc/5.4.0/890-fix-m68k-compile.patch b/patches/gcc/5.4.0/890-fix-m68k-compile.patch
new file mode 100644
index 0000000..6e63de0
--- /dev/null
+++ b/patches/gcc/5.4.0/890-fix-m68k-compile.patch
@@ -0,0 +1,15 @@
+remove unused header, which breaks the toolchain building
+
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+
+diff -Nur gcc-5.3.0.orig/libgcc/config/m68k/linux-atomic.c gcc-5.3.0/libgcc/config/m68k/linux-atomic.c
+--- gcc-5.3.0.orig/libgcc/config/m68k/linux-atomic.c 2015-01-05 13:33:28.000000000 +0100
++++ gcc-5.3.0/libgcc/config/m68k/linux-atomic.c 2016-03-19 09:25:07.000000000 +0100
+@@ -33,7 +33,6 @@
+ using the kernel helper defined below. There is no support for
+ 64-bit operations yet. */
+
+-#include <asm/unistd.h>
+ #include <stdbool.h>
+
+ #ifndef __NR_atomic_cmpxchg_32
diff --git a/patches/gcc/5.4.0/891-fix-m68k-uclinux.patch b/patches/gcc/5.4.0/891-fix-m68k-uclinux.patch
new file mode 100644
index 0000000..4e186bd
--- /dev/null
+++ b/patches/gcc/5.4.0/891-fix-m68k-uclinux.patch
@@ -0,0 +1,18 @@
+avoids internal compiler error while compiling linux-atomic.c
+See here:
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53833
+
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+
+diff -Nur gcc-5.3.0.orig/libgcc/config.host gcc-5.3.0/libgcc/config.host
+--- gcc-5.3.0.orig/libgcc/config.host 2015-10-01 14:01:18.000000000 +0200
++++ gcc-5.3.0/libgcc/config.host 2016-04-26 21:30:25.353691745 +0200
+@@ -794,7 +794,7 @@
+ m68k*-*-openbsd*)
+ ;;
+ m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc
+- tmake_file="$tmake_file m68k/t-floatlib m68k/t-linux"
++ tmake_file="$tmake_file m68k/t-floatlib"
+ md_unwind_header=m68k/linux-unwind.h
+ ;;
+ m68k-*-linux*) # Motorola m68k's running GNU/Linux
diff --git a/patches/gcc/5.4.0/892-microblaze-uclibc.patch b/patches/gcc/5.4.0/892-microblaze-uclibc.patch
new file mode 100644
index 0000000..a8eb5a6
--- /dev/null
+++ b/patches/gcc/5.4.0/892-microblaze-uclibc.patch
@@ -0,0 +1,24 @@
+Add dynamic linker support for uClibc
+
+Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
+
+diff -Nur gcc-5.3.0.orig/gcc/config/microblaze/linux.h gcc-5.3.0/gcc/config/microblaze/linux.h
+--- gcc-5.3.0.orig/gcc/config/microblaze/linux.h 2015-05-28 16:08:19.000000000 +0200
++++ gcc-5.3.0/gcc/config/microblaze/linux.h 2016-05-13 09:21:01.579262885 +0200
+@@ -28,7 +28,15 @@
+ #undef TLS_NEEDS_GOT
+ #define TLS_NEEDS_GOT 1
+
+-#define DYNAMIC_LINKER "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++
++#if DEFAULT_LIBC == LIBC_UCLIBC
++#define DYNAMIC_LINKER UCLIBC_DYNAMIC_LINKER
++#else
++#define DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
++#endif
++
+ #undef SUBTARGET_EXTRA_SPECS
+ #define SUBTARGET_EXTRA_SPECS \
+ { "dynamic_linker", DYNAMIC_LINKER }
diff --git a/patches/gcc/5.3.0/900-libitm-fixes-for-musl-support.patch b/patches/gcc/5.4.0/900-libitm-fixes-for-musl-support.patch
index fdf4ee7..fdf4ee7 100644
--- a/patches/gcc/5.3.0/900-libitm-fixes-for-musl-support.patch
+++ b/patches/gcc/5.4.0/900-libitm-fixes-for-musl-support.patch
diff --git a/patches/gcc/5.3.0/901-fixincludes-update-for-musl-support.patch b/patches/gcc/5.4.0/901-fixincludes-update-for-musl-support.patch
index 13c08d6..13c08d6 100644
--- a/patches/gcc/5.3.0/901-fixincludes-update-for-musl-support.patch
+++ b/patches/gcc/5.4.0/901-fixincludes-update-for-musl-support.patch
diff --git a/patches/gcc/5.3.0/902-unwind-fix-for-musl.patch b/patches/gcc/5.4.0/902-unwind-fix-for-musl.patch
index ef47054..ef47054 100644
--- a/patches/gcc/5.3.0/902-unwind-fix-for-musl.patch
+++ b/patches/gcc/5.4.0/902-unwind-fix-for-musl.patch
diff --git a/patches/gcc/5.3.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch b/patches/gcc/5.4.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch
index c852131..c852131 100644
--- a/patches/gcc/5.3.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch
+++ b/patches/gcc/5.4.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch
diff --git a/patches/gcc/5.3.0/904-musl-libc-config.patch b/patches/gcc/5.4.0/904-musl-libc-config.patch
index 8549140..8549140 100644
--- a/patches/gcc/5.3.0/904-musl-libc-config.patch
+++ b/patches/gcc/5.4.0/904-musl-libc-config.patch
diff --git a/patches/gcc/5.3.0/905-add-musl-support-to-gcc.patch b/patches/gcc/5.4.0/905-add-musl-support-to-gcc.patch
index 92e7436..92e7436 100644
--- a/patches/gcc/5.3.0/905-add-musl-support-to-gcc.patch
+++ b/patches/gcc/5.4.0/905-add-musl-support-to-gcc.patch
diff --git a/patches/gcc/5.3.0/906-mips-musl-support.patch b/patches/gcc/5.4.0/906-mips-musl-support.patch
index 6b473f9..6b473f9 100644
--- a/patches/gcc/5.3.0/906-mips-musl-support.patch
+++ b/patches/gcc/5.4.0/906-mips-musl-support.patch
diff --git a/patches/gcc/5.3.0/907-x86-musl-support.patch b/patches/gcc/5.4.0/907-x86-musl-support.patch
index 3f2fe5d..3f2fe5d 100644
--- a/patches/gcc/5.3.0/907-x86-musl-support.patch
+++ b/patches/gcc/5.4.0/907-x86-musl-support.patch
diff --git a/patches/gcc/5.3.0/908-arm-musl-support.patch b/patches/gcc/5.4.0/908-arm-musl-support.patch
index 906355a..906355a 100644
--- a/patches/gcc/5.3.0/908-arm-musl-support.patch
+++ b/patches/gcc/5.4.0/908-arm-musl-support.patch
diff --git a/patches/gcc/5.3.0/909-aarch64-musl-support.patch b/patches/gcc/5.4.0/909-aarch64-musl-support.patch
index 3d032f5..3d032f5 100644
--- a/patches/gcc/5.3.0/909-aarch64-musl-support.patch
+++ b/patches/gcc/5.4.0/909-aarch64-musl-support.patch
diff --git a/patches/gcc/5.3.0/910-nios2-bad-multilib-default.patch b/patches/gcc/5.4.0/910-nios2-bad-multilib-default.patch
index d94697f..d94697f 100644
--- a/patches/gcc/5.3.0/910-nios2-bad-multilib-default.patch
+++ b/patches/gcc/5.4.0/910-nios2-bad-multilib-default.patch
diff --git a/patches/gcc/5.4.0/930-libgcc-disable-split-stack-nothreads.patch b/patches/gcc/5.4.0/930-libgcc-disable-split-stack-nothreads.patch
new file mode 100644
index 0000000..07f9a73
--- /dev/null
+++ b/patches/gcc/5.4.0/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-5.3.0.orig/libgcc/config/t-stack gcc-5.3.0/libgcc/config/t-stack
+--- gcc-5.3.0.orig/libgcc/config/t-stack 2010-10-01 21:31:49.000000000 +0200
++++ gcc-5.3.0/libgcc/config/t-stack 2016-03-07 03:25:32.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/patches/gcc/5.4.0/940-uclinux-enable-threads.patch b/patches/gcc/5.4.0/940-uclinux-enable-threads.patch
new file mode 100644
index 0000000..490a55b
--- /dev/null
+++ b/patches/gcc/5.4.0/940-uclinux-enable-threads.patch
@@ -0,0 +1,19 @@
+Enable POSIX threads for uClinux targets
+Reported upstream:
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71721
+
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+
+diff -Nur gcc-5.4.0.orig/gcc/config.gcc gcc-5.4.0/gcc/config.gcc
+--- gcc-5.4.0.orig/gcc/config.gcc 2015-09-10 16:17:53.000000000 +0200
++++ gcc-5.4.0/gcc/config.gcc 2016-07-01 21:26:02.772958441 +0200
+@@ -808,6 +808,9 @@
+ *-*-uclinux*)
+ extra_options="$extra_options gnu-user.opt"
+ use_gcc_stdint=wrap
++ case ${enable_threads} in
++ "" | yes | posix) thread_file='posix' ;;
++ esac
+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC SINGLE_LIBC"
+ ;;
+ *-*-rdos*)