summaryrefslogtreecommitdiff
path: root/toolchain/gcc
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2013-11-26 18:42:32 +0000
committerImre Kaloz <kaloz@openwrt.org>2013-11-26 18:42:32 +0000
commitb1f4f27fc43217b9e8a889c9cc686b9650cc16dd (patch)
treef59a3889b9103d088d4a09dc9bfc47b803f34a24 /toolchain/gcc
parenteb811eadba1acf4208b29def4c4c5cb1d79f8609 (diff)
downloadmtk-20170518-b1f4f27fc43217b9e8a889c9cc686b9650cc16dd.zip
mtk-20170518-b1f4f27fc43217b9e8a889c9cc686b9650cc16dd.tar.gz
mtk-20170518-b1f4f27fc43217b9e8a889c9cc686b9650cc16dd.tar.bz2
upgrade Linaro GCC 4.8 to 4.8-2013.11
Signed-off-by: Imre Kaloz <kaloz@openwrt.org> SVN-Revision: 38922
Diffstat (limited to 'toolchain/gcc')
-rw-r--r--toolchain/gcc/common.mk6
-rw-r--r--toolchain/gcc/patches/4.8-linaro/020-fix_pr58670.patch167
-rw-r--r--toolchain/gcc/patches/4.8-linaro/200-musl.patch11
-rw-r--r--toolchain/gcc/patches/4.8-linaro/870-ppc_no_crtsavres.patch2
4 files changed, 9 insertions, 177 deletions
diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk
index eec9d20..ebfcfc1 100644
--- a/toolchain/gcc/common.mk
+++ b/toolchain/gcc/common.mk
@@ -34,10 +34,10 @@ ifeq ($(findstring linaro, $(CONFIG_GCC_VERSION)),linaro)
PKG_COMP:=bz2
endif
ifeq ($(CONFIG_GCC_VERSION),"4.8-linaro")
- PKG_REV:=4.8-2013.08
- PKG_VERSION:=4.8.2
+ PKG_REV:=4.8-2013.11
+ PKG_VERSION:=4.8.3
PKG_VERSION_MAJOR:=4.8
- PKG_MD5SUM:=668e0f4250e35aff554b66accc9a3105
+ PKG_MD5SUM:=729f4ac34ad404892ecafb991bea2da5
PKG_COMP:=xz
endif
PKG_SOURCE_URL:=http://launchpad.net/gcc-linaro/$(PKG_VERSION_MAJOR)/$(PKG_REV)/+download/
diff --git a/toolchain/gcc/patches/4.8-linaro/020-fix_pr58670.patch b/toolchain/gcc/patches/4.8-linaro/020-fix_pr58670.patch
deleted file mode 100644
index 8a4ae1b..0000000
--- a/toolchain/gcc/patches/4.8-linaro/020-fix_pr58670.patch
+++ /dev/null
@@ -1,167 +0,0 @@
---- a/gcc/cfgrtl.c
-+++ b/gcc/cfgrtl.c
-@@ -1784,10 +1784,18 @@ commit_one_edge_insertion (edge e)
- }
-
- /* If the source has one successor and the edge is not abnormal,
-- insert there. Except for the entry block. */
-+ insert there. Except for the entry block.
-+ Don't do this if the predecessor ends in a jump other than
-+ unconditional simple jump. E.g. for asm goto that points all
-+ its labels at the fallthru basic block, we can't insert instructions
-+ before the asm goto, as the asm goto can have various of side effects,
-+ and can't emit instructions after the asm goto, as it must end
-+ the basic block. */
- else if ((e->flags & EDGE_ABNORMAL) == 0
- && single_succ_p (e->src)
-- && e->src != ENTRY_BLOCK_PTR)
-+ && e->src != ENTRY_BLOCK_PTR
-+ && (!JUMP_P (BB_END (e->src))
-+ || simplejump_p (BB_END (e->src))))
- {
- bb = e->src;
-
---- a/gcc/stmt.c
-+++ b/gcc/stmt.c
-@@ -613,6 +613,9 @@ tree_conflicts_with_clobbers_p (tree t,
- CLOBBERS is a list of STRING_CST nodes each naming a hard register
- that is clobbered by this insn.
-
-+ LABELS is a list of labels, and if LABELS is non-NULL, FALLTHRU_BB
-+ should be the fallthru basic block of the asm goto.
-+
- Not all kinds of lvalue that may appear in OUTPUTS can be stored directly.
- Some elements of OUTPUTS may be replaced with trees representing temporary
- values. The caller should copy those temporary values to the originally
-@@ -622,7 +625,8 @@ tree_conflicts_with_clobbers_p (tree t,
-
- static void
- expand_asm_operands (tree string, tree outputs, tree inputs,
-- tree clobbers, tree labels, int vol, location_t locus)
-+ tree clobbers, tree labels, basic_block fallthru_bb,
-+ int vol, location_t locus)
- {
- rtvec argvec, constraintvec, labelvec;
- rtx body;
-@@ -643,6 +647,7 @@ expand_asm_operands (tree string, tree o
- enum machine_mode *inout_mode = XALLOCAVEC (enum machine_mode, noutputs);
- const char **constraints = XALLOCAVEC (const char *, noutputs + ninputs);
- int old_generating_concat_p = generating_concat_p;
-+ rtx fallthru_label = NULL_RTX;
-
- /* An ASM with no outputs needs to be treated as volatile, for now. */
- if (noutputs == 0)
-@@ -942,8 +947,24 @@ expand_asm_operands (tree string, tree o
-
- /* Copy labels to the vector. */
- for (i = 0, tail = labels; i < nlabels; ++i, tail = TREE_CHAIN (tail))
-- ASM_OPERANDS_LABEL (body, i)
-- = gen_rtx_LABEL_REF (Pmode, label_rtx (TREE_VALUE (tail)));
-+ {
-+ rtx r;
-+ /* If asm goto has any labels in the fallthru basic block, use
-+ a label that we emit immediately after the asm goto. Expansion
-+ may insert further instructions into the same basic block after
-+ asm goto and if we don't do this, insertion of instructions on
-+ the fallthru edge might misbehave. See PR58670. */
-+ if (fallthru_bb
-+ && label_to_block_fn (cfun, TREE_VALUE (tail)) == fallthru_bb)
-+ {
-+ if (fallthru_label == NULL_RTX)
-+ fallthru_label = gen_label_rtx ();
-+ r = fallthru_label;
-+ }
-+ else
-+ r = label_rtx (TREE_VALUE (tail));
-+ ASM_OPERANDS_LABEL (body, i) = gen_rtx_LABEL_REF (Pmode, r);
-+ }
-
- generating_concat_p = old_generating_concat_p;
-
-@@ -1067,6 +1088,9 @@ expand_asm_operands (tree string, tree o
- emit_insn (body);
- }
-
-+ if (fallthru_label)
-+ emit_label (fallthru_label);
-+
- /* For any outputs that needed reloading into registers, spill them
- back to where they belong. */
- for (i = 0; i < noutputs; ++i)
-@@ -1087,6 +1111,7 @@ expand_asm_stmt (gimple stmt)
- const char *s;
- tree str, out, in, cl, labels;
- location_t locus = gimple_location (stmt);
-+ basic_block fallthru_bb = NULL;
-
- /* Meh... convert the gimple asm operands into real tree lists.
- Eventually we should make all routines work on the vectors instead
-@@ -1122,6 +1147,9 @@ expand_asm_stmt (gimple stmt)
- n = gimple_asm_nlabels (stmt);
- if (n > 0)
- {
-+ edge fallthru = find_fallthru_edge (gimple_bb (stmt)->succs);
-+ if (fallthru)
-+ fallthru_bb = fallthru->dest;
- t = labels = gimple_asm_label_op (stmt, 0);
- for (i = 1; i < n; i++)
- t = TREE_CHAIN (t) = gimple_asm_label_op (stmt, i);
-@@ -1147,7 +1175,7 @@ expand_asm_stmt (gimple stmt)
-
- /* Generate the ASM_OPERANDS insn; store into the TREE_VALUEs of
- OUTPUTS some trees for where the values were actually stored. */
-- expand_asm_operands (str, outputs, in, cl, labels,
-+ expand_asm_operands (str, outputs, in, cl, labels, fallthru_bb,
- gimple_asm_volatile_p (stmt), locus);
-
- /* Copy all the intermediate outputs into the specified outputs. */
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/torture/pr58670.c
-@@ -0,0 +1,47 @@
-+/* PR middle-end/58670 */
-+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
-+
-+#if defined (__i386__) || defined (__x86_64__)
-+#define ASM_STR "bts $1, %0; jc %l[lab]"
-+#endif
-+
-+__attribute__((noinline, noclone)) int
-+foo (int a, int b)
-+{
-+ if (a)
-+ return -3;
-+#ifdef ASM_STR
-+ asm volatile goto (ASM_STR : : "m" (b) : "memory" : lab);
-+ return 0;
-+lab:
-+#endif
-+ return 0;
-+}
-+
-+int
-+bar (int a, int b)
-+{
-+ if (a)
-+ return -3;
-+#ifdef ASM_STR
-+ asm volatile goto (ASM_STR : : "m" (b) : "memory" : lab);
-+ return 0;
-+lab:
-+#endif
-+ return 0;
-+}
-+
-+int
-+main ()
-+{
-+ if (foo (1, 0) != -3
-+ || foo (0, 3) != 0
-+ || foo (1, 0) != -3
-+ || foo (0, 0) != 0
-+ || bar (1, 0) != -3
-+ || bar (0, 3) != 0
-+ || bar (1, 0) != -3
-+ || bar (0, 0) != 0)
-+ __builtin_abort ();
-+ return 0;
-+}
diff --git a/toolchain/gcc/patches/4.8-linaro/200-musl.patch b/toolchain/gcc/patches/4.8-linaro/200-musl.patch
index 3fe5a7e..dedbb10 100644
--- a/toolchain/gcc/patches/4.8-linaro/200-musl.patch
+++ b/toolchain/gcc/patches/4.8-linaro/200-musl.patch
@@ -1,6 +1,6 @@
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
-@@ -550,7 +550,7 @@ case ${target} in
+@@ -551,7 +551,7 @@ case ${target} in
esac
# Common C libraries.
@@ -9,7 +9,7 @@
# Common parts for widely ported systems.
case ${target} in
-@@ -653,6 +653,9 @@ case ${target} in
+@@ -654,6 +654,9 @@ case ${target} in
*-*-*uclibc*)
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
;;
@@ -306,9 +306,9 @@
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
- BIONIC_DYNAMIC_LINKERN32)
+ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32)
---- a/gcc/config/sparc/linux64.h 2013-09-10 10:02:45.663973856 +0100
-+++ b/gcc/config/sparc/linux64.h 2013-09-10 10:03:17.871972435 +0100
-@@ -104,6 +104,9 @@
+--- a/gcc/config/sparc/linux64.h
++++ b/gcc/config/sparc/linux64.h
+@@ -95,6 +95,9 @@ along with GCC; see the file COPYING3.
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
@@ -318,4 +318,3 @@
#ifdef SPARC_BI_ARCH
#undef SUBTARGET_EXTRA_SPECS
-
diff --git a/toolchain/gcc/patches/4.8-linaro/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches/4.8-linaro/870-ppc_no_crtsavres.patch
index 14e4fbd..7d8f54f 100644
--- a/toolchain/gcc/patches/4.8-linaro/870-ppc_no_crtsavres.patch
+++ b/toolchain/gcc/patches/4.8-linaro/870-ppc_no_crtsavres.patch
@@ -1,6 +1,6 @@
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
-@@ -17664,7 +17664,7 @@ rs6000_savres_strategy (rs6000_stack_t *
+@@ -17661,7 +17661,7 @@ rs6000_savres_strategy (rs6000_stack_t *
/* Define cutoff for using out-of-line functions to save registers. */
if (DEFAULT_ABI == ABI_V4 || TARGET_ELF)
{