summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Hundven <bryanhundven@gmail.com>2016-09-09 18:01:03 (GMT)
committerGitHub <noreply@github.com>2016-09-09 18:01:03 (GMT)
commit3a36f30ad7f6c9ceac205f5eb189cb74922392a9 (patch)
tree771b84512bf3bad1d38aed0e0133e9ae54df251c
parent1e4040e01118b21225b46f69b698631be5912376 (diff)
parent4b4082785d2a68d225d9791b023e68f23d9d6f3c (diff)
Merge pull request #389 from dajamminyogesh/master
gcc: Added 6.1.0 to version list
-rw-r--r--Makefile.in3
-rw-r--r--config/cc/gcc.in24
-rw-r--r--config/libc/musl.in4
-rw-r--r--patches/duma/2_5_15/200-cpp11-new-operator.patch96
-rw-r--r--patches/gcc/6.1.0/100-uclibc-conf.patch15
-rw-r--r--patches/gcc/6.1.0/301-missing-execinfo_h.patch13
-rw-r--r--patches/gcc/6.1.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch160
-rw-r--r--patches/gcc/6.1.0/380-gcc-plugin-POSIX-include-sys-select-h.patch11
-rw-r--r--patches/gcc/6.1.0/810-arm-softfloat-libgcc.patch30
-rw-r--r--patches/gcc/6.1.0/830-arm_unbreak_armv4t.patch15
-rw-r--r--patches/gcc/6.1.0/840-microblaze-enable-dwarf-eh-support.patch166
-rw-r--r--patches/gcc/6.1.0/860-cilk-wchar.patch56
-rw-r--r--patches/glibc/2.23/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch84
-rw-r--r--samples/i686-w64-mingw32,nios2-spico-elf/crosstool.config2
-rw-r--r--samples/s390x-ibm-linux-gnu/crosstool.config1
15 files changed, 675 insertions, 5 deletions
diff --git a/Makefile.in b/Makefile.in
index 3df6597..16ab72a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -349,6 +349,9 @@ install-lib-samples: $(DESTDIR)$(libdir) install-lib-main
$(install) -m 644 "$${libc_cfg}" \
"$(DESTDIR)$(libdir)/$${samp_dir}"; \
done; \
+ [ -e "$${samp_dir}/broken" ] && \
+ $(install) -m 644 "$${samp_dir}/broken" \
+ "$(DESTDIR)$(libdir)/$${samp_dir}/" || :; \
done
@$(install) -m 644 samples/samples.mk "$(DESTDIR)$(libdir)/samples/samples.mk"
diff --git a/config/cc/gcc.in b/config/cc/gcc.in
index 7894ec9..101f2b2 100644
--- a/config/cc/gcc.in
+++ b/config/cc/gcc.in
@@ -71,6 +71,10 @@ choice
# Don't remove next line
# CT_INSERT_VERSION_BELOW
+config CC_GCC_V_6_1_0
+ bool
+ prompt "6.1.0"
+ select CC_GCC_6
config CC_GCC_V_5_4_0
bool
@@ -162,10 +166,27 @@ config CC_GCC_5_or_later
bool
select CC_GCC_4_9_or_later
+config CC_GCC_6
+ bool
+ select CC_GCC_6_or_later
+ select CC_GCC_USE_GMP_MPFR
+ select CC_GCC_USE_MPC
+ select CC_GCC_HAS_GRAPHITE
+ select CC_GCC_HAS_LTO
+ select CC_GCC_HAS_PKGVERSION_BUGURL
+ select CC_GCC_HAS_BUILD_ID
+ select CC_GCC_HAS_LNK_HASH_STYLE
+ select CC_GCC_HAS_LIBQUADMATH
+ select CC_GCC_HAS_LIBSANITIZER
+ select CC_SUPPORT_GOLANG
+
+config CC_GCC_6_or_later
+ bool
+ select CC_GCC_5_or_later
config CC_GCC_latest
bool
- select CC_GCC_5_or_later
+ select CC_GCC_6_or_later
select CC_GCC_USE_GMP_MPFR
select CC_GCC_USE_MPC
select CC_GCC_HAS_GRAPHITE
@@ -261,6 +282,7 @@ config CC_GCC_VERSION
string
# Don't remove next line
# CT_INSERT_VERSION_STRING_BELOW
+ default "6.1.0" if CC_GCC_V_6_1_0
default "5.4.0" if CC_GCC_V_5_4_0
default "linaro-5.2-2015.11-2" if CC_GCC_V_linaro_5_2
default "linaro-4.9-2015.06" if CC_GCC_V_linaro_4_9
diff --git a/config/libc/musl.in b/config/libc/musl.in
index ff84448..3e0b5a1 100644
--- a/config/libc/musl.in
+++ b/config/libc/musl.in
@@ -55,7 +55,7 @@ choice
config LIBC_MUSL_V_1_1
bool
- prompt "1.1.14 (Mainline)"
+ prompt "1.1.15 (Mainline)"
depends on EXPERIMENTAL
endchoice
@@ -64,6 +64,6 @@ config LIBC_VERSION
string
# Don't remove next line
# CT_INSERT_VERSION_STRING_BELOW
- default "1.1.14" if LIBC_MUSL_V_1_1
+ default "1.1.15" if LIBC_MUSL_V_1_1
endif # ! LIBC_MUSL_CUSTOM
diff --git a/patches/duma/2_5_15/200-cpp11-new-operator.patch b/patches/duma/2_5_15/200-cpp11-new-operator.patch
new file mode 100644
index 0000000..900333e
--- /dev/null
+++ b/patches/duma/2_5_15/200-cpp11-new-operator.patch
@@ -0,0 +1,96 @@
+diff --git a/dumapp.cpp b/dumapp.cpp
+index dbddf66..b5e9ba3 100644
+--- a/dumapp.cpp
++++ b/dumapp.cpp
+@@ -189,8 +189,7 @@ void * duma_new_operator(DUMA_SIZE_T userSize, enum _DUMA_Allocator allocator, b
+ * Single object form, no debug information
+ * (11) = (a) ; ASW
+ */
+-void * DUMA_CDECL operator new( DUMA_SIZE_T size )
+-throw(std::bad_alloc)
++void * DUMA_CDECL operator new( DUMA_SIZE_T size ) NEW_THROW_SPEC
+ {
+ return duma_new_operator(size, EFA_NEW_ELEM, true DUMA_PARAMS_UK);
+ }
+@@ -253,8 +252,7 @@ throw()
+ * Array object form, no debug information
+ * (21) = (a) ; AAW
+ */
+-void * DUMA_CDECL operator new[]( DUMA_SIZE_T size )
+-throw(std::bad_alloc)
++void * DUMA_CDECL operator new[]( DUMA_SIZE_T size ) NEW_THROW_SPEC
+ {
+ return duma_new_operator(size, EFA_NEW_ARRAY, true DUMA_PARAMS_UK);
+ }
+@@ -320,8 +318,7 @@ throw()
+ * Single object form with debug information
+ * (31) = (a) ; ASW
+ */
+-void * DUMA_CDECL operator new( DUMA_SIZE_T size, const char *filename, int lineno )
+-throw( std::bad_alloc )
++void * DUMA_CDECL operator new( DUMA_SIZE_T size, const char *filename, int lineno ) NEW_THROW_SPEC
+ {
+ return duma_new_operator(size, EFA_NEW_ELEM, true DUMA_PARAMS_FILELINE);
+ }
+@@ -373,8 +370,7 @@ throw()
+ * Array object form with debug information
+ * (41) = (a) ; AAW
+ */
+-void * DUMA_CDECL operator new[]( DUMA_SIZE_T size, const char *filename, int lineno )
+-throw( std::bad_alloc )
++void * DUMA_CDECL operator new[]( DUMA_SIZE_T size, const char *filename, int lineno ) NEW_THROW_SPEC
+ {
+ return duma_new_operator(size, EFA_NEW_ARRAY, true DUMA_PARAMS_FILELINE);
+ }
+diff --git a/dumapp.h b/dumapp.h
+index fc40d9a..7175359 100644
+--- a/dumapp.h
++++ b/dumapp.h
+@@ -64,6 +64,11 @@
+ #endif
+ #endif
+
++#if __cplusplus <= 199711L
++#define NEW_THROW_SPEC throw(std::bad_alloc)
++#else
++#define NEW_THROW_SPEC
++#endif
+
+ #ifndef DUMA_NO_CPP_SUPPORT
+
+@@ -81,7 +86,7 @@
+ /* (12) = (b) ; ASN */
+ /* (13) = (c) ; FSW */
+ /* (14) = (d) ; FSN */
+- void * DUMA_CDECL operator new(DUMA_SIZE_T) throw(std::bad_alloc);
++ void * DUMA_CDECL operator new(DUMA_SIZE_T) NEW_THROW_SPEC;
+ void * DUMA_CDECL operator new(DUMA_SIZE_T, const std::nothrow_t &) throw();
+ void DUMA_CDECL operator delete(void *) throw();
+ void DUMA_CDECL operator delete(void *, const std::nothrow_t &) throw();
+@@ -91,7 +96,7 @@
+ /* (22) = (b) ; AAN */
+ /* (23) = (c) ; FAW */
+ /* (24) = (d) ; FAN */
+- void * DUMA_CDECL operator new[](DUMA_SIZE_T) throw(std::bad_alloc);
++ void * DUMA_CDECL operator new[](DUMA_SIZE_T) NEW_THROW_SPEC;
+ void * DUMA_CDECL operator new[](DUMA_SIZE_T, const std::nothrow_t &) throw();
+ void DUMA_CDECL operator delete[](void *) throw();
+ void DUMA_CDECL operator delete[](void *, const std::nothrow_t &) throw();
+@@ -103,7 +108,7 @@
+ /* (32) = (b) ; ASN */
+ /* (33) = (c) ; FSW */
+ /* (34) = (d) ; FSN */
+- void * DUMA_CDECL operator new(DUMA_SIZE_T, const char *, int) throw(std::bad_alloc);
++ void * DUMA_CDECL operator new(DUMA_SIZE_T, const char *, int) NEW_THROW_SPEC;
+ void * DUMA_CDECL operator new(DUMA_SIZE_T, const std::nothrow_t &, const char *, int) throw();
+ void DUMA_CDECL operator delete(void *, const char *, int) throw();
+ void DUMA_CDECL operator delete(void *, const std::nothrow_t &, const char *, int) throw();
+@@ -113,7 +118,7 @@
+ /* (42) = (b) ; AAN */
+ /* (43) = (c) ; FAW */
+ /* (44) = (d) ; FAN */
+- void * DUMA_CDECL operator new[](DUMA_SIZE_T, const char *, int) throw(std::bad_alloc);
++ void * DUMA_CDECL operator new[](DUMA_SIZE_T, const char *, int) NEW_THROW_SPEC;
+ void * DUMA_CDECL operator new[](DUMA_SIZE_T, const std::nothrow_t &, const char *, int) throw();
+ void DUMA_CDECL operator delete[](void *, const char *, int) throw();
+ void DUMA_CDECL operator delete[](void *, const std::nothrow_t &, const char *, int) throw();
diff --git a/patches/gcc/6.1.0/100-uclibc-conf.patch b/patches/gcc/6.1.0/100-uclibc-conf.patch
new file mode 100644
index 0000000..73d1f0d
--- /dev/null
+++ b/patches/gcc/6.1.0/100-uclibc-conf.patch
@@ -0,0 +1,15 @@
+Index: b/contrib/regression/objs-gcc.sh
+===================================================================
+--- a/contrib/regression/objs-gcc.sh
++++ b/contrib/regression/objs-gcc.sh
+@@ -106,6 +106,10 @@
+ then
+ make all-gdb all-dejagnu all-ld || exit 1
+ make install-gdb install-dejagnu install-ld || exit 1
++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
++ then
++ make all-gdb all-dejagnu all-ld || exit 1
++ make install-gdb install-dejagnu install-ld || exit 1
+ elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
+ make bootstrap || exit 1
+ make install || exit 1
diff --git a/patches/gcc/6.1.0/301-missing-execinfo_h.patch b/patches/gcc/6.1.0/301-missing-execinfo_h.patch
new file mode 100644
index 0000000..2d0e7ba
--- /dev/null
+++ b/patches/gcc/6.1.0/301-missing-execinfo_h.patch
@@ -0,0 +1,13 @@
+Index: b/boehm-gc/include/gc.h
+===================================================================
+--- a/boehm-gc/include/gc.h
++++ b/boehm-gc/include/gc.h
+@@ -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/patches/gcc/6.1.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/patches/gcc/6.1.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
new file mode 100644
index 0000000..d8986d5
--- /dev/null
+++ b/patches/gcc/6.1.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
@@ -0,0 +1,160 @@
+diff -urN gcc-5.3.0.orig/config/gcc-plugin.m4 gcc-5.3.0/config/gcc-plugin.m4
+--- gcc-5.3.0.orig/config/gcc-plugin.m4 2015-12-19 14:39:04.120734900 +0000
++++ gcc-5.3.0/config/gcc-plugin.m4 2015-12-20 01:28:45.381965300 +0000
+@@ -20,6 +20,9 @@
+
+ pluginlibs=
+
++ PICFLAG="-fPIC"
++ UNDEFINEDPREAMBLE="extern int X;"
++ UNDEFINEDCODE="return X == 0;"
+ case "${host}" in
+ *-*-darwin*)
+ if test x$build = x$host; then
+@@ -30,6 +33,11 @@
+ export_sym_check=
+ fi
+ ;;
++ *-*-mingw*|*-*-cygwin*|*-*-msys*)
++ PICFLAG=""
++ UNDEFINEDPREAMBLE=""
++ UNDEFINEDCODE=""
++ ;;
+ *)
+ if test x$build = x$host; then
+ export_sym_check="objdump${exeext} -T"
+@@ -81,17 +89,17 @@
+ case "${host}" in
+ *-*-darwin*)
+ CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
+- CFLAGS="$CFLAGS -fPIC"
++ CFLAGS="$CFLAGS ${PICFLAG}"
+ LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
+ ;;
+ *)
+- CFLAGS="$CFLAGS -fPIC"
+- LDFLAGS="$LDFLAGS -fPIC -shared"
++ CFLAGS="$CFLAGS ${PICFLAG}"
++ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
+ ;;
+ esac
+- AC_MSG_CHECKING([for -fPIC -shared])
++ AC_MSG_CHECKING([for ${PICFLAG} -shared])
+ AC_TRY_LINK(
+- [extern int X;],[return X == 0;],
++ [${UNDEFINEDPREAMBLE}],[${UNDEFINEDCODE}],
+ [AC_MSG_RESULT([yes]); have_pic_shared=yes],
+ [AC_MSG_RESULT([no]); have_pic_shared=no])
+ if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then
+diff -urN gcc-5.3.0.orig/gcc/configure gcc-5.3.0/gcc/configure
+--- gcc-5.3.0.orig/gcc/configure 2015-12-19 14:40:16.893975900 +0000
++++ gcc-5.3.0/gcc/configure 2015-12-20 01:28:45.472476700 +0000
+@@ -28386,6 +28386,9 @@
+
+ pluginlibs=
+
++ PICFLAG="-fPIC"
++ UNDEFINEDPREAMBLE="extern int X;"
++ UNDEFINEDCODE="return X == 0;"
+ case "${host}" in
+ *-*-darwin*)
+ if test x$build = x$host; then
+@@ -28396,6 +28399,11 @@
+ export_sym_check=
+ fi
+ ;;
++ *-*-mingw*|*-*-cygwin*|*-*-msys*)
++ PICFLAG=""
++ UNDEFINEDPREAMBLE=""
++ UNDEFINEDCODE=""
++ ;;
+ *)
+ if test x$build = x$host; then
+ export_sym_check="objdump${exeext} -T"
+@@ -28508,23 +28516,23 @@
+ case "${host}" in
+ *-*-darwin*)
+ CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
+- CFLAGS="$CFLAGS -fPIC"
++ CFLAGS="$CFLAGS ${PICFLAG}"
+ LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
+ ;;
+ *)
+- CFLAGS="$CFLAGS -fPIC"
+- LDFLAGS="$LDFLAGS -fPIC -shared"
++ CFLAGS="$CFLAGS ${PICFLAG}"
++ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
+ ;;
+ esac
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5
+-$as_echo_n "checking for -fPIC -shared... " >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5
++$as_echo_n "checking for ${PICFLAG} -shared... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-extern int X;
++${UNDEFINEDPREAMBLE}
+ int
+ main ()
+ {
+-return X == 0;
++${UNDEFINEDCODE}
+ ;
+ return 0;
+ }
+diff -urN gcc-5.3.0.orig/libcc1/configure gcc-5.3.0/libcc1/configure
+--- gcc-5.3.0.orig/libcc1/configure 2015-12-19 14:40:20.855979000 +0000
++++ gcc-5.3.0/libcc1/configure 2015-12-20 01:28:45.504980900 +0000
+@@ -14500,6 +14500,9 @@
+
+ pluginlibs=
+
++ PICFLAG="-fPIC"
++ UNDEFINEDPREAMBLE="extern int X;"
++ UNDEFINEDCODE="return X == 0;"
+ case "${host}" in
+ *-*-darwin*)
+ if test x$build = x$host; then
+@@ -14510,6 +14513,11 @@
+ export_sym_check=
+ fi
+ ;;
++ *-*-mingw*|*-*-cygwin*|*-*-msys*)
++ PICFLAG=""
++ UNDEFINEDPREAMBLE=""
++ UNDEFINEDCODE=""
++ ;;
+ *)
+ if test x$build = x$host; then
+ export_sym_check="objdump${exeext} -T"
+@@ -14622,23 +14630,23 @@
+ case "${host}" in
+ *-*-darwin*)
+ CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
+- CFLAGS="$CFLAGS -fPIC"
++ CFLAGS="$CFLAGS ${PICFLAG}"
+ LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
+ ;;
+ *)
+- CFLAGS="$CFLAGS -fPIC"
+- LDFLAGS="$LDFLAGS -fPIC -shared"
++ CFLAGS="$CFLAGS ${PICFLAG}"
++ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
+ ;;
+ esac
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5
+-$as_echo_n "checking for -fPIC -shared... " >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5
++$as_echo_n "checking for ${PICFLAG} -shared... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-extern int X;
++${UNDEFINEDPREAMBLE}
+ int
+ main ()
+ {
+-return X == 0;
++${UNDEFINEDCODE}
+ ;
+ return 0;
+ }
diff --git a/patches/gcc/6.1.0/380-gcc-plugin-POSIX-include-sys-select-h.patch b/patches/gcc/6.1.0/380-gcc-plugin-POSIX-include-sys-select-h.patch
new file mode 100644
index 0000000..12ef48e
--- /dev/null
+++ b/patches/gcc/6.1.0/380-gcc-plugin-POSIX-include-sys-select-h.patch
@@ -0,0 +1,11 @@
+diff -urN gcc-5.3.0.orig/libcc1/connection.cc gcc-5.3.0/libcc1/connection.cc
+--- gcc-5.3.0.orig/libcc1/connection.cc 2015-12-19 14:40:20.860479600 +0000
++++ gcc-5.3.0/libcc1/connection.cc 2015-12-20 01:31:04.346611500 +0000
+@@ -21,6 +21,7 @@
+ #include <string>
+ #include <unistd.h>
+ #include <sys/types.h>
++#include <sys/select.h>
+ #include <string.h>
+ #include <errno.h>
+ #include "marshall.hh"
diff --git a/patches/gcc/6.1.0/810-arm-softfloat-libgcc.patch b/patches/gcc/6.1.0/810-arm-softfloat-libgcc.patch
new file mode 100644
index 0000000..5efa7fd
--- /dev/null
+++ b/patches/gcc/6.1.0/810-arm-softfloat-libgcc.patch
@@ -0,0 +1,30 @@
+Index: b/gcc/config/arm/linux-elf.h
+===================================================================
+--- a/gcc/config/arm/linux-elf.h
++++ b/gcc/config/arm/linux-elf.h
+@@ -60,7 +60,7 @@
+ %{shared:-lc} \
+ %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
+
+-#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
++#define LIBGCC_SPEC "-lgcc"
+
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+
+Index: b/libgcc/config/arm/t-linux
+===================================================================
+--- a/libgcc/config/arm/t-linux
++++ b/libgcc/config/arm/t-linux
+@@ -1,6 +1,11 @@
+ LIB1ASMSRC = arm/lib1funcs.S
+ LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
+- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3
++ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \
++ _arm_addsubdf3 _arm_addsubsf3 \
++ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \
++ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \
++ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \
++ _arm_fixsfsi _arm_fixunssfsi
+
+ # Just for these, we omit the frame pointer since it makes such a big
+ # difference.
diff --git a/patches/gcc/6.1.0/830-arm_unbreak_armv4t.patch b/patches/gcc/6.1.0/830-arm_unbreak_armv4t.patch
new file mode 100644
index 0000000..b730059
--- /dev/null
+++ b/patches/gcc/6.1.0/830-arm_unbreak_armv4t.patch
@@ -0,0 +1,15 @@
+http://sourceware.org/ml/crossgcc/2008-05/msg00009.html
+
+Index: b/gcc/config/arm/linux-eabi.h
+===================================================================
+--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h
+@@ -45,7 +45,7 @@
+ The ARM10TDMI core is the default for armv5t, so set
+ SUBTARGET_CPU_DEFAULT to achieve this. */
+ #undef SUBTARGET_CPU_DEFAULT
+-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
+
+ /* TARGET_BIG_ENDIAN_DEFAULT is set in
+ config.gcc for big endian configurations. */
diff --git a/patches/gcc/6.1.0/840-microblaze-enable-dwarf-eh-support.patch b/patches/gcc/6.1.0/840-microblaze-enable-dwarf-eh-support.patch
new file mode 100644
index 0000000..9d29090
--- /dev/null
+++ b/patches/gcc/6.1.0/840-microblaze-enable-dwarf-eh-support.patch
@@ -0,0 +1,166 @@
+Fetched from Xilinx gcc git at https://github.com/Xilinx/gcc
+
+From 23c35173490ac2d6348a668dfc9c1a6eb62171f2 Mon Sep 17 00:00:00 2001
+From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
+Date: Mon, 18 Jun 2012 20:18:13 +0200
+Subject: [PATCH] [Patch, microblaze]: Enable DWARF exception handling support.
+
+Changelog
+
+2013-03-18 Edgar E. Iglesias <edgar.iglesias@xilinx.com>
+ David Holsgrove <david.holsgrove@xilinx.com>
+
+ * common/config/microblaze/microblaze-common.c: Remove
+ TARGET_EXCEPT_UNWIND_INFO definition.
+ * config/microblaze/microblaze-protos.h: Add
+ microblaze_eh_return prototype.
+ * gcc/config/microblaze/microblaze.c: (microblaze_must_save_register,
+ microblaze_expand_epilogue, microblaze_return_addr): Handle
+ calls_eh_return
+ (microblaze_eh_return): New function.
+ * gcc/config/microblaze/microblaze.h: Define RETURN_ADDR_OFFSET,
+ EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM, EH_RETURN_STACKADJ_RTX,
+ ASM_PREFERRED_EH_DATA_FORMAT
+ * gcc/config/microblaze/microblaze.md: Define eh_return pattern.
+
+Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
+Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
+---
+ gcc/common/config/microblaze/microblaze-common.c | 3 ---
+ gcc/config/microblaze/microblaze-protos.h | 1 +
+ gcc/config/microblaze/microblaze.c | 29 ++++++++++++++++++++----
+ gcc/config/microblaze/microblaze.h | 15 ++++++++++++
+ gcc/config/microblaze/microblaze.md | 11 +++++++++
+ 5 files changed, 52 insertions(+), 7 deletions(-)
+
+Index: b/gcc/common/config/microblaze/microblaze-common.c
+===================================================================
+--- a/gcc/common/config/microblaze/microblaze-common.c
++++ b/gcc/common/config/microblaze/microblaze-common.c
+@@ -37,7 +37,4 @@
+ #undef TARGET_OPTION_OPTIMIZATION_TABLE
+ #define TARGET_OPTION_OPTIMIZATION_TABLE microblaze_option_optimization_table
+
+-#undef TARGET_EXCEPT_UNWIND_INFO
+-#define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info
+-
+ struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;
+Index: b/gcc/config/microblaze/microblaze-protos.h
+===================================================================
+--- a/gcc/config/microblaze/microblaze-protos.h
++++ b/gcc/config/microblaze/microblaze-protos.h
+@@ -56,6 +56,7 @@
+ extern int symbol_mentioned_p (rtx);
+ extern int label_mentioned_p (rtx);
+ extern bool microblaze_cannot_force_const_mem (machine_mode, rtx);
++extern void microblaze_eh_return (rtx op0);
+ #endif /* RTX_CODE */
+
+ /* Declare functions in microblaze-c.c. */
+Index: b/gcc/config/microblaze/microblaze.c
+===================================================================
+--- a/gcc/config/microblaze/microblaze.c
++++ b/gcc/config/microblaze/microblaze.c
+@@ -1959,6 +1959,11 @@
+ if (frame_pointer_needed && (regno == HARD_FRAME_POINTER_REGNUM))
+ return 1;
+
++ if (crtl->calls_eh_return
++ && regno == MB_ABI_SUB_RETURN_ADDR_REGNUM) {
++ return 1;
++ }
++
+ if (!crtl->is_leaf)
+ {
+ if (regno == MB_ABI_SUB_RETURN_ADDR_REGNUM)
+@@ -1986,6 +1991,13 @@
+ return 1;
+ }
+
++ if (crtl->calls_eh_return
++ && (regno == EH_RETURN_DATA_REGNO (0)
++ || regno == EH_RETURN_DATA_REGNO (1)))
++ {
++ return 1;
++ }
++
+ return 0;
+ }
+
+@@ -3067,6 +3079,12 @@
+ emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, fsiz_rtx));
+ }
+
++ if (crtl->calls_eh_return)
++ emit_insn (gen_addsi3 (stack_pointer_rtx,
++ stack_pointer_rtx,
++ gen_rtx_raw_REG (SImode,
++ MB_EH_STACKADJ_REGNUM)));
++
+ emit_jump_insn (gen_return_internal (gen_rtx_REG (Pmode, GP_REG_FIRST +
+ MB_ABI_SUB_RETURN_ADDR_REGNUM)));
+ }
+@@ -3364,10 +3382,13 @@
+ if (count != 0)
+ return NULL_RTX;
+
+- return gen_rtx_PLUS (Pmode,
+- get_hard_reg_initial_val (Pmode,
+- MB_ABI_SUB_RETURN_ADDR_REGNUM),
+- GEN_INT (8));
++ return get_hard_reg_initial_val (Pmode,
++ MB_ABI_SUB_RETURN_ADDR_REGNUM);
++}
++
++void microblaze_eh_return (rtx op0)
++{
++ emit_insn (gen_movsi(gen_rtx_MEM(Pmode, stack_pointer_rtx), op0));
+ }
+
+ /* Queue an .ident string in the queue of top-level asm statements.
+Index: b/gcc/config/microblaze/microblaze.h
+===================================================================
+--- a/gcc/config/microblaze/microblaze.h
++++ b/gcc/config/microblaze/microblaze.h
+@@ -184,6 +184,21 @@
+ #define INCOMING_RETURN_ADDR_RTX \
+ gen_rtx_REG (VOIDmode, GP_REG_FIRST + MB_ABI_SUB_RETURN_ADDR_REGNUM)
+
++/* Specifies the offset from INCOMING_RETURN_ADDR_RTX and the actual return PC. */
++#define RETURN_ADDR_OFFSET (8)
++
++/* Describe how we implement __builtin_eh_return. */
++#define EH_RETURN_DATA_REGNO(N) (((N) < 2) ? MB_ABI_FIRST_ARG_REGNUM + (N) : INVALID_REGNUM)
++
++#define MB_EH_STACKADJ_REGNUM MB_ABI_INT_RETURN_VAL2_REGNUM
++#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, MB_EH_STACKADJ_REGNUM)
++
++/* Select a format to encode pointers in exception handling data. CODE
++ is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
++ true if the symbol may be affected by dynamic relocations. */
++#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
++ ((flag_pic || GLOBAL) ? DW_EH_PE_aligned : DW_EH_PE_absptr)
++
+ /* Use DWARF 2 debugging information by default. */
+ #define DWARF2_DEBUGGING_INFO
+ #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+Index: b/gcc/config/microblaze/microblaze.md
+===================================================================
+--- a/gcc/config/microblaze/microblaze.md
++++ b/gcc/config/microblaze/microblaze.md
+@@ -2272,4 +2272,15 @@
+ (set_attr "mode" "SI")
+ (set_attr "length" "4")])
+
++; This is used in compiling the unwind routines.
++(define_expand "eh_return"
++ [(use (match_operand 0 "general_operand" ""))]
++ ""
++ "
++{
++ microblaze_eh_return(operands[0]);
++ DONE;
++}")
++
+ (include "sync.md")
++
diff --git a/patches/gcc/6.1.0/860-cilk-wchar.patch b/patches/gcc/6.1.0/860-cilk-wchar.patch
new file mode 100644
index 0000000..1d9916f
--- /dev/null
+++ b/patches/gcc/6.1.0/860-cilk-wchar.patch
@@ -0,0 +1,56 @@
+[PATCH] cilk: fix build without wchar
+
+When building against uClibc with wchar support disabled, WCHAR_MIN and
+WCHAR_MAX are not defined leading to compilation errors.
+
+Fix it by only including the wchar code if available.
+
+Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
+---
+ libcilkrts/include/cilk/reducer_min_max.h | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+Index: b/libcilkrts/include/cilk/reducer_min_max.h
+===================================================================
+--- a/libcilkrts/include/cilk/reducer_min_max.h
++++ b/libcilkrts/include/cilk/reducer_min_max.h
+@@ -3154,7 +3154,9 @@
+ CILK_C_REDUCER_MAX_INSTANCE(char, char, CHAR_MIN)
+ CILK_C_REDUCER_MAX_INSTANCE(unsigned char, uchar, 0)
+ CILK_C_REDUCER_MAX_INSTANCE(signed char, schar, SCHAR_MIN)
++#ifdef WCHAR_MIN
+ CILK_C_REDUCER_MAX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN)
++#endif
+ CILK_C_REDUCER_MAX_INSTANCE(short, short, SHRT_MIN)
+ CILK_C_REDUCER_MAX_INSTANCE(unsigned short, ushort, 0)
+ CILK_C_REDUCER_MAX_INSTANCE(int, int, INT_MIN)
+@@ -3306,7 +3308,9 @@
+ CILK_C_REDUCER_MAX_INDEX_INSTANCE(char, char, CHAR_MIN)
+ CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned char, uchar, 0)
+ CILK_C_REDUCER_MAX_INDEX_INSTANCE(signed char, schar, SCHAR_MIN)
++#ifdef WCHAR_MIN
+ CILK_C_REDUCER_MAX_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN)
++#endif
+ CILK_C_REDUCER_MAX_INDEX_INSTANCE(short, short, SHRT_MIN)
+ CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned short, ushort, 0)
+ CILK_C_REDUCER_MAX_INDEX_INSTANCE(int, int, INT_MIN)
+@@ -3432,7 +3436,9 @@
+ CILK_C_REDUCER_MIN_INSTANCE(char, char, CHAR_MAX)
+ CILK_C_REDUCER_MIN_INSTANCE(unsigned char, uchar, CHAR_MAX)
+ CILK_C_REDUCER_MIN_INSTANCE(signed char, schar, SCHAR_MAX)
++#ifdef WCHAR_MAX
+ CILK_C_REDUCER_MIN_INSTANCE(wchar_t, wchar_t, WCHAR_MAX)
++#endif
+ CILK_C_REDUCER_MIN_INSTANCE(short, short, SHRT_MAX)
+ CILK_C_REDUCER_MIN_INSTANCE(unsigned short, ushort, USHRT_MAX)
+ CILK_C_REDUCER_MIN_INSTANCE(int, int, INT_MAX)
+@@ -3584,7 +3590,9 @@
+ CILK_C_REDUCER_MIN_INDEX_INSTANCE(char, char, CHAR_MAX)
+ CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned char, uchar, CHAR_MAX)
+ CILK_C_REDUCER_MIN_INDEX_INSTANCE(signed char, schar, SCHAR_MAX)
++#ifdef WCHAR_MAX
+ CILK_C_REDUCER_MIN_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MAX)
++#endif
+ CILK_C_REDUCER_MIN_INDEX_INSTANCE(short, short, SHRT_MAX)
+ CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned short, ushort, USHRT_MAX)
+ CILK_C_REDUCER_MIN_INDEX_INSTANCE(int, int, INT_MAX)
diff --git a/patches/glibc/2.23/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/patches/glibc/2.23/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
new file mode 100644
index 0000000..6fd663a
--- /dev/null
+++ b/patches/glibc/2.23/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
@@ -0,0 +1,84 @@
+From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001
+From: Yvan Roux <yvan.roux@linaro.org>
+Date: Fri, 15 Apr 2016 13:29:26 +0200
+Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with
+ -Wparentheses
+
+---
+ ChangeLog | 5 +++++
+ nis/nis_call.c | 20 +++++++++++---------
+ stdlib/setenv.c | 26 ++++++++++++++------------
+ 3 files changed, 30 insertions(+), 21 deletions(-)
+
+diff --git a/nis/nis_call.c b/nis/nis_call.c
+index 3fa37e4..cb7839a 100644
+--- a/nis/nis_call.c
++++ b/nis/nis_call.c
+@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent,
+ /* Choose which entry should be evicted from the cache. */
+ loc = &nis_server_cache[0];
+ if (*loc != NULL)
+- for (i = 1; i < 16; ++i)
+- if (nis_server_cache[i] == NULL)
+- {
++ {
++ for (i = 1; i < 16; ++i)
++ if (nis_server_cache[i] == NULL)
++ {
++ loc = &nis_server_cache[i];
++ break;
++ }
++ else if ((*loc)->uses > nis_server_cache[i]->uses
++ || ((*loc)->uses == nis_server_cache[i]->uses
++ && (*loc)->expires > nis_server_cache[i]->expires))
+ loc = &nis_server_cache[i];
+- break;
+- }
+- else if ((*loc)->uses > nis_server_cache[i]->uses
+- || ((*loc)->uses == nis_server_cache[i]->uses
+- && (*loc)->expires > nis_server_cache[i]->expires))
+- loc = &nis_server_cache[i];
++ }
+ old = *loc;
+ *loc = new;
+
+diff --git a/stdlib/setenv.c b/stdlib/setenv.c
+index da61ee0..e66045f 100644
+--- a/stdlib/setenv.c
++++ b/stdlib/setenv.c
+@@ -278,18 +278,20 @@ unsetenv (const char *name)
+ ep = __environ;
+ if (ep != NULL)
+ while (*ep != NULL)
+- if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
+- {
+- /* Found it. Remove this pointer by moving later ones back. */
+- char **dp = ep;
+-
+- do
+- dp[0] = dp[1];
+- while (*dp++);
+- /* Continue the loop in case NAME appears again. */
+- }
+- else
+- ++ep;
++ {
++ if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
++ {
++ /* Found it. Remove this pointer by moving later ones back. */
++ char **dp = ep;
++
++ do
++ dp[0] = dp[1];
++ while (*dp++);
++ /* Continue the loop in case NAME appears again. */
++ }
++ else
++ ++ep;
++ }
+
+ UNLOCK;
+
+--
+2.7.4
+
diff --git a/samples/i686-w64-mingw32,nios2-spico-elf/crosstool.config b/samples/i686-w64-mingw32,nios2-spico-elf/crosstool.config
index c112aa0..70b5a03 100644
--- a/samples/i686-w64-mingw32,nios2-spico-elf/crosstool.config
+++ b/samples/i686-w64-mingw32,nios2-spico-elf/crosstool.config
@@ -13,5 +13,5 @@ CT_BINUTILS_V_2_25=y
CT_CC_LANG_CXX=y
CT_DEBUG_gdb=y
CT_MPFR_V_3_1_2=y
-CT_ISL_V_0_12_2=y
+CT_ISL_V_0_14=y
CT_MPC_V_1_0_2=y
diff --git a/samples/s390x-ibm-linux-gnu/crosstool.config b/samples/s390x-ibm-linux-gnu/crosstool.config
index c4b9ded..7e6bb40 100644
--- a/samples/s390x-ibm-linux-gnu/crosstool.config
+++ b/samples/s390x-ibm-linux-gnu/crosstool.config
@@ -1,6 +1,5 @@
CT_LOCAL_TARBALLS_DIR="${HOME}/src"
CT_SAVE_TARBALLS=y
-CT_PATCH_NONE=y
CT_LOG_EXTRA=y
CT_ARCH_64=y
CT_ARCH_s390=y