From patchwork Tue Nov 14 05:59:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeniy Didin X-Patchwork-Id: 837852 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ybpBl3gx3z9sBd for ; Wed, 15 Nov 2017 00:24:31 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 55FFD2FD10; Tue, 14 Nov 2017 13:24:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Vfk5KFKDjcj9; Tue, 14 Nov 2017 13:24:26 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 0B9132D15C; Tue, 14 Nov 2017 13:24:26 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id DC9C11CEF5C for ; Tue, 14 Nov 2017 13:06:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D5F1986DBC for ; Tue, 14 Nov 2017 13:06:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wHZwRNTxItVp for ; Tue, 14 Nov 2017 13:06:19 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtprelay.synopsys.com (smtprelay.synopsys.com [198.182.60.111]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5A81486CED for ; Tue, 14 Nov 2017 13:06:19 +0000 (UTC) Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id A792010C13B9; Tue, 14 Nov 2017 05:06:18 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 8DA3E391; Tue, 14 Nov 2017 05:06:18 -0800 (PST) Received: from ru20arcgnu1.internal.synopsys.com (ru20arcgnu1.internal.synopsys.com [10.121.9.48]) by mailhost.synopsys.com (Postfix) with ESMTP id DC379351; Tue, 14 Nov 2017 05:06:16 -0800 (PST) From: Evgeniy Didin To: buildroot@busybox.net Date: Tue, 14 Nov 2017 08:59:56 +0300 Message-Id: <20171114055956.45043-1-didin@synopsys.com> X-Mailer: git-send-email 2.11.0 Subject: [Buildroot] [PATCH] fwup: fix for ARC toolchain X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Evgeniy Didin , Thomas Petazzoni , Alexey Brodkin , arc-buildroot@synopsys.com MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Building fwup package with ARC toolchain causes internal compiler error. Adding patch for ARC gcc solves this issue. In the next version of toolchain, this problem has already been taken into account. Fixes: http://autobuild.buildroot.net/results/a1b/a1bd5084309ced6c2d1b311617e5d9f0c362557a// http://autobuild.buildroot.net/results/dd3/dd3000bd99d71383ce82cd6b01b543cd9660130e// Signed-off-by: Evgeniy Didin Cc: Alexey Brodkin Cc: arc-buildroot@synopsys.com Cc: Thomas Petazzoni --- .../0001-fix-checking-for-jumps.patch | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 package/gcc/arc-2017.09-release/0001-fix-checking-for-jumps.patch diff --git a/package/gcc/arc-2017.09-release/0001-fix-checking-for-jumps.patch b/package/gcc/arc-2017.09-release/0001-fix-checking-for-jumps.patch new file mode 100644 index 0000000000..ce78fac2e6 --- /dev/null +++ b/package/gcc/arc-2017.09-release/0001-fix-checking-for-jumps.patch @@ -0,0 +1,49 @@ +From c2694d3739d90ea3350b42252638b604a2c122b7 Mon Sep 17 00:00:00 2001 +From: Claudiu Zissulescu +Date: Tue, 7 Nov 2017 20:16:41 +0200 +Subject: [PATCH] [FIX][ZOL] fix checking for jumps + +Signed-off-by: Evgeniy Didin +--- + gcc/config/arc/arc.c | 3 ++- + gcc/testsuite/gcc.target/arc/loop-4.c | 14 ++++++++++++++ + 2 files changed, 16 insertions(+), 1 deletion(-) + create mode 100644 gcc/testsuite/gcc.target/arc/loop-4.c + +diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c +index 22eeb34a371..5d367499d03 100644 +--- a/gcc/config/arc/arc.c ++++ b/gcc/config/arc/arc.c +@@ -7505,7 +7505,8 @@ hwloop_optimize (hwloop_info loop) + && INSN_P (last_insn) + && (JUMP_P (last_insn) || CALL_P (last_insn) + || GET_CODE (PATTERN (last_insn)) == SEQUENCE +- || JUMP_P (prev_active_insn (last_insn)) ++ || (prev_active_insn (last_insn) ++ && JUMP_P (prev_active_insn (last_insn))) + /* At this stage we can have (insn (clobber (mem:BLK + (reg)))) instructions, ignpre them. */ + || (GET_CODE (PATTERN (last_insn)) != CLOBBER +diff --git a/gcc/testsuite/gcc.target/arc/loop-4.c b/gcc/testsuite/gcc.target/arc/loop-4.c +new file mode 100644 +index 00000000000..99a93a74d1e +--- /dev/null ++++ b/gcc/testsuite/gcc.target/arc/loop-4.c +@@ -0,0 +1,14 @@ ++/* { dg-do assemble } */ ++/* { dg-do compile } */ ++/* { dg-options "-Os" } */ ++ ++ ++void fn1(void *p1, int p2, int p3) ++{ ++ char *d = p1; ++ do ++ *d++ = p2; ++ while (--p3); ++} ++ ++/* { dg-final { scan-assembler "lp_count" } } */ +-- +2.11.0 +