summaryrefslogtreecommitdiffstats
path: root/toolchain/gcc/patches
diff options
context:
space:
mode:
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-02-26 16:39:54 +0000
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-02-26 16:39:54 +0000
commit8f7b453b71eb66200b3db4ebdf6b948714c2838c (patch)
tree0949bd6a08fc738954721417bf44f08beb063349 /toolchain/gcc/patches
parentb7abb067e96a68080986ff55db63947668d2d640 (diff)
toolchain/gcc: refresh patches
Signed-off-by: Florian Fainelli <florian@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35808 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'toolchain/gcc/patches')
-rw-r--r--toolchain/gcc/patches/4.5-linaro/200-musl.patch100
-rw-r--r--toolchain/gcc/patches/4.5-linaro/200-ppc_include_config_linux_h.patch2
-rw-r--r--toolchain/gcc/patches/4.5-linaro/840-armv4_pass_fix-v4bx_to_ld.patch6
-rw-r--r--toolchain/gcc/patches/4.5-linaro/850-use_shared_libgcc.patch4
-rw-r--r--toolchain/gcc/patches/4.5-linaro/999-coldfire.patch2
-rw-r--r--toolchain/gcc/patches/4.6-linaro/200-musl.patch48
-rw-r--r--toolchain/gcc/patches/4.6-linaro/830-arm_unbreak_armv4t.patch2
-rw-r--r--toolchain/gcc/patches/4.6-linaro/840-armv4_pass_fix-v4bx_to_ld.patch6
-rw-r--r--toolchain/gcc/patches/4.6-linaro/850-use_shared_libgcc.patch4
-rw-r--r--toolchain/gcc/patches/4.6-linaro/860-uclibc_use_eh_frame.patch2
-rw-r--r--toolchain/gcc/patches/4.6-linaro/870-ppc_no_crtsavres.patch2
-rw-r--r--toolchain/gcc/patches/4.6-linaro/910-mbsd_multi.patch4
-rw-r--r--toolchain/gcc/patches/4.6-linaro/999-coldfire.patch2
-rw-r--r--toolchain/gcc/patches/4.6.3/000-gcc-bug-54369.patch13
-rw-r--r--toolchain/gcc/patches/4.6.3/002-siginfo_t.patch60
-rw-r--r--toolchain/gcc/patches/4.6.3/200-musl.patch38
-rw-r--r--toolchain/gcc/patches/4.6.3/840-armv4_pass_fix-v4bx_to_ld.patch6
-rw-r--r--toolchain/gcc/patches/4.6.3/999-coldfire.patch2
-rw-r--r--toolchain/gcc/patches/4.7-linaro/200-musl.patch69
-rw-r--r--toolchain/gcc/patches/4.7-linaro/820-libgcc_pic.patch6
-rw-r--r--toolchain/gcc/patches/4.7-linaro/830-arm_unbreak_armv4t.patch2
-rw-r--r--toolchain/gcc/patches/4.7-linaro/840-armv4_pass_fix-v4bx_to_ld.patch6
-rw-r--r--toolchain/gcc/patches/4.7-linaro/870-ppc_no_crtsavres.patch2
-rw-r--r--toolchain/gcc/patches/4.7-linaro/910-mbsd_multi.patch6
-rw-r--r--toolchain/gcc/patches/4.7-linaro/993-arm_insn-opinit-RTX_CODE-fixup.patch2
-rw-r--r--toolchain/gcc/patches/4.7-linaro/999-coldfire.patch2
-rw-r--r--toolchain/gcc/patches/4.7.2/200-musl.patch70
-rw-r--r--toolchain/gcc/patches/4.7.2/820-libgcc_pic.patch6
-rw-r--r--toolchain/gcc/patches/4.7.2/840-armv4_pass_fix-v4bx_to_ld.patch6
-rw-r--r--toolchain/gcc/patches/4.7.2/870-ppc_no_crtsavres.patch2
-rw-r--r--toolchain/gcc/patches/4.7.2/910-mbsd_multi.patch4
-rw-r--r--toolchain/gcc/patches/4.7.2/999-coldfire.patch2
32 files changed, 190 insertions, 298 deletions
diff --git a/toolchain/gcc/patches/4.5-linaro/200-musl.patch b/toolchain/gcc/patches/4.5-linaro/200-musl.patch
index f29097c8b..d68f67241 100644
--- a/toolchain/gcc/patches/4.5-linaro/200-musl.patch
+++ b/toolchain/gcc/patches/4.5-linaro/200-musl.patch
@@ -1,7 +1,6 @@
-diff -urN gcc-linaro-4.5-2012.03/config.sub gcc-linaro-4.5-2012.03.new/config.sub
---- gcc-linaro-4.5-2012.03/config.sub 2012-03-12 12:29:55.000000000 +0100
-+++ gcc-linaro-4.5-2012.03.new/config.sub 2012-11-29 15:45:43.802377940 +0100
-@@ -125,6 +125,7 @@
+--- a/config.sub
++++ b/config.sub
+@@ -125,6 +125,7 @@ esac
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
@@ -9,17 +8,8 @@ diff -urN gcc-linaro-4.5-2012.03/config.sub gcc-linaro-4.5-2012.03.new/config.su
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
-@@ -1310,6 +1311,7 @@
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-uclibc* \
-+ | -linux-musl* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-diff -urN gcc-linaro-4.5-2012.03/gcc/config/arm/linux-eabi.h gcc-linaro-4.5-2012.03.new/gcc/config/arm/linux-eabi.h
---- gcc-linaro-4.5-2012.03/gcc/config/arm/linux-eabi.h 2012-03-12 12:29:55.000000000 +0100
-+++ gcc-linaro-4.5-2012.03.new/gcc/config/arm/linux-eabi.h 2012-11-29 15:45:43.802377940 +0100
+--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h
@@ -63,6 +63,10 @@
#undef GLIBC_DYNAMIC_LINKER
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
@@ -31,10 +21,9 @@ diff -urN gcc-linaro-4.5-2012.03/gcc/config/arm/linux-eabi.h gcc-linaro-4.5-2012
/* 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 -urN gcc-linaro-4.5-2012.03/gcc/config/i386/linux.h gcc-linaro-4.5-2012.03.new/gcc/config/i386/linux.h
---- gcc-linaro-4.5-2012.03/gcc/config/i386/linux.h 2012-03-12 12:29:55.000000000 +0100
-+++ gcc-linaro-4.5-2012.03.new/gcc/config/i386/linux.h 2012-11-29 15:45:43.802377940 +0100
-@@ -101,6 +101,7 @@
+--- a/gcc/config/i386/linux.h
++++ b/gcc/config/i386/linux.h
+@@ -101,6 +101,7 @@ along with GCC; see the file COPYING3.
/* These macros may be overridden in k*bsd-gnu.h and i386/k*bsd-gnu.h. */
#define LINK_EMULATION "elf_i386"
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
@@ -42,10 +31,9 @@ diff -urN gcc-linaro-4.5-2012.03/gcc/config/i386/linux.h gcc-linaro-4.5-2012.03.
#undef ASM_SPEC
#define ASM_SPEC \
-diff -urN gcc-linaro-4.5-2012.03/gcc/config/i386/linux64.h gcc-linaro-4.5-2012.03.new/gcc/config/i386/linux64.h
---- gcc-linaro-4.5-2012.03/gcc/config/i386/linux64.h 2012-03-12 12:29:55.000000000 +0100
-+++ gcc-linaro-4.5-2012.03.new/gcc/config/i386/linux64.h 2012-11-29 15:45:43.802377940 +0100
-@@ -61,6 +61,9 @@
+--- a/gcc/config/i386/linux64.h
++++ b/gcc/config/i386/linux64.h
+@@ -61,6 +61,9 @@ see the files COPYING3 and COPYING.RUNTI
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
@@ -55,10 +43,9 @@ diff -urN gcc-linaro-4.5-2012.03/gcc/config/i386/linux64.h gcc-linaro-4.5-2012.0
#if TARGET_64BIT_DEFAULT
#define SPEC_32 "m32"
#define SPEC_64 "!m32"
-diff -urN gcc-linaro-4.5-2012.03/gcc/config/linux.h gcc-linaro-4.5-2012.03.new/gcc/config/linux.h
---- gcc-linaro-4.5-2012.03/gcc/config/linux.h 2012-03-12 12:29:55.000000000 +0100
-+++ gcc-linaro-4.5-2012.03.new/gcc/config/linux.h 2012-11-29 15:46:48.982379607 +0100
-@@ -86,6 +86,7 @@
+--- a/gcc/config/linux.h
++++ b/gcc/config/linux.h
+@@ -86,6 +86,7 @@ see the files COPYING3 and COPYING.RUNTI
#define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
#define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
@@ -66,7 +53,7 @@ diff -urN gcc-linaro-4.5-2012.03/gcc/config/linux.h gcc-linaro-4.5-2012.03.new/g
#define LINUX_TARGET_OS_CPP_BUILTINS() \
do { \
-@@ -120,18 +121,21 @@
+@@ -120,18 +121,21 @@ see the files COPYING3 and COPYING.RUNTI
uClibc or Bionic is the default C library and whether
-muclibc or -mglibc or -mbionic has been passed to change the default. */
@@ -96,7 +83,7 @@ diff -urN gcc-linaro-4.5-2012.03/gcc/config/linux.h gcc-linaro-4.5-2012.03.new/g
#else
#error "Unsupported DEFAULT_LIBC"
#endif /* DEFAULT_LIBC */
-@@ -149,13 +153,13 @@
+@@ -149,13 +153,13 @@ see the files COPYING3 and COPYING.RUNTI
#define LINUX_DYNAMIC_LINKER \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
@@ -113,10 +100,9 @@ diff -urN gcc-linaro-4.5-2012.03/gcc/config/linux.h gcc-linaro-4.5-2012.03.new/g
/* Determine whether the entire c99 runtime
is present in the runtime library. */
-diff -urN gcc-linaro-4.5-2012.03/gcc/config/linux.opt gcc-linaro-4.5-2012.03.new/gcc/config/linux.opt
---- gcc-linaro-4.5-2012.03/gcc/config/linux.opt 2012-03-12 12:29:55.000000000 +0100
-+++ gcc-linaro-4.5-2012.03.new/gcc/config/linux.opt 2012-11-29 15:45:43.802377940 +0100
-@@ -30,3 +30,7 @@
+--- a/gcc/config/linux.opt
++++ b/gcc/config/linux.opt
+@@ -30,3 +30,7 @@ Use GNU C library
muclibc
Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) VarExists Negative(mbionic)
Use uClibc C library
@@ -124,10 +110,9 @@ diff -urN gcc-linaro-4.5-2012.03/gcc/config/linux.opt gcc-linaro-4.5-2012.03.new
+mmusl
+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc)
+Use musl C library
-diff -urN gcc-linaro-4.5-2012.03/gcc/config/mips/linux.h gcc-linaro-4.5-2012.03.new/gcc/config/mips/linux.h
---- gcc-linaro-4.5-2012.03/gcc/config/mips/linux.h 2012-03-12 12:29:55.000000000 +0100
-+++ gcc-linaro-4.5-2012.03.new/gcc/config/mips/linux.h 2012-11-29 15:45:43.802377940 +0100
-@@ -66,6 +66,8 @@
+--- a/gcc/config/mips/linux.h
++++ b/gcc/config/mips/linux.h
+@@ -66,6 +66,8 @@ along with GCC; see the file COPYING3.
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
@@ -136,10 +121,9 @@ diff -urN gcc-linaro-4.5-2012.03/gcc/config/mips/linux.h gcc-linaro-4.5-2012.03.
/* Borrowed from sparc/linux.h */
#undef LINK_SPEC
#define LINK_SPEC \
-diff -urN gcc-linaro-4.5-2012.03/gcc/config/mips/linux64.h gcc-linaro-4.5-2012.03.new/gcc/config/mips/linux64.h
---- gcc-linaro-4.5-2012.03/gcc/config/mips/linux64.h 2012-03-12 12:29:55.000000000 +0100
-+++ gcc-linaro-4.5-2012.03.new/gcc/config/mips/linux64.h 2012-11-29 15:48:10.542381697 +0100
-@@ -39,8 +39,11 @@
+--- a/gcc/config/mips/linux64.h
++++ b/gcc/config/mips/linux64.h
+@@ -39,8 +39,11 @@ along with GCC; see the file COPYING3.
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"
#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
@@ -152,10 +136,9 @@ diff -urN gcc-linaro-4.5-2012.03/gcc/config/mips/linux64.h gcc-linaro-4.5-2012.0
#undef LINK_SPEC
#define LINK_SPEC "\
-diff -urN gcc-linaro-4.5-2012.03/gcc/config.gcc gcc-linaro-4.5-2012.03.new/gcc/config.gcc
---- gcc-linaro-4.5-2012.03/gcc/config.gcc 2012-03-12 12:29:55.000000000 +0100
-+++ gcc-linaro-4.5-2012.03.new/gcc/config.gcc 2012-11-29 15:46:18.474378826 +0100
-@@ -514,7 +514,7 @@
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -514,7 +514,7 @@ case ${target} in
tmake_file="$tmake_file t-gnu";;
esac
# Common C libraries.
@@ -164,7 +147,7 @@ diff -urN gcc-linaro-4.5-2012.03/gcc/config.gcc gcc-linaro-4.5-2012.03.new/gcc/c
# glibc / uclibc / bionic switch.
# uclibc and bionic aren't usable for GNU/Hurd and neither for GNU/k*BSD.
case $target in
-@@ -530,6 +530,9 @@
+@@ -530,6 +530,9 @@ case ${target} in
*-*-*uclibc*)
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
;;
@@ -174,10 +157,9 @@ diff -urN gcc-linaro-4.5-2012.03/gcc/config.gcc gcc-linaro-4.5-2012.03.new/gcc/c
*)
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
;;
-diff -urN gcc-linaro-4.5-2012.03/gcc/ginclude/stddef.h gcc-linaro-4.5-2012.03.new/gcc/ginclude/stddef.h
---- gcc-linaro-4.5-2012.03/gcc/ginclude/stddef.h 2012-03-12 12:29:55.000000000 +0100
-+++ gcc-linaro-4.5-2012.03.new/gcc/ginclude/stddef.h 2012-11-29 15:45:43.802377940 +0100
-@@ -183,6 +183,7 @@
+--- a/gcc/ginclude/stddef.h
++++ b/gcc/ginclude/stddef.h
+@@ -183,6 +183,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
#ifndef _GCC_SIZE_T
#ifndef _SIZET_
#ifndef __size_t
@@ -185,7 +167,7 @@ diff -urN gcc-linaro-4.5-2012.03/gcc/ginclude/stddef.h gcc-linaro-4.5-2012.03.ne
#define __size_t__ /* BeOS */
#define __SIZE_T__ /* Cray Unicos/Mk */
#define _SIZE_T
-@@ -199,6 +200,7 @@
+@@ -199,6 +200,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define ___int_size_t_h
#define _GCC_SIZE_T
#define _SIZET_
@@ -193,7 +175,7 @@ diff -urN gcc-linaro-4.5-2012.03/gcc/ginclude/stddef.h gcc-linaro-4.5-2012.03.ne
#if defined (__FreeBSD__) && (__FreeBSD__ >= 5)
/* __size_t is a typedef on FreeBSD 5!, must not trash it. */
#else
-@@ -213,6 +215,7 @@
+@@ -213,6 +215,7 @@ typedef __SIZE_TYPE__ size_t;
typedef long ssize_t;
#endif /* __BEOS__ */
#endif /* !(defined (__GNUG__) && defined (size_t)) */
@@ -201,9 +183,8 @@ diff -urN gcc-linaro-4.5-2012.03/gcc/ginclude/stddef.h gcc-linaro-4.5-2012.03.ne
#endif /* __size_t */
#endif /* _SIZET_ */
#endif /* _GCC_SIZE_T */
-diff -urN gcc-linaro-4.5-2012.03/libgomp/config/posix/time.c gcc-linaro-4.5-2012.03.new/libgomp/config/posix/time.c
---- gcc-linaro-4.5-2012.03/libgomp/config/posix/time.c 2012-03-12 12:29:55.000000000 +0100
-+++ gcc-linaro-4.5-2012.03.new/libgomp/config/posix/time.c 2012-11-29 15:45:43.802377940 +0100
+--- a/libgomp/config/posix/time.c
++++ b/libgomp/config/posix/time.c
@@ -28,6 +28,8 @@
The following implementation uses the most simple POSIX routines.
If present, POSIX 4 clocks should be used instead. */
@@ -213,10 +194,9 @@ diff -urN gcc-linaro-4.5-2012.03/libgomp/config/posix/time.c gcc-linaro-4.5-2012
#include "libgomp.h"
#include <unistd.h>
#if TIME_WITH_SYS_TIME
-diff -urN gcc-linaro-4.5-2012.03/libstdc++-v3/configure.host gcc-linaro-4.5-2012.03.new/libstdc++-v3/configure.host
---- gcc-linaro-4.5-2012.03/libstdc++-v3/configure.host 2012-03-12 12:29:55.000000000 +0100
-+++ gcc-linaro-4.5-2012.03.new/libstdc++-v3/configure.host 2012-11-29 15:45:43.806377939 +0100
-@@ -236,6 +236,13 @@
+--- a/libstdc++-v3/configure.host
++++ b/libstdc++-v3/configure.host
+@@ -236,6 +236,13 @@ case "${host_os}" in
os_include_dir="os/bsd/freebsd"
;;
gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
@@ -230,7 +210,7 @@ diff -urN gcc-linaro-4.5-2012.03/libstdc++-v3/configure.host gcc-linaro-4.5-2012
if [ "$uclibc" = "yes" ]; then
os_include_dir="os/uclibc"
elif [ "$bionic" = "yes" ]; then
-@@ -244,6 +251,9 @@
+@@ -244,6 +251,9 @@ case "${host_os}" in
os_include_dir="os/gnu-linux"
fi
;;
diff --git a/toolchain/gcc/patches/4.5-linaro/200-ppc_include_config_linux_h.patch b/toolchain/gcc/patches/4.5-linaro/200-ppc_include_config_linux_h.patch
index 09b4a3e04..f5580356a 100644
--- a/toolchain/gcc/patches/4.5-linaro/200-ppc_include_config_linux_h.patch
+++ b/toolchain/gcc/patches/4.5-linaro/200-ppc_include_config_linux_h.patch
@@ -1,6 +1,6 @@
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
-@@ -2028,7 +2028,7 @@ powerpc-*-rtems*)
+@@ -2031,7 +2031,7 @@ powerpc-*-rtems*)
tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-rtems t-rtems rs6000/t-ppccomm"
;;
powerpc-*-linux* | powerpc64-*-linux*)
diff --git a/toolchain/gcc/patches/4.5-linaro/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches/4.5-linaro/840-armv4_pass_fix-v4bx_to_ld.patch
index e2e33c2b3..97ef38590 100644
--- a/toolchain/gcc/patches/4.5-linaro/840-armv4_pass_fix-v4bx_to_ld.patch
+++ b/toolchain/gcc/patches/4.5-linaro/840-armv4_pass_fix-v4bx_to_ld.patch
@@ -1,8 +1,8 @@
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
-@@ -63,10 +63,14 @@
- #undef GLIBC_DYNAMIC_LINKER
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
+@@ -67,10 +67,14 @@
+ #undef MUSL_DYNAMIC_LINKER
+ #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-arm.so.1"
+/* For armv4 we pass --fix-v4bx to linker to support EABI */
+#undef TARGET_FIX_V4BX_SPEC
diff --git a/toolchain/gcc/patches/4.5-linaro/850-use_shared_libgcc.patch b/toolchain/gcc/patches/4.5-linaro/850-use_shared_libgcc.patch
index 902edf58b..875287b93 100644
--- a/toolchain/gcc/patches/4.5-linaro/850-use_shared_libgcc.patch
+++ b/toolchain/gcc/patches/4.5-linaro/850-use_shared_libgcc.patch
@@ -1,6 +1,6 @@
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
-@@ -95,10 +95,6 @@
+@@ -99,10 +99,6 @@
#define ENDFILE_SPEC \
LINUX_OR_ANDROID_LD (LINUX_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
@@ -24,7 +24,7 @@
#define LINUX_TARGET_LINK_SPEC "%{h*} %{version:-v} \
--- a/gcc/config/linux.h
+++ b/gcc/config/linux.h
-@@ -116,6 +116,10 @@ see the files COPYING3 and COPYING.RUNTI
+@@ -117,6 +117,10 @@ see the files COPYING3 and COPYING.RUNTI
#define USE_LD_AS_NEEDED 1
#endif
diff --git a/toolchain/gcc/patches/4.5-linaro/999-coldfire.patch b/toolchain/gcc/patches/4.5-linaro/999-coldfire.patch
index c8e4bd03a..fabb8ef3a 100644
--- a/toolchain/gcc/patches/4.5-linaro/999-coldfire.patch
+++ b/toolchain/gcc/patches/4.5-linaro/999-coldfire.patch
@@ -1,6 +1,6 @@
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
-@@ -1690,6 +1690,7 @@ m68k-*-linux*) # Motorola m68k's runnin
+@@ -1693,6 +1693,7 @@ m68k-*-linux*) # Motorola m68k's runnin
if test x$sjlj != x1; then
tmake_file="$tmake_file m68k/t-slibgcc-elf-ver"
fi
diff --git a/toolchain/gcc/patches/4.6-linaro/200-musl.patch b/toolchain/gcc/patches/4.6-linaro/200-musl.patch
index 86a225cf9..f861e0b51 100644
--- a/toolchain/gcc/patches/4.6-linaro/200-musl.patch
+++ b/toolchain/gcc/patches/4.6-linaro/200-musl.patch
@@ -1,4 +1,3 @@
-diff --git a/config.sub b/config.sub
--- a/config.sub
+++ b/config.sub
@@ -125,6 +125,7 @@ esac
@@ -9,18 +8,9 @@ diff --git a/config.sub b/config.sub
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
-@@ -1310,6 +1311,7 @@ case $os in
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-uclibc* \
-+ | -linux-musl* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-diff --git a/gcc/config.gcc b/gcc/config.gcc
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
-@@ -478,7 +478,7 @@ case ${target} in
+@@ -485,7 +485,7 @@ case ${target} in
esac
# Common C libraries.
@@ -29,7 +19,7 @@ diff --git a/gcc/config.gcc b/gcc/config.gcc
# Common parts for widely ported systems.
case ${target} in
-@@ -591,6 +591,9 @@ case ${target} in
+@@ -598,6 +598,9 @@ case ${target} in
*-*-*uclibc*)
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
;;
@@ -39,12 +29,11 @@ diff --git a/gcc/config.gcc b/gcc/config.gcc
*)
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
;;
-diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
-@@ -64,6 +64,10 @@
- #undef GLIBC_DYNAMIC_LINKER
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
+@@ -78,6 +78,10 @@
+ %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
+ %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
+/* musl has no "classic" (i.e. broken) mode */
+#undef MUSL_DYNAMIC_LINKER
@@ -53,10 +42,9 @@ diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
/* 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/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
--- a/gcc/config/i386/linux.h
+++ b/gcc/config/i386/linux.h
-@@ -93,6 +93,7 @@ along with GCC; see the file COPYING3. If not see
+@@ -93,6 +93,7 @@ along with GCC; see the file COPYING3.
/* These macros may be overridden in k*bsd-gnu.h and i386/k*bsd-gnu.h. */
#define LINK_EMULATION "elf_i386"
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
@@ -64,10 +52,9 @@ diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
#undef ASM_SPEC
#define ASM_SPEC \
-diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
--- a/gcc/config/i386/linux64.h
+++ b/gcc/config/i386/linux64.h
-@@ -65,6 +65,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+@@ -65,6 +65,9 @@ see the files COPYING3 and COPYING.RUNTI
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
@@ -77,10 +64,9 @@ diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
#if TARGET_64BIT_DEFAULT
#define SPEC_32 "m32"
#define SPEC_64 "!m32"
-diff --git a/gcc/config/linux.h b/gcc/config/linux.h
--- a/gcc/config/linux.h
+++ b/gcc/config/linux.h
-@@ -33,10 +33,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+@@ -33,10 +33,12 @@ see the files COPYING3 and COPYING.RUNTI
#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
#define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
#define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
@@ -93,7 +79,7 @@ diff --git a/gcc/config/linux.h b/gcc/config/linux.h
#endif
#define LINUX_TARGET_OS_CPP_BUILTINS() \
-@@ -54,18 +56,21 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+@@ -54,18 +56,21 @@ see the files COPYING3 and COPYING.RUNTI
uClibc or Bionic is the default C library and whether
-muclibc or -mglibc or -mbionic has been passed to change the default. */
@@ -123,7 +109,7 @@ diff --git a/gcc/config/linux.h b/gcc/config/linux.h
#else
#error "Unsupported DEFAULT_LIBC"
#endif /* DEFAULT_LIBC */
-@@ -83,13 +88,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+@@ -83,13 +88,13 @@ see the files COPYING3 and COPYING.RUNTI
#define LINUX_DYNAMIC_LINKER \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
@@ -140,7 +126,6 @@ diff --git a/gcc/config/linux.h b/gcc/config/linux.h
/* Determine whether the entire c99 runtime
is present in the runtime library. */
-diff --git a/gcc/config/linux.opt b/gcc/config/linux.opt
--- a/gcc/config/linux.opt
+++ b/gcc/config/linux.opt
@@ -30,3 +30,7 @@ Use GNU C library
@@ -151,10 +136,9 @@ diff --git a/gcc/config/linux.opt b/gcc/config/linux.opt
+mmusl
+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc)
+Use musl C library
-diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
--- a/gcc/config/mips/linux.h
+++ b/gcc/config/mips/linux.h
-@@ -63,6 +63,8 @@ along with GCC; see the file COPYING3. If not see
+@@ -63,6 +63,8 @@ along with GCC; see the file COPYING3.
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
@@ -163,7 +147,6 @@ diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
/* Borrowed from sparc/linux.h */
#undef LINK_SPEC
#define LINK_SPEC \
-diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
--- a/gcc/ginclude/stddef.h
+++ b/gcc/ginclude/stddef.h
@@ -184,6 +184,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
@@ -190,7 +173,6 @@ diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
#endif /* __size_t */
#endif /* _SIZET_ */
#endif /* _GCC_SIZE_T */
-diff --git a/libgomp/config/posix/time.c b/libgomp/config/posix/time.c
--- a/libgomp/config/posix/time.c
+++ b/libgomp/config/posix/time.c
@@ -28,6 +28,8 @@
@@ -202,7 +184,6 @@ diff --git a/libgomp/config/posix/time.c b/libgomp/config/posix/time.c
#include "libgomp.h"
#include <unistd.h>
#if TIME_WITH_SYS_TIME
-diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
--- a/libstdc++-v3/configure.host
+++ b/libstdc++-v3/configure.host
@@ -237,6 +237,13 @@ case "${host_os}" in
@@ -229,10 +210,9 @@ diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
hpux*)
os_include_dir="os/hpux"
;;
-diff --git a/gcc/config/mips/linux64.h b/gcc/config/mips/linux64.h
---- a/gcc/config/mips/linux64.h 2012-11-12 15:28:31.000000000 +0100
-+++ b/gcc/config/mips/linux64.h 2012-11-29 15:11:14.006324944 +0100
-@@ -40,9 +40,12 @@
+--- a/gcc/config/mips/linux64.h
++++ b/gcc/config/mips/linux64.h
+@@ -40,9 +40,12 @@ along with GCC; see the file COPYING3.
#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
#define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
diff --git a/toolchain/gcc/patches/4.6-linaro/830-arm_unbreak_armv4t.patch b/toolchain/gcc/patches/4.6-linaro/830-arm_unbreak_armv4t.patch
index 37f8f2a54..7e2ed6987 100644
--- a/toolchain/gcc/patches/4.6-linaro/830-arm_unbreak_armv4t.patch
+++ b/toolchain/gcc/patches/4.6-linaro/830-arm_unbreak_armv4t.patch
@@ -2,7 +2,7 @@ http://sourceware.org/ml/crossgcc/2008-05/msg00009.html
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
-@@ -45,7 +45,7 @@
+@@ -46,7 +46,7 @@
The ARM10TDMI core is the default for armv5t, so set
SUBTARGET_CPU_DEFAULT to achieve this. */
#undef SUBTARGET_CPU_DEFAULT
diff --git a/toolchain/gcc/patches/4.6-linaro/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches/4.6-linaro/840-armv4_pass_fix-v4bx_to_ld.patch
index 67c374d9a..3be371be6 100644
--- a/toolchain/gcc/patches/4.6-linaro/840-armv4_pass_fix-v4bx_to_ld.patch
+++ b/toolchain/gcc/patches/4.6-linaro/840-armv4_pass_fix-v4bx_to_ld.patch
@@ -1,8 +1,8 @@
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
-@@ -64,10 +64,15 @@
- #undef GLIBC_DYNAMIC_LINKER
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
+@@ -82,10 +82,15 @@
+ #undef MUSL_DYNAMIC_LINKER
+ #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-arm.so.1"
+/* For armv4 we pass --fix-v4bx to linker to support EABI */
+#undef TARGET_FIX_V4BX_SPEC
diff --git a/toolchain/gcc/patches/4.6-linaro/850-use_shared_libgcc.patch b/toolchain/gcc/patches/4.6-linaro/850-use_shared_libgcc.patch
index a197bed7a..1a7f62a7e 100644
--- a/toolchain/gcc/patches/4.6-linaro/850-use_shared_libgcc.patch
+++ b/toolchain/gcc/patches/4.6-linaro/850-use_shared_libgcc.patch
@@ -1,6 +1,6 @@
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
-@@ -96,10 +96,6 @@
+@@ -115,10 +115,6 @@
#define ENDFILE_SPEC \
LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
@@ -24,7 +24,7 @@
#define LINUX_TARGET_LINK_SPEC "%{h*} \
--- a/gcc/config/linux.h
+++ b/gcc/config/linux.h
-@@ -50,6 +50,10 @@ see the files COPYING3 and COPYING.RUNTI
+@@ -52,6 +52,10 @@ see the files COPYING3 and COPYING.RUNTI
builtin_assert ("system=posix"); \
} while (0)
diff --git a/toolchain/gcc/patches/4.6-linaro/860-uclibc_use_eh_frame.patch b/toolchain/gcc/patches/4.6-linaro/860-uclibc_use_eh_frame.patch
index 6b85d4913..381a14bc9 100644
--- a/toolchain/gcc/patches/4.6-linaro/860-uclibc_use_eh_frame.patch
+++ b/toolchain/gcc/patches/4.6-linaro/860-uclibc_use_eh_frame.patch
@@ -1,6 +1,6 @@
--- a/gcc/crtstuff.c
+++ b/gcc/crtstuff.c
-@@ -100,15 +100,20 @@
+@@ -100,15 +100,20 @@ call_ ## FUNC (void) \
#if defined(OBJECT_FORMAT_ELF) \
&& !defined(OBJECT_FORMAT_FLAT) \
&& defined(HAVE_LD_EH_FRAME_HDR) \
diff --git a/toolchain/gcc/patches/4.6-linaro/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches/4.6-linaro/870-ppc_no_crtsavres.patch
index 874774348..0e15ffc39 100644
--- a/toolchain/gcc/patches/4.6-linaro/870-ppc_no_crtsavres.patch
+++ b/toolchain/gcc/patches/4.6-linaro/870-ppc_no_crtsavres.patch
@@ -1,6 +1,6 @@
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
-@@ -248,13 +248,13 @@
+@@ -248,13 +248,13 @@ do { \
/* Define cutoff for using external functions to save floating point.
When optimizing for size, use external functions when profitable. */
diff --git a/toolchain/gcc/patches/4.6-linaro/910-mbsd_multi.patch b/toolchain/gcc/patches/4.6-linaro/910-mbsd_multi.patch
index 45a551e6e..51bbc7f2b 100644
--- a/toolchain/gcc/patches/4.6-linaro/910-mbsd_multi.patch
+++ b/toolchain/gcc/patches/4.6-linaro/910-mbsd_multi.patch
@@ -209,7 +209,7 @@
-Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol
-Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol
-Wformat-security -Wformat-y2k @gol
-@@ -4497,6 +4497,22 @@ This option is only supported for C and
+@@ -4498,6 +4498,22 @@ This option is only supported for C and
@option{-Wall} and by @option{-pedantic}, which can be disabled with
@option{-Wno-pointer-sign}.
@@ -232,7 +232,7 @@
@item -Wstack-protector
@opindex Wstack-protector
@opindex Wno-stack-protector
-@@ -6319,7 +6335,7 @@ so, the first branch is redirected to ei
+@@ -6317,7 +6333,7 @@ so, the first branch is redirected to ei
second branch or a point immediately following it, depending on whether
the condition is known to be true or false.
diff --git a/toolchain/gcc/patches/4.6-linaro/999-coldfire.patch b/toolchain/gcc/patches/4.6-linaro/999-coldfire.patch
index e14561b89..0913f3497 100644
--- a/toolchain/gcc/patches/4.6-linaro/999-coldfire.patch
+++ b/toolchain/gcc/patches/4.6-linaro/999-coldfire.patch
@@ -1,6 +1,6 @@
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
-@@ -1795,7 +1795,7 @@
+@@ -1805,7 +1805,7 @@ m68k-*-linux*) # Motorola m68k's runnin
default_m68k_cpu=68020
default_cf_cpu=5475
with_arch=${with_arch:-m68k}
diff --git a/toolchain/gcc/patches/4.6.3/000-gcc-bug-54369.patch b/toolchain/gcc/patches/4.6.3/000-gcc-bug-54369.patch
index b91f0eb62..936b7410e 100644
--- a/toolchain/gcc/patches/4.6.3/000-gcc-bug-54369.patch
+++ b/toolchain/gcc/patches/4.6.3/000-gcc-bug-54369.patch
@@ -14,9 +14,9 @@ Modified:
branches/gcc-4_6-branch/gcc/config/mips/mips.c
branches/gcc-4_6-branch/gcc/config/sparc/sparc.c
---
---- gcc-4_6-branch/gcc/config/mips/mips.c 2012/09/02 10:36:54 190859
-+++ gcc-4_6-branch/gcc/config/mips/mips.c 2012/09/02 10:37:49 190860
-@@ -15083,7 +15083,10 @@
+--- a/gcc/config/mips/mips.c
++++ b/gcc/config/mips/mips.c
+@@ -15083,7 +15083,10 @@ mips_reorg (void)
}
if (optimize > 0 && flag_delayed_branch)
@@ -28,9 +28,9 @@ Modified:
mips_reorg_process_insns ();
if (!TARGET_MIPS16
&& TARGET_EXPLICIT_RELOCS
---- gcc-4_6-branch/gcc/config/sparc/sparc.c 2012/09/02 10:36:54 190859
-+++ gcc-4_6-branch/gcc/config/sparc/sparc.c 2012/09/02 10:37:49 190860
-@@ -9456,7 +9456,10 @@
+--- a/gcc/config/sparc/sparc.c
++++ b/gcc/config/sparc/sparc.c
+@@ -9452,7 +9452,10 @@ sparc_reorg (void)
/* We need to have the (essentially) final form of the insn stream in order
to properly detect the various hazards. Run delay slot scheduling. */
if (optimize > 0 && flag_delayed_branch)
@@ -42,4 +42,3 @@ Modified:
/* Now look for specific patterns in the insn stream. */
for (insn = get_insns (); insn; insn = next)
-
diff --git a/toolchain/gcc/patches/4.6.3/002-siginfo_t.patch b/toolchain/gcc/patches/4.6.3/002-siginfo_t.patch
index a19b7f221..5fc29bb27 100644
--- a/toolchain/gcc/patches/4.6.3/002-siginfo_t.patch
+++ b/toolchain/gcc/patches/4.6.3/002-siginfo_t.patch
@@ -31,10 +31,9 @@ gcc/
* config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Likewise.
---
-diff -urN gcc-linaro-4.6-2012.02/gcc/config/alpha/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/alpha/linux-unwind.h
---- gcc-linaro-4.6-2012.02/gcc/config/alpha/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
-+++ gcc-linaro-4.6-2012.02.new/gcc/config/alpha/linux-unwind.h 2012-09-13 10:25:52.919072751 +0200
-@@ -49,7 +49,7 @@
+--- a/gcc/config/alpha/linux-unwind.h
++++ b/gcc/config/alpha/linux-unwind.h
+@@ -49,7 +49,7 @@ alpha_fallback_frame_state (struct _Unwi
else if (pc[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */
{
struct rt_sigframe {
@@ -43,10 +42,9 @@ diff -urN gcc-linaro-4.6-2012.02/gcc/config/alpha/linux-unwind.h gcc-linaro-4.6-
struct ucontext uc;
} *rt_ = context->cfa;
sc = &rt_->uc.uc_mcontext;
-diff -urN gcc-linaro-4.6-2012.02/gcc/config/bfin/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/bfin/linux-unwind.h
---- gcc-linaro-4.6-2012.02/gcc/config/bfin/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
-+++ gcc-linaro-4.6-2012.02.new/gcc/config/bfin/linux-unwind.h 2012-09-13 10:26:14.819073313 +0200
-@@ -48,10 +48,10 @@
+--- a/gcc/config/bfin/linux-unwind.h
++++ b/gcc/config/bfin/linux-unwind.h
+@@ -48,10 +48,10 @@ bfin_fallback_frame_state (struct _Unwin
{
struct rt_sigframe {
int sig;
@@ -59,10 +57,9 @@ diff -urN gcc-linaro-4.6-2012.02/gcc/config/bfin/linux-unwind.h gcc-linaro-4.6-2
struct ucontext uc;
} *rt_ = context->cfa;
-diff -urN gcc-linaro-4.6-2012.02/gcc/config/i386/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/i386/linux-unwind.h
---- gcc-linaro-4.6-2012.02/gcc/config/i386/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
-+++ gcc-linaro-4.6-2012.02.new/gcc/config/i386/linux-unwind.h 2012-09-13 10:26:41.891074005 +0200
-@@ -133,9 +133,9 @@
+--- a/gcc/config/i386/linux-unwind.h
++++ b/gcc/config/i386/linux-unwind.h
+@@ -133,9 +133,9 @@ x86_fallback_frame_state (struct _Unwind
{
struct rt_sigframe {
int sig;
@@ -74,10 +71,9 @@ diff -urN gcc-linaro-4.6-2012.02/gcc/config/i386/linux-unwind.h gcc-linaro-4.6-2
struct ucontext uc;
} *rt_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
-diff -urN gcc-linaro-4.6-2012.02/gcc/config/ia64/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/ia64/linux-unwind.h
---- gcc-linaro-4.6-2012.02/gcc/config/ia64/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
-+++ gcc-linaro-4.6-2012.02.new/gcc/config/ia64/linux-unwind.h 2012-09-13 10:26:59.251074450 +0200
-@@ -47,7 +47,7 @@
+--- a/gcc/config/ia64/linux-unwind.h
++++ b/gcc/config/ia64/linux-unwind.h
+@@ -47,7 +47,7 @@ ia64_fallback_frame_state (struct _Unwin
struct sigframe {
char scratch[16];
unsigned long sig_number;
@@ -86,7 +82,7 @@ diff -urN gcc-linaro-4.6-2012.02/gcc/config/ia64/linux-unwind.h gcc-linaro-4.6-2
struct sigcontext *sc;
} *frame_ = (struct sigframe *)context->psp;
struct sigcontext *sc = frame_->sc;
-@@ -137,7 +137,7 @@
+@@ -137,7 +137,7 @@ ia64_handle_unwabi (struct _Unwind_Conte
struct sigframe {
char scratch[16];
unsigned long sig_number;
@@ -95,10 +91,9 @@ diff -urN gcc-linaro-4.6-2012.02/gcc/config/ia64/linux-unwind.h gcc-linaro-4.6-2
struct sigcontext *sc;
} *frame = (struct sigframe *)context->psp;
struct sigcontext *sc = frame->sc;
-diff -urN gcc-linaro-4.6-2012.02/gcc/config/mips/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/mips/linux-unwind.h
---- gcc-linaro-4.6-2012.02/gcc/config/mips/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
-+++ gcc-linaro-4.6-2012.02.new/gcc/config/mips/linux-unwind.h 2012-09-13 10:27:17.947074929 +0200
-@@ -75,7 +75,7 @@
+--- a/gcc/config/mips/linux-unwind.h
++++ b/gcc/config/mips/linux-unwind.h
+@@ -75,7 +75,7 @@ mips_fallback_frame_state (struct _Unwin
struct rt_sigframe {
u_int32_t ass[4]; /* Argument save space for o32. */
u_int32_t trampoline[2];
@@ -107,10 +102,9 @@ diff -urN gcc-linaro-4.6-2012.02/gcc/config/mips/linux-unwind.h gcc-linaro-4.6-2
_sig_ucontext_t uc;
} *rt_ = context->cfa;
sc = &rt_->uc.uc_mcontext;
-diff -urN gcc-linaro-4.6-2012.02/gcc/config/pa/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/pa/linux-unwind.h
---- gcc-linaro-4.6-2012.02/gcc/config/pa/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
-+++ gcc-linaro-4.6-2012.02.new/gcc/config/pa/linux-unwind.h 2012-09-13 10:27:27.491075173 +0200
-@@ -63,7 +63,7 @@
+--- a/gcc/config/pa/linux-unwind.h
++++ b/gcc/config/pa/linux-unwind.h
+@@ -63,7 +63,7 @@ pa32_fallback_frame_state (struct _Unwin
int i;
struct sigcontext *sc;
struct rt_sigframe {
@@ -119,10 +113,9 @@ diff -urN gcc-linaro-4.6-2012.02/gcc/config/pa/linux-unwind.h gcc-linaro-4.6-201
struct ucontext uc;
} *frame;
-diff -urN gcc-linaro-4.6-2012.02/gcc/config/sh/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/sh/linux-unwind.h
---- gcc-linaro-4.6-2012.02/gcc/config/sh/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
-+++ gcc-linaro-4.6-2012.02.new/gcc/config/sh/linux-unwind.h 2012-09-13 10:27:58.551075969 +0200
-@@ -80,9 +80,9 @@
+--- a/gcc/config/sh/linux-unwind.h
++++ b/gcc/config/sh/linux-unwind.h
+@@ -80,9 +80,9 @@ shmedia_fallback_frame_state (struct _Un
&& (*(unsigned long *) (pc+11) == 0x6ff0fff0))
{
struct rt_sigframe {
@@ -134,7 +127,7 @@ diff -urN gcc-linaro-4.6-2012.02/gcc/config/sh/linux-unwind.h gcc-linaro-4.6-201
struct ucontext uc;
} *rt_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
-@@ -179,7 +179,7 @@
+@@ -179,7 +179,7 @@ sh_fallback_frame_state (struct _Unwind_
&& (*(unsigned short *) (pc+14) == 0x00ad))))
{
struct rt_sigframe {
@@ -143,10 +136,9 @@ diff -urN gcc-linaro-4.6-2012.02/gcc/config/sh/linux-unwind.h gcc-linaro-4.6-201
struct ucontext uc;
} *rt_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
-diff -urN gcc-linaro-4.6-2012.02/gcc/config/xtensa/linux-unwind.h gcc-linaro-4.6-2012.02.new/gcc/config/xtensa/linux-unwind.h
---- gcc-linaro-4.6-2012.02/gcc/config/xtensa/linux-unwind.h 2012-02-07 11:33:31.000000000 +0100
-+++ gcc-linaro-4.6-2012.02.new/gcc/config/xtensa/linux-unwind.h 2012-09-13 10:28:13.827076359 +0200
-@@ -62,7 +62,7 @@
+--- a/gcc/config/xtensa/linux-unwind.h
++++ b/gcc/config/xtensa/linux-unwind.h
+@@ -62,7 +62,7 @@ xtensa_fallback_frame_state (struct _Unw
struct sigcontext *sc;
struct rt_sigframe {
diff --git a/toolchain/gcc/patches/4.6.3/200-musl.patch b/toolchain/gcc/patches/4.6.3/200-musl.patch
index 86a225cf9..d18abbe45 100644
--- a/toolchain/gcc/patches/4.6.3/200-musl.patch
+++ b/toolchain/gcc/patches/4.6.3/200-musl.patch
@@ -1,4 +1,3 @@
-diff --git a/config.sub b/config.sub
--- a/config.sub
+++ b/config.sub
@@ -125,6 +125,7 @@ esac
@@ -9,15 +8,6 @@ diff --git a/config.sub b/config.sub
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
-@@ -1310,6 +1311,7 @@ case $os in
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-uclibc* \
-+ | -linux-musl* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-diff --git a/gcc/config.gcc b/gcc/config.gcc
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -478,7 +478,7 @@ case ${target} in
@@ -39,7 +29,6 @@ diff --git a/gcc/config.gcc b/gcc/config.gcc
*)
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
;;
-diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
@@ -64,6 +64,10 @@
@@ -53,10 +42,9 @@ diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
/* 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/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
--- a/gcc/config/i386/linux.h
+++ b/gcc/config/i386/linux.h
-@@ -93,6 +93,7 @@ along with GCC; see the file COPYING3. If not see
+@@ -93,6 +93,7 @@ along with GCC; see the file COPYING3.
/* These macros may be overridden in k*bsd-gnu.h and i386/k*bsd-gnu.h. */
#define LINK_EMULATION "elf_i386"
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
@@ -64,10 +52,9 @@ diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
#undef ASM_SPEC
#define ASM_SPEC \
-diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
--- a/gcc/config/i386/linux64.h
+++ b/gcc/config/i386/linux64.h
-@@ -65,6 +65,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+@@ -65,6 +65,9 @@ see the files COPYING3 and COPYING.RUNTI
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
@@ -77,10 +64,9 @@ diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
#if TARGET_64BIT_DEFAULT
#define SPEC_32 "m32"
#define SPEC_64 "!m32"
-diff --git a/gcc/config/linux.h b/gcc/config/linux.h
--- a/gcc/config/linux.h
+++ b/gcc/config/linux.h
-@@ -33,10 +33,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+@@ -33,10 +33,12 @@ see the files COPYING3 and COPYING.RUNTI
#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
#define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
#define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
@@ -93,7 +79,7 @@ diff --git a/gcc/config/linux.h b/gcc/config/linux.h
#endif
#define LINUX_TARGET_OS_CPP_BUILTINS() \
-@@ -54,18 +56,21 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+@@ -54,18 +56,21 @@ see the files COPYING3 and COPYING.RUNTI
uClibc or Bionic is the default C library and whether
-muclibc or -mglibc or -mbionic has been passed to change the default. */
@@ -123,7 +109,7 @@ diff --git a/gcc/config/linux.h b/gcc/config/linux.h
#else
#error "Unsupported DEFAULT_LIBC"
#endif /* DEFAULT_LIBC */
-@@ -83,13 +88,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+@@ -83,13 +88,13 @@ see the files COPYING3 and COPYING.RUNTI
#define LINUX_DYNAMIC_LINKER \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
@@ -140,7 +126,6 @@ diff --git a/gcc/config/linux.h b/gcc/config/linux.h
/* Determine whether the entire c99 runtime
is present in the runtime library. */
-diff --git a/gcc/config/linux.opt b/gcc/config/linux.opt
--- a/gcc/config/linux.opt
+++ b/gcc/config/linux.opt
@@ -30,3 +30,7 @@ Use GNU C library
@@ -151,10 +136,9 @@ diff --git a/gcc/config/linux.opt b/gcc/config/linux.opt
+mmusl
+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc)
+Use musl C library
-diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
--- a/gcc/config/mips/linux.h
+++ b/gcc/config/mips/linux.h
-@@ -63,6 +63,8 @@ along with GCC; see the file COPYING3. If not see
+@@ -63,6 +63,8 @@ along with GCC; see the file COPYING3.
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
@@ -163,7 +147,6 @@ diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
/* Borrowed from sparc/linux.h */
#undef LINK_SPEC
#define LINK_SPEC \
-diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
--- a/gcc/ginclude/stddef.h
+++ b/gcc/ginclude/stddef.h
@@ -184,6 +184,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
@@ -190,7 +173,6 @@ diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
#endif /* __size_t */
#endif /* _SIZET_ */
#endif /* _GCC_SIZE_T */
-diff --git a/libgomp/config/posix/time.c b/libgomp/config/posix/time.c
--- a/libgomp/config/posix/time.c
+++ b/libgomp/config/posix/time.c
@@ -28,6 +28,8 @@
@@ -202,7 +184,6 @@ diff --git a/libgomp/config/posix/time.c b/libgomp/config/posix/time.c
#include "libgomp.h"
#include <unistd.h>
#if TIME_WITH_SYS_TIME
-diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
--- a/libstdc++-v3/configure.host
+++ b/libstdc++-v3/configure.host
@@ -237,6 +237,13 @@ case "${host_os}" in
@@ -229,10 +210,9 @@ diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
hpux*)
os_include_dir="os/hpux"
;;
-diff --git a/gcc/config/mips/linux64.h b/gcc/config/mips/linux64.h
---- a/gcc/config/mips/linux64.h 2012-11-12 15:28:31.000000000 +0100
-+++ b/gcc/config/mips/linux64.h 2012-11-29 15:11:14.006324944 +0100
-@@ -40,9 +40,12 @@
+--- a/gcc/config/mips/linux64.h
++++ b/gcc/config/mips/linux64.h
+@@ -40,9 +40,12 @@ along with GCC; see the file COPYING3.
#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
#define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
diff --git a/toolchain/gcc/patches/4.6.3/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches/4.6.3/840-armv4_pass_fix-v4bx_to_ld.patch
index 67c374d9a..5be6b9edf 100644
--- a/toolchain/gcc/patches/4.6.3/840-armv4_pass_fix-v4bx_to_ld.patch
+++ b/toolchain/gcc/patches/4.6.3/840-armv4_pass_fix-v4bx_to_ld.patch
@@ -1,8 +1,8 @@
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
-@@ -64,10 +64,15 @@
- #undef GLIBC_DYNAMIC_LINKER
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
+@@ -68,10 +68,15 @@
+ #undef MUSL_DYNAMIC_LINKER
+ #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-arm.so.1"
+/* For armv4 we pass --fix-v4bx to linker to support EABI */
+#undef TARGET_FIX_V4BX_SPEC
diff --git a/toolchain/gcc/patches/4.6.3/999-coldfire.patch b/toolchain/gcc/patches/4.6.3/999-coldfire.patch
index 6083e0bf8..29a98bf03 100644
--- a/toolchain/gcc/patches/4.6.3/999-coldfire.patch
+++ b/toolchain/gcc/patches/4.6.3/999-coldfire.patch
@@ -1,6 +1,6 @@
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
-@@ -1804,6 +1804,7 @@ m68k-*-linux*) # Motorola m68k's runnin
+@@ -1807,6 +1807,7 @@ m68k-*-linux*) # Motorola m68k's runnin
if test x$sjlj != x1; then
tmake_file="$tmake_file m68k/t-slibgcc-elf-ver"
fi
diff --git a/toolchain/gcc/patches/4.7-linaro/200-musl.patch b/toolchain/gcc/patches/4.7-linaro/200-musl.patch
index 55c6fd149..97355507c 100644
--- a/toolchain/gcc/patches/4.7-linaro/200-musl.patch
+++ b/toolchain/gcc/patches/4.7-linaro/200-musl.patch
@@ -1,7 +1,6 @@
-diff --git a/gcc/config.gcc b/gcc/config.gcc
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
-@@ -522,7 +522,7 @@
+@@ -529,7 +529,7 @@ case ${target} in
esac
# Common C libraries.
@@ -10,7 +9,7 @@ diff --git a/gcc/config.gcc b/gcc/config.gcc
# Common parts for widely ported systems.
case ${target} in
-@@ -625,6 +625,9 @@
+@@ -632,6 +632,9 @@ case ${target} in
*-*-*uclibc*)
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
;;
@@ -20,20 +19,19 @@ diff --git a/gcc/config.gcc b/gcc/config.gcc
*)
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
;;
-@@ -1722,6 +1725,7 @@
+@@ -1755,6 +1758,7 @@ microblaze*-linux*)
tm_file="${tm_file} dbxelf.h gnu-user.h linux.h microblaze/linux.h"
c_target_objs="${c_target_objs} microblaze-c.o"
cxx_target_objs="${cxx_target_objs} microblaze-c.o"
+ tmake_file="${tmake_file} microblaze/t-microblaze"
;;
- microblaze*-*-*)
- tm_file="${tm_file} dbxelf.h"
-diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
+ microblaze*-*-rtems*)
+ tm_file="${tm_file} dbxelf.h"
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
-@@ -64,6 +64,10 @@
- #undef GLIBC_DYNAMIC_LINKER
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
+@@ -78,6 +78,10 @@
+ %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
+ %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
+/* musl has no "classic" (i.e. broken) mode */
+#undef MUSL_DYNAMIC_LINKER
@@ -42,18 +40,16 @@ diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
/* 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/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
--- a/gcc/config/i386/linux.h
+++ b/gcc/config/i386/linux.h
-@@ -22,3 +22,4 @@
+@@ -22,3 +22,4 @@ along with GCC; see the file COPYING3.
#define GNU_USER_LINK_EMULATION "elf_i386"
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
-diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
--- a/gcc/config/i386/linux64.h
+++ b/gcc/config/i386/linux64.h
-@@ -31,3 +31,7 @@
+@@ -31,3 +31,7 @@ see the files COPYING3 and COPYING.RUNTI
#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"
@@ -61,10 +57,9 @@ diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1"
+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
-diff --git a/gcc/config/linux.h b/gcc/config/linux.h
--- a/gcc/config/linux.h
+++ b/gcc/config/linux.h
-@@ -33,10 +33,12 @@
+@@ -33,10 +33,12 @@ see the files COPYING3 and COPYING.RUNTI
#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
#define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
#define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
@@ -77,7 +72,7 @@ diff --git a/gcc/config/linux.h b/gcc/config/linux.h
#endif
#define GNU_USER_TARGET_OS_CPP_BUILTINS() \
-@@ -54,18 +56,21 @@
+@@ -54,18 +56,21 @@ see the files COPYING3 and COPYING.RUNTI
uClibc or Bionic is the default C library and whether
-muclibc or -mglibc or -mbionic has been passed to change the default. */
@@ -107,7 +102,7 @@ diff --git a/gcc/config/linux.h b/gcc/config/linux.h
#else
#error "Unsupported DEFAULT_LIBC"
#endif /* DEFAULT_LIBC */
-@@ -85,16 +90,16 @@
+@@ -85,16 +90,16 @@ see the files COPYING3 and COPYING.RUNTI
#define GNU_USER_DYNAMIC_LINKER \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
@@ -128,10 +123,9 @@ diff --git a/gcc/config/linux.h b/gcc/config/linux.h
/* Determine whether the entire c99 runtime
is present in the runtime library. */
-diff --git a/gcc/config/linux.opt b/gcc/config/linux.opt
--- a/gcc/config/linux.opt
+++ b/gcc/config/linux.opt
-@@ -30,3 +30,7 @@
+@@ -30,3 +30,7 @@ Use GNU C library
muclibc
Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic)
Use uClibc C library
@@ -139,19 +133,17 @@ diff --git a/gcc/config/linux.opt b/gcc/config/linux.opt
+mmusl
+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc)
+Use musl C library
-diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
--- a/gcc/config/mips/linux.h
+++ b/gcc/config/mips/linux.h
-@@ -19,3 +19,5 @@
+@@ -19,3 +19,5 @@ along with GCC; see the file COPYING3.
<http://www.gnu.org/licenses/>. */
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
+
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-mips.so.1"
-diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
-@@ -362,17 +362,21 @@
+@@ -362,17 +362,21 @@ extern int dot_symbols;
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"
#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
@@ -177,10 +169,9 @@ diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \
-diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
-@@ -804,15 +804,18 @@
+@@ -804,15 +804,18 @@ extern int fixuplabelno;
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
@@ -202,10 +193,9 @@ diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
-diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
--- a/gcc/ginclude/stddef.h
+++ b/gcc/ginclude/stddef.h
-@@ -184,6 +184,7 @@
+@@ -184,6 +184,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
#ifndef _GCC_SIZE_T
#ifndef _SIZET_
#ifndef __size_t
@@ -213,7 +203,7 @@ diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
#define __size_t__ /* BeOS */
#define __SIZE_T__ /* Cray Unicos/Mk */
#define _SIZE_T
-@@ -200,6 +201,7 @@
+@@ -200,6 +201,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define ___int_size_t_h
#define _GCC_SIZE_T
#define _SIZET_
@@ -221,7 +211,7 @@ diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
#if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
|| defined(__FreeBSD_kernel__)
/* __size_t is a typedef on FreeBSD 5, must not trash it. */
-@@ -215,6 +217,7 @@
+@@ -215,6 +217,7 @@ typedef __SIZE_TYPE__ size_t;
typedef long ssize_t;
#endif /* __BEOS__ */
#endif /* !(defined (__GNUG__) && defined (size_t)) */
@@ -229,7 +219,6 @@ diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
#endif /* __size_t */
#endif /* _SIZET_ */
#endif /* _GCC_SIZE_T */
-diff --git a/libgomp/config/posix/time.c b/libgomp/config/posix/time.c
--- a/libgomp/config/posix/time.c
+++ b/libgomp/config/posix/time.c
@@ -28,6 +28,8 @@
@@ -241,10 +230,9 @@ diff --git a/libgomp/config/posix/time.c b/libgomp/config/posix/time.c
#include "libgomp.h"
#include <unistd.h>
#if TIME_WITH_SYS_TIME
-diff --git a/libitm/config/arm/hwcap.cc b/libitm/config/arm/hwcap.cc
--- a/libitm/config/arm/hwcap.cc
+++ b/libitm/config/arm/hwcap.cc
-@@ -40,7 +40,11 @@
+@@ -40,7 +40,11 @@ int GTM_hwcap HIDDEN = 0
#ifdef __linux__
#include <unistd.h>
@@ -256,7 +244,6 @@ diff --git a/libitm/config/arm/hwcap.cc b/libitm/config/arm/hwcap.cc
#include <elf.h>
static void __attribute__((constructor))
-diff --git a/libitm/config/linux/x86/tls.h 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 @@
@@ -281,17 +268,16 @@ diff --git a/libitm/config/linux/x86/tls.h b/libitm/config/linux/x86/tls.h
namespace GTM HIDDEN {
#ifdef __x86_64__
-@@ -101,5 +104,6 @@
+@@ -101,5 +104,6 @@ static inline void set_abi_disp(struct a
} // namespace GTM
#endif /* >= GLIBC 2.10 */
+#endif
#endif // LIBITM_X86_TLS_H
-diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
--- a/libstdc++-v3/configure.host
+++ b/libstdc++-v3/configure.host
-@@ -243,6 +243,13 @@
+@@ -246,6 +246,13 @@ case "${host_os}" in
os_include_dir="os/bsd/freebsd"
;;
gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
@@ -305,7 +291,7 @@ diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
if [ "$uclibc" = "yes" ]; then
os_include_dir="os/uclibc"
elif [ "$bionic" = "yes" ]; then
-@@ -251,6 +258,9 @@
+@@ -254,6 +261,9 @@ case "${host_os}" in
os_include_dir="os/gnu-linux"
fi
;;
@@ -315,10 +301,9 @@ diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
hpux*)
os_include_dir="os/hpux"
;;
-diff --git a/gcc/config/mips/linux64.h b/gcc/config/mips/linux64.h
---- a/gcc/config/mips/linux64.h 2012-11-13 12:42:00.000000000 +0100
-+++ b/gcc/config/mips/linux64.h 2012-11-29 15:35:10.434361723 +0100
-@@ -28,6 +28,9 @@
+--- a/gcc/config/mips/linux64.h
++++ b/gcc/config/mips/linux64.h
+@@ -28,6 +28,9 @@ along with GCC; see the file COPYING3.
#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
#define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
diff --git a/toolchain/gcc/patches/4.7-linaro/820-libgcc_pic.patch b/toolchain/gcc/patches/4.7-linaro/820-libgcc_pic.patch
index 187e6bf11..a3d6a2379 100644
--- a/toolchain/gcc/patches/4.7-linaro/820-libgcc_pic.patch
+++ b/toolchain/gcc/patches/4.7-linaro/820-libgcc_pic.patch
@@ -1,6 +1,6 @@
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
-@@ -862,11 +862,12 @@ $(libgcov-objects): %$(objext): $(srcdir
+@@ -866,11 +866,12 @@ $(libgcov-objects): %$(objext): $(srcdir
# Static libraries.
libgcc.a: $(libgcc-objects)
@@ -14,7 +14,7 @@
-rm -f $@
objects="$(objects)"; \
-@@ -888,7 +889,7 @@ libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_E
+@@ -892,7 +893,7 @@ libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_E
endif
ifeq ($(enable_shared),yes)
@@ -23,7 +23,7 @@
ifneq ($(LIBUNWIND),)
all: libunwind$(SHLIB_EXT)
endif
-@@ -1043,6 +1044,10 @@ install-shared:
+@@ -1059,6 +1060,10 @@ install-shared:
chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
diff --git a/toolchain/gcc/patches/4.7-linaro/830-arm_unbreak_armv4t.patch b/toolchain/gcc/patches/4.7-linaro/830-arm_unbreak_armv4t.patch
index 37f8f2a54..7e2ed6987 100644
--- a/toolchain/gcc/patches/4.7-linaro/830-arm_unbreak_armv4t.patch
+++ b/toolchain/gcc/patches/4.7-linaro/830-arm_unbreak_armv4t.patch
@@ -2,7 +2,7 @@ http://sourceware.org/ml/crossgcc/2008-05/msg00009.html
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
-@@ -45,7 +45,7 @@
+@@ -46,7 +46,7 @@
The ARM10TDMI core is the default for armv5t, so set
SUBTARGET_CPU_DEFAULT to achieve this. */
#undef SUBTARGET_CPU_DEFAULT
diff --git a/toolchain/gcc/patches/4.7-linaro/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches/4.7-linaro/840-armv4_pass_fix-v4bx_to_ld.patch
index 67c374d9a..3be371be6 100644
--- a/toolchain/gcc/patches/4.7-linaro/840-armv4_pass_fix-v4bx_to_ld.patch
+++ b/toolchain/gcc/patches/4.7-linaro/840-armv4_pass_fix-v4bx_to_ld.patch
@@ -1,8 +1,8 @@
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
-@@ -64,10 +64,15 @@
- #undef GLIBC_DYNAMIC_LINKER
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
+@@ -82,10 +82,15 @@
+ #undef MUSL_DYNAMIC_LINKER
+ #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-arm.so.1"
+/* For armv4 we pass --fix-v4bx to linker to support EABI */
+#undef TARGET_FIX_V4BX_SPEC
diff --git a/toolchain/gcc/patches/4.7-linaro/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches/4.7-linaro/870-ppc_no_crtsavres.patch
index feaf02d6a..599ae26af 100644
--- a/toolchain/gcc/patches/4.7-linaro/870-ppc_no_crtsavres.patch
+++ b/toolchain/gcc/patches/4.7-linaro/870-ppc_no_crtsavres.patch
@@ -1,6 +1,6 @@
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
-@@ -246,13 +246,13 @@ do { \
+@@ -245,13 +245,13 @@ do { \
/* Define cutoff for using external functions to save floating point.
When optimizing for size, use external functions when profitable. */
diff --git a/toolchain/gcc/patches/4.7-linaro/910-mbsd_multi.patch b/toolchain/gcc/patches/4.7-linaro/910-mbsd_multi.patch
index 605545dfe..82b17455e 100644
--- a/toolchain/gcc/patches/4.7-linaro/910-mbsd_multi.patch
+++ b/toolchain/gcc/patches/4.7-linaro/910-mbsd_multi.patch
@@ -166,7 +166,7 @@
{ OPT_LEVELS_3_PLUS, OPT_ftree_loop_distribute_patterns, NULL, 1 },
{ OPT_LEVELS_3_PLUS, OPT_fpredictive_commoning, NULL, 1 },
/* Inlining of functions reducing size is a good idea with -Os
-@@ -1432,6 +1432,17 @@ common_handle_option (struct gcc_options
+@@ -1433,6 +1433,17 @@ common_handle_option (struct gcc_options
opts, opts_set, loc, dc);
break;
@@ -209,7 +209,7 @@
-Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol
-Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol
-Wformat-security -Wformat-y2k @gol
-@@ -4649,6 +4649,22 @@ This option is only supported for C and
+@@ -4661,6 +4661,22 @@ This option is only supported for C and
@option{-Wall} and by @option{-pedantic}, which can be disabled with
@option{-Wno-pointer-sign}.
@@ -232,7 +232,7 @@
@item -Wstack-protector
@opindex Wstack-protector
@opindex Wno-stack-protector
-@@ -6571,7 +6587,7 @@ so, the first branch is redirected to ei
+@@ -6580,7 +6596,7 @@ so, the first branch is redirected to ei
second branch or a point immediately following it, depending on whether
the condition is known to be true or false.
diff --git a/toolchain/gcc/patches/4.7-linaro/993-arm_insn-opinit-RTX_CODE-fixup.patch b/toolchain/gcc/patches/4.7-linaro/993-arm_insn-opinit-RTX_CODE-fixup.patch
index 9f8da4c4c..ecd8c3e40 100644
--- a/toolchain/gcc/patches/4.7-linaro/993-arm_insn-opinit-RTX_CODE-fixup.patch
+++ b/toolchain/gcc/patches/4.7-linaro/993-arm_insn-opinit-RTX_CODE-fixup.patch
@@ -12,5 +12,5 @@
extern int const_ok_for_arm (HOST_WIDE_INT);
+#ifdef RTX_CODE
extern int const_ok_for_op (HOST_WIDE_INT, enum rtx_code);
+ extern int const_ok_for_dimode_op (HOST_WIDE_INT, enum rtx_code);
extern int arm_split_constant (RTX_CODE, enum machine_mode, rtx,
- HOST_WIDE_INT, rtx, rtx, int);
diff --git a/toolchain/gcc/patches/4.7-linaro/999-coldfire.patch b/toolchain/gcc/patches/4.7-linaro/999-coldfire.patch
index a72b9fdfb..397caa350 100644
--- a/toolchain/gcc/patches/4.7-linaro/999-coldfire.patch
+++ b/toolchain/gcc/patches/4.7-linaro/999-coldfire.patch
@@ -1,6 +1,6 @@
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
-@@ -1610,6 +1610,7 @@ m32rle-*-linux*)
+@@ -1660,6 +1660,7 @@ m32rle-*-linux*)
if test x$enable_threads = xyes; then
thread_file='posix'
fi
diff --git a/toolchain/gcc/patches/4.7.2/200-musl.patch b/toolchain/gcc/patches/4.7.2/200-musl.patch
index 40348ac64..1856b99a9 100644
--- a/toolchain/gcc/patches/4.7.2/200-musl.patch
+++ b/toolchain/gcc/patches/4.7.2/200-musl.patch
@@ -1,7 +1,6 @@
-diff --git a/config.sub b/config.sub
--- a/config.sub
+++ b/config.sub
-@@ -125,6 +125,7 @@
+@@ -125,6 +125,7 @@ esac
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
@@ -9,18 +8,9 @@ diff --git a/config.sub b/config.sub
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
-@@ -1346,6 +1347,7 @@
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-uclibc* \
-+ | -linux-musl* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-diff --git a/gcc/config.gcc b/gcc/config.gcc
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
-@@ -522,7 +522,7 @@
+@@ -522,7 +522,7 @@ case ${target} in
esac
# Common C libraries.
@@ -29,7 +19,7 @@ diff --git a/gcc/config.gcc b/gcc/config.gcc
# Common parts for widely ported systems.
case ${target} in
-@@ -625,6 +625,9 @@
+@@ -625,6 +625,9 @@ case ${target} in
*-*-*uclibc*)
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
;;
@@ -39,7 +29,7 @@ diff --git a/gcc/config.gcc b/gcc/config.gcc
*)
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
;;
-@@ -1722,6 +1725,7 @@
+@@ -1722,6 +1725,7 @@ microblaze*-linux*)
tm_file="${tm_file} dbxelf.h gnu-user.h linux.h microblaze/linux.h"
c_target_objs="${c_target_objs} microblaze-c.o"
cxx_target_objs="${cxx_target_objs} microblaze-c.o"
@@ -47,7 +37,6 @@ diff --git a/gcc/config.gcc b/gcc/config.gcc
;;
microblaze*-*-*)
tm_file="${tm_file} dbxelf.h"
-diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
@@ -64,6 +64,10 @@
@@ -61,18 +50,16 @@ diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
/* 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/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
--- a/gcc/config/i386/linux.h
+++ b/gcc/config/i386/linux.h
-@@ -22,3 +22,4 @@
+@@ -22,3 +22,4 @@ along with GCC; see the file COPYING3.
#define GNU_USER_LINK_EMULATION "elf_i386"
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
-diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
--- a/gcc/config/i386/linux64.h
+++ b/gcc/config/i386/linux64.h
-@@ -31,3 +31,7 @@
+@@ -31,3 +31,7 @@ see the files COPYING3 and COPYING.RUNTI
#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"
@@ -80,10 +67,9 @@ diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1"
+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
-diff --git a/gcc/config/linux.h b/gcc/config/linux.h
--- a/gcc/config/linux.h
+++ b/gcc/config/linux.h
-@@ -33,10 +33,12 @@
+@@ -33,10 +33,12 @@ see the files COPYING3 and COPYING.RUNTI
#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
#define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
#define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
@@ -96,7 +82,7 @@ diff --git a/gcc/config/linux.h b/gcc/config/linux.h
#endif
#define GNU_USER_TARGET_OS_CPP_BUILTINS() \
-@@ -54,18 +56,21 @@
+@@ -54,18 +56,21 @@ see the files COPYING3 and COPYING.RUNTI
uClibc or Bionic is the default C library and whether
-muclibc or -mglibc or -mbionic has been passed to change the default. */
@@ -126,7 +112,7 @@ diff --git a/gcc/config/linux.h b/gcc/config/linux.h
#else
#error "Unsupported DEFAULT_LIBC"
#endif /* DEFAULT_LIBC */
-@@ -85,16 +90,16 @@
+@@ -85,16 +90,16 @@ see the files COPYING3 and COPYING.RUNTI
#define GNU_USER_DYNAMIC_LINKER \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
@@ -147,10 +133,9 @@ diff --git a/gcc/config/linux.h b/gcc/config/linux.h
/* Determine whether the entire c99 runtime
is present in the runtime library. */
-diff --git a/gcc/config/linux.opt b/gcc/config/linux.opt
--- a/gcc/config/linux.opt
+++ b/gcc/config/linux.opt
-@@ -30,3 +30,7 @@
+@@ -30,3 +30,7 @@ Use GNU C library
muclibc
Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic)
Use uClibc C library
@@ -158,19 +143,17 @@ diff --git a/gcc/config/linux.opt b/gcc/config/linux.opt
+mmusl
+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc)
+Use musl C library
-diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
--- a/gcc/config/mips/linux.h
+++ b/gcc/config/mips/linux.h
-@@ -19,3 +19,5 @@
+@@ -19,3 +19,5 @@ along with GCC; see the file COPYING3.
<http://www.gnu.org/licenses/>. */
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
+
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-mips.so.1"
-diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
-@@ -362,17 +362,21 @@
+@@ -362,17 +362,21 @@ extern int dot_symbols;
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"
#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
@@ -196,10 +179,9 @@ diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \
-diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
-@@ -804,15 +804,18 @@
+@@ -804,15 +804,18 @@ extern int fixuplabelno;
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
@@ -221,10 +203,9 @@ diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
-diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
--- a/gcc/ginclude/stddef.h
+++ b/gcc/ginclude/stddef.h
-@@ -184,6 +184,7 @@
+@@ -184,6 +184,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
#ifndef _GCC_SIZE_T
#ifndef _SIZET_
#ifndef __size_t
@@ -232,7 +213,7 @@ diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
#define __size_t__ /* BeOS */
#define __SIZE_T__ /* Cray Unicos/Mk */
#define _SIZE_T
-@@ -200,6 +201,7 @@
+@@ -200,6 +201,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
#define ___int_size_t_h
#define _GCC_SIZE_T
#define _SIZET_
@@ -240,7 +221,7 @@ diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
#if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
|| defined(__FreeBSD_kernel__)
/* __size_t is a typedef on FreeBSD 5, must not trash it. */
-@@ -215,6 +217,7 @@
+@@ -215,6 +217,7 @@ typedef __SIZE_TYPE__ size_t;
typedef long ssize_t;
#endif /* __BEOS__ */
#endif /* !(defined (__GNUG__) && defined (size_t)) */
@@ -248,7 +229,6 @@ diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
#endif /* __size_t */
#endif /* _SIZET_ */
#endif /* _GCC_SIZE_T */
-diff --git a/libgomp/config/posix/time.c b/libgomp/config/posix/time.c
--- a/libgomp/config/posix/time.c
+++ b/libgomp/config/posix/time.c
@@ -28,6 +28,8 @@
@@ -260,10 +240,9 @@ diff --git a/libgomp/config/posix/time.c b/libgomp/config/posix/time.c
#include "libgomp.h"
#include <unistd.h>
#if TIME_WITH_SYS_TIME
-diff --git a/libitm/config/arm/hwcap.cc b/libitm/config/arm/hwcap.cc
--- a/libitm/config/arm/hwcap.cc
+++ b/libitm/config/arm/hwcap.cc
-@@ -40,7 +40,11 @@
+@@ -40,7 +40,11 @@ int GTM_hwcap HIDDEN = 0
#ifdef __linux__
#include <unistd.h>
@@ -275,7 +254,6 @@ diff --git a/libitm/config/arm/hwcap.cc b/libitm/config/arm/hwcap.cc
#include <elf.h>
static void __attribute__((constructor))
-diff --git a/libitm/config/linux/x86/tls.h 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 @@
@@ -300,17 +278,16 @@ diff --git a/libitm/config/linux/x86/tls.h b/libitm/config/linux/x86/tls.h
namespace GTM HIDDEN {
#ifdef __x86_64__
-@@ -101,5 +104,6 @@
+@@ -101,5 +104,6 @@ static inline void set_abi_disp(struct a
} // namespace GTM
#endif /* >= GLIBC 2.10 */
+#endif
#endif // LIBITM_X86_TLS_H
-diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
--- a/libstdc++-v3/configure.host
+++ b/libstdc++-v3/configure.host
-@@ -243,6 +243,13 @@
+@@ -243,6 +243,13 @@ case "${host_os}" in
os_include_dir="os/bsd/freebsd"
;;
gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
@@ -324,7 +301,7 @@ diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
if [ "$uclibc" = "yes" ]; then
os_include_dir="os/uclibc"
elif [ "$bionic" = "yes" ]; then
-@@ -251,6 +258,9 @@
+@@ -251,6 +258,9 @@ case "${host_os}" in
os_include_dir="os/gnu-linux"
fi
;;
@@ -334,10 +311,9 @@ diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
hpux*)
os_include_dir="os/hpux"
;;
-diff --git a/gcc/config/mips/linux64.h b/gcc/config/mips/linux64.h
---- a/gcc/config/mips/linux64.h 2012-11-13 12:42:00.000000000 +0100
-+++ n/gcc/config/mips/linux64.h 2012-11-29 15:35:10.434361723 +0100
-@@ -28,6 +28,9 @@
+--- a/gcc/config/mips/linux64.h
++++ b/gcc/config/mips/linux64.h
+@@ -28,6 +28,9 @@ along with GCC; see the file COPYING3.
#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
#define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
diff --git a/toolchain/gcc/patches/4.7.2/820-libgcc_pic.patch b/toolchain/gcc/patches/4.7.2/820-libgcc_pic.patch
index 187e6bf11..a3d6a2379 100644
--- a/toolchain/gcc/patches/4.7.2/820-libgcc_pic.patch
+++ b/toolchain/gcc/patches/4.7.2/820-libgcc_pic.patch
@@ -1,6 +1,6 @@
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
-@@ -862,11 +862,12 @@ $(libgcov-objects): %$(objext): $(srcdir
+@@ -866,11 +866,12 @@ $(libgcov-objects): %$(objext): $(srcdir
# Static libraries.
libgcc.a: $(libgcc-objects)
@@ -14,7 +14,7 @@
-rm -f $@
objects="$(objects)"; \
-@@ -888,7 +889,7 @@ libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_E
+@@ -892,7 +893,7 @@ libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_E
endif
ifeq ($(enable_shared),yes)
@@ -23,7 +23,7 @@
ifneq ($(LIBUNWIND),)
all: libunwind$(SHLIB_EXT)
endif
-@@ -1043,6 +1044,10 @@ install-shared:
+@@ -1059,6 +1060,10 @@ install-shared:
chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
diff --git a/toolchain/gcc/patches/4.7.2/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches/4.7.2/840-armv4_pass_fix-v4bx_to_ld.patch
index 67c374d9a..5be6b9edf 100644
--- a/toolchain/gcc/patches/4.7.2/840-armv4_pass_fix-v4bx_to_ld.patch
+++ b/toolchain/gcc/patches/4.7.2/840-armv4_pass_fix-v4bx_to_ld.patch
@@ -1,8 +1,8 @@
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
-@@ -64,10 +64,15 @@
- #undef GLIBC_DYNAMIC_LINKER
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
+@@ -68,10 +68,15 @@
+ #undef MUSL_DYNAMIC_LINKER
+ #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-arm.so.1"
+/* For armv4 we pass --fix-v4bx to linker to support EABI */
+#undef TARGET_FIX_V4BX_SPEC
diff --git a/toolchain/gcc/patches/4.7.2/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches/4.7.2/870-ppc_no_crtsavres.patch
index feaf02d6a..599ae26af 100644
--- a/toolchain/gcc/patches/4.7.2/870-ppc_no_crtsavres.patch
+++ b/toolchain/gcc/patches/4.7.2/870-ppc_no_crtsavres.patch
@@ -1,6 +1,6 @@
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
-@@ -246,13 +246,13 @@ do { \
+@@ -245,13 +245,13 @@ do { \
/* Define cutoff for using external functions to save floating point.
When optimizing for size, use external functions when profitable. */
diff --git a/toolchain/gcc/patches/4.7.2/910-mbsd_multi.patch b/toolchain/gcc/patches/4.7.2/910-mbsd_multi.patch
index 605545dfe..d619b0371 100644
--- a/toolchain/gcc/patches/4.7.2/910-mbsd_multi.patch
+++ b/toolchain/gcc/patches/4.7.2/910-mbsd_multi.patch
@@ -209,7 +209,7 @@
-Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol
-Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol
-Wformat-security -Wformat-y2k @gol
-@@ -4649,6 +4649,22 @@ This option is only supported for C and
+@@ -4651,6 +4651,22 @@ This option is only supported for C and
@option{-Wall} and by @option{-pedantic}, which can be disabled with
@option{-Wno-pointer-sign}.
@@ -232,7 +232,7 @@
@item -Wstack-protector
@opindex Wstack-protector
@opindex Wno-stack-protector
-@@ -6571,7 +6587,7 @@ so, the first branch is redirected to ei
+@@ -6570,7 +6586,7 @@ so, the first branch is redirected to ei
second branch or a point immediately following it, depending on whether
the condition is known to be true or false.
diff --git a/toolchain/gcc/patches/4.7.2/999-coldfire.patch b/toolchain/gcc/patches/4.7.2/999-coldfire.patch
index a72b9fdfb..0a2d75587 100644
--- a/toolchain/gcc/patches/4.7.2/999-coldfire.patch
+++ b/toolchain/gcc/patches/4.7.2/999-coldfire.patch
@@ -1,6 +1,6 @@
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
-@@ -1610,6 +1610,7 @@ m32rle-*-linux*)
+@@ -1627,6 +1627,7 @@ m32rle-*-linux*)
if test x$enable_threads = xyes; then
thread_file='posix'
fi