All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/6] Internal toolchain backend updates
@ 2015-06-14 14:33 Thomas Petazzoni
  2015-06-14 14:33 ` [Buildroot] [PATCH 1/6] uclibc: bump uClibc-ng to 1.0.3 Thomas Petazzoni
                   ` (5 more replies)
  0 siblings, 6 replies; 20+ messages in thread
From: Thomas Petazzoni @ 2015-06-14 14:33 UTC (permalink / raw)
  To: buildroot

Hello,

Here is a set of updates to the internal toolchain backend, bumping
uClibc-ng, adding support for gcc 5.1, bumping gdb 7.9 and
deprecating support for eglibc.

Also available at:

  git at git.free-electrons.com:users/thomas-petazzoni/buildroot

branch internal-toolchain-updates.

Best regards,

Thomas

Thomas Petazzoni (6):
  uclibc: bump uClibc-ng to 1.0.3
  uclibc: add libgcc_s_resume fix
  gcc: add support for gcc 5.1
  gcc: switch to gcc 4.9 as the default version
  gdb: bump 7.9 series to 7.9.1
  toolchain-buildroot: mark eglibc as deprecated

 package/gcc/5.1.0/100-uclibc-conf.patch            |  15 +
 .../5.1.0/200-gcc-poison-system-directories.patch  | 207 +++++++++++++
 .../5.1.0/201-libgcc-remove-unistd-header.patch    |  14 +
 package/gcc/5.1.0/301-missing-execinfo_h.patch     |  13 +
 package/gcc/5.1.0/810-arm-softfloat-libgcc.patch   |  30 ++
 package/gcc/5.1.0/830-arm_unbreak_armv4t.patch     |  15 +
 .../840-microblaze-enable-dwarf-eh-support.patch   | 166 +++++++++++
 package/gcc/5.1.0/850-libstdcxx-uclibc-c99.patch   | 273 ++++++++++++++++++
 package/gcc/5.1.0/860-cilk-wchar.patch             |  56 ++++
 .../5.1.0/900-libitm-fixes-for-musl-support.patch  |  65 +++++
 .../901-fixincludes-update-for-musl-support.patch  |  32 ++
 package/gcc/5.1.0/902-unwind-fix-for-musl.patch    |  36 +++
 ...dc++-libgfortran-gthr-workaround-for-musl.patch |  80 +++++
 package/gcc/5.1.0/904-musl-libc-config.patch       | 321 +++++++++++++++++++++
 .../gcc/5.1.0/905-add-musl-support-to-gcc.patch    | 130 +++++++++
 package/gcc/5.1.0/906-mips-musl-support.patch      |  37 +++
 package/gcc/5.1.0/907-x86-musl-support.patch       |  45 +++
 package/gcc/5.1.0/908-arm-musl-support.patch       |  45 +++
 package/gcc/5.1.0/909-aarch64-musl-support.patch   |  33 +++
 package/gcc/Config.in.host                         |  11 +-
 package/gcc/gcc.hash                               |   2 +
 .../0001-gdbserver-fix-uClibc-whithout-MMU.patch   |   0
 ...gdbserver-xtensa-drop-xtensa_usrregs_info.patch |   0
 ...erver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch |   0
 package/gdb/Config.in.host                         |   2 +-
 package/gdb/gdb.hash                               |   2 +-
 .../0.9.33.2/0071-Fix-libgcc_s_resume-issue.patch  |  53 ++++
 .../0001-fix-static-linking-of-pthread-apps.patch  |  72 -----
 ...ert-Do-not-define-unimplemented-functions.patch | 118 --------
 .../1.0.3/0001-Fix-libgcc_s_resume-issue.patch     |  53 ++++
 package/uclibc/Config.in                           |   2 +-
 package/uclibc/uclibc.hash                         |   2 +-
 toolchain/toolchain-buildroot/Config.in            |   1 +
 33 files changed, 1735 insertions(+), 196 deletions(-)
 create mode 100644 package/gcc/5.1.0/100-uclibc-conf.patch
 create mode 100644 package/gcc/5.1.0/200-gcc-poison-system-directories.patch
 create mode 100644 package/gcc/5.1.0/201-libgcc-remove-unistd-header.patch
 create mode 100644 package/gcc/5.1.0/301-missing-execinfo_h.patch
 create mode 100644 package/gcc/5.1.0/810-arm-softfloat-libgcc.patch
 create mode 100644 package/gcc/5.1.0/830-arm_unbreak_armv4t.patch
 create mode 100644 package/gcc/5.1.0/840-microblaze-enable-dwarf-eh-support.patch
 create mode 100644 package/gcc/5.1.0/850-libstdcxx-uclibc-c99.patch
 create mode 100644 package/gcc/5.1.0/860-cilk-wchar.patch
 create mode 100644 package/gcc/5.1.0/900-libitm-fixes-for-musl-support.patch
 create mode 100644 package/gcc/5.1.0/901-fixincludes-update-for-musl-support.patch
 create mode 100644 package/gcc/5.1.0/902-unwind-fix-for-musl.patch
 create mode 100644 package/gcc/5.1.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch
 create mode 100644 package/gcc/5.1.0/904-musl-libc-config.patch
 create mode 100644 package/gcc/5.1.0/905-add-musl-support-to-gcc.patch
 create mode 100644 package/gcc/5.1.0/906-mips-musl-support.patch
 create mode 100644 package/gcc/5.1.0/907-x86-musl-support.patch
 create mode 100644 package/gcc/5.1.0/908-arm-musl-support.patch
 create mode 100644 package/gcc/5.1.0/909-aarch64-musl-support.patch
 rename package/gdb/{7.9 => 7.9.1}/0001-gdbserver-fix-uClibc-whithout-MMU.patch (100%)
 rename package/gdb/{7.9 => 7.9.1}/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch (100%)
 rename package/gdb/{7.9 => 7.9.1}/0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch (100%)
 create mode 100644 package/uclibc/0.9.33.2/0071-Fix-libgcc_s_resume-issue.patch
 delete mode 100644 package/uclibc/1.0.2/0001-fix-static-linking-of-pthread-apps.patch
 delete mode 100644 package/uclibc/1.0.2/0002-Revert-Do-not-define-unimplemented-functions.patch
 create mode 100644 package/uclibc/1.0.3/0001-Fix-libgcc_s_resume-issue.patch

-- 
2.1.0

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 1/6] uclibc: bump uClibc-ng to 1.0.3
  2015-06-14 14:33 [Buildroot] [PATCH 0/6] Internal toolchain backend updates Thomas Petazzoni
@ 2015-06-14 14:33 ` Thomas Petazzoni
  2015-06-14 19:03   ` Waldemar Brodkorb
  2015-06-22 22:17   ` Peter Korsgaard
  2015-06-14 14:33 ` [Buildroot] [PATCH 2/6] uclibc: add libgcc_s_resume fix Thomas Petazzoni
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 20+ messages in thread
From: Thomas Petazzoni @ 2015-06-14 14:33 UTC (permalink / raw)
  To: buildroot

This commit bumps uClibc-ng to the latest version, and drops the two
patches that have been merged upstream.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../0001-fix-static-linking-of-pthread-apps.patch  |  72 -------------
 ...ert-Do-not-define-unimplemented-functions.patch | 118 ---------------------
 package/uclibc/Config.in                           |   2 +-
 package/uclibc/uclibc.hash                         |   2 +-
 4 files changed, 2 insertions(+), 192 deletions(-)
 delete mode 100644 package/uclibc/1.0.2/0001-fix-static-linking-of-pthread-apps.patch
 delete mode 100644 package/uclibc/1.0.2/0002-Revert-Do-not-define-unimplemented-functions.patch

diff --git a/package/uclibc/1.0.2/0001-fix-static-linking-of-pthread-apps.patch b/package/uclibc/1.0.2/0001-fix-static-linking-of-pthread-apps.patch
deleted file mode 100644
index e3e6621..0000000
--- a/package/uclibc/1.0.2/0001-fix-static-linking-of-pthread-apps.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 74c69da52ad5029cd2fc2d3d41d581022ed0a7aa Mon Sep 17 00:00:00 2001
-From: Waldemar Brodkorb <wbx@openadk.org>
-Date: Wed, 15 Apr 2015 12:47:57 -0500
-Subject: [PATCH] fix static linking of pthread apps
-
-When compiling python you get duplicate symbol problem.
-Seen in the autobuilders of buildroot project.
-
-Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
----
- libc/sysdeps/linux/common/setregid.c  | 2 +-
- libc/sysdeps/linux/common/setresgid.c | 4 ++--
- libc/sysdeps/linux/common/setresuid.c | 4 ++--
- 3 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/libc/sysdeps/linux/common/setregid.c b/libc/sysdeps/linux/common/setregid.c
-index 15d590a..aaa7293 100644
---- a/libc/sysdeps/linux/common/setregid.c
-+++ b/libc/sysdeps/linux/common/setregid.c
-@@ -37,4 +37,4 @@ int setregid(gid_t rgid, gid_t egid)
- }
- #endif
- 
--libc_hidden_def(setregid)
-+libc_hidden_weak(setregid)
-diff --git a/libc/sysdeps/linux/common/setresgid.c b/libc/sysdeps/linux/common/setresgid.c
-index 95decc2..b6d1647 100644
---- a/libc/sysdeps/linux/common/setresgid.c
-+++ b/libc/sysdeps/linux/common/setresgid.c
-@@ -16,7 +16,7 @@
- # define __NR_setresgid __NR_setresgid32
- 
- _syscall3(int, setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid)
--libc_hidden_def(setresgid)
-+libc_hidden_weak(setresgid)
- 
- #elif defined(__NR_setresgid)
- 
-@@ -34,7 +34,7 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid)
- 	}
- 	return (__syscall_setresgid(rgid, egid, sgid));
- }
--libc_hidden_def(setresgid)
-+libc_hidden_weak(setresgid)
- 
- #endif
- 
-diff --git a/libc/sysdeps/linux/common/setresuid.c b/libc/sysdeps/linux/common/setresuid.c
-index 022ccfe..a2a2183 100644
---- a/libc/sysdeps/linux/common/setresuid.c
-+++ b/libc/sysdeps/linux/common/setresuid.c
-@@ -16,7 +16,7 @@
- # define __NR_setresuid __NR_setresuid32
- 
- _syscall3(int, setresuid, uid_t, ruid, uid_t, euid, uid_t, suid)
--libc_hidden_def(setresuid)
-+libc_hidden_weak(setresuid)
- 
- #elif defined(__NR_setresuid)
- 
-@@ -34,7 +34,7 @@ int setresuid(uid_t ruid, uid_t euid, uid_t suid)
- 	}
- 	return (__syscall_setresuid(ruid, euid, suid));
- }
--libc_hidden_def(setresuid)
-+libc_hidden_weak(setresuid)
- 
- #endif
- 
--- 
-2.3.2 (Apple Git-55)
-
diff --git a/package/uclibc/1.0.2/0002-Revert-Do-not-define-unimplemented-functions.patch b/package/uclibc/1.0.2/0002-Revert-Do-not-define-unimplemented-functions.patch
deleted file mode 100644
index 66780ce..0000000
--- a/package/uclibc/1.0.2/0002-Revert-Do-not-define-unimplemented-functions.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-From 650380248eaad577445c88b7314307d3acd166fc Mon Sep 17 00:00:00 2001
-From: Waldemar Brodkorb <wbx@openadk.org>
-Date: Sat, 25 Apr 2015 07:09:40 -0500
-Subject: [PATCH] Revert "Do not define unimplemented functions"
-
-This reverts commit bd3eaf83ef1b4954b6c0e7ba8bbdd29b2cd4a833.
-
-They are now implemented.
-
-Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
----
- include/math.h                             |  2 --
- libc/sysdeps/linux/common/bits/mathcalls.h | 18 ------------------
- 2 files changed, 20 deletions(-)
-
-diff --git a/include/math.h b/include/math.h
-index c79af3f..1b54c9e 100644
---- a/include/math.h
-+++ b/include/math.h
-@@ -118,7 +118,6 @@ __BEGIN_DECLS
- #  define _Mfloat_		float
- # endif
- # define _Mdouble_		_Mfloat_
--# define _Mdouble_is_float_
- # ifdef __STDC__
- #  define __MATH_PRECNAME(name,r) name##f##r
- # else
-@@ -127,7 +126,6 @@ __BEGIN_DECLS
- # define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_C99
- # define _Mdouble_END_NAMESPACE   __END_NAMESPACE_C99
- # include <bits/mathcalls.h>
--# undef _Mdouble_is_float_
- # undef	_Mdouble_
- # undef _Mdouble_BEGIN_NAMESPACE
- # undef _Mdouble_END_NAMESPACE
-diff --git a/libc/sysdeps/linux/common/bits/mathcalls.h b/libc/sysdeps/linux/common/bits/mathcalls.h
-index 3d7e34f..9bebb51 100644
---- a/libc/sysdeps/linux/common/bits/mathcalls.h
-+++ b/libc/sysdeps/linux/common/bits/mathcalls.h
-@@ -291,9 +291,7 @@ __END_NAMESPACE_C99
- #ifdef __USE_ISOC99
- __BEGIN_NAMESPACE_C99
- /* True gamma function.  */
--# ifndef _Mdouble_is_float_
- __MATHCALLI (tgamma,, (_Mdouble_))
--# endif
- __END_NAMESPACE_C99
- #endif
- 
-@@ -324,9 +322,7 @@ __MATHCALLX (nextafter,, (_Mdouble_ __x, _Mdouble_ __y), (__const__))
- libm_hidden_proto(nextafterl)
- # endif
- # if defined __USE_ISOC99 && !defined __LDBL_COMPAT
--#  ifndef _Mdouble_is_float_
- __MATHCALLX (nexttoward,, (_Mdouble_ __x, long double __y), (__const__))
--#  endif
- # endif
- 
- /* Return the remainder of integer divison X / Y with infinite precision.  */
-@@ -343,15 +339,11 @@ __MATHDECLI (int,ilogb,, (_Mdouble_ __x))
- 
- #ifdef __USE_ISOC99
- /* Return X times (2 to the Nth power).  */
--# ifndef _Mdouble_is_float_
- __MATHCALLI (scalbln,, (_Mdouble_ __x, long int __n))
--# endif
- 
- /* Round X to integral value in floating-point format using current
-    rounding direction, but do not raise inexact exception.  */
--# ifndef _Mdouble_is_float_
- __MATHCALLI (nearbyint,, (_Mdouble_ __x))
--# endif
- 
- /* Round X to nearest integral value, rounding halfway cases away from
-    zero.  */
-@@ -364,9 +356,7 @@ __MATHCALLX (trunc,, (_Mdouble_ __x), (__const__))
- /* Compute remainder of X and Y and put in *QUO a value with sign of x/y
-    and magnitude congruent `mod 2^n' to the magnitude of the integral
-    quotient x/y, with n >= 3.  */
--# ifndef _Mdouble_is_float_
- __MATHCALLI (remquo,, (_Mdouble_ __x, _Mdouble_ __y, int *__quo))
--# endif
- 
- 
- /* Conversion functions.  */
-@@ -383,19 +373,13 @@ __MATHDECLI (long long int,llround,, (_Mdouble_ __x))
- 
- 
- /* Return positive difference between X and Y.  */
--# ifndef _Mdouble_is_float_
- __MATHCALLI (fdim,, (_Mdouble_ __x, _Mdouble_ __y))
--# endif
- 
- /* Return maximum numeric value from X and Y.  */
--# ifndef _Mdouble_is_float_
- __MATHCALLI (fmax,, (_Mdouble_ __x, _Mdouble_ __y))
--# endif
- 
- /* Return minimum numeric value from X and Y.  */
--# ifndef _Mdouble_is_float_
- __MATHCALLI (fmin,, (_Mdouble_ __x, _Mdouble_ __y))
--# endif
- 
- 
- /* Classify given number.  */
-@@ -406,9 +390,7 @@ __MATHDECL_PRIV (int, signbit,, (_Mdouble_ __value), (__const__))
- 
- 
- /* Multiply-add function computed as a ternary operation.  */
--# ifndef _Mdouble_is_float_
- __MATHCALLI (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z))
--# endif
- #endif /* Use ISO C99.  */
- 
- #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
--- 
-2.3.2 (Apple Git-55)
-
diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in
index f69cc25..0e954d19 100644
--- a/package/uclibc/Config.in
+++ b/package/uclibc/Config.in
@@ -64,7 +64,7 @@ config BR2_UCLIBC_VERSION_STRING
 	string
 	default "0.9.33.2"	if BR2_UCLIBC_VERSION_0_9_33
 	default "arc-2014.12" if BR2_UCLIBC_VERSION_ARC_GIT
-	default "1.0.2"		if BR2_UCLIBC_VERSION_NG
+	default "1.0.3"		if BR2_UCLIBC_VERSION_NG
 	default BR2_USE_UCLIBC_SNAPSHOT	if BR2_UCLIBC_VERSION_SNAPSHOT
 
 config BR2_UCLIBC_CONFIG
diff --git a/package/uclibc/uclibc.hash b/package/uclibc/uclibc.hash
index fe60291..841c96b 100644
--- a/package/uclibc/uclibc.hash
+++ b/package/uclibc/uclibc.hash
@@ -2,7 +2,7 @@
 sha256	62333167b79afb0b25a843513288c67b59547acf653e8fbe62ee64e71ebd1587	uClibc-0.9.33.2.tar.xz
 
 # From http://www.uclibc-ng.org/trac/
-sha256  7e92e99995daa634cbdc63c297784df6e8fe39cc1d3bbd2d37eb5c3ced8a86e5        uClibc-ng-1.0.2.tar.xz
+sha256  b4c73fe3e7af4eeabf7510ee66ca85f775c3ed44d20b1bcd30c6ac481dd753cd        uClibc-ng-1.0.3.tar.xz
 
 # No hash for the ARC variant, comes from the github-helper
 none	xxx	uClibc-arc-2014.12.tar.gz
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 2/6] uclibc: add libgcc_s_resume fix
  2015-06-14 14:33 [Buildroot] [PATCH 0/6] Internal toolchain backend updates Thomas Petazzoni
  2015-06-14 14:33 ` [Buildroot] [PATCH 1/6] uclibc: bump uClibc-ng to 1.0.3 Thomas Petazzoni
@ 2015-06-14 14:33 ` Thomas Petazzoni
  2015-06-14 16:24   ` Baruch Siach
  2015-06-14 14:33 ` [Buildroot] [PATCH 3/6] gcc: add support for gcc 5.1 Thomas Petazzoni
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 20+ messages in thread
From: Thomas Petazzoni @ 2015-06-14 14:33 UTC (permalink / raw)
  To: buildroot

This commit adds a fix for building uClibc 0.9.33.2 and uClibc-ng
1.0.3 with gcc 5.1 on ARM, since we're about to add support for gcc
5.1.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../0.9.33.2/0071-Fix-libgcc_s_resume-issue.patch  | 53 ++++++++++++++++++++++
 .../1.0.3/0001-Fix-libgcc_s_resume-issue.patch     | 53 ++++++++++++++++++++++
 2 files changed, 106 insertions(+)
 create mode 100644 package/uclibc/0.9.33.2/0071-Fix-libgcc_s_resume-issue.patch
 create mode 100644 package/uclibc/1.0.3/0001-Fix-libgcc_s_resume-issue.patch

diff --git a/package/uclibc/0.9.33.2/0071-Fix-libgcc_s_resume-issue.patch b/package/uclibc/0.9.33.2/0071-Fix-libgcc_s_resume-issue.patch
new file mode 100644
index 0000000..8a165f3
--- /dev/null
+++ b/package/uclibc/0.9.33.2/0071-Fix-libgcc_s_resume-issue.patch
@@ -0,0 +1,53 @@
+From 7ed8bacef45a2537646e7235092bd2e5408cd0b5 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Sun, 14 Jun 2015 15:14:22 +0200
+Subject: [PATCH] Fix libgcc_s_resume issue
+
+When built with gcc 5.1, uClibc-ng fails to build with the following
+issue:
+
+   librt/librt_so.a(rt-unwind-resume.oS): In function `_Unwind_Resume':
+   rt-unwind-resume.c:(.text+0x3c): undefined reference to
+
+This commit fixes the code in a way similar to what was done in glibc
+in commit:
+
+   https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=175cef4163dd60f95106cfd5f593b8a4e09d02c9
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++-
+ libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c       | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
+index f4d6f41..a6a0515 100644
+--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
+@@ -27,7 +27,8 @@
+ #define __libc_fatal(x)         {/*write(STDERR_FILENO, x, strlen(x));*/ abort();}
+ 
+ static void *libgcc_s_handle;
+-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc)
++  __attribute_used__;
+ static _Unwind_Reason_Code (*libgcc_s_personality)
+   (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
+ static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
+diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c
+index f9a4ffb..e2e2e0b 100644
+--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c
++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c
+@@ -25,7 +25,8 @@
+ #define __libc_dlclose          dlclose
+ #define __libc_fatal(x)         {/*write(STDERR_FILENO, x, strlen(x));*/ abort();}
+ 
+-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc)
++  __attribute_used__;
+ static _Unwind_Reason_Code (*libgcc_s_personality)
+   (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
+ 
+-- 
+2.1.0
+
diff --git a/package/uclibc/1.0.3/0001-Fix-libgcc_s_resume-issue.patch b/package/uclibc/1.0.3/0001-Fix-libgcc_s_resume-issue.patch
new file mode 100644
index 0000000..a3cf0d7
--- /dev/null
+++ b/package/uclibc/1.0.3/0001-Fix-libgcc_s_resume-issue.patch
@@ -0,0 +1,53 @@
+From 8f3bfd31864c28bf5901fc92e0405c729c2204c9 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Sun, 14 Jun 2015 13:19:43 +0200
+Subject: [PATCH] Fix libgcc_s_resume issue
+
+When built with gcc 5.1, uClibc-ng fails to build with the following
+issue:
+
+   librt/librt_so.a(rt-unwind-resume.oS): In function `_Unwind_Resume':
+   rt-unwind-resume.c:(.text+0x3c): undefined reference to
+
+This commit fixes the code in a way similar to what was done in glibc
+in commit:
+
+   https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=175cef4163dd60f95106cfd5f593b8a4e09d02c9
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++-
+ libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c       | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
+index f4d6f41..a6a0515 100644
+--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
+@@ -27,7 +27,8 @@
+ #define __libc_fatal(x)         {/*write(STDERR_FILENO, x, strlen(x));*/ abort();}
+ 
+ static void *libgcc_s_handle;
+-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc)
++  __attribute_used__;
+ static _Unwind_Reason_Code (*libgcc_s_personality)
+   (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
+ static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
+diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c
+index f9a4ffb..e2e2e0b 100644
+--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c
++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c
+@@ -25,7 +25,8 @@
+ #define __libc_dlclose          dlclose
+ #define __libc_fatal(x)         {/*write(STDERR_FILENO, x, strlen(x));*/ abort();}
+ 
+-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc)
++  __attribute_used__;
+ static _Unwind_Reason_Code (*libgcc_s_personality)
+   (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
+ 
+-- 
+2.1.0
+
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 3/6] gcc: add support for gcc 5.1
  2015-06-14 14:33 [Buildroot] [PATCH 0/6] Internal toolchain backend updates Thomas Petazzoni
  2015-06-14 14:33 ` [Buildroot] [PATCH 1/6] uclibc: bump uClibc-ng to 1.0.3 Thomas Petazzoni
  2015-06-14 14:33 ` [Buildroot] [PATCH 2/6] uclibc: add libgcc_s_resume fix Thomas Petazzoni
@ 2015-06-14 14:33 ` Thomas Petazzoni
  2015-06-20 15:12   ` Bernd Kuhls
  2015-06-22 22:18   ` Peter Korsgaard
  2015-06-14 14:33 ` [Buildroot] [PATCH 4/6] gcc: switch to gcc 4.9 as the default version Thomas Petazzoni
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 20+ messages in thread
From: Thomas Petazzoni @ 2015-06-14 14:33 UTC (permalink / raw)
  To: buildroot

This commit adds support for gcc 5.1 in Buildroot. In terms of gcc
patches, compared to gcc 4.9.x:

 * Kept as is, sometimes after minor adjusments:

   100-uclibc-conf.patch
   301-missing-execinfo_h.patch
   810-arm-softfloat-libgcc.patch
   830-arm_unbreak_armv4t.patch
   840-microblaze-enable-dwarf-eh-support.patch
   850-libstdcxx-uclibc-c99.patch
   860-cilk-wchar.patch

 * Dropped:

   110-pr64896.patch
   111-pr65730.patch

 * Split in multiple parts:

   900-musl-support.patch

   The patches from Crosstool-NG for muls support are used instead of
   one single patch.

 * Renamed:

   910-gcc-poison-system-directories.patch to
   200-gcc-poison-system-directories.patch

   920-libgcc-remove-unistd-header.patch to
   201-libgcc-remove-unistd-header.patch

   Since the 9xx part of the series is now used by the various musl
   related patches.

We have tested the following configurations, with a minimal Busybox
system:

 * ARM, uClibc-ng
 * ARM, glibc
 * ARM, musl
 * x86, uClibc-ng and uClibc 0.9.33.2
 * x86, glibc
 * x86, musl

All of the configurations built fine. All the configurations boot fine
in Qemu, except x86/uClibc (either ng or 0.9.33.2), it segfaults when
running init:

devtmpfs: mounted
Freeing unused kernel memory: 300K (c1389000 - c13d4000)
init[1]: segfault at 0 ip b77708c1 sp bfa9bb0c error 4 in ld-uClibc-0.9.33.2.so[b776c000+6000]
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

We'll give some time for the uClibc developers to fix the problem
before taking other measures in Buildroot to exclude gcc 5.1 from a
x86/uClibc configuration.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/gcc/5.1.0/100-uclibc-conf.patch            |  15 +
 .../5.1.0/200-gcc-poison-system-directories.patch  | 207 +++++++++++++
 .../5.1.0/201-libgcc-remove-unistd-header.patch    |  14 +
 package/gcc/5.1.0/301-missing-execinfo_h.patch     |  13 +
 package/gcc/5.1.0/810-arm-softfloat-libgcc.patch   |  30 ++
 package/gcc/5.1.0/830-arm_unbreak_armv4t.patch     |  15 +
 .../840-microblaze-enable-dwarf-eh-support.patch   | 166 +++++++++++
 package/gcc/5.1.0/850-libstdcxx-uclibc-c99.patch   | 273 ++++++++++++++++++
 package/gcc/5.1.0/860-cilk-wchar.patch             |  56 ++++
 .../5.1.0/900-libitm-fixes-for-musl-support.patch  |  65 +++++
 .../901-fixincludes-update-for-musl-support.patch  |  32 ++
 package/gcc/5.1.0/902-unwind-fix-for-musl.patch    |  36 +++
 ...dc++-libgfortran-gthr-workaround-for-musl.patch |  80 +++++
 package/gcc/5.1.0/904-musl-libc-config.patch       | 321 +++++++++++++++++++++
 .../gcc/5.1.0/905-add-musl-support-to-gcc.patch    | 130 +++++++++
 package/gcc/5.1.0/906-mips-musl-support.patch      |  37 +++
 package/gcc/5.1.0/907-x86-musl-support.patch       |  45 +++
 package/gcc/5.1.0/908-arm-musl-support.patch       |  45 +++
 package/gcc/5.1.0/909-aarch64-musl-support.patch   |  33 +++
 package/gcc/Config.in.host                         |   8 +
 package/gcc/gcc.hash                               |   2 +
 21 files changed, 1623 insertions(+)
 create mode 100644 package/gcc/5.1.0/100-uclibc-conf.patch
 create mode 100644 package/gcc/5.1.0/200-gcc-poison-system-directories.patch
 create mode 100644 package/gcc/5.1.0/201-libgcc-remove-unistd-header.patch
 create mode 100644 package/gcc/5.1.0/301-missing-execinfo_h.patch
 create mode 100644 package/gcc/5.1.0/810-arm-softfloat-libgcc.patch
 create mode 100644 package/gcc/5.1.0/830-arm_unbreak_armv4t.patch
 create mode 100644 package/gcc/5.1.0/840-microblaze-enable-dwarf-eh-support.patch
 create mode 100644 package/gcc/5.1.0/850-libstdcxx-uclibc-c99.patch
 create mode 100644 package/gcc/5.1.0/860-cilk-wchar.patch
 create mode 100644 package/gcc/5.1.0/900-libitm-fixes-for-musl-support.patch
 create mode 100644 package/gcc/5.1.0/901-fixincludes-update-for-musl-support.patch
 create mode 100644 package/gcc/5.1.0/902-unwind-fix-for-musl.patch
 create mode 100644 package/gcc/5.1.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch
 create mode 100644 package/gcc/5.1.0/904-musl-libc-config.patch
 create mode 100644 package/gcc/5.1.0/905-add-musl-support-to-gcc.patch
 create mode 100644 package/gcc/5.1.0/906-mips-musl-support.patch
 create mode 100644 package/gcc/5.1.0/907-x86-musl-support.patch
 create mode 100644 package/gcc/5.1.0/908-arm-musl-support.patch
 create mode 100644 package/gcc/5.1.0/909-aarch64-musl-support.patch

diff --git a/package/gcc/5.1.0/100-uclibc-conf.patch b/package/gcc/5.1.0/100-uclibc-conf.patch
new file mode 100644
index 0000000..73d1f0d
--- /dev/null
+++ b/package/gcc/5.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/package/gcc/5.1.0/200-gcc-poison-system-directories.patch b/package/gcc/5.1.0/200-gcc-poison-system-directories.patch
new file mode 100644
index 0000000..f41c0c4
--- /dev/null
+++ b/package/gcc/5.1.0/200-gcc-poison-system-directories.patch
@@ -0,0 +1,207 @@
+From 160397ef3c3331099af028f1b8d3e085b07d88ad Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:59:00 +0400
+Subject: [PATCH 16/35] gcc: poison-system-directories
+
+Adapted to Buildroot and gcc 4.9.1 by Thomas Petazzoni, especially the
+addition of the BR_COMPILER_PARANOID_UNSAFE_PATH environment variable.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Upstream-Status: Inappropriate [distribution: codesourcery]
+---
+ gcc/Makefile.in     |    2 +-
+ gcc/common.opt      |    4 ++++
+ gcc/config.in       |    6 ++++++
+ gcc/configure       |   20 ++++++++++++++++++--
+ gcc/configure.ac    |   10 ++++++++++
+ gcc/doc/invoke.texi |    9 +++++++++
+ gcc/gcc.c           |    2 ++
+ gcc/incpath.c       |   19 +++++++++++++++++++
+ 8 files changed, 69 insertions(+), 3 deletions(-)
+
+Index: b/gcc/common.opt
+===================================================================
+--- a/gcc/common.opt
++++ b/gcc/common.opt
+@@ -623,6 +623,10 @@
+ Common Var(warn_return_local_addr) Init(1) Warning
+ Warn about returning a pointer/reference to a local or temporary variable.
+ 
++Wpoison-system-directories
++Common Var(flag_poison_system_directories) Init(1) Warning
++Warn for -I and -L options using system directories if cross compiling
++
+ Wshadow
+ Common Var(warn_shadow) Warning
+ Warn when one local variable shadows another
+Index: b/gcc/config.in
+===================================================================
+--- a/gcc/config.in
++++ b/gcc/config.in
+@@ -168,6 +168,12 @@
+ #endif
+ 
+ 
++/* Define to warn for use of native system header directories */
++#ifndef USED_FOR_TARGET
++#undef ENABLE_POISON_SYSTEM_DIRECTORIES
++#endif
++
++
+ /* Define if you want all operations on RTL (the basic data structure of the
+    optimizer and back end) to be checked for dynamic type safety at runtime.
+    This is quite expensive. */
+Index: b/gcc/configure
+===================================================================
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -932,6 +932,7 @@
+ enable_maintainer_mode
+ enable_link_mutex
+ enable_version_specific_runtime_libs
++enable_poison_system_directories
+ enable_plugin
+ enable_host_shared
+ enable_libquadmath_support
+@@ -1661,6 +1662,8 @@
+   --enable-version-specific-runtime-libs
+                           specify that runtime libraries should be installed
+                           in a compiler-specific directory
++  --enable-poison-system-directories
++                          warn for use of native system header directories
+   --enable-plugin         enable plugin support
+   --enable-host-shared    build host code as shared libraries
+   --disable-libquadmath-support
+@@ -28087,6 +28090,19 @@
+ fi
+ 
+ 
++# Check whether --enable-poison-system-directories was given.
++if test "${enable_poison_system_directories+set}" = set; then :
++  enableval=$enable_poison_system_directories;
++else
++  enable_poison_system_directories=no
++fi
++
++if test "x${enable_poison_system_directories}" = "xyes"; then
++
++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
++
++fi
++
+ # Substitute configuration variables
+ 
+ 
+Index: b/gcc/configure.ac
+===================================================================
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -5571,6 +5571,16 @@
+                 [specify that runtime libraries should be
+                  installed in a compiler-specific directory])])
+ 
++AC_ARG_ENABLE([poison-system-directories],
++             AS_HELP_STRING([--enable-poison-system-directories],
++                            [warn for use of native system header directories]),,
++             [enable_poison_system_directories=no])
++if test "x${enable_poison_system_directories}" = "xyes"; then
++  AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
++           [1],
++           [Define to warn for use of native system header directories])
++fi
++
+ # Substitute configuration variables
+ AC_SUBST(subdirs)
+ AC_SUBST(srcdir)
+Index: b/gcc/doc/invoke.texi
+===================================================================
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -269,6 +269,7 @@
+ -Woverlength-strings  -Wpacked  -Wpacked-bitfield-compat  -Wpadded @gol
+ -Wparentheses  -Wpedantic-ms-format -Wno-pedantic-ms-format @gol
+ -Wpointer-arith  -Wno-pointer-to-int-cast @gol
++-Wno-poison-system-directories @gol
+ -Wredundant-decls  -Wno-return-local-addr @gol
+ -Wreturn-type  -Wsequence-point  -Wshadow  -Wno-shadow-ivar @gol
+ -Wshift-count-negative -Wshift-count-overflow @gol
+@@ -4432,6 +4433,14 @@
+ most targets, it is made up of code and thus requires the stack to be
+ made executable in order for the program to work properly.
+ 
++ at item -Wno-poison-system-directories
++ at opindex Wno-poison-system-directories
++Do not warn for @option{-I} or @option{-L} options using system
++directories such as @file{/usr/include} when cross compiling.  This
++option is intended for use in chroot environments when such
++directories contain the correct headers and libraries for the target
++system rather than the host.
++
+ @item -Wfloat-equal
+ @opindex Wfloat-equal
+ @opindex Wno-float-equal
+Index: b/gcc/gcc.c
+===================================================================
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -835,6 +835,8 @@
+    "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
+    "%X %{o*} %{e*} %{N} %{n} %{r}\
+     %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} " VTABLE_VERIFICATION_SPEC " \
++    %{Wno-poison-system-directories:--no-poison-system-directories}\
++    %{Werror=poison-system-directories:--error-poison-system-directories}\
+     %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\
+     " CHKP_SPEC " \
+     %{fopenacc|fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\
+@@ -4244,6 +4246,12 @@
+       gcc_assert (!compare_debug_opt);
+     }
+ 
++  temp = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH");
++  if (temp && strlen(temp) > 0)
++    {
++      save_switch("-Werror=poison-system-directories", 0, NULL, false, true);
++    }
++
+   /* Set up the search paths.  We add directories that we expect to
+      contain GNU Toolchain components before directories specified by
+      the machine description so that we will find GNU components (like
+Index: b/gcc/incpath.c
+===================================================================
+--- a/gcc/incpath.c
++++ b/gcc/incpath.c
+@@ -28,6 +28,7 @@
+ #include "intl.h"
+ #include "incpath.h"
+ #include "cppdefault.h"
++#include "diagnostic-core.h"
+ 
+ /* Microsoft Windows does not natively support inodes.
+    VMS has non-numeric inodes.  */
+@@ -383,6 +384,24 @@
+ 	}
+       fprintf (stderr, _("End of search list.\n"));
+     }
++
++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
++  if (flag_poison_system_directories)
++    {
++       struct cpp_dir *p;
++
++       for (p = heads[QUOTE]; p; p = p->next)
++         {
++          if ((!strncmp (p->name, "/usr/include", 12))
++              || (!strncmp (p->name, "/usr/local/include", 18))
++              || (!strncmp (p->name, "/usr/X11R6/include", 18)))
++            warning (OPT_Wpoison_system_directories,
++                     "include location \"%s\" is unsafe for "
++                     "cross-compilation",
++                     p->name);
++         }
++    }
++#endif
+ }
+ 
+ /* Use given -I paths for #include "..." but not #include <...>, and
diff --git a/package/gcc/5.1.0/201-libgcc-remove-unistd-header.patch b/package/gcc/5.1.0/201-libgcc-remove-unistd-header.patch
new file mode 100644
index 0000000..20d1c06
--- /dev/null
+++ b/package/gcc/5.1.0/201-libgcc-remove-unistd-header.patch
@@ -0,0 +1,14 @@
+Upstream status: In progress
+
+Index: b/libgcc/config/nios2/linux-atomic.c
+===================================================================
+--- a/libgcc/config/nios2/linux-atomic.c
++++ b/libgcc/config/nios2/linux-atomic.c
+@@ -20,7 +20,6 @@
+ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+ <http://www.gnu.org/licenses/>.  */
+ 
+-#include <asm/unistd.h>
+ #define EFAULT  14
+ #define EBUSY   16
+ #define ENOSYS  38
diff --git a/package/gcc/5.1.0/301-missing-execinfo_h.patch b/package/gcc/5.1.0/301-missing-execinfo_h.patch
new file mode 100644
index 0000000..2d0e7ba
--- /dev/null
+++ b/package/gcc/5.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/package/gcc/5.1.0/810-arm-softfloat-libgcc.patch b/package/gcc/5.1.0/810-arm-softfloat-libgcc.patch
new file mode 100644
index 0000000..5efa7fd
--- /dev/null
+++ b/package/gcc/5.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/package/gcc/5.1.0/830-arm_unbreak_armv4t.patch b/package/gcc/5.1.0/830-arm_unbreak_armv4t.patch
new file mode 100644
index 0000000..b730059
--- /dev/null
+++ b/package/gcc/5.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/package/gcc/5.1.0/840-microblaze-enable-dwarf-eh-support.patch b/package/gcc/5.1.0/840-microblaze-enable-dwarf-eh-support.patch
new file mode 100644
index 0000000..9d29090
--- /dev/null
+++ b/package/gcc/5.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/package/gcc/5.1.0/850-libstdcxx-uclibc-c99.patch b/package/gcc/5.1.0/850-libstdcxx-uclibc-c99.patch
new file mode 100644
index 0000000..9e97d94
--- /dev/null
+++ b/package/gcc/5.1.0/850-libstdcxx-uclibc-c99.patch
@@ -0,0 +1,273 @@
+Allow C99-depending features of libstdc++ with uClibc
+
+The libstdc++ code is fairly restrictive on how it checks for C99
+compatibility: it requires *complete* C99 support to enable certain
+features. For example, uClibc provides a good number of C99 features,
+but not C99 complex number support. For this reason, libstdc++
+completely disables many the standard C++ methods that can in fact
+work because uClibc provides the necessary functions.
+
+This patch is similar and highly inspired from
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393, but implemented in
+a way that doesn't involve changing the configure.ac script, as
+autoreconfiguring gcc is complicated. It simply relies on the fact
+that uClibc defines the __UCLIBC__ definition.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/libstdc++-v3/config/locale/generic/c_locale.h
+===================================================================
+--- a/libstdc++-v3/config/locale/generic/c_locale.h
++++ b/libstdc++-v3/config/locale/generic/c_locale.h
+@@ -70,7 +70,7 @@
+     __builtin_va_list __args;
+     __builtin_va_start(__args, __fmt);
+ 
+-#ifdef _GLIBCXX_USE_C99
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
+     const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
+ #else
+     const int __ret = __builtin_vsprintf(__out, __fmt, __args);
+Index: b/libstdc++-v3/config/locale/gnu/c_locale.h
+===================================================================
+--- a/libstdc++-v3/config/locale/gnu/c_locale.h
++++ b/libstdc++-v3/config/locale/gnu/c_locale.h
+@@ -88,7 +88,7 @@
+     __builtin_va_list __args;
+     __builtin_va_start(__args, __fmt);
+ 
+-#ifdef _GLIBCXX_USE_C99
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
+     const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
+ #else
+     const int __ret = __builtin_vsprintf(__out, __fmt, __args);
+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
+@@ -5239,7 +5239,7 @@
+ _GLIBCXX_END_NAMESPACE_VERSION
+ } // namespace
+ 
+-#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99)
++#if __cplusplus >= 201103L && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__))
+ 
+ #include <ext/string_conversions.h>
+ 
+Index: b/libstdc++-v3/include/bits/locale_facets.tcc
+===================================================================
+--- a/libstdc++-v3/include/bits/locale_facets.tcc
++++ b/libstdc++-v3/include/bits/locale_facets.tcc
+@@ -992,7 +992,7 @@
+ 	char __fbuf[16];
+ 	__num_base::_S_format_float(__io, __fbuf, __mod);
+ 
+-#ifdef _GLIBCXX_USE_C99
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
+ 	// Precision is always used except for hexfloat format.
+ 	const bool __use_prec =
+ 	  (__io.flags() & ios_base::floatfield) != ios_base::floatfield;
+Index: b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
+===================================================================
+--- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc
++++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
+@@ -578,7 +578,7 @@
+     {
+       const locale __loc = __io.getloc();
+       const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+-#ifdef _GLIBCXX_USE_C99
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
+       // First try a buffer perhaps big enough.
+       int __cs_size = 64;
+       char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
+Index: b/libstdc++-v3/include/c_compatibility/math.h
+===================================================================
+--- a/libstdc++-v3/include/c_compatibility/math.h
++++ b/libstdc++-v3/include/c_compatibility/math.h
+@@ -56,7 +56,7 @@
+ using std::floor;
+ using std::fmod;
+ 
+-#if _GLIBCXX_USE_C99
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
+ using std::fpclassify;
+ using std::isfinite;
+ using std::isinf;
+Index: b/libstdc++-v3/include/c_compatibility/wchar.h
+===================================================================
+--- a/libstdc++-v3/include/c_compatibility/wchar.h
++++ b/libstdc++-v3/include/c_compatibility/wchar.h
+@@ -103,7 +103,7 @@
+ using std::wmemset;
+ using std::wcsftime;
+ 
+-#if _GLIBCXX_USE_C99
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
+ using std::wcstold;
+ using std::wcstoll;
+ using std::wcstoull;
+Index: b/libstdc++-v3/include/c_global/cstdlib
+===================================================================
+--- a/libstdc++-v3/include/c_global/cstdlib
++++ b/libstdc++-v3/include/c_global/cstdlib
+@@ -195,7 +195,7 @@
+ _GLIBCXX_END_NAMESPACE_VERSION
+ } // namespace
+ 
+-#if _GLIBCXX_USE_C99
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
+ 
+ #undef _Exit
+ #undef llabs
+Index: b/libstdc++-v3/include/c_global/cwchar
+===================================================================
+--- a/libstdc++-v3/include/c_global/cwchar
++++ b/libstdc++-v3/include/c_global/cwchar
+@@ -232,7 +232,7 @@
+ _GLIBCXX_END_NAMESPACE_VERSION
+ } // namespace
+ 
+-#if _GLIBCXX_USE_C99
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
+ 
+ #undef wcstold
+ #undef wcstoll
+@@ -289,7 +289,7 @@
+   using std::vwscanf;
+ #endif
+ 
+-#if _GLIBCXX_USE_C99
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
+   using std::wcstold;
+   using std::wcstoll;
+   using std::wcstoull;
+Index: b/libstdc++-v3/include/c_std/cstdio
+===================================================================
+--- a/libstdc++-v3/include/c_std/cstdio
++++ b/libstdc++-v3/include/c_std/cstdio
+@@ -144,7 +144,7 @@
+   using ::vsprintf;
+ } // namespace std
+ 
+-#if _GLIBCXX_USE_C99
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
+ 
+ #undef snprintf
+ #undef vfscanf
+Index: b/libstdc++-v3/include/c_std/cstdlib
+===================================================================
+--- a/libstdc++-v3/include/c_std/cstdlib
++++ b/libstdc++-v3/include/c_std/cstdlib
+@@ -192,7 +192,7 @@
+ _GLIBCXX_END_NAMESPACE_VERSION
+ } // namespace
+ 
+-#if _GLIBCXX_USE_C99
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
+ 
+ #undef _Exit
+ #undef llabs
+Index: b/libstdc++-v3/include/c_std/cwchar
+===================================================================
+--- a/libstdc++-v3/include/c_std/cwchar
++++ b/libstdc++-v3/include/c_std/cwchar
+@@ -228,7 +228,7 @@
+ _GLIBCXX_END_NAMESPACE_VERSION
+ } // namespace
+ 
+-#if _GLIBCXX_USE_C99
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
+ 
+ #undef wcstold
+ #undef wcstoll
+Index: b/libstdc++-v3/include/ext/vstring.h
+===================================================================
+--- a/libstdc++-v3/include/ext/vstring.h
++++ b/libstdc++-v3/include/ext/vstring.h
+@@ -2680,7 +2680,7 @@
+ _GLIBCXX_END_NAMESPACE_VERSION
+ } // namespace
+ 
+-#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99))
++#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)))
+ 
+ #include <ext/string_conversions.h>
+ 
+Index: b/libstdc++-v3/include/tr1/cstdio
+===================================================================
+--- a/libstdc++-v3/include/tr1/cstdio
++++ b/libstdc++-v3/include/tr1/cstdio
+@@ -33,7 +33,7 @@
+ 
+ #include <cstdio>
+ 
+-#if _GLIBCXX_USE_C99
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
+ 
+ namespace std _GLIBCXX_VISIBILITY(default)
+ {
+Index: b/libstdc++-v3/include/tr1/cstdlib
+===================================================================
+--- a/libstdc++-v3/include/tr1/cstdlib
++++ b/libstdc++-v3/include/tr1/cstdlib
+@@ -35,7 +35,7 @@
+ 
+ #if _GLIBCXX_HOSTED
+ 
+-#if _GLIBCXX_USE_C99
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
+ 
+ namespace std _GLIBCXX_VISIBILITY(default)
+ {
+Index: b/libstdc++-v3/include/tr1/cwchar
+===================================================================
+--- a/libstdc++-v3/include/tr1/cwchar
++++ b/libstdc++-v3/include/tr1/cwchar
+@@ -52,7 +52,7 @@
+   using std::vwscanf;
+ #endif
+ 
+-#if _GLIBCXX_USE_C99
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
+   using std::wcstold;
+   using std::wcstoll;
+   using std::wcstoull;
+Index: b/libstdc++-v3/include/tr1/stdlib.h
+===================================================================
+--- a/libstdc++-v3/include/tr1/stdlib.h
++++ b/libstdc++-v3/include/tr1/stdlib.h
+@@ -33,7 +33,7 @@
+ 
+ #if _GLIBCXX_HOSTED
+ 
+-#if _GLIBCXX_USE_C99
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
+ 
+ using std::tr1::atoll;
+ using std::tr1::strtoll;
+Index: b/libstdc++-v3/src/c++11/debug.cc
+===================================================================
+--- a/libstdc++-v3/src/c++11/debug.cc
++++ b/libstdc++-v3/src/c++11/debug.cc
+@@ -788,7 +788,7 @@
+ 				     int __n __attribute__ ((__unused__)), 
+ 				     const char* __fmt, _Tp __s) const throw ()
+     {
+-#ifdef _GLIBCXX_USE_C99
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
+       std::snprintf(__buf, __n, __fmt, __s);
+ #else
+       std::sprintf(__buf, __fmt, __s);
+Index: b/libstdc++-v3/include/c_global/cstdio
+===================================================================
+--- a/libstdc++-v3/include/c_global/cstdio
++++ b/libstdc++-v3/include/c_global/cstdio
+@@ -146,7 +146,7 @@
+   using ::vsprintf;
+ } // namespace
+ 
+-#if _GLIBCXX_USE_C99
++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
+ 
+ #undef snprintf
+ #undef vfscanf
diff --git a/package/gcc/5.1.0/860-cilk-wchar.patch b/package/gcc/5.1.0/860-cilk-wchar.patch
new file mode 100644
index 0000000..1d9916f
--- /dev/null
+++ b/package/gcc/5.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/package/gcc/5.1.0/900-libitm-fixes-for-musl-support.patch b/package/gcc/5.1.0/900-libitm-fixes-for-musl-support.patch
new file mode 100644
index 0000000..fdf4ee7
--- /dev/null
+++ b/package/gcc/5.1.0/900-libitm-fixes-for-musl-support.patch
@@ -0,0 +1,65 @@
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 22 Apr 2015 14:11:25 +0000 (+0000)
+Subject: libitm fixes for musl support
+X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=e53a4d49c3d03ab8eaddb073cf972c1c46d75338
+
+libitm fixes for musl support
+
+On behalf of Szabolcs.Nagy at arm.com
+
+2015-04-22  Gregor Richards  <gregor.richards@uwaterloo.ca>
+
+       * config/arm/hwcap.cc: Use fcntl.h instead of sys/fcntl.h.
+       * config/linux/x86/tls.h: Only use __GLIBC_PREREQ if defined.
+
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk at 222325 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+
+Index: b/libitm/config/arm/hwcap.cc
+===================================================================
+--- a/libitm/config/arm/hwcap.cc
++++ b/libitm/config/arm/hwcap.cc
+@@ -40,7 +40,7 @@
+ 
+ #ifdef __linux__
+ #include <unistd.h>
+-#include <sys/fcntl.h>
++#include <fcntl.h>
+ #include <elf.h>
+ 
+ static void __attribute__((constructor))
+Index: b/libitm/config/linux/x86/tls.h
+===================================================================
+--- a/libitm/config/linux/x86/tls.h
++++ b/libitm/config/linux/x86/tls.h
+@@ -25,16 +25,19 @@
+ #ifndef LIBITM_X86_TLS_H
+ #define LIBITM_X86_TLS_H 1
+ 
+-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
++#if defined(__GLIBC_PREREQ)
++#if __GLIBC_PREREQ(2, 10)
+ /* Use slots in the TCB head rather than __thread lookups.
+    GLIBC has reserved words 10 through 13 for TM.  */
+ #define HAVE_ARCH_GTM_THREAD 1
+ #define HAVE_ARCH_GTM_THREAD_DISP 1
+ #endif
++#endif
+ 
+ #include "config/generic/tls.h"
+ 
+-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
++#if defined(__GLIBC_PREREQ)
++#if __GLIBC_PREREQ(2, 10)
+ namespace GTM HIDDEN {
+ 
+ #ifdef __x86_64__
+@@ -101,5 +104,6 @@
+ 
+ } // namespace GTM
+ #endif /* >= GLIBC 2.10 */
++#endif
+ 
+ #endif // LIBITM_X86_TLS_H
diff --git a/package/gcc/5.1.0/901-fixincludes-update-for-musl-support.patch b/package/gcc/5.1.0/901-fixincludes-update-for-musl-support.patch
new file mode 100644
index 0000000..13c08d6
--- /dev/null
+++ b/package/gcc/5.1.0/901-fixincludes-update-for-musl-support.patch
@@ -0,0 +1,32 @@
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 22 Apr 2015 14:18:16 +0000 (+0000)
+Subject: fixincludes update for musl support
+X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=2dc727de2e87c2756a514cbb43cea23c99deaa3d
+
+fixincludes update for musl support
+
+On behalf of Szabolcs.Nagy at arm.com
+
+2015-04-22  Gregor Richards  <gregor.richards@uwaterloo.ca>
+
+	* mkfixinc.sh: Add *-musl* with no fixes.
+
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk at 222327 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+
+Index: b/fixincludes/mkfixinc.sh
+===================================================================
+--- a/fixincludes/mkfixinc.sh
++++ b/fixincludes/mkfixinc.sh
+@@ -19,7 +19,8 @@
+     powerpc-*-eabi*    | \
+     powerpc-*-rtems*   | \
+     powerpcle-*-eabisim* | \
+-    powerpcle-*-eabi* )
++    powerpcle-*-eabi* | \
++    *-musl* )
+ 	#  IF there is no include fixing,
+ 	#  THEN create a no-op fixer and exit
+ 	(echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
diff --git a/package/gcc/5.1.0/902-unwind-fix-for-musl.patch b/package/gcc/5.1.0/902-unwind-fix-for-musl.patch
new file mode 100644
index 0000000..ef47054
--- /dev/null
+++ b/package/gcc/5.1.0/902-unwind-fix-for-musl.patch
@@ -0,0 +1,36 @@
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 22 Apr 2015 14:20:01 +0000 (+0000)
+Subject: unwind fix for musl
+X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=a2e31d0681d8a47389b8a3552622fbd9827bcef4
+
+unwind fix for musl
+
+On behalf of szabolcs.nagy at arm.com
+
+2015-04-22  Gregor Richards  <gregor.richards@uwaterloo.ca>
+	    Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	* unwind-dw2-fde-dip.c (USE_PT_GNU_EH_FRAME): Define it on
+	Linux if target provides dl_iterate_phdr.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk at 222328 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+
+Index: b/libgcc/unwind-dw2-fde-dip.c
+===================================================================
+--- a/libgcc/unwind-dw2-fde-dip.c
++++ b/libgcc/unwind-dw2-fde-dip.c
+@@ -59,6 +59,12 @@
+ 
+ #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
+     && defined(TARGET_DL_ITERATE_PHDR) \
++    && defined(__linux__)
++# define USE_PT_GNU_EH_FRAME
++#endif
++
++#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
++    && defined(TARGET_DL_ITERATE_PHDR) \
+     && (defined(__DragonFly__) || defined(__FreeBSD__))
+ # define ElfW __ElfN
+ # define USE_PT_GNU_EH_FRAME
diff --git a/package/gcc/5.1.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch b/package/gcc/5.1.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch
new file mode 100644
index 0000000..c852131
--- /dev/null
+++ b/package/gcc/5.1.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch
@@ -0,0 +1,80 @@
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 22 Apr 2015 14:24:11 +0000 (+0000)
+Subject: libstdc++, libgfortran gthr workaround for musl
+X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=1e5f711c11cb80ce609db9e9c1d8b2da0f7b5b61
+
+libstdc++, libgfortran gthr workaround for musl
+
+On behalf of szabolcs.nagy at arm.com
+
+[libstdc++-v3/]
+2015-04-22  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	* config/os/generic/os_defines.h (_GLIBCXX_GTHREAD_USE_WEAK): Define.
+	* configure.host (os_include_dir): Set to "os/generic" for linux-musl*.
+
+[libgfortran/]
+2015-04-22  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	* acinclude.m4 (GTHREAD_USE_WEAK): Define as 0 for *-*-musl*.
+	* configure: Regenerate.
+
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk at 222329 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+
+Index: b/libgfortran/acinclude.m4
+===================================================================
+--- a/libgfortran/acinclude.m4
++++ b/libgfortran/acinclude.m4
+@@ -100,7 +100,7 @@
+ 	      [Define to 1 if the target supports #pragma weak])
+   fi
+   case "$host" in
+-    *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* )
++    *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
+       AC_DEFINE(GTHREAD_USE_WEAK, 0,
+ 		[Define to 0 if the target shouldn't use #pragma weak])
+       ;;
+Index: b/libgfortran/configure
+===================================================================
+--- a/libgfortran/configure
++++ b/libgfortran/configure
+@@ -26447,7 +26447,7 @@
+ 
+   fi
+   case "$host" in
+-    *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* )
++    *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
+ 
+ $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h
+ 
+Index: b/libstdc++-v3/config/os/generic/os_defines.h
+===================================================================
+--- a/libstdc++-v3/config/os/generic/os_defines.h
++++ b/libstdc++-v3/config/os/generic/os_defines.h
+@@ -33,4 +33,9 @@
+ // System-specific #define, typedefs, corrections, etc, go here.  This
+ // file will come before all others.
+ 
++// Disable the weak reference logic in gthr.h for os/generic because it
++// is broken on every platform unless there is implementation specific
++// workaround in gthr-posix.h and at link-time for static linking.
++#define _GLIBCXX_GTHREAD_USE_WEAK 0
++
+ #endif
+Index: b/libstdc++-v3/configure.host
+===================================================================
+--- a/libstdc++-v3/configure.host
++++ b/libstdc++-v3/configure.host
+@@ -271,6 +271,9 @@
+   freebsd*)
+     os_include_dir="os/bsd/freebsd"
+     ;;
++  linux-musl*)
++    os_include_dir="os/generic"
++    ;;
+   gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
+     if [ "$uclibc" = "yes" ]; then
+       os_include_dir="os/uclibc"
diff --git a/package/gcc/5.1.0/904-musl-libc-config.patch b/package/gcc/5.1.0/904-musl-libc-config.patch
new file mode 100644
index 0000000..c4eddb4
--- /dev/null
+++ b/package/gcc/5.1.0/904-musl-libc-config.patch
@@ -0,0 +1,321 @@
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 8 May 2015 08:25:47 +0000 (+0000)
+Subject: [PATCH 2/13] musl libc config
+X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=a9173ceabaf29c16f8ef226fbf98af373a4b2ceb
+
+[PATCH 2/13] musl libc config
+
+2015-05-08  Gregor Richards  <gregor.richards@uwaterloo.ca>
+	    Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	* config.gcc (LIBC_MUSL): New tm_defines macro.
+	* config/linux.h (OPTION_MUSL): Define.
+	(MUSL_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER32,)
+	(MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32,)
+	(INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,)
+	(INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,)
+	(INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define.
+	* config/linux.opt (mmusl): New option.
+	* doc/invoke.texi (GNU/Linux Options): Document -mmusl.
+	* configure.ac (gcc_cv_libc_provides_ssp): Add *-*-musl*.
+	(gcc_cv_target_dl_iterate_phdr): Add *-linux-musl*.
+	* configure: Regenerate.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk at 222904 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+
+Index: b/gcc/config.gcc
+===================================================================
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -575,7 +575,7 @@
+ esac
+ 
+ # Common C libraries.
+-tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
++tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
+ 
+ # 32-bit x86 processors supported by --with-arch=.  Each processor
+ # MUST be separated by exactly one space.
+@@ -720,6 +720,9 @@
+     *-*-*uclibc*)
+       tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
+       ;;
++    *-*-*musl*)
++      tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
++      ;;
+     *)
+       tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
+       ;;
+Index: b/gcc/config/linux.h
+===================================================================
+--- a/gcc/config/linux.h
++++ b/gcc/config/linux.h
+@@ -32,10 +32,12 @@
+ #define OPTION_GLIBC  (DEFAULT_LIBC == LIBC_GLIBC)
+ #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
+ #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
++#define OPTION_MUSL   (DEFAULT_LIBC == LIBC_MUSL)
+ #else
+ #define OPTION_GLIBC  (linux_libc == LIBC_GLIBC)
+ #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
+ #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
++#define OPTION_MUSL   (linux_libc == LIBC_MUSL)
+ #endif
+ 
+ #define GNU_USER_TARGET_OS_CPP_BUILTINS()			\
+@@ -50,21 +52,25 @@
+     } while (0)
+ 
+ /* Determine which dynamic linker to use depending on whether GLIBC or
+-   uClibc or Bionic is the default C library and whether
+-   -muclibc or -mglibc or -mbionic has been passed to change the default.  */
++   uClibc or Bionic or musl is the default C library and whether
++   -muclibc or -mglibc or -mbionic or -mmusl has been passed to change
++   the default.  */
+ 
+-#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3)	\
+-  "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}"
++#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4)	\
++  "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}"
+ 
+ #if DEFAULT_LIBC == LIBC_GLIBC
+-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
+-  CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B)
++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
++  CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M)
+ #elif DEFAULT_LIBC == LIBC_UCLIBC
+-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
+-  CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B)
++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
++  CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M)
+ #elif DEFAULT_LIBC == LIBC_BIONIC
+-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
+-  CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U)
++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
++  CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M)
++#elif DEFAULT_LIBC == LIBC_MUSL
++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
++  CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B)
+ #else
+ #error "Unsupported DEFAULT_LIBC"
+ #endif /* DEFAULT_LIBC */
+@@ -81,24 +87,100 @@
+ #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
+ #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
+ #define BIONIC_DYNAMIC_LINKERX32 "/system/bin/linkerx32"
++/* Should be redefined for each target that supports musl.  */
++#define MUSL_DYNAMIC_LINKER "/dev/null"
++#define MUSL_DYNAMIC_LINKER32 "/dev/null"
++#define MUSL_DYNAMIC_LINKER64 "/dev/null"
++#define MUSL_DYNAMIC_LINKERX32 "/dev/null"
+ 
+ #define GNU_USER_DYNAMIC_LINKER						\
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER,	\
+-			 BIONIC_DYNAMIC_LINKER)
++			 BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
+ #define GNU_USER_DYNAMIC_LINKER32					\
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \
+-			 BIONIC_DYNAMIC_LINKER32)
++			 BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
+ #define GNU_USER_DYNAMIC_LINKER64					\
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \
+-			 BIONIC_DYNAMIC_LINKER64)
++			 BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
+ #define GNU_USER_DYNAMIC_LINKERX32					\
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \
+-			 BIONIC_DYNAMIC_LINKERX32)
++			 BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32)
+ 
+ /* Whether we have Bionic libc runtime */
+ #undef TARGET_HAS_BIONIC
+ #define TARGET_HAS_BIONIC (OPTION_BIONIC)
+ 
++/* musl avoids problematic includes by rearranging the include directories.
++ * Unfortunately, this is mostly duplicated from cppdefault.c */
++#if DEFAULT_LIBC == LIBC_MUSL
++#define INCLUDE_DEFAULTS_MUSL_GPP			\
++    { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1,		\
++      GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },		\
++    { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1,		\
++      GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 },		\
++    { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1,	\
++      GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
++
++#ifdef LOCAL_INCLUDE_DIR
++#define INCLUDE_DEFAULTS_MUSL_LOCAL			\
++    { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },		\
++    { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
++#else
++#define INCLUDE_DEFAULTS_MUSL_LOCAL
++#endif
++
++#ifdef PREFIX_INCLUDE_DIR
++#define INCLUDE_DEFAULTS_MUSL_PREFIX			\
++    { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0},
++#else
++#define INCLUDE_DEFAULTS_MUSL_PREFIX
++#endif
++
++#ifdef CROSS_INCLUDE_DIR
++#define INCLUDE_DEFAULTS_MUSL_CROSS			\
++    { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0},
++#else
++#define INCLUDE_DEFAULTS_MUSL_CROSS
++#endif
++
++#ifdef TOOL_INCLUDE_DIR
++#define INCLUDE_DEFAULTS_MUSL_TOOL			\
++    { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0},
++#else
++#define INCLUDE_DEFAULTS_MUSL_TOOL
++#endif
++
++#ifdef NATIVE_SYSTEM_HEADER_DIR
++#define INCLUDE_DEFAULTS_MUSL_NATIVE			\
++    { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 },	\
++    { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
++#else
++#define INCLUDE_DEFAULTS_MUSL_NATIVE
++#endif
++
++#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT)
++# undef INCLUDE_DEFAULTS_MUSL_LOCAL
++# define INCLUDE_DEFAULTS_MUSL_LOCAL
++# undef INCLUDE_DEFAULTS_MUSL_NATIVE
++# define INCLUDE_DEFAULTS_MUSL_NATIVE
++#else
++# undef INCLUDE_DEFAULTS_MUSL_CROSS
++# define INCLUDE_DEFAULTS_MUSL_CROSS
++#endif
++
++#undef INCLUDE_DEFAULTS
++#define INCLUDE_DEFAULTS				\
++  {							\
++    INCLUDE_DEFAULTS_MUSL_GPP				\
++    INCLUDE_DEFAULTS_MUSL_PREFIX			\
++    INCLUDE_DEFAULTS_MUSL_CROSS				\
++    INCLUDE_DEFAULTS_MUSL_TOOL				\
++    INCLUDE_DEFAULTS_MUSL_NATIVE			\
++    { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 },		\
++    { 0, 0, 0, 0, 0, 0 }				\
++  }
++#endif
++
+ #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */
+ /* This is a *uclinux* target.  We don't define below macros to normal linux
+    versions, because doing so would require *uclinux* targets to include
+Index: b/gcc/config/linux.opt
+===================================================================
+--- a/gcc/config/linux.opt
++++ b/gcc/config/linux.opt
+@@ -28,5 +28,9 @@
+ Use GNU C library
+ 
+ muclibc
+-Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic)
++Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mmusl)
+ Use uClibc C library
++
++mmusl
++Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mbionic)
++Use musl C library
+Index: b/gcc/configure
+===================================================================
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -27681,6 +27681,9 @@
+ else
+   gcc_cv_libc_provides_ssp=no
+     case "$target" in
++       *-*-musl*)
++	 # All versions of musl provide stack protector
++	 gcc_cv_libc_provides_ssp=yes;;
+        *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
+       # glibc 2.4 and later provides __stack_chk_fail and
+       # either __stack_chk_guard, or TLS access to stack guard canary.
+@@ -27713,6 +27716,7 @@
+ 	 # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
+ 	 # simply assert that glibc does provide this, which is true for all
+ 	 # realistically usable GNU/Hurd configurations.
++	 # All supported versions of musl provide it as well
+ 	 gcc_cv_libc_provides_ssp=yes;;
+        *-*-darwin* | *-*-freebsd*)
+ 	 ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail"
+@@ -27809,6 +27813,9 @@
+       gcc_cv_target_dl_iterate_phdr=no
+     fi
+     ;;
++  *-linux-musl*)
++    gcc_cv_target_dl_iterate_phdr=yes
++    ;;
+ esac
+ 
+ if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
+Index: b/gcc/configure.ac
+===================================================================
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -5199,6 +5199,9 @@
+       gcc_cv_libc_provides_ssp,
+       [gcc_cv_libc_provides_ssp=no
+     case "$target" in
++       *-*-musl*)
++	 # All versions of musl provide stack protector
++	 gcc_cv_libc_provides_ssp=yes;;
+        *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
+       # glibc 2.4 and later provides __stack_chk_fail and
+       # either __stack_chk_guard, or TLS access to stack guard canary.
+@@ -5225,6 +5228,7 @@
+ 	 # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
+ 	 # simply assert that glibc does provide this, which is true for all
+ 	 # realistically usable GNU/Hurd configurations.
++	 # All supported versions of musl provide it as well
+ 	 gcc_cv_libc_provides_ssp=yes;;
+        *-*-darwin* | *-*-freebsd*)
+ 	 AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes],
+@@ -5298,6 +5302,9 @@
+       gcc_cv_target_dl_iterate_phdr=no
+     fi
+     ;;
++  *-linux-musl*)
++    gcc_cv_target_dl_iterate_phdr=yes
++    ;;
+ esac
+ GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR])
+ if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
+Index: b/gcc/doc/invoke.texi
+===================================================================
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -667,7 +667,7 @@
+ -mcpu=@var{cpu}}
+ 
+ @emph{GNU/Linux Options}
+- at gccoptlist{-mglibc -muclibc -mbionic -mandroid @gol
++ at gccoptlist{-mglibc -muclibc -mmusl -mbionic -mandroid @gol
+ -tno-android-cc -tno-android-ld}
+ 
+ @emph{H8/300 Options}
+@@ -15324,13 +15324,19 @@
+ @item -mglibc
+ @opindex mglibc
+ Use the GNU C library.  This is the default except
+-on @samp{*-*-linux-*uclibc*} and @samp{*-*-linux-*android*} targets.
++on @samp{*-*-linux-*uclibc*}, @samp{*-*-linux-*musl*} and
++ at samp{*-*-linux-*android*} targets.
+ 
+ @item -muclibc
+ @opindex muclibc
+ Use uClibc C library.  This is the default on
+ @samp{*-*-linux-*uclibc*} targets.
+ 
++ at item -mmusl
++ at opindex mmusl
++Use the musl C library.  This is the default on
++ at samp{*-*-linux-*musl*} targets.
++
+ @item -mbionic
+ @opindex mbionic
+ Use Bionic C library.  This is the default on
diff --git a/package/gcc/5.1.0/905-add-musl-support-to-gcc.patch b/package/gcc/5.1.0/905-add-musl-support-to-gcc.patch
new file mode 100644
index 0000000..92e7436
--- /dev/null
+++ b/package/gcc/5.1.0/905-add-musl-support-to-gcc.patch
@@ -0,0 +1,130 @@
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 8 May 2015 08:30:40 +0000 (+0000)
+Subject: [PATCH 0/13] Add musl support to GCC
+X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=f2d678afa5b8385d763b93772d73d6bf80a9739e
+
+[PATCH 0/13] Add musl support to GCC
+
+2015-05-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	* config/glibc-stdint.h (OPTION_MUSL): Define.
+	(INT_FAST16_TYPE, INT_FAST32_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE):
+	Change the definition based on OPTION_MUSL for 64 bit targets.
+	* config/linux.h (OPTION_MUSL): Redefine.
+	* config/alpha/linux.h (OPTION_MUSL): Redefine.
+	* config/rs6000/linux.h (OPTION_MUSL): Redefine.
+	* config/rs6000/linux64.h (OPTION_MUSL): Redefine.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk at 222905 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+
+Index: b/gcc/config/alpha/linux.h
+===================================================================
+--- a/gcc/config/alpha/linux.h
++++ b/gcc/config/alpha/linux.h
+@@ -61,10 +61,14 @@
+ #define OPTION_GLIBC  (DEFAULT_LIBC == LIBC_GLIBC)
+ #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
+ #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
++#undef OPTION_MUSL
++#define OPTION_MUSL   (DEFAULT_LIBC == LIBC_MUSL)
+ #else
+ #define OPTION_GLIBC  (linux_libc == LIBC_GLIBC)
+ #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
+ #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
++#undef OPTION_MUSL
++#define OPTION_MUSL   (linux_libc == LIBC_MUSL)
+ #endif
+ 
+ /* Determine what functions are present at the runtime;
+Index: b/gcc/config/glibc-stdint.h
+===================================================================
+--- a/gcc/config/glibc-stdint.h
++++ b/gcc/config/glibc-stdint.h
+@@ -22,6 +22,12 @@
+ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+ <http://www.gnu.org/licenses/>.  */
+ 
++/* Systems using musl libc should use this header and make sure
++   OPTION_MUSL is defined correctly before using the TYPE macros. */
++#ifndef OPTION_MUSL
++#define OPTION_MUSL 0
++#endif
++
+ #define SIG_ATOMIC_TYPE "int"
+ 
+ #define INT8_TYPE "signed char"
+@@ -43,12 +49,12 @@
+ #define UINT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")
+ 
+ #define INT_FAST8_TYPE "signed char"
+-#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int")
+-#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int")
++#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int")
++#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int")
+ #define INT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int")
+ #define UINT_FAST8_TYPE "unsigned char"
+-#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int")
+-#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int")
++#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int")
++#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int")
+ #define UINT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")
+ 
+ #define INTPTR_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int")
+Index: b/gcc/config/linux.h
+===================================================================
+--- a/gcc/config/linux.h
++++ b/gcc/config/linux.h
+@@ -32,11 +32,13 @@
+ #define OPTION_GLIBC  (DEFAULT_LIBC == LIBC_GLIBC)
+ #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
+ #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
++#undef OPTION_MUSL
+ #define OPTION_MUSL   (DEFAULT_LIBC == LIBC_MUSL)
+ #else
+ #define OPTION_GLIBC  (linux_libc == LIBC_GLIBC)
+ #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
+ #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
++#undef OPTION_MUSL
+ #define OPTION_MUSL   (linux_libc == LIBC_MUSL)
+ #endif
+ 
+Index: b/gcc/config/rs6000/linux.h
+===================================================================
+--- a/gcc/config/rs6000/linux.h
++++ b/gcc/config/rs6000/linux.h
+@@ -30,10 +30,14 @@
+ #define OPTION_GLIBC  (DEFAULT_LIBC == LIBC_GLIBC)
+ #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
+ #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
++#undef OPTION_MUSL
++#define OPTION_MUSL   (DEFAULT_LIBC == LIBC_MUSL)
+ #else
+ #define OPTION_GLIBC  (linux_libc == LIBC_GLIBC)
+ #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
+ #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
++#undef OPTION_MUSL
++#define OPTION_MUSL   (linux_libc == LIBC_MUSL)
+ #endif
+ 
+ /* Determine what functions are present at the runtime;
+Index: b/gcc/config/rs6000/linux64.h
+===================================================================
+--- a/gcc/config/rs6000/linux64.h
++++ b/gcc/config/rs6000/linux64.h
+@@ -299,10 +299,14 @@
+ #define OPTION_GLIBC  (DEFAULT_LIBC == LIBC_GLIBC)
+ #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
+ #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
++#undef OPTION_MUSL
++#define OPTION_MUSL   (DEFAULT_LIBC == LIBC_MUSL)
+ #else
+ #define OPTION_GLIBC  (linux_libc == LIBC_GLIBC)
+ #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
+ #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
++#undef OPTION_MUSL
++#define OPTION_MUSL   (linux_libc == LIBC_MUSL)
+ #endif
+ 
+ /* Determine what functions are present at the runtime;
diff --git a/package/gcc/5.1.0/906-mips-musl-support.patch b/package/gcc/5.1.0/906-mips-musl-support.patch
new file mode 100644
index 0000000..6b473f9
--- /dev/null
+++ b/package/gcc/5.1.0/906-mips-musl-support.patch
@@ -0,0 +1,37 @@
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 8 May 2015 15:16:50 +0000 (+0000)
+Subject: [PATCH 6/13] mips musl support
+X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=2550b6a866c887472b587bef87d433c51cf1ebc8
+
+[PATCH 6/13] mips musl support
+
+2015-05-08  Gregor Richards  <gregor.richards@uwaterloo.ca>
+	    Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	* config/mips/linux.h (MUSL_DYNAMIC_LINKER32): Define.
+	(MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERN32): Define.
+	(GNU_USER_DYNAMIC_LINKERN32): Update.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk at 222915 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+
+Index: b/gcc/config/mips/linux.h
+===================================================================
+--- a/gcc/config/mips/linux.h
++++ b/gcc/config/mips/linux.h
+@@ -37,7 +37,13 @@
+ #define UCLIBC_DYNAMIC_LINKERN32 \
+   "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}"
+ 
++#undef MUSL_DYNAMIC_LINKER32
++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1"
++#undef MUSL_DYNAMIC_LINKER64
++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips64%{EL:el}%{msoft-float:-sf}.so.1"
++#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mipsn32%{EL:el}%{msoft-float:-sf}.so.1"
++
+ #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
+ #define GNU_USER_DYNAMIC_LINKERN32 \
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
+-                         BIONIC_DYNAMIC_LINKERN32)
++                         BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32)
diff --git a/package/gcc/5.1.0/907-x86-musl-support.patch b/package/gcc/5.1.0/907-x86-musl-support.patch
new file mode 100644
index 0000000..3f2fe5d
--- /dev/null
+++ b/package/gcc/5.1.0/907-x86-musl-support.patch
@@ -0,0 +1,45 @@
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 15 May 2015 13:20:01 +0000 (+0000)
+Subject: [PATCH 9/13] x86 musl support
+X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=5551c8d927c17f60837f15f8dfe46f945ba3fa9c
+
+[PATCH 9/13] x86 musl support
+
+On behalf of Szabolcs Nagy.
+
+2015-05-15  Gregor Richards  <gregor.richards@uwaterloo.ca>
+
+	* config/i386/linux.h (MUSL_DYNAMIC_LINKER): Define.
+	* config/i386/linux64.h (MUSL_DYNAMIC_LINKER32): Define.
+	(MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32): Define.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk at 223218 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+
+Index: b/gcc/config/i386/linux.h
+===================================================================
+--- a/gcc/config/i386/linux.h
++++ b/gcc/config/i386/linux.h
+@@ -21,3 +21,6 @@
+ 
+ #define GNU_USER_LINK_EMULATION "elf_i386"
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++
++#undef MUSL_DYNAMIC_LINKER
++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
+Index: b/gcc/config/i386/linux64.h
+===================================================================
+--- a/gcc/config/i386/linux64.h
++++ b/gcc/config/i386/linux64.h
+@@ -30,3 +30,10 @@
+ #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+ #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
+ #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
++
++#undef MUSL_DYNAMIC_LINKER32
++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
++#undef MUSL_DYNAMIC_LINKER64
++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1"
++#undef MUSL_DYNAMIC_LINKERX32
++#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
diff --git a/package/gcc/5.1.0/908-arm-musl-support.patch b/package/gcc/5.1.0/908-arm-musl-support.patch
new file mode 100644
index 0000000..906355a
--- /dev/null
+++ b/package/gcc/5.1.0/908-arm-musl-support.patch
@@ -0,0 +1,45 @@
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 27 May 2015 13:17:11 +0000 (+0000)
+Subject: [PATCH 4/13] arm musl support
+X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=de799bd087ab9a179768fea75bd195a31d3432a4
+
+[PATCH 4/13] arm musl support
+
+On behalf of szabolcs.nagy at arm.com
+
+2015-05-27  Gregor Richards  <gregor.richards@uwaterloo.ca>
+
+	* config/arm/linux-eabi.h (MUSL_DYNAMIC_LINKER): Define.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk at 223749 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+
+Index: b/gcc/config/arm/linux-eabi.h
+===================================================================
+--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h
+@@ -77,6 +77,23 @@
+     %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
+     %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
+ 
++/* For ARM musl currently supports four dynamic linkers:
++   - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI
++   - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI
++   - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB
++   - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB
++   musl does not support the legacy OABI mode.
++   All the dynamic linkers live in /lib.
++   We default to soft-float, EL. */
++#undef  MUSL_DYNAMIC_LINKER
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}"
++#else
++#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}"
++#endif
++#define MUSL_DYNAMIC_LINKER \
++  "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
++
+ /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
+    use the GNU/Linux version, not the generic BPABI version.  */
+ #undef  LINK_SPEC
diff --git a/package/gcc/5.1.0/909-aarch64-musl-support.patch b/package/gcc/5.1.0/909-aarch64-musl-support.patch
new file mode 100644
index 0000000..3d032f5
--- /dev/null
+++ b/package/gcc/5.1.0/909-aarch64-musl-support.patch
@@ -0,0 +1,33 @@
+From: jgreenhalgh <jgreenhalgh@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 27 May 2015 16:46:39 +0000 (+0000)
+Subject: [PATCH 3/13] aarch64 musl support
+X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=b3ff21cf0531be91bc3fb8200296a7633090ec78
+
+[PATCH 3/13] aarch64 musl support
+
+gcc/Changelog:
+
+2015-05-27  Gregor Richards  <gregor.richards@uwaterloo.ca>
+	    Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	* config/aarch64/aarch64-linux.h (MUSL_DYNAMIC_LINKER): Define.
+
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk at 223766 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+
+Index: b/gcc/config/aarch64/aarch64-linux.h
+===================================================================
+--- a/gcc/config/aarch64/aarch64-linux.h
++++ b/gcc/config/aarch64/aarch64-linux.h
+@@ -23,6 +23,9 @@
+ 
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
+ 
++#undef MUSL_DYNAMIC_LINKER
++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
++
+ #undef  ASAN_CC1_SPEC
+ #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
+ 
diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index cf96c73..578e24f 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -78,6 +78,13 @@ choice
 		select BR2_GCC_NEEDS_MPC
 		select BR2_GCC_SUPPORTS_GRAPHITE
 
+	config BR2_GCC_VERSION_5_1_X
+		bool "gcc 5.1.x"
+		# Broken or unsupported architectures
+		depends on !BR2_arc
+		select BR2_GCC_NEEDS_MPC
+		select BR2_GCC_SUPPORTS_GRAPHITE
+
 endchoice
 
 config BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE
@@ -90,6 +97,7 @@ config BR2_GCC_VERSION
 	default "4.7.4"     if BR2_GCC_VERSION_4_7_X
 	default "4.8.4"     if BR2_GCC_VERSION_4_8_X
 	default "4.9.2"     if BR2_GCC_VERSION_4_9_X
+	default "5.1.0"     if BR2_GCC_VERSION_5_1_X
 	default "arc-2014.12" if BR2_GCC_VERSION_4_8_ARC
 
 config BR2_EXTRA_GCC_CONFIG_OPTIONS
diff --git a/package/gcc/gcc.hash b/package/gcc/gcc.hash
index 5eec97f..f7a6c94 100644
--- a/package/gcc/gcc.hash
+++ b/package/gcc/gcc.hash
@@ -6,5 +6,7 @@ sha512  dfcb737073191e628231031a3571ec77ee760a59377630f4a6e4fdfa66f9ddad39fde47e
 sha512  b4c84ebd754c026029d706ef52c4242df4dcadc6a22cc5669b3aa37ac9dc25bc9cd9651fda83fb24dd5d17b1710e6865a35bb6c5cd9b95d0971717453935ae8e  gcc-4.8.4.tar.bz2
 # From ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.9.2/sha512.sum
 sha512  e96cba06d572dbe7f382a2b00fd9297dcf9f9219d46a9ad0bd904dc36d5e7db3335e422640b79a27fed6fde91b0731732b94a0e2fbcd47344d6779f8ba1f4f9c  gcc-4.9.2.tar.bz2
+# From ftp://gcc.gnu.org/pub/gcc/releases/gcc-5.1.0/sha512.sum
+sha512  30f6a94d3adb25bc51fcaddf32a6c41429f569eeb9ed64330445b1296f99998fbfa03277b375be4f7b2b80f519910ef88e4149db7cd9031e2c61a49f501bde94  gcc-5.1.0.tar.bz2
 # No hash for the ARC variant, comes from the github-helper:
 none  xxx  gcc-arc-2014.12.tar.gz
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 4/6] gcc: switch to gcc 4.9 as the default version
  2015-06-14 14:33 [Buildroot] [PATCH 0/6] Internal toolchain backend updates Thomas Petazzoni
                   ` (2 preceding siblings ...)
  2015-06-14 14:33 ` [Buildroot] [PATCH 3/6] gcc: add support for gcc 5.1 Thomas Petazzoni
@ 2015-06-14 14:33 ` Thomas Petazzoni
  2015-06-22 22:19   ` Peter Korsgaard
  2015-06-14 14:33 ` [Buildroot] [PATCH 5/6] gdb: bump 7.9 series to 7.9.1 Thomas Petazzoni
  2015-06-14 14:33 ` [Buildroot] [PATCH 6/6] toolchain-buildroot: mark eglibc as deprecated Thomas Petazzoni
  5 siblings, 1 reply; 20+ messages in thread
From: Thomas Petazzoni @ 2015-06-14 14:33 UTC (permalink / raw)
  To: buildroot

Now that we have added gcc 5.1, it's time to make gcc 4.9 the default
version used in Buildroot.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Should we deprecate/remove gcc 4.7 ? Maybe it's a bit early, I don't
know.
---
 package/gcc/Config.in.host | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index 578e24f..51f04f5 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -9,8 +9,7 @@ config BR2_GCC_SUPPORTS_GRAPHITE
 choice
 	prompt "GCC compiler Version"
 	default BR2_GCC_VERSION_4_8_ARC if BR2_arc
-	default BR2_GCC_VERSION_4_9_X if BR2_microblaze || BR2_powerpc64le
-	default BR2_GCC_VERSION_4_8_X
+	default BR2_GCC_VERSION_4_9_X
 	help
 	  Select the version of gcc you wish to use.
 
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 5/6] gdb: bump 7.9 series to 7.9.1
  2015-06-14 14:33 [Buildroot] [PATCH 0/6] Internal toolchain backend updates Thomas Petazzoni
                   ` (3 preceding siblings ...)
  2015-06-14 14:33 ` [Buildroot] [PATCH 4/6] gcc: switch to gcc 4.9 as the default version Thomas Petazzoni
@ 2015-06-14 14:33 ` Thomas Petazzoni
  2015-06-22 22:23   ` Peter Korsgaard
  2015-06-14 14:33 ` [Buildroot] [PATCH 6/6] toolchain-buildroot: mark eglibc as deprecated Thomas Petazzoni
  5 siblings, 1 reply; 20+ messages in thread
From: Thomas Petazzoni @ 2015-06-14 14:33 UTC (permalink / raw)
  To: buildroot

Note that both gdb 7.9 and 7.9.1 fail to build in a chroot without
texinfo, due to the infamous makeinfo issue. This should be fixed
separately.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/gdb/{7.9 => 7.9.1}/0001-gdbserver-fix-uClibc-whithout-MMU.patch | 0
 .../{7.9 => 7.9.1}/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch | 0
 .../0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch            | 0
 package/gdb/Config.in.host                                              | 2 +-
 package/gdb/gdb.hash                                                    | 2 +-
 5 files changed, 2 insertions(+), 2 deletions(-)
 rename package/gdb/{7.9 => 7.9.1}/0001-gdbserver-fix-uClibc-whithout-MMU.patch (100%)
 rename package/gdb/{7.9 => 7.9.1}/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch (100%)
 rename package/gdb/{7.9 => 7.9.1}/0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch (100%)

diff --git a/package/gdb/7.9/0001-gdbserver-fix-uClibc-whithout-MMU.patch b/package/gdb/7.9.1/0001-gdbserver-fix-uClibc-whithout-MMU.patch
similarity index 100%
rename from package/gdb/7.9/0001-gdbserver-fix-uClibc-whithout-MMU.patch
rename to package/gdb/7.9.1/0001-gdbserver-fix-uClibc-whithout-MMU.patch
diff --git a/package/gdb/7.9/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch b/package/gdb/7.9.1/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch
similarity index 100%
rename from package/gdb/7.9/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch
rename to package/gdb/7.9.1/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch
diff --git a/package/gdb/7.9/0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch b/package/gdb/7.9.1/0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch
similarity index 100%
rename from package/gdb/7.9/0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch
rename to package/gdb/7.9.1/0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch
diff --git a/package/gdb/Config.in.host b/package/gdb/Config.in.host
index 6b0ca9b..b0046b5 100644
--- a/package/gdb/Config.in.host
+++ b/package/gdb/Config.in.host
@@ -53,4 +53,4 @@ config BR2_GDB_VERSION
 	default "6be65fb56ea6694a9260733a536a023a1e2d4d57" if BR2_microblaze
 	default "7.7.1"    if BR2_GDB_VERSION_7_7
 	default "7.8.2"	   if BR2_GDB_VERSION_7_8 || !BR2_PACKAGE_HOST_GDB
-	default "7.9"      if BR2_GDB_VERSION_7_9
+	default "7.9.1"      if BR2_GDB_VERSION_7_9
diff --git a/package/gdb/gdb.hash b/package/gdb/gdb.hash
index f489f64..0130935 100644
--- a/package/gdb/gdb.hash
+++ b/package/gdb/gdb.hash
@@ -1,7 +1,7 @@
 # From ftp://gcc.gnu.org/pub/gdb/releases/sha512.sum
 sha512	887b9b726dae8f6e3e5e41574460a67e4f9002b0d47bc985dcf63bdf3518397a90b6a208cb5b19e5ed2341715ad75cfeed4df4fb423f39f74218e36bc87f1cab	gdb-7.7.1.tar.bz2
 sha512	face5bf1b4ce144fc8604fc84620beed956177a11fd632b4e41906fc7f632910b2b43a50e6cfdfd6cbd876ee527c813bddab8df29dc560a6c36694cdb8edc4e4	gdb-7.8.2.tar.xz
-sha512	850202a477b486a75dc8196efead79c95bc675e348064a5eefee2a50215d40f62e9e052e9b8df29f997f91430f6e7454883652c701f5b1e688d9e2c575876c83	gdb-7.9.tar.xz
+sha512	eebdf88b24e52e792b8a4b89ea85790de72b462a7810b44975fdf4232c068f353b15506071f450102a9d4bcecdde8e93dc3748a10699b7f73f3e04fb2d9d8414	gdb-7.9.1.tar.xz
 # No hash for the ARC & microblaze variants, comes from the github-helper:
 none	xxx	gdb-arc-2014.12-gdb.tar.gz
 none	xxx	gdb-6be65fb56ea6694a9260733a536a023a1e2d4d57.tar.gz
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 6/6] toolchain-buildroot: mark eglibc as deprecated
  2015-06-14 14:33 [Buildroot] [PATCH 0/6] Internal toolchain backend updates Thomas Petazzoni
                   ` (4 preceding siblings ...)
  2015-06-14 14:33 ` [Buildroot] [PATCH 5/6] gdb: bump 7.9 series to 7.9.1 Thomas Petazzoni
@ 2015-06-14 14:33 ` Thomas Petazzoni
  2015-06-22 22:24   ` Peter Korsgaard
  5 siblings, 1 reply; 20+ messages in thread
From: Thomas Petazzoni @ 2015-06-14 14:33 UTC (permalink / raw)
  To: buildroot

eglibc is a dead project and has not been making any release since a
while, now that glibc is back and kicking. So let's deprecated our
eglibc support.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/toolchain-buildroot/Config.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
index d9914b0..77a197e 100644
--- a/toolchain/toolchain-buildroot/Config.in
+++ b/toolchain/toolchain-buildroot/Config.in
@@ -49,6 +49,7 @@ config BR2_TOOLCHAIN_BUILDROOT_EGLIBC
 		   BR2_x86_64 || BR2_microblaze || BR2_powerpc64
 	depends on BR2_USE_MMU
 	depends on !BR2_STATIC_LIBS
+	depends on BR2_DEPRECATED_SINCE_2015_08
 	select BR2_TOOLCHAIN_USES_GLIBC
 	# our eglibc.mk enables RPC support
 	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 2/6] uclibc: add libgcc_s_resume fix
  2015-06-14 14:33 ` [Buildroot] [PATCH 2/6] uclibc: add libgcc_s_resume fix Thomas Petazzoni
@ 2015-06-14 16:24   ` Baruch Siach
  2015-06-14 20:33     ` Thomas Petazzoni
  0 siblings, 1 reply; 20+ messages in thread
From: Baruch Siach @ 2015-06-14 16:24 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Sun, Jun 14, 2015 at 04:33:27PM +0200, Thomas Petazzoni wrote:
> diff --git a/package/uclibc/0.9.33.2/0071-Fix-libgcc_s_resume-issue.patch b/package/uclibc/0.9.33.2/0071-Fix-libgcc_s_resume-issue.patch
> new file mode 100644
> index 0000000..8a165f3
> --- /dev/null
> +++ b/package/uclibc/0.9.33.2/0071-Fix-libgcc_s_resume-issue.patch
> @@ -0,0 +1,53 @@
> +From 7ed8bacef45a2537646e7235092bd2e5408cd0b5 Mon Sep 17 00:00:00 2001
> +From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> +Date: Sun, 14 Jun 2015 15:14:22 +0200
> +Subject: [PATCH] Fix libgcc_s_resume issue
> +
> +When built with gcc 5.1, uClibc-ng fails to build with the following
> +issue:

This patch is for uClibc.

> +
> +   librt/librt_so.a(rt-unwind-resume.oS): In function `_Unwind_Resume':
> +   rt-unwind-resume.c:(.text+0x3c): undefined reference to

Is that the full error message? I have that strange feeling that something is 
missing. Same goes for the uClibc-ng patch.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 1/6] uclibc: bump uClibc-ng to 1.0.3
  2015-06-14 14:33 ` [Buildroot] [PATCH 1/6] uclibc: bump uClibc-ng to 1.0.3 Thomas Petazzoni
@ 2015-06-14 19:03   ` Waldemar Brodkorb
  2015-06-14 20:40     ` Thomas Petazzoni
  2015-06-22 22:17   ` Peter Korsgaard
  1 sibling, 1 reply; 20+ messages in thread
From: Waldemar Brodkorb @ 2015-06-14 19:03 UTC (permalink / raw)
  To: buildroot

Hi Thomas,
Thomas Petazzoni wrote,

> This commit bumps uClibc-ng to the latest version, and drops the two
> patches that have been merged upstream.

Have you seen the new uclibcng-testrunner.sh? It can be used on a
target without GNU make. I tested it already with busybox hush.
This might be used on no-MMU targets.

You need to generate a file while cross-compiling with "gen" target.

best regards
 Waldemar

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 2/6] uclibc: add libgcc_s_resume fix
  2015-06-14 16:24   ` Baruch Siach
@ 2015-06-14 20:33     ` Thomas Petazzoni
  2015-06-22 22:28       ` Peter Korsgaard
  0 siblings, 1 reply; 20+ messages in thread
From: Thomas Petazzoni @ 2015-06-14 20:33 UTC (permalink / raw)
  To: buildroot

Dear Baruch Siach,

On Sun, 14 Jun 2015 19:24:09 +0300, Baruch Siach wrote:

> > +When built with gcc 5.1, uClibc-ng fails to build with the following
> > +issue:
> 
> This patch is for uClibc.

Bad copy/paste, indeed.

> > +   librt/librt_so.a(rt-unwind-resume.oS): In function `_Unwind_Resume':
> > +   rt-unwind-resume.c:(.text+0x3c): undefined reference to
> 
> Is that the full error message? I have that strange feeling that something is 
> missing. Same goes for the uClibc-ng patch.

Gah, again a copy/paste issue (though different than the previous one).
The full error message is:

  LD librt-0.9.33.2.so
librt/librt_so.a(rt-unwind-resume.oS): In function `_Unwind_Resume':
rt-unwind-resume.c:(.text+0x3c): undefined reference to `libgcc_s_resume'
collect2: error: ld returned 1 exit status
make[2]: *** [lib/librt.so] Error 1

I'll update the commit log accordingly.

Thanks for the review!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 1/6] uclibc: bump uClibc-ng to 1.0.3
  2015-06-14 19:03   ` Waldemar Brodkorb
@ 2015-06-14 20:40     ` Thomas Petazzoni
  0 siblings, 0 replies; 20+ messages in thread
From: Thomas Petazzoni @ 2015-06-14 20:40 UTC (permalink / raw)
  To: buildroot

Waldemar,

On Sun, 14 Jun 2015 21:03:48 +0200, Waldemar Brodkorb wrote:

> > This commit bumps uClibc-ng to the latest version, and drops the two
> > patches that have been merged upstream.
> 
> Have you seen the new uclibcng-testrunner.sh? It can be used on a
> target without GNU make. I tested it already with busybox hush.
> This might be used on no-MMU targets.

Yes, I've seen it, but so far I haven't used it. We could add support
for it later on.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 3/6] gcc: add support for gcc 5.1
  2015-06-14 14:33 ` [Buildroot] [PATCH 3/6] gcc: add support for gcc 5.1 Thomas Petazzoni
@ 2015-06-20 15:12   ` Bernd Kuhls
  2015-06-20 15:38     ` Bernd Kuhls
  2015-06-22 22:18   ` Peter Korsgaard
  1 sibling, 1 reply; 20+ messages in thread
From: Bernd Kuhls @ 2015-06-20 15:12 UTC (permalink / raw)
  To: buildroot

Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
@public.gmane.org> wrote in news:1434292411-5003-4-git-send-email-
thomas.petazzoni at free-electrons.com:

>  * x86, uClibc-ng and uClibc 0.9.33.2

Hi,

using buildroot master

* 333002c - (origin/master, origin/HEAD) dnsmasq: bump to version 2.73 (70 
minutes ago) <Gustavo Zacarias>

including

http://patchwork.ozlabs.org/patch/483999/
http://patchwork.ozlabs.org/patch/484002/
http://patchwork.ozlabs.org/patch/483998/
http://patchwork.ozlabs.org/patch/483997/

this defconfig

BR2_x86_i386=y
BR2_GCC_VERSION_5_1_X=y

fails to compile:

make[2]: Entering directory `/home/fli4l/br9_gcc5/output/build/host-gcc-
final-5.1.0/build/i386-buildroot-linux-uclibc/libgcc'
# If this is the top-level multilib, build all the other
# multilibs.
/home/fli4l/br9_gcc5/output/build/host-gcc-final-5.1.0/build/./gcc/xgcc -
B/home/fli4l/br9_gcc5/output/build/host-gcc-final-5.1.0/build/./gcc/ -
B/home/fli4l/br9_gcc5/output/host/usr/i386-buildroot-linux-uclibc/bin/ -
B/home/fli4l/br9_gcc5/output/host/usr/i386-buildroot-linux-uclibc/lib/ -
isystem /home/fli4l/br9_gcc5/output/host/usr/i386-buildroot-linux-
uclibc/include -isystem /home/fli4l/br9_gcc5/output/host/usr/i386-
buildroot-linux-uclibc/sys-include    -g -O2 -g -Os -O2  -g -O2 -g -Os -
DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-
strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-
definition  -isystem ./include   -fpic -mlong-double-80 -g -DIN_LIBGCC2 -
fbuilding-libgcc -fno-stack-protector   -fpic -mlong-double-80 -I. -I. -
I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc 
-I../../../libgcc/../include    -DUSE_TLS -o generic-morestack-thread.o -MT 
generic-morestack-thread.o -MD -MP -MF generic-morestack-thread.dep  -c 
../../../libgcc/generic-morestack-thread.c -fvisibility=hidden -
DHIDE_EXPORTS
../../../libgcc/generic-morestack-thread.c:41:21: fatal error: pthread.h: 
No such file or directory
compilation terminated.
make[2]: *** [generic-morestack-thread.o] Error 1
make[2]: Leaving directory `/home/fli4l/br9_gcc5/output/build/host-gcc-
final-5.1.0/build/i386-buildroot-linux-uclibc/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/home/fli4l/br9_gcc5/output/build/host-gcc-
final-5.1.0/build'
make: *** [all] Error 2
make: Leaving directory `/home/fli4l/br9_gcc5/output/build/host-gcc-final-
5.1.0/build'

Regards, Bernd

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 3/6] gcc: add support for gcc 5.1
  2015-06-20 15:12   ` Bernd Kuhls
@ 2015-06-20 15:38     ` Bernd Kuhls
  2015-06-22 22:27       ` Peter Korsgaard
  0 siblings, 1 reply; 20+ messages in thread
From: Bernd Kuhls @ 2015-06-20 15:38 UTC (permalink / raw)
  To: buildroot

Bernd Kuhls <bernd.kuhls@t-online.de> wrote in 
news:XnsA4BFAF16D8B15berndkuhlsPkbjNfxxIA at bernd-kuhls.de:

> ../../../libgcc/generic-morestack-thread.c:41:21: fatal error: pthread.h: 

Hi,

the problem seems to be the uclibc-ng, choosing it and i386 as target limits 
the choice "Thread library implementation" to "None", changing back to uclibc 
provides also "linuxthreads" and "linuxthreads (stable/old)".

It is caused by 
http://git.buildroot.net/buildroot/tree/package/uclibc/Config.in#n40 and the 
following lines which differ to those for BR2_UCLIBC_VERSION_0_9_33.

Is this the intended behaviour?

Regards, Bernd

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 1/6] uclibc: bump uClibc-ng to 1.0.3
  2015-06-14 14:33 ` [Buildroot] [PATCH 1/6] uclibc: bump uClibc-ng to 1.0.3 Thomas Petazzoni
  2015-06-14 19:03   ` Waldemar Brodkorb
@ 2015-06-22 22:17   ` Peter Korsgaard
  1 sibling, 0 replies; 20+ messages in thread
From: Peter Korsgaard @ 2015-06-22 22:17 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > This commit bumps uClibc-ng to the latest version, and drops the two
 > patches that have been merged upstream.

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 3/6] gcc: add support for gcc 5.1
  2015-06-14 14:33 ` [Buildroot] [PATCH 3/6] gcc: add support for gcc 5.1 Thomas Petazzoni
  2015-06-20 15:12   ` Bernd Kuhls
@ 2015-06-22 22:18   ` Peter Korsgaard
  1 sibling, 0 replies; 20+ messages in thread
From: Peter Korsgaard @ 2015-06-22 22:18 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > This commit adds support for gcc 5.1 in Buildroot. In terms of gcc
 > patches, compared to gcc 4.9.x:

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 4/6] gcc: switch to gcc 4.9 as the default version
  2015-06-14 14:33 ` [Buildroot] [PATCH 4/6] gcc: switch to gcc 4.9 as the default version Thomas Petazzoni
@ 2015-06-22 22:19   ` Peter Korsgaard
  0 siblings, 0 replies; 20+ messages in thread
From: Peter Korsgaard @ 2015-06-22 22:19 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Now that we have added gcc 5.1, it's time to make gcc 4.9 the default
 > version used in Buildroot.

Committed, thanks.

 > Should we deprecate/remove gcc 4.7 ? Maybe it's a bit early, I don't
 > know.

I think it's a bit too early, I'm still stuck on 4.7.x for a project at
work atleast.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 5/6] gdb: bump 7.9 series to 7.9.1
  2015-06-14 14:33 ` [Buildroot] [PATCH 5/6] gdb: bump 7.9 series to 7.9.1 Thomas Petazzoni
@ 2015-06-22 22:23   ` Peter Korsgaard
  0 siblings, 0 replies; 20+ messages in thread
From: Peter Korsgaard @ 2015-06-22 22:23 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Note that both gdb 7.9 and 7.9.1 fail to build in a chroot without
 > texinfo, due to the infamous makeinfo issue. This should be fixed
 > separately.

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 > ---
 >  package/gdb/{7.9 => 7.9.1}/0001-gdbserver-fix-uClibc-whithout-MMU.patch | 0
 >  .../{7.9 => 7.9.1}/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch | 0
 >  .../0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch            | 0
 >  package/gdb/Config.in.host                                              | 2 +-
 >  package/gdb/gdb.hash                                                    | 2 +-
 >  5 files changed, 2 insertions(+), 2 deletions(-)
 >  rename package/gdb/{7.9 => 7.9.1}/0001-gdbserver-fix-uClibc-whithout-MMU.patch (100%)
 >  rename package/gdb/{7.9 => 7.9.1}/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch (100%)
 >  rename package/gdb/{7.9 => 7.9.1}/0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch (100%)

 > diff --git a/package/gdb/7.9/0001-gdbserver-fix-uClibc-whithout-MMU.patch b/package/gdb/7.9.1/0001-gdbserver-fix-uClibc-whithout-MMU.patch
 > similarity index 100%
 > rename from package/gdb/7.9/0001-gdbserver-fix-uClibc-whithout-MMU.patch
 > rename to package/gdb/7.9.1/0001-gdbserver-fix-uClibc-whithout-MMU.patch
 > diff --git a/package/gdb/7.9/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch b/package/gdb/7.9.1/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch
 > similarity index 100%
 > rename from package/gdb/7.9/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch
 > rename to package/gdb/7.9.1/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch
 > diff --git a/package/gdb/7.9/0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch b/package/gdb/7.9.1/0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch
 > similarity index 100%
 > rename from package/gdb/7.9/0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch
 > rename to package/gdb/7.9.1/0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch
 > diff --git a/package/gdb/Config.in.host b/package/gdb/Config.in.host
 > index 6b0ca9b..b0046b5 100644
 > --- a/package/gdb/Config.in.host
 > +++ b/package/gdb/Config.in.host
 > @@ -53,4 +53,4 @@ config BR2_GDB_VERSION
 >  	default "6be65fb56ea6694a9260733a536a023a1e2d4d57" if BR2_microblaze
 >  	default "7.7.1"    if BR2_GDB_VERSION_7_7
 >  	default "7.8.2"	   if BR2_GDB_VERSION_7_8 || !BR2_PACKAGE_HOST_GDB
 > -	default "7.9"      if BR2_GDB_VERSION_7_9
 > +	default "7.9.1"      if BR2_GDB_VERSION_7_9

Committed with the white space trimmed so this aligns up with the other
lines.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 6/6] toolchain-buildroot: mark eglibc as deprecated
  2015-06-14 14:33 ` [Buildroot] [PATCH 6/6] toolchain-buildroot: mark eglibc as deprecated Thomas Petazzoni
@ 2015-06-22 22:24   ` Peter Korsgaard
  0 siblings, 0 replies; 20+ messages in thread
From: Peter Korsgaard @ 2015-06-22 22:24 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > eglibc is a dead project and has not been making any release since a
 > while, now that glibc is back and kicking. So let's deprecated our
 > eglibc support.

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 3/6] gcc: add support for gcc 5.1
  2015-06-20 15:38     ` Bernd Kuhls
@ 2015-06-22 22:27       ` Peter Korsgaard
  0 siblings, 0 replies; 20+ messages in thread
From: Peter Korsgaard @ 2015-06-22 22:27 UTC (permalink / raw)
  To: buildroot

>>>>> "Bernd" == Bernd Kuhls <bernd.kuhls@t-online.de> writes:

 > Bernd Kuhls <bernd.kuhls@t-online.de> wrote in 
 > news:XnsA4BFAF16D8B15berndkuhlsPkbjNfxxIA at bernd-kuhls.de:

 >> ../../../libgcc/generic-morestack-thread.c:41:21: fatal error: pthread.h: 

 > Hi,

 > the problem seems to be the uclibc-ng, choosing it and i386 as target limits 
 > the choice "Thread library implementation" to "None", changing back to uclibc 
 > provides also "linuxthreads" and "linuxthreads (stable/old)".

 > It is caused by 
 > http://git.buildroot.net/buildroot/tree/package/uclibc/Config.in#n40 and the 
 > following lines which differ to those for BR2_UCLIBC_VERSION_0_9_33.

 > Is this the intended behaviour?

I believe so as NTPL uses atomic instructions not available on
i386. Perhaps we should simply deprecate the i386 variant, it is after
all 26 years since the i486 was released and I doubt anybody still uses
i386'es.


-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Buildroot] [PATCH 2/6] uclibc: add libgcc_s_resume fix
  2015-06-14 20:33     ` Thomas Petazzoni
@ 2015-06-22 22:28       ` Peter Korsgaard
  0 siblings, 0 replies; 20+ messages in thread
From: Peter Korsgaard @ 2015-06-22 22:28 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

Hi,

 > Gah, again a copy/paste issue (though different than the previous one).
 > The full error message is:

 >   LD librt-0.9.33.2.so
 > librt/librt_so.a(rt-unwind-resume.oS): In function `_Unwind_Resume':
 > rt-unwind-resume.c:(.text+0x3c): undefined reference to `libgcc_s_resume'
 > collect2: error: ld returned 1 exit status
 > make[2]: *** [lib/librt.so] Error 1

 > I'll update the commit log accordingly.

Thanks, please send an updated patch with that fixed.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2015-06-22 22:28 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-14 14:33 [Buildroot] [PATCH 0/6] Internal toolchain backend updates Thomas Petazzoni
2015-06-14 14:33 ` [Buildroot] [PATCH 1/6] uclibc: bump uClibc-ng to 1.0.3 Thomas Petazzoni
2015-06-14 19:03   ` Waldemar Brodkorb
2015-06-14 20:40     ` Thomas Petazzoni
2015-06-22 22:17   ` Peter Korsgaard
2015-06-14 14:33 ` [Buildroot] [PATCH 2/6] uclibc: add libgcc_s_resume fix Thomas Petazzoni
2015-06-14 16:24   ` Baruch Siach
2015-06-14 20:33     ` Thomas Petazzoni
2015-06-22 22:28       ` Peter Korsgaard
2015-06-14 14:33 ` [Buildroot] [PATCH 3/6] gcc: add support for gcc 5.1 Thomas Petazzoni
2015-06-20 15:12   ` Bernd Kuhls
2015-06-20 15:38     ` Bernd Kuhls
2015-06-22 22:27       ` Peter Korsgaard
2015-06-22 22:18   ` Peter Korsgaard
2015-06-14 14:33 ` [Buildroot] [PATCH 4/6] gcc: switch to gcc 4.9 as the default version Thomas Petazzoni
2015-06-22 22:19   ` Peter Korsgaard
2015-06-14 14:33 ` [Buildroot] [PATCH 5/6] gdb: bump 7.9 series to 7.9.1 Thomas Petazzoni
2015-06-22 22:23   ` Peter Korsgaard
2015-06-14 14:33 ` [Buildroot] [PATCH 6/6] toolchain-buildroot: mark eglibc as deprecated Thomas Petazzoni
2015-06-22 22:24   ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.