diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index 4970ccde8c..0e5b5983ae 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -50,10 +50,10 @@ ifeq ($(findstring linaro, $(CONFIG_GCC_VERSION)),linaro) PKG_MD5SUM:=acd304caf055ccaaca4e3ef61da11e7d endif ifeq ($(CONFIG_GCC_VERSION),"4.7-linaro") - PKG_REV:=4.7-2012.04 - PKG_VERSION:=4.7.1 + PKG_REV:=4.7-2012.10 + PKG_VERSION:=4.7.3 PKG_VERSION_MAJOR:=4.7 - PKG_MD5SUM:=6dab459c1177fc9ae2969e7a39549d44 + PKG_MD5SUM:=a5ca87667350f1395d4da40c94ef059c endif PKG_SOURCE_URL:=http://launchpad.net/gcc-linaro/$(PKG_VERSION_MAJOR)/$(PKG_REV)/+download/ PKG_SOURCE:=$(PKG_NAME)-linaro-$(PKG_REV).tar.bz2 diff --git a/toolchain/gcc/patches/4.7-linaro/000-upstream_uclibc_fix.patch b/toolchain/gcc/patches/4.7-linaro/000-upstream_uclibc_fix.patch deleted file mode 100644 index c4ce247e72..0000000000 --- a/toolchain/gcc/patches/4.7-linaro/000-upstream_uclibc_fix.patch +++ /dev/null @@ -1,239 +0,0 @@ ---- a/gcc/tree-ssa-tail-merge.c -+++ b/gcc/tree-ssa-tail-merge.c -@@ -1033,7 +1033,7 @@ set_cluster (basic_block bb1, basic_bloc - gimple_bb (s2) are members of SAME_SUCC. */ - - static bool --gimple_equal_p (same_succ same_succ, gimple s1, gimple s2) -+gimple_equal_p (same_succ same_succ, gimple s1, gimple s2, bool *gvn_used) - { - unsigned int i; - tree lhs1, lhs2; -@@ -1069,7 +1069,10 @@ gimple_equal_p (same_succ same_succ, gim - if (operand_equal_p (t1, t2, 0)) - continue; - if (gvn_uses_equal (t1, t2)) -- continue; -+ { -+ *gvn_used = true; -+ continue; -+ } - equal = false; - break; - } -@@ -1083,12 +1086,16 @@ gimple_equal_p (same_succ same_succ, gim - if (lhs1 == NULL_TREE || lhs2 == NULL_TREE) - return false; - if (TREE_CODE (lhs1) == SSA_NAME && TREE_CODE (lhs2) == SSA_NAME) -- return vn_valueize (lhs1) == vn_valueize (lhs2); -+ { -+ *gvn_used = true; -+ return vn_valueize (lhs1) == vn_valueize (lhs2); -+ } - return operand_equal_p (lhs1, lhs2, 0); - - case GIMPLE_ASSIGN: - lhs1 = gimple_get_lhs (s1); - lhs2 = gimple_get_lhs (s2); -+ *gvn_used = true; - return (TREE_CODE (lhs1) == SSA_NAME - && TREE_CODE (lhs2) == SSA_NAME - && vn_valueize (lhs1) == vn_valueize (lhs2)); -@@ -1096,15 +1103,23 @@ gimple_equal_p (same_succ same_succ, gim - case GIMPLE_COND: - t1 = gimple_cond_lhs (s1); - t2 = gimple_cond_lhs (s2); -- if (!operand_equal_p (t1, t2, 0) -- && !gvn_uses_equal (t1, t2)) -- return false; -+ if (!operand_equal_p (t1, t2, 0)) -+ { -+ if (gvn_uses_equal (t1, t2)) -+ *gvn_used = true; -+ else -+ return false; -+ } - - t1 = gimple_cond_rhs (s1); - t2 = gimple_cond_rhs (s2); -- if (!operand_equal_p (t1, t2, 0) -- && !gvn_uses_equal (t1, t2)) -- return false; -+ if (!operand_equal_p (t1, t2, 0)) -+ { -+ if (gvn_uses_equal (t1, t2)) -+ *gvn_used = true; -+ else -+ return false; -+ } - - code1 = gimple_expr_code (s1); - code2 = gimple_expr_code (s2); -@@ -1126,18 +1141,25 @@ gimple_equal_p (same_succ same_succ, gim - /* Let GSI skip backwards over local defs. */ - - static void --gsi_advance_bw_nondebug_nonlocal (gimple_stmt_iterator *gsi) -+gsi_advance_bw_nondebug_nonlocal (gimple_stmt_iterator *gsi, tree *vuse) - { - gimple stmt; -+ tree lvuse; - - while (true) - { - if (gsi_end_p (*gsi)) - return; - stmt = gsi_stmt (*gsi); -+ -+ lvuse = gimple_vuse (stmt); -+ if (lvuse != NULL_TREE) -+ *vuse = lvuse; -+ - if (!(is_gimple_assign (stmt) && local_def (gimple_get_lhs (stmt)) - && !gimple_has_side_effects (stmt))) - return; -+ - gsi_prev_nondebug (gsi); - } - } -@@ -1146,28 +1168,34 @@ gsi_advance_bw_nondebug_nonlocal (gimple - clusters them. */ - - static void --find_duplicate (same_succ same_succ, basic_block bb1, basic_block bb2) -+find_duplicate (same_succ same_succ, basic_block bb1, basic_block bb2, -+ bool gvn_used) - { - gimple_stmt_iterator gsi1 = gsi_last_nondebug_bb (bb1); - gimple_stmt_iterator gsi2 = gsi_last_nondebug_bb (bb2); -+ tree vuse1 = NULL_TREE, vuse2 = NULL_TREE; - -- gsi_advance_bw_nondebug_nonlocal (&gsi1); -- gsi_advance_bw_nondebug_nonlocal (&gsi2); -+ gsi_advance_bw_nondebug_nonlocal (&gsi1, &vuse1); -+ gsi_advance_bw_nondebug_nonlocal (&gsi2, &vuse2); - - while (!gsi_end_p (gsi1) && !gsi_end_p (gsi2)) - { -- if (!gimple_equal_p (same_succ, gsi_stmt (gsi1), gsi_stmt (gsi2))) -+ if (!gimple_equal_p (same_succ, gsi_stmt (gsi1), gsi_stmt (gsi2), -+ &gvn_used)) - return; - - gsi_prev_nondebug (&gsi1); - gsi_prev_nondebug (&gsi2); -- gsi_advance_bw_nondebug_nonlocal (&gsi1); -- gsi_advance_bw_nondebug_nonlocal (&gsi2); -+ gsi_advance_bw_nondebug_nonlocal (&gsi1, &vuse1); -+ gsi_advance_bw_nondebug_nonlocal (&gsi2, &vuse2); - } - - if (!(gsi_end_p (gsi1) && gsi_end_p (gsi2))) - return; - -+ if (gvn_used && vuse1 != vuse2) -+ return; -+ - if (dump_file) - fprintf (dump_file, "find_duplicates: duplicate of \n", - bb1->index, bb2->index); -@@ -1179,7 +1207,7 @@ find_duplicate (same_succ same_succ, bas - E2 are equal. */ - - static bool --same_phi_alternatives_1 (basic_block dest, edge e1, edge e2) -+same_phi_alternatives_1 (basic_block dest, edge e1, edge e2, bool *gvn_used) - { - int n1 = e1->dest_idx, n2 = e2->dest_idx; - gimple_stmt_iterator gsi; -@@ -1197,7 +1225,10 @@ same_phi_alternatives_1 (basic_block des - if (operand_equal_for_phi_arg_p (val1, val2)) - continue; - if (gvn_uses_equal (val1, val2)) -- continue; -+ { -+ *gvn_used = true; -+ continue; -+ } - - return false; - } -@@ -1209,7 +1240,8 @@ same_phi_alternatives_1 (basic_block des - phi alternatives for BB1 and BB2 are equal. */ - - static bool --same_phi_alternatives (same_succ same_succ, basic_block bb1, basic_block bb2) -+same_phi_alternatives (same_succ same_succ, basic_block bb1, basic_block bb2, -+ bool *gvn_used) - { - unsigned int s; - bitmap_iterator bs; -@@ -1227,7 +1259,7 @@ same_phi_alternatives (same_succ same_su - - /* For all phis in bb, the phi alternatives for e1 and e2 need to have - the same value. */ -- if (!same_phi_alternatives_1 (succ, e1, e2)) -+ if (!same_phi_alternatives_1 (succ, e1, e2, gvn_used)) - return false; - } - -@@ -1301,6 +1333,7 @@ find_clusters_1 (same_succ same_succ) - bitmap_iterator bi, bj; - int nr_comparisons; - int max_comparisons = PARAM_VALUE (PARAM_MAX_TAIL_MERGE_COMPARISONS); -+ bool gvn_used; - - EXECUTE_IF_SET_IN_BITMAP (same_succ->bbs, 0, i, bi) - { -@@ -1333,10 +1366,11 @@ find_clusters_1 (same_succ same_succ) - if (!deps_ok_for_redirect (bb1, bb2)) - continue; - -- if (!(same_phi_alternatives (same_succ, bb1, bb2))) -+ gvn_used = false; -+ if (!(same_phi_alternatives (same_succ, bb1, bb2, &gvn_used))) - continue; - -- find_duplicate (same_succ, bb1, bb2); -+ find_duplicate (same_succ, bb1, bb2, gvn_used); - } - } - } ---- /dev/null -+++ b/testsuite/gcc.dg/pr52734.c -@@ -0,0 +1,35 @@ -+/* { dg-do run } */ -+/* { dg-options "-O2" } */ -+ -+int bbb = 0; -+ -+int __attribute__((noinline,noclone)) aaa(void) -+{ -+ ++bbb; -+ return 0; -+} -+ -+int __attribute__((noinline,noclone)) ccc(void) -+{ -+ int ddd; -+ /* bbb == 0 */ -+ if (aaa()) -+ return bbb; -+ -+ /* bbb == 1 */ -+ ddd = bbb; -+ /* bbb == ddd == 1 */ -+ if (aaa ()) -+ return 0; -+ /* bbb == 2, ddd == 1 */ -+ -+ return ddd; -+} -+ -+int main(void) -+{ -+ if (ccc() != 1) -+ __builtin_abort(); -+ return 0; -+} -+ diff --git a/toolchain/gcc/patches/4.7-linaro/001-gcc-bug-54369.patch b/toolchain/gcc/patches/4.7-linaro/001-gcc-bug-54369.patch deleted file mode 100644 index 60a88b9856..0000000000 --- a/toolchain/gcc/patches/4.7-linaro/001-gcc-bug-54369.patch +++ /dev/null @@ -1,45 +0,0 @@ -Author: ebotcazou -Date: Sun Sep 2 10:36:54 2012 -New Revision: 190859 - -URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190859 -Log: - PR rtl-optimization/54369 - * config/mips/mips.c (mips_reorg): Invoke cleanup_barriers before - calling dbr_schedule. - * config/sparc/sparc.c (sparc_reorg): Likewise. - -Modified: - branches/gcc-4_7-branch/gcc/ChangeLog - branches/gcc-4_7-branch/gcc/config/mips/mips.c - branches/gcc-4_7-branch/gcc/config/sparc/sparc.c ---- ---- gcc-4_7-branch/gcc/config/mips/mips.c 2012/09/02 10:36:27 190858 -+++ gcc-4_7-branch/gcc/config/mips/mips.c 2012/09/02 10:36:54 190859 -@@ -15415,7 +15415,10 @@ - } - - if (optimize > 0 && flag_delayed_branch) -- dbr_schedule (get_insns ()); -+ { -+ cleanup_barriers (); -+ dbr_schedule (get_insns ()); -+ } - mips_reorg_process_insns (); - if (!TARGET_MIPS16 - && TARGET_EXPLICIT_RELOCS ---- gcc-4_7-branch/gcc/config/sparc/sparc.c 2012/09/02 10:36:27 190858 -+++ gcc-4_7-branch/gcc/config/sparc/sparc.c 2012/09/02 10:36:54 190859 -@@ -10663,7 +10663,10 @@ - /* 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) -- dbr_schedule (get_insns ()); -+ { -+ cleanup_barriers (); -+ dbr_schedule (get_insns ()); -+ } - - /* Now look for specific patterns in the insn stream. */ - for (insn = get_insns (); insn; insn = next) - diff --git a/toolchain/gcc/patches/4.7-linaro/002-gcc-bug-54494.patch b/toolchain/gcc/patches/4.7-linaro/002-gcc-bug-54494.patch deleted file mode 100644 index ce4ae770f0..0000000000 --- a/toolchain/gcc/patches/4.7-linaro/002-gcc-bug-54494.patch +++ /dev/null @@ -1,37 +0,0 @@ -URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191025 -Log: -2012-09-06 Andrew Pinski - - PR tree-opt/54494 - * tree-inline.c (remap_gimple_op_r): Copy TREE_SIDE_EFFECTS also. -2012-09-06 Andrew Pinski - - PR tree-opt/54494 - * gcc.dg/tree-ssa/strlen-1.c: New testcase. - - -Added: - branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/tree-ssa/strlen-1.c - - copied unchanged from r191014, -trunk/gcc/testsuite/gcc.dg/tree-ssa/strlen-1.c -Modified: - branches/gcc-4_7-branch/ (props changed) - branches/gcc-4_7-branch/gcc/ChangeLog - branches/gcc-4_7-branch/gcc/testsuite/ChangeLog - branches/gcc-4_7-branch/gcc/tree-inline.c - -Propchange: branches/gcc-4_7-branch/ - ('svn:mergeinfo' modified) - ---- ---- gcc-4_7-branch/gcc/tree-inline.c 2012/09/06 13:47:33 191024 -+++ gcc-4_7-branch/gcc/tree-inline.c 2012/09/06 13:51:37 191025 -@@ -871,6 +871,7 @@ - ptr, TREE_OPERAND (*tp, 1)); - TREE_THIS_NOTRAP (*tp) = TREE_THIS_NOTRAP (old); - TREE_THIS_VOLATILE (*tp) = TREE_THIS_VOLATILE (old); -+ TREE_SIDE_EFFECTS (*tp) = TREE_SIDE_EFFECTS (old); - TREE_NO_WARNING (*tp) = TREE_NO_WARNING (old); - *walk_subtrees = 0; - return NULL; - diff --git a/toolchain/gcc/patches/4.7-linaro/003-siginfo_t.patch b/toolchain/gcc/patches/4.7-linaro/003-siginfo_t.patch deleted file mode 100644 index 255ba8d100..0000000000 --- a/toolchain/gcc/patches/4.7-linaro/003-siginfo_t.patch +++ /dev/null @@ -1,147 +0,0 @@ -There is one usage in boehm-gc/os_dep.c, but it is only used if -SUNOS5SIGS is defined, which it is only if one of SUNOS5, DRSNX, HPUX, or -FREEBSD is defined, which are all not using Linux-based glibc ports. - -Likewise, gcc/ada/init.c has a struct __siginfo occurence, but only for -__FreeBSD__. - -config/rs6000/linux-unwind.h uses ``char siginfo[128]'', and -config/s390/linux-unwind.h also uses a constant. - -I tested the following patch for sh-linux-gnu. This only covers one -configuration, but the change is pretty mechanic anyway and every place -that used to refer to struct siginfo already must have had in -its include path, which is the same file that declares siginfo_t. - -OK to commit? This should probably also go into any active release -branches, to keep them buildable once this glibc change ripples through? - -libgcc/ - * config/alpha/linux-unwind.h (alpha_fallback_frame_state): Use - siginfo_t instead of struct siginfo. - * config/bfin/linux-unwind.h (bfin_fallback_frame_state): Likewise. - * config/i386/linux-unwind.h (x86_fallback_frame_state): Likewise. - * config/ia64/linux-unwind.h (ia64_fallback_frame_state) - (ia64_handle_unwabi): Likewise. - * config/mips/linux-unwind.h (mips_fallback_frame_state): Likewise. - * config/pa/linux-unwind.h (pa32_fallback_frame_state): Likewise. - * config/sh/linux-unwind.h (shmedia_fallback_frame_state) - (sh_fallback_frame_state): Likewise. - * config/tilepro/linux-unwind.h (tile_fallback_frame_state): Likewise. - * config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Likewise. ---- -diff -urN gcc-linaro-4.7-2012.04/libgcc/config/alpha/linux-unwind.h gcc-linaro-4.7-2012.04.new/libgcc/config/alpha/linux-unwind.h ---- gcc-linaro-4.7-2012.04/libgcc/config/alpha/linux-unwind.h 2012-04-10 11:54:47.000000000 +0200 -+++ gcc-linaro-4.7-2012.04.new/libgcc/config/alpha/linux-unwind.h 2012-09-13 14:07:22.307413027 +0200 -@@ -49,7 +49,7 @@ - else if (pc[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */ - { - struct rt_sigframe { -- struct siginfo info; -+ siginfo_t info; - struct ucontext uc; - } *rt_ = context->cfa; - sc = &rt_->uc.uc_mcontext; -diff -urN gcc-linaro-4.7-2012.04/libgcc/config/bfin/linux-unwind.h gcc-linaro-4.7-2012.04.new/libgcc/config/bfin/linux-unwind.h ---- gcc-linaro-4.7-2012.04/libgcc/config/bfin/linux-unwind.h 2012-04-10 11:54:47.000000000 +0200 -+++ gcc-linaro-4.7-2012.04.new/libgcc/config/bfin/linux-unwind.h 2012-09-13 14:07:36.343413388 +0200 -@@ -48,10 +48,10 @@ - { - struct rt_sigframe { - int sig; -- struct siginfo *pinfo; -+ siginfo_t *pinfo; - void *puc; - char retcode[8]; -- struct siginfo info; -+ siginfo_t info; - struct ucontext uc; - } *rt_ = context->cfa; - -diff -urN gcc-linaro-4.7-2012.04/libgcc/config/i386/linux-unwind.h gcc-linaro-4.7-2012.04.new/libgcc/config/i386/linux-unwind.h ---- gcc-linaro-4.7-2012.04/libgcc/config/i386/linux-unwind.h 2012-04-10 11:54:47.000000000 +0200 -+++ gcc-linaro-4.7-2012.04.new/libgcc/config/i386/linux-unwind.h 2012-09-13 14:07:49.147413712 +0200 -@@ -139,9 +139,9 @@ - { - struct rt_sigframe { - int sig; -- struct siginfo *pinfo; -+ siginfo_t *pinfo; - void *puc; -- struct siginfo info; -+ siginfo_t info; - struct ucontext uc; - } *rt_ = context->cfa; - /* The void * cast is necessary to avoid an aliasing warning. -diff -urN gcc-linaro-4.7-2012.04/libgcc/config/mips/linux-unwind.h gcc-linaro-4.7-2012.04.new/libgcc/config/mips/linux-unwind.h ---- gcc-linaro-4.7-2012.04/libgcc/config/mips/linux-unwind.h 2012-04-10 11:54:47.000000000 +0200 -+++ gcc-linaro-4.7-2012.04.new/libgcc/config/mips/linux-unwind.h 2012-09-13 14:08:43.007415091 +0200 -@@ -75,7 +75,7 @@ - struct rt_sigframe { - u_int32_t ass[4]; /* Argument save space for o32. */ - u_int32_t trampoline[2]; -- struct siginfo info; -+ siginfo_t info; - _sig_ucontext_t uc; - } *rt_ = context->cfa; - sc = &rt_->uc.uc_mcontext; -diff -urN gcc-linaro-4.7-2012.04/libgcc/config/pa/linux-unwind.h gcc-linaro-4.7-2012.04.new/libgcc/config/pa/linux-unwind.h ---- gcc-linaro-4.7-2012.04/libgcc/config/pa/linux-unwind.h 2012-04-10 11:54:47.000000000 +0200 -+++ gcc-linaro-4.7-2012.04.new/libgcc/config/pa/linux-unwind.h 2012-09-13 14:08:54.335415383 +0200 -@@ -63,7 +63,7 @@ - int i; - struct sigcontext *sc; - struct rt_sigframe { -- struct siginfo info; -+ siginfo_t info; - struct ucontext uc; - } *frame; - -diff -urN gcc-linaro-4.7-2012.04/libgcc/config/sh/linux-unwind.h gcc-linaro-4.7-2012.04.new/libgcc/config/sh/linux-unwind.h ---- gcc-linaro-4.7-2012.04/libgcc/config/sh/linux-unwind.h 2012-04-10 11:54:47.000000000 +0200 -+++ gcc-linaro-4.7-2012.04.new/libgcc/config/sh/linux-unwind.h 2012-09-13 14:09:12.383415847 +0200 -@@ -80,9 +80,9 @@ - && (*(unsigned long *) (pc+11) == 0x6ff0fff0)) - { - struct rt_sigframe { -- struct siginfo *pinfo; -+ siginfo_t *pinfo; - void *puc; -- struct siginfo info; -+ siginfo_t info; - struct ucontext uc; - } *rt_ = context->cfa; - /* The void * cast is necessary to avoid an aliasing warning. -@@ -179,7 +179,7 @@ - && (*(unsigned short *) (pc+14) == 0x00ad)))) - { - struct rt_sigframe { -- struct siginfo info; -+ siginfo_t info; - struct ucontext uc; - } *rt_ = context->cfa; - /* The void * cast is necessary to avoid an aliasing warning. -diff -urN gcc-linaro-4.7-2012.04/libgcc/config/tilepro/linux-unwind.h gcc-linaro-4.7-2012.04.new/libgcc/config/tilepro/linux-unwind.h ---- gcc-linaro-4.7-2012.04/libgcc/config/tilepro/linux-unwind.h 2012-04-10 11:54:47.000000000 +0200 -+++ gcc-linaro-4.7-2012.04.new/libgcc/config/tilepro/linux-unwind.h 2012-09-13 14:09:28.907416268 +0200 -@@ -61,7 +61,7 @@ - - struct rt_sigframe { - unsigned char save_area[C_ABI_SAVE_AREA_SIZE]; -- struct siginfo info; -+ siginfo_t info; - struct ucontext uc; - } *rt_; - -diff -urN gcc-linaro-4.7-2012.04/libgcc/config/xtensa/linux-unwind.h gcc-linaro-4.7-2012.04.new/libgcc/config/xtensa/linux-unwind.h ---- gcc-linaro-4.7-2012.04/libgcc/config/xtensa/linux-unwind.h 2012-04-10 11:54:47.000000000 +0200 -+++ gcc-linaro-4.7-2012.04.new/libgcc/config/xtensa/linux-unwind.h 2012-09-13 14:09:41.399416587 +0200 -@@ -62,7 +62,7 @@ - struct sigcontext *sc; - - struct rt_sigframe { -- struct siginfo info; -+ siginfo_t info; - struct ucontext uc; - } *rt_; -