summaryrefslogtreecommitdiffstats
path: root/toolchain/gcc/patches/4.6-linaro
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain/gcc/patches/4.6-linaro')
-rw-r--r--toolchain/gcc/patches/4.6-linaro/010-documentation.patch23
-rw-r--r--toolchain/gcc/patches/4.6-linaro/020-gcc_bug_54295.patch70
-rw-r--r--toolchain/gcc/patches/4.6-linaro/200-musl.patch57
-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/900-bad-mips16-crt9
-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
11 files changed, 140 insertions, 41 deletions
diff --git a/toolchain/gcc/patches/4.6-linaro/010-documentation.patch b/toolchain/gcc/patches/4.6-linaro/010-documentation.patch
new file mode 100644
index 000000000..25773a3d3
--- /dev/null
+++ b/toolchain/gcc/patches/4.6-linaro/010-documentation.patch
@@ -0,0 +1,23 @@
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -4251,18 +4251,10 @@
+ doc/gccint.info: $(TEXI_GCCINT_FILES)
+ doc/cppinternals.info: $(TEXI_CPPINT_FILES)
+
+-doc/%.info: %.texi
+- if [ x$(BUILD_INFO) = xinfo ]; then \
+- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \
+- -I $(gcc_docdir)/include -o $@ $<; \
+- fi
++doc/%.info:
+
+ # Duplicate entry to handle renaming of gccinstall.info
+-doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES)
+- if [ x$(BUILD_INFO) = xinfo ]; then \
+- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \
+- -I $(gcc_docdir)/include -o $@ $<; \
+- fi
++doc/gccinstall.info:
+
+ doc/cpp.dvi: $(TEXI_CPP_FILES)
+ doc/gcc.dvi: $(TEXI_GCC_FILES)
diff --git a/toolchain/gcc/patches/4.6-linaro/020-gcc_bug_54295.patch b/toolchain/gcc/patches/4.6-linaro/020-gcc_bug_54295.patch
new file mode 100644
index 000000000..5bef9eab0
--- /dev/null
+++ b/toolchain/gcc/patches/4.6-linaro/020-gcc_bug_54295.patch
@@ -0,0 +1,70 @@
+diff -urN a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c
+--- a/gcc/tree-ssa-math-opts.c 2012-12-12 18:05:23.000000000 +0100
++++ b/gcc/tree-ssa-math-opts.c 2013-04-29 15:54:00.051998936 +0200
+@@ -1280,6 +1280,47 @@
+ return result;
+ }
+
++/* Return true if stmt is a type conversion operation that can be stripped
++ when used in a widening multiply operation. */
++static bool
++widening_mult_conversion_strippable_p (tree result_type, gimple stmt)
++{
++ enum tree_code rhs_code = gimple_assign_rhs_code (stmt);
++
++ if (TREE_CODE (result_type) == INTEGER_TYPE)
++ {
++ tree op_type;
++ tree inner_op_type;
++
++ if (!CONVERT_EXPR_CODE_P (rhs_code))
++ return false;
++
++ op_type = TREE_TYPE (gimple_assign_lhs (stmt));
++
++ /* If the type of OP has the same precision as the result, then
++ we can strip this conversion. The multiply operation will be
++ selected to create the correct extension as a by-product. */
++ if (TYPE_PRECISION (result_type) == TYPE_PRECISION (op_type))
++ return true;
++
++ /* We can also strip a conversion if it preserves the signed-ness of
++ the operation and doesn't narrow the range. */
++ inner_op_type = TREE_TYPE (gimple_assign_rhs1 (stmt));
++
++ /* If the inner-most type is unsigned, then we can strip any
++ intermediate widening operation. If it's signed, then the
++ intermediate widening operation must also be signed. */
++ if ((TYPE_UNSIGNED (inner_op_type)
++ || TYPE_UNSIGNED (op_type) == TYPE_UNSIGNED (inner_op_type))
++ && TYPE_PRECISION (op_type) > TYPE_PRECISION (inner_op_type))
++ return true;
++
++ return false;
++ }
++
++ return rhs_code == FIXED_CONVERT_EXPR;
++}
++
+ /* Return true if RHS is a suitable operand for a widening multiplication,
+ assuming a target type of TYPE.
+ There are two cases:
+@@ -1296,17 +1337,13 @@
+ {
+ gimple stmt;
+ tree type1, rhs1;
+- enum tree_code rhs_code;
+
+ if (TREE_CODE (rhs) == SSA_NAME)
+ {
+ stmt = SSA_NAME_DEF_STMT (rhs);
+ if (is_gimple_assign (stmt))
+ {
+- rhs_code = gimple_assign_rhs_code (stmt);
+- if (TREE_CODE (type) == INTEGER_TYPE
+- ? !CONVERT_EXPR_CODE_P (rhs_code)
+- : rhs_code != FIXED_CONVERT_EXPR)
++ if (! widening_mult_conversion_strippable_p (type, stmt))
+ rhs1 = rhs;
+ else
+ {
diff --git a/toolchain/gcc/patches/4.6-linaro/200-musl.patch b/toolchain/gcc/patches/4.6-linaro/200-musl.patch
index cee994809..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,3 +210,19 @@ diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
hpux*)
os_include_dir="os/hpux"
;;
+--- 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"
++#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mips.so.1"
++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips.so.1"
++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips.so.1"
+ #define LINUX_DYNAMIC_LINKERN32 \
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
+- BIONIC_DYNAMIC_LINKERN32)
++ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32)
+
+ #undef LINK_SPEC
+ #define LINK_SPEC "\
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/900-bad-mips16-crt b/toolchain/gcc/patches/4.6-linaro/900-bad-mips16-crt
new file mode 100644
index 000000000..5bb2ffb48
--- /dev/null
+++ b/toolchain/gcc/patches/4.6-linaro/900-bad-mips16-crt
@@ -0,0 +1,9 @@
+--- gcc/gcc/config/mips/t-libgcc-mips16~ 2013-03-26 09:09:34.209077496 -0400
++++ gcc/gcc/config/mips/t-libgcc-mips16 2013-03-26 18:21:01.717303669 -0400
+@@ -43,3 +43,6 @@
+
+ # Version these symbols if building libgcc.so.
+ SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver
++
++CRTSTUFF_T_CFLAGS += -mno-mips16
++CRTSTUFF_T_CFLAGS_S += -mno-mips16
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}