Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2234588imm; Thu, 18 Oct 2018 11:08:09 -0700 (PDT) X-Google-Smtp-Source: ACcGV61V4LiSNJMY+AX1FqQ/lf/2j2E2WRCCIvt5BRJ27KNSqHefZQbNuzxtf5ULZO4/JxetMtaX X-Received: by 2002:a17:902:187:: with SMTP id b7-v6mr30973903plb.150.1539886089721; Thu, 18 Oct 2018 11:08:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539886089; cv=none; d=google.com; s=arc-20160816; b=o3QoCJwmc6Il1/sG/0k0g+I0QxSsBW7woYxyY5k0vMquiVYFSK0+WXiKGNzdb4GtTE MCLoqV1XbLF4sCbSXXOT5Bz1cj5mY8YEssV5CtBsspja4zqh++2PwUNeCUomMgpCW4Bo mxqGjcKpxtLOdbMqXfaQuczkkFdT03fqxx7cLOGem74kcSjr5UIpPjzdDgICLR8qm5o0 VsnIE0PtkkIFvLWeAitF1eKn2TGcunpq8BihmB1qIkls/j4mgm4CFHBczePb4OFwee/X Dk5zPDR5FRDGrLQ2WeSm9nGucTbVYhA7d8X2nCP9lwYjA8/YVjzIn8tCusbPfizE7KS4 mdsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=n56FA0i8Yz2kk0gj/GPtmt385SVfruGkFgOS8DcQgMI=; b=iF9PqT0xnyrPGZqNV64OX8FXBpTa5Q7knbGGS5v/abliPt7aWR8dK3iqf3tiqfugns wbswsuE8HutdOs4SWKYqxK+MzTQEUkJTdVq8nEBkgM3JJU+s1K8U6moGuJOybYt2SBPV LiPCXNOUU08GjuoqsszycJMRWSOuWJlrzIsimxOOMqYtAXgTzba86bGOd+C1a9Rs4jTf yf0s0nX8ZF9emTQV+ORByx5/eDsj/iHqUuqNxrgvbrVjQyTsl8/RD9RBvbK/z6+kZHkZ xbyK3pkVz7mTWP+Q5NGGKz9D9xeRZvyiiy2p+apkTf+yI8E2GKO4foYZj1BMwMBQ31R5 eXbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zQAQx0+2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n12-v6si19610818pgl.136.2018.10.18.11.07.54; Thu, 18 Oct 2018 11:08:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zQAQx0+2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730546AbeJSCIx (ORCPT + 99 others); Thu, 18 Oct 2018 22:08:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:58074 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730074AbeJSCIv (ORCPT ); Thu, 18 Oct 2018 22:08:51 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 73E982148D; Thu, 18 Oct 2018 18:06:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539886003; bh=3YJ9xM/q67rrbvodTr3yYiN9o879fjLqeULXE3gV96o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zQAQx0+2zQJaYDbJaFH6346kV2Eu8MLA8akzBpkQwL2sMObAeYN8QLn2roS0PoJQe bXh2PUWNx05CTAVFVDXGpAoVu4YsEBnjkmBLyrdlSH4A7J2Cyx8qH+62Lw4irkG28v +P4NdJAq/iOUm/ws3BaweohCAD+9L/2PfECMVH2A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rob Herring , Alexey Brodkin , Vineet Gupta Subject: [PATCH 4.4 43/48] ARC: build: Get rid of toolchain check Date: Thu, 18 Oct 2018 19:55:18 +0200 Message-Id: <20181018175430.209323205@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181018175427.133690306@linuxfoundation.org> References: <20181018175427.133690306@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alexey Brodkin commit 615f64458ad890ef94abc879a66d8b27236e733a upstream. This check is very naive: we simply test if GCC invoked without "-mcpu=XXX" has ARC700 define set. In that case we think that GCC was built with "--with-cpu=arc700" and has libgcc built for ARC700. Otherwise if ARC700 is not defined we think that everythng was built for ARCv2. But in reality our life is much more interesting. 1. Regardless of GCC configuration (i.e. what we pass in "--with-cpu" it may generate code for any ARC core). 2. libgcc might be built with explicitly specified "--mcpu=YYY" That's exactly what happens in case of multilibbed toolchains: - GCC is configured with default settings - All the libs built for many different CPU flavors I.e. that check gets in the way of usage of multilibbed toolchains. And even non-multilibbed toolchains are affected. OpenEmbedded also builds GCC without "--with-cpu" because each and every target component later is compiled with explicitly set "-mcpu=ZZZ". Acked-by: Rob Herring Signed-off-by: Alexey Brodkin Signed-off-by: Vineet Gupta Signed-off-by: Greg Kroah-Hartman --- arch/arc/Makefile | 14 -------------- 1 file changed, 14 deletions(-) --- a/arch/arc/Makefile +++ b/arch/arc/Makefile @@ -18,20 +18,6 @@ cflags-y += -fno-common -pipe -fno-built cflags-$(CONFIG_ISA_ARCOMPACT) += -mA7 cflags-$(CONFIG_ISA_ARCV2) += -mcpu=archs -is_700 = $(shell $(CC) -dM -E - < /dev/null | grep -q "ARC700" && echo 1 || echo 0) - -ifdef CONFIG_ISA_ARCOMPACT -ifeq ($(is_700), 0) - $(error Toolchain not configured for ARCompact builds) -endif -endif - -ifdef CONFIG_ISA_ARCV2 -ifeq ($(is_700), 1) - $(error Toolchain not configured for ARCv2 builds) -endif -endif - ifdef CONFIG_ARC_CURR_IN_REG # For a global register defintion, make sure it gets passed to every file # We had a customer reported bug where some code built in kernel was NOT using