From patchwork Thu Nov 9 21:56:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Brodkin X-Patchwork-Id: 836518 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.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yXxpR3Kc0z9sPt for ; Fri, 10 Nov 2017 08:57:03 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A07A488014; Thu, 9 Nov 2017 21:57:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hw_y1CZ24K2z; Thu, 9 Nov 2017 21:56:58 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id E75C087FEB; Thu, 9 Nov 2017 21:56:57 +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 1D1721C078A for ; Thu, 9 Nov 2017 21:56:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 10CCD88C62 for ; Thu, 9 Nov 2017 21:56:57 +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 QXH2lvf6j92s for ; Thu, 9 Nov 2017 21:56:55 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtprelay.synopsys.com (us01smtprelay-2.synopsys.com [198.182.47.9]) by whitealder.osuosl.org (Postfix) with ESMTPS id BCC0988C21 for ; Thu, 9 Nov 2017 21:56:55 +0000 (UTC) Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id C346E24E1F1E; Thu, 9 Nov 2017 13:56:53 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id A8DF5437; Thu, 9 Nov 2017 13:56:53 -0800 (PST) Received: from ru20arcgnu1.internal.synopsys.com (ru20arcgnu1.internal.synopsys.com [10.121.9.48]) by mailhost.synopsys.com (Postfix) with ESMTP id 2E3E8434; Thu, 9 Nov 2017 13:56:51 -0800 (PST) From: Alexey Brodkin To: buildroot@busybox.net Date: Fri, 10 Nov 2017 00:56:48 +0300 Message-Id: <20171109215648.15975-1-abrodkin@synopsys.com> X-Mailer: git-send-email 2.10.2 Subject: [Buildroot] [PATCH] gcc: Use upstream GCC 7.2 for ARC 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: Thomas Petazzoni , Alexey Brodkin MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" It turned out with vanilla upstream GCC 7.2 stuff could be built for ARC, what's more we may even build Linux kernel with rootfs and get it all running perfectly fine so why not use that? Essentially GCC from SNPS GitHub still has a lot of fixes and improvements most of which will be a part of the next upstream release but let's see how it goes and if we see vanilla GCC doesn't require way too many back-ported patches we'll be able to get rid of SNPS GitHub here at all. As of today the only really required back-port is the one for non-uClibc libc. Back-ported from upstream master with help of: -------------------->8-------------------- git format-patch 927c0132251f -1 -- . ':!gcc/ChangeLog' ':!libgcc/ChangeLog' -------------------->8-------------------- Signed-off-by: Alexey Brodkin Cc: Arnout Vandecappelle (Essensium/Mind) Cc: Thomas Petazzoni Cc: Peter Korsgaard --- ...re-script-to-allow-non-uclibc-based-tripl.patch | 51 ++++++++++++++++++++++ package/gcc/Config.in.host | 1 - package/gcc/gcc.mk | 2 +- 3 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 package/gcc/7.2.0/0001-ARC-Configure-script-to-allow-non-uclibc-based-tripl.patch diff --git a/package/gcc/7.2.0/0001-ARC-Configure-script-to-allow-non-uclibc-based-tripl.patch b/package/gcc/7.2.0/0001-ARC-Configure-script-to-allow-non-uclibc-based-tripl.patch new file mode 100644 index 0000000..4f97c2f --- /dev/null +++ b/package/gcc/7.2.0/0001-ARC-Configure-script-to-allow-non-uclibc-based-tripl.patch @@ -0,0 +1,51 @@ +From 927c0132251f1cd3452b96ebd75f1b06bc53e4ec Mon Sep 17 00:00:00 2001 +From: claziss +Date: Mon, 10 Jul 2017 13:55:26 +0000 +Subject: [PATCH] [ARC] Configure script to allow non uclibc based triplets + +gcc/ +2017-07-10 Vineet Gupta + + * config.gcc: Remove uclibc from arc target spec. + +libgcc/ +2017-07-10 Vineet Gupta + + * config.host: Remove uclibc from arc target spec. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250097 138bc75d-0d04-0410-961f-82ee72b054a4 +Signed-off-by: Alexey Brodkin +--- + gcc/config.gcc | 2 +- + libgcc/config.host | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gcc/config.gcc b/gcc/config.gcc +index 1b47457..933a451 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -1044,7 +1044,7 @@ arc*-*-elf*) + big*) tm_file="arc/big.h ${tm_file}" + esac + ;; +-arc*-*-linux-uclibc*) ++arc*-*-linux*) + tm_file="arc/arc-arch.h dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arc/linux.h ${tm_file}" + tmake_file="${tmake_file} arc/t-arc" + extra_gcc_objs="driver-arc.o" +diff --git a/libgcc/config.host b/libgcc/config.host +index 989ac71..a5ab453 100644 +--- a/libgcc/config.host ++++ b/libgcc/config.host +@@ -383,7 +383,7 @@ arc*-*-elf*) + extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o" + extra_parts="$extra_parts crttls.o" + ;; +-arc*-*-linux-uclibc*) ++arc*-*-linux*) + tmake_file="${tmake_file} t-slibgcc-libgcc t-slibgcc-nolc-override arc/t-arc-uClibc arc/t-arc" + extra_parts="$extra_parts crti.o crtn.o" + extra_parts="$extra_parts crttls.o" +-- +2.10.2 + diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host index 1fb6b60..63b75cd 100644 --- a/package/gcc/Config.in.host +++ b/package/gcc/Config.in.host @@ -69,7 +69,6 @@ config BR2_GCC_VERSION_6_X config BR2_GCC_VERSION_7_X bool "gcc 7.x" # Broken or unsupported architectures - depends on !BR2_arc depends on !BR2_or1k select BR2_TOOLCHAIN_GCC_AT_LEAST_7 diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk index 6bdd6c8..0613092 100644 --- a/package/gcc/gcc.mk +++ b/package/gcc/gcc.mk @@ -10,7 +10,7 @@ GCC_VERSION = $(call qstrip,$(BR2_GCC_VERSION)) -ifeq ($(BR2_arc),y) +ifeq ($(BR2_GCC_VERSION_ARC),y) GCC_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,gcc,$(GCC_VERSION)) GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz else ifeq ($(BR2_or1k),y)