summaryrefslogtreecommitdiffstats
path: root/package/gcc
diff options
context:
space:
mode:
authorEvgeniy Didin <Evgeniy.Didin@synopsys.com>2017-09-21 21:28:28 +0300
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-10-08 16:10:27 +0200
commit5bd21f991f3fe244893e230f24f6b7213f28dd74 (patch)
tree2065e40b918738fdf97fcfab2c4c725cec41dbcb /package/gcc
parent27cf2d3baf879f7314f12787982d8f4a5b4218cf (diff)
downloadbuildroot-5bd21f991f3fe244893e230f24f6b7213f28dd74.tar.gz
buildroot-5bd21f991f3fe244893e230f24f6b7213f28dd74.zip
toolchain: Bump ARC tools to arc-2017.09-rc1
This commit bumps ARC toolchain to arc-2017.09-rc1. The arc-2017.09 series is built on top of upstream GCC 7.1.1 and Binutils 2.29 so please expect all kinds of breakages related to GCC 7.x as we saw earlier with the move from 4.8 to 6.x :) Note patches for both GCC and Binutils were updated with copies from corresponding mainline versions, i.e. "package/gcc/7.2.0" and "package/binutils/2.29". Please note that it is a release candidate and it might contain some breakages, please don't use it for production builds. Signed-off-by: Evgeniy Didin <didin@synopsys.com> Cc: Alexey Brodkin <abrodkin@synopsys.com> Cc: arc-buildroot@synopsys.com Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> [Thomas: drop binutils patch related to the Blackfin architecture.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/gcc')
-rw-r--r--package/gcc/Config.in.host6
-rw-r--r--package/gcc/arc-2017.03/0001-ARC-Fix-tst_movb-pattern.patch55
-rw-r--r--package/gcc/arc-2017.03/301-missing-execinfo_h.patch13
-rw-r--r--package/gcc/arc-2017.03/940-uclinux-enable-threads.patch19
-rw-r--r--package/gcc/arc-2017.09-rc1/0100-uclibc-conf.patch29
-rw-r--r--package/gcc/arc-2017.09-rc1/0860-cilk-fix-build-without-wchar.patch (renamed from package/gcc/arc-2017.03/860-cilk-wchar.patch)24
-rw-r--r--package/gcc/arc-2017.09-rc1/0900-remove-selftests.patch111
-rw-r--r--package/gcc/arc-2017.09-rc1/0910-Update-uses-for-hw-loop-labels.patch63
-rw-r--r--package/gcc/gcc.hash2
9 files changed, 223 insertions, 99 deletions
diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index 0926560885..1115554d10 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -9,10 +9,10 @@ choice
Select the version of gcc you wish to use.
config BR2_GCC_VERSION_ARC
- bool "gcc arc (6.x)"
+ bool "gcc arc (7.x)"
# Only supported architecture
depends on BR2_arc
- select BR2_TOOLCHAIN_GCC_AT_LEAST_6
+ select BR2_TOOLCHAIN_GCC_AT_LEAST_7
config BR2_GCC_VERSION_OR1K
bool "gcc or1k (5.x)"
@@ -92,7 +92,7 @@ config BR2_GCC_VERSION
default "5.4.0" if BR2_GCC_VERSION_5_X
default "6.4.0" if BR2_GCC_VERSION_6_X
default "7.2.0" if BR2_GCC_VERSION_7_X
- default "arc-2017.03" if BR2_GCC_VERSION_ARC
+ default "arc-2017.09-rc1" if BR2_GCC_VERSION_ARC
default "musl-5.4.0" if BR2_GCC_VERSION_OR1K
config BR2_EXTRA_GCC_CONFIG_OPTIONS
diff --git a/package/gcc/arc-2017.03/0001-ARC-Fix-tst_movb-pattern.patch b/package/gcc/arc-2017.03/0001-ARC-Fix-tst_movb-pattern.patch
deleted file mode 100644
index 3b09a13019..0000000000
--- a/package/gcc/arc-2017.03/0001-ARC-Fix-tst_movb-pattern.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 08235ef444fd32d311fc9edb65895133820462e3 Mon Sep 17 00:00:00 2001
-From: claziss <claziss@synopsys.com>
-Date: Wed, 24 May 2017 12:53:43 +0200
-Subject: [PATCH] [ARC] Fix tst_movb pattern.
-
-The tst_movb pattern is missing guarding when spitting.
-
-gcc/
-2017-05-24 Claudiu Zissulescu <claziss@synopsys.com>
-
- * config/arc/arc.md (tst_movb): Add guard when splitting.
-
-testsuite/
-2017-05-24 Claudiu Zissulescu <claziss@synopsys.com>
-
- * gcc.target/arc/pr9001195952.c: New test.
----
- gcc/config/arc/arc.md | 2 +-
- gcc/testsuite/gcc.target/arc/pr9001195952.c | 11 +++++++++++
- 2 files changed, 12 insertions(+), 1 deletion(-)
- create mode 100755 gcc/testsuite/gcc.target/arc/pr9001195952.c
-
-diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md
-index e78abaaafc42..d5510aeb0600 100644
---- a/gcc/config/arc/arc.md
-+++ b/gcc/config/arc/arc.md
-@@ -863,7 +863,7 @@ archs4xd, archs4xd_slow"
- (clobber (match_scratch:SI 3 "=X,X,X,X,X,X,Rrq,Rrq,c"))]
- "TARGET_NPS_BITOPS"
- "movb.f.cl %3,%1,%p2,%p2,%s2"
-- "reload_completed
-+ "TARGET_NPS_BITOPS && reload_completed
- && (extract_constrain_insn_cached (insn), (which_alternative & ~1) != 6)"
- [(set (match_dup 0) (match_dup 4))])
-
-diff --git a/gcc/testsuite/gcc.target/arc/pr9001195952.c b/gcc/testsuite/gcc.target/arc/pr9001195952.c
-new file mode 100755
-index 000000000000..252438d8d78b
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/arc/pr9001195952.c
-@@ -0,0 +1,11 @@
-+/* { dg-do compile } */
-+/* { dg-skip-if "" { ! { clmcpu } } } */
-+/* { dg-options "-mcpu=archs -Os -w -fpic" } */
-+
-+/* tst_movb split pattern is wrong for anything else than NPS
-+ chip. */
-+__bswap_32___bsx() {
-+ int a = __builtin_bswap32(__bswap_32___bsx);
-+ if (a & 1048575)
-+ zlog_warn();
-+}
---
-2.7.4
-
diff --git a/package/gcc/arc-2017.03/301-missing-execinfo_h.patch b/package/gcc/arc-2017.03/301-missing-execinfo_h.patch
deleted file mode 100644
index 2d0e7baa44..0000000000
--- a/package/gcc/arc-2017.03/301-missing-execinfo_h.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: b/boehm-gc/include/gc.h
-===================================================================
---- a/boehm-gc/include/gc.h
-+++ b/boehm-gc/include/gc.h
-@@ -503,7 +503,7 @@
- #if defined(__linux__) || defined(__GLIBC__)
- # include <features.h>
- # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
-- && !defined(__ia64__)
-+ && !defined(__ia64__) && !defined(__UCLIBC__)
- # ifndef GC_HAVE_BUILTIN_BACKTRACE
- # define GC_HAVE_BUILTIN_BACKTRACE
- # endif
diff --git a/package/gcc/arc-2017.03/940-uclinux-enable-threads.patch b/package/gcc/arc-2017.03/940-uclinux-enable-threads.patch
deleted file mode 100644
index 5532656725..0000000000
--- a/package/gcc/arc-2017.03/940-uclinux-enable-threads.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Enable POSIX threads for uClinux targets
-Reported upstream:
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71721
-
-Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
-
-diff -Nur gcc-6.1.0.orig/gcc/config.gcc gcc-6.1.0/gcc/config.gcc
---- gcc-6.1.0.orig/gcc/config.gcc 2016-04-11 12:14:59.000000000 +0200
-+++ gcc-6.1.0/gcc/config.gcc 2016-07-02 20:04:25.732169982 +0200
-@@ -833,6 +833,9 @@
- *-*-uclinux*)
- extra_options="$extra_options gnu-user.opt"
- use_gcc_stdint=wrap
-+ case ${enable_threads} in
-+ "" | yes | posix) thread_file='posix' ;;
-+ esac
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC SINGLE_LIBC"
- ;;
- *-*-rdos*)
diff --git a/package/gcc/arc-2017.09-rc1/0100-uclibc-conf.patch b/package/gcc/arc-2017.09-rc1/0100-uclibc-conf.patch
new file mode 100644
index 0000000000..d354baf81f
--- /dev/null
+++ b/package/gcc/arc-2017.09-rc1/0100-uclibc-conf.patch
@@ -0,0 +1,29 @@
+From 326b880b20e5f8187dbda736b4c4c662cbfb00ca Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@gmail.com>
+Date: Tue, 2 May 2017 22:36:15 +0200
+Subject: [PATCH] uclibc-conf
+
+[Romain: convert to git patch]
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
+---
+ contrib/regression/objs-gcc.sh | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/contrib/regression/objs-gcc.sh b/contrib/regression/objs-gcc.sh
+index 60b0497..6dc7ead 100755
+--- a/contrib/regression/objs-gcc.sh
++++ b/contrib/regression/objs-gcc.sh
+@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ]
+ then
+ make all-gdb all-dejagnu all-ld || exit 1
+ make install-gdb install-dejagnu install-ld || exit 1
++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
++ then
++ make all-gdb all-dejagnu all-ld || exit 1
++ make install-gdb install-dejagnu install-ld || exit 1
+ elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
+ make bootstrap || exit 1
+ make install || exit 1
+--
+2.9.3
+
diff --git a/package/gcc/arc-2017.03/860-cilk-wchar.patch b/package/gcc/arc-2017.09-rc1/0860-cilk-fix-build-without-wchar.patch
index 1d9916f554..61ab01c713 100644
--- a/package/gcc/arc-2017.03/860-cilk-wchar.patch
+++ b/package/gcc/arc-2017.09-rc1/0860-cilk-fix-build-without-wchar.patch
@@ -1,4 +1,7 @@
-[PATCH] cilk: fix build without wchar
+From 714739e69ead1d9823233af40645277f6d4633ea Mon Sep 17 00:00:00 2001
+From: Peter Korsgaard <peter@korsgaard.com>
+Date: Tue, 2 May 2017 23:21:46 +0200
+Subject: [PATCH] cilk: fix build without wchar
When building against uClibc with wchar support disabled, WCHAR_MIN and
WCHAR_MAX are not defined leading to compilation errors.
@@ -6,15 +9,17 @@ WCHAR_MAX are not defined leading to compilation errors.
Fix it by only including the wchar code if available.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
+[Romain: convert to git patch]
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
- libcilkrts/include/cilk/reducer_min_max.h | 8 ++++++++
+ libcilkrts/include/cilk/reducer_min_max.h | 8 ++++++++
1 file changed, 8 insertions(+)
-Index: b/libcilkrts/include/cilk/reducer_min_max.h
-===================================================================
+diff --git a/libcilkrts/include/cilk/reducer_min_max.h b/libcilkrts/include/cilk/reducer_min_max.h
+index 641aa82..4f8e010 100644
--- a/libcilkrts/include/cilk/reducer_min_max.h
+++ b/libcilkrts/include/cilk/reducer_min_max.h
-@@ -3154,7 +3154,9 @@
+@@ -3289,7 +3289,9 @@ __CILKRTS_BEGIN_EXTERN_C
CILK_C_REDUCER_MAX_INSTANCE(char, char, CHAR_MIN)
CILK_C_REDUCER_MAX_INSTANCE(unsigned char, uchar, 0)
CILK_C_REDUCER_MAX_INSTANCE(signed char, schar, SCHAR_MIN)
@@ -24,7 +29,7 @@ Index: b/libcilkrts/include/cilk/reducer_min_max.h
CILK_C_REDUCER_MAX_INSTANCE(short, short, SHRT_MIN)
CILK_C_REDUCER_MAX_INSTANCE(unsigned short, ushort, 0)
CILK_C_REDUCER_MAX_INSTANCE(int, int, INT_MIN)
-@@ -3306,7 +3308,9 @@
+@@ -3441,7 +3443,9 @@ __CILKRTS_BEGIN_EXTERN_C
CILK_C_REDUCER_MAX_INDEX_INSTANCE(char, char, CHAR_MIN)
CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned char, uchar, 0)
CILK_C_REDUCER_MAX_INDEX_INSTANCE(signed char, schar, SCHAR_MIN)
@@ -34,7 +39,7 @@ Index: b/libcilkrts/include/cilk/reducer_min_max.h
CILK_C_REDUCER_MAX_INDEX_INSTANCE(short, short, SHRT_MIN)
CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned short, ushort, 0)
CILK_C_REDUCER_MAX_INDEX_INSTANCE(int, int, INT_MIN)
-@@ -3432,7 +3436,9 @@
+@@ -3567,7 +3571,9 @@ __CILKRTS_BEGIN_EXTERN_C
CILK_C_REDUCER_MIN_INSTANCE(char, char, CHAR_MAX)
CILK_C_REDUCER_MIN_INSTANCE(unsigned char, uchar, CHAR_MAX)
CILK_C_REDUCER_MIN_INSTANCE(signed char, schar, SCHAR_MAX)
@@ -44,7 +49,7 @@ Index: b/libcilkrts/include/cilk/reducer_min_max.h
CILK_C_REDUCER_MIN_INSTANCE(short, short, SHRT_MAX)
CILK_C_REDUCER_MIN_INSTANCE(unsigned short, ushort, USHRT_MAX)
CILK_C_REDUCER_MIN_INSTANCE(int, int, INT_MAX)
-@@ -3584,7 +3590,9 @@
+@@ -3719,7 +3725,9 @@ __CILKRTS_BEGIN_EXTERN_C
CILK_C_REDUCER_MIN_INDEX_INSTANCE(char, char, CHAR_MAX)
CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned char, uchar, CHAR_MAX)
CILK_C_REDUCER_MIN_INDEX_INSTANCE(signed char, schar, SCHAR_MAX)
@@ -54,3 +59,6 @@ Index: b/libcilkrts/include/cilk/reducer_min_max.h
CILK_C_REDUCER_MIN_INDEX_INSTANCE(short, short, SHRT_MAX)
CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned short, ushort, USHRT_MAX)
CILK_C_REDUCER_MIN_INDEX_INSTANCE(int, int, INT_MAX)
+--
+2.9.3
+
diff --git a/package/gcc/arc-2017.09-rc1/0900-remove-selftests.patch b/package/gcc/arc-2017.09-rc1/0900-remove-selftests.patch
new file mode 100644
index 0000000000..a3bc7a5730
--- /dev/null
+++ b/package/gcc/arc-2017.09-rc1/0900-remove-selftests.patch
@@ -0,0 +1,111 @@
+From 63f0917d90eb83d267dc517fdfb6523a74b1917c Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@gmail.com>
+Date: Wed, 3 May 2017 00:37:06 +0200
+Subject: [PATCH] remove selftests
+
+When the gcc archive is extracted by the gcc.mk, the gcc/testsuite
+is excluded:
+
+HOST_GCC_EXCLUDES = \
+ libjava/* libgo/* \
+ gcc/testsuite/* libstdc++-v3/testsuite/*
+
+The new Makefile target from the "Selftest framework" [1] added a dependency
+on the gcc/testsuite/Makefile.
+Revert partially the commit [1] to allow building gcc without selftest.
+
+[1] https://github.com/gcc-mirror/gcc/commit/99b4f3a2d5bf2c137de9731e27b483eb6b462fd9
+
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
+---
+ gcc/Makefile.in | 46 +++++-----------------------------------------
+ 1 file changed, 5 insertions(+), 41 deletions(-)
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 74d1912..652a554 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -1581,14 +1581,13 @@ OBJS = \
+ OBJS-libcommon = diagnostic.o diagnostic-color.o diagnostic-show-locus.o \
+ edit-context.o \
+ pretty-print.o intl.o \
+- vec.o input.o version.o hash-table.o ggc-none.o memory-block.o \
+- selftest.o
++ vec.o input.o version.o hash-table.o ggc-none.o memory-block.o
+
+ # Objects in libcommon-target.a, used by drivers and by the core
+ # compiler and containing target-dependent code.
+ OBJS-libcommon-target = $(common_out_object_file) prefix.o params.o \
+ opts.o opts-common.o options.o vec.o hooks.o common/common-targhooks.o \
+- hash-table.o file-find.o spellcheck.o selftest.o
++ hash-table.o file-find.o spellcheck.o
+
+ # This lists all host objects for the front ends.
+ ALL_HOST_FRONTEND_OBJS = $(foreach v,$(CONFIG_LANGUAGES),$($(v)_OBJS))
+@@ -1865,10 +1864,10 @@ config.status: $(srcdir)/configure $(srcdir)/config.gcc
+ quickstrap: all
+ cd $(toplevel_builddir) && $(MAKE) all-target-libgcc
+
+-all.internal: start.encap rest.encap doc selftest
++all.internal: start.encap rest.encap doc
+ # This is what to compile if making a cross-compiler.
+ all.cross: native gcc-cross$(exeext) cpp$(exeext) specs \
+- libgcc-support lang.all.cross doc selftest @GENINSRC@ srcextra
++ libgcc-support lang.all.cross doc @GENINSRC@ srcextra
+ # This is what must be made before installing GCC and converting libraries.
+ start.encap: native xgcc$(exeext) cpp$(exeext) specs \
+ libgcc-support lang.start.encap @GENINSRC@ srcextra
+@@ -1888,41 +1887,6 @@ endif
+ # This does the things that can't be done on the host machine.
+ rest.cross: specs
+
+-# GCC's selftests.
+-# Specify a dummy input file to placate the driver.
+-# Specify -nostdinc to work around missing WIND_BASE environment variable
+-# required for *-wrs-vxworks-* targets.
+-# Specify -o /dev/null so the output of -S is discarded. More importantly
+-# It does not try to create a file with the name "null.s" on POSIX and
+-# "nul.s" on Windows. Because on Windows "nul" is a reserved file name.
+-# Specify the path to gcc/testsuite/selftests within the srcdir
+-# as an argument to -fself-test.
+-SELFTEST_FLAGS = -nostdinc -x c /dev/null -S -o /dev/null \
+- -fself-test=$(srcdir)/testsuite/selftests
+-
+-# Run the selftests during the build once we have a driver and a cc1,
+-# so that self-test failures are caught as early as possible.
+-# Use "s-selftest" to ensure that we only run the selftests if the
+-# driver, cc1, or selftest data change.
+-.PHONY: selftest
+-selftest: s-selftest
+-s-selftest: $(GCC_PASSES) cc1$(exeext) stmp-int-hdrs \
+- $(srcdir)/testsuite/selftests
+- $(GCC_FOR_TARGET) $(SELFTEST_FLAGS)
+- $(STAMP) $@
+-
+-# Convenience method for running selftests under gdb:
+-.PHONY: selftest-gdb
+-selftest-gdb: $(GCC_PASSES) cc1$(exeext) stmp-int-hdrs
+- $(GCC_FOR_TARGET) $(SELFTEST_FLAGS) \
+- -wrapper gdb,--args
+-
+-# Convenience method for running selftests under valgrind:
+-.PHONY: selftest-valgrind
+-selftest-valgrind: $(GCC_PASSES) cc1$(exeext) stmp-int-hdrs
+- $(GCC_FOR_TARGET) $(SELFTEST_FLAGS) \
+- -wrapper valgrind,--leak-check=full
+-
+ # Recompile all the language-independent object files.
+ # This is used only if the user explicitly asks for it.
+ compilations: $(BACKEND)
+@@ -2076,7 +2040,7 @@ gcc-nm.c: gcc-ar.c
+ cp $^ $@
+
+ COLLECT2_OBJS = collect2.o collect2-aix.o tlink.o vec.o ggc-none.o \
+- collect-utils.o file-find.o hash-table.o selftest.o
++ collect-utils.o file-find.o hash-table.o
+ COLLECT2_LIBS = @COLLECT2_LIBS@
+ collect2$(exeext): $(COLLECT2_OBJS) $(LIBDEPS)
+ # Don't try modifying collect2 (aka ld) in place--it might be linking this.
+--
+2.9.3
+
diff --git a/package/gcc/arc-2017.09-rc1/0910-Update-uses-for-hw-loop-labels.patch b/package/gcc/arc-2017.09-rc1/0910-Update-uses-for-hw-loop-labels.patch
new file mode 100644
index 0000000000..c703909b7b
--- /dev/null
+++ b/package/gcc/arc-2017.09-rc1/0910-Update-uses-for-hw-loop-labels.patch
@@ -0,0 +1,63 @@
+From cb7f97fb860b5286d3470ccda0f623f4657780a3 Mon Sep 17 00:00:00 2001
+From: claziss <claziss@synopsys.com>
+Date: Tue, 19 Sep 2017 15:45:19 +0200
+Subject: [PATCH] [ARC][ZOL] Update uses for hw-loop labels.
+
+Make sure we mark the hw-loop labels as beeing used.
+
+gcc/
+2017-09-19 Claudiu Zissulescu <claziss@synopsys.com>
+
+ * config/arc/arc.c (hwloop_optimize): Update hw-loop's end/start
+ labels number of usages.
+
+gcc/testsuite
+2017-09-19 Claudiu Zissulescu <claziss@synopsys.com>
+
+ * gcc.target/arc/loop-2.cpp: New test.
+---
+ gcc/config/arc/arc.c | 3 +++
+ gcc/testsuite/gcc.target/arc/arc.exp | 2 +-
+ gcc/testsuite/gcc.target/arc/loop-2.cpp | 18 ++++++++++++++++++
+ 3 files changed, 22 insertions(+), 1 deletion(-)
+ create mode 100644 gcc/testsuite/gcc.target/arc/loop-2.cpp
+
+diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
+index 5c0a872cc97..cc7fc624ff2 100644
+--- a/gcc/config/arc/arc.c
++++ b/gcc/config/arc/arc.c
+@@ -7613,6 +7613,9 @@ hwloop_optimize (hwloop_info loop)
+ /* Insert the loop end label before the last instruction of the
+ loop. */
+ emit_label_after (end_label, loop->last_insn);
++ /* Make sure we mark the begining and end label as used. */
++ LABEL_NUSES (loop->end_label)++;
++ LABEL_NUSES (loop->start_label)++;
+
+ return true;
+ }
+diff --git a/gcc/testsuite/gcc.target/arc/loop-2.cpp b/gcc/testsuite/gcc.target/arc/loop-2.cpp
+new file mode 100644
+index 00000000000..d1dc917ba47
+--- /dev/null
++++ b/gcc/testsuite/gcc.target/arc/loop-2.cpp
+@@ -0,0 +1,18 @@
++/* { dg-options "-O2" } *
++/* { dg-do assemble } */
++
++/* This file fails to assemble if we forgot to increase the number of
++ uses for loop's start and end labels. */
++int a, c, d;
++int *b;
++void fn1(int p1) {
++ if (d == 5)
++ for (int i; i < p1; ++i)
++ if (c)
++ b[i] = c;
++ else
++ int t = a = t;
++ else
++ for (int i; i < p1; ++i)
++ b[i] = 0;
++}
+
diff --git a/package/gcc/gcc.hash b/package/gcc/gcc.hash
index f35a2e2b55..7d4d435e87 100644
--- a/package/gcc/gcc.hash
+++ b/package/gcc/gcc.hash
@@ -8,6 +8,6 @@ sha512 02c60e54527c7adf584798d5251f8a0b80c93d5deafce82501b2c28e6692e0bd783927bb
sha512 f853cd6530b4055d8d8289da74687cb4c6d5f363598d386332d31852b581bac76c3adb7d61889edec3b779f63d8646f0122840f12965ce4a4389ba535dbbb6e1 gcc-7.2.0.tar.xz
# Locally calculated (fetched from Github)
-sha512 282f76b8b63372f5b4426092b80d36da96cd0bda2a8588405b9ec22806c69fafb696b0e0df65bc36c3c3aa8ce5befc24246fd5c6ddb21dcde01f45f7b11ff7c4 gcc-arc-2017.03.tar.gz
+sha512 c30255dc937e23f6388b4c640455114bcf86cffe923191e32d33ffcde6c4980e9d1811e85877fed3e414ed069cc3e2013993ed76331088ff0846ac50421cb426 gcc-arc-2017.09-rc1.tar.gz
# Locally calculated (fetched from Github)
sha512 841101f7de45f327bf2e92f3efc73ca88a021e4b9b541458ce80a16e55882bd8606a8492d75c57c589ee2c10d42ae2865b67690155d7289a541df1d68096402f gcc-musl-5.4.0.tar.gz
OpenPOWER on IntegriCloud