Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2253018imm; Thu, 18 Oct 2018 11:26:51 -0700 (PDT) X-Google-Smtp-Source: ACcGV61jxZmTXIe7wwKyOtJ8uzS15SowXZ+6xwul+lg3Uzf4h7WcNROFa3wRrNkhYTIutOjWX8vK X-Received: by 2002:a63:b04f:: with SMTP id z15-v6mr29674795pgo.442.1539887211811; Thu, 18 Oct 2018 11:26:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539887211; cv=none; d=google.com; s=arc-20160816; b=cdhCK4hJVhC4L5XZnu1hNHB3YYc3pTtL61n59FQXi5DZrqAab4BXWMiItBtPuJL+WE DCFM5j+D1tdlzaCjdq+OkI5dqx0wT34pm0sfEE/cel9mhevQxtJW/9iVH5GViV5WpAGm 19oyW6ApThdqVbb6HZfZfmaNFIHWW/z6qSpRyRRcB8cQTNbfANYVKqV5vGoNJW4JR7X6 jW4lip8n4VWsrFW/PyFt0KotFA2iEJqK0eHdsfm+XjzEp1zYGEJPBgNiSGk2ROhk7sup BTxNKbE0N6N6Fum9zzoU8WfHjyEdCDQkfI45if9xk9kia/yp7QaR76xaTdZZ3je1llzj moYA== 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=KFZFXDux0XZXJ7tTyP265GXEyrw2nFGOBbX2vVpnaOE=; b=ypT6VHLRn84pKFI0koON2K0udSZ8dmFgyhHSF/WJ3y6Qu7hOSboLrT/rVhP166IKDC oI8nPJHG5rtI79zEWBQ87zR0FUVWXQ98aOmZ4bEtl9Q/DcVdUnxZM5VKYbknn0nrlVNu 4PTNPBdVQoO8CvTgg/jqwpBVBjc4+qsuhvk8yQN2LtczPOKYt1IJGyqvyePkaLKzt+lM iPeXoiuEynqGPjoEEZEi+gr2bpCZ7H/zNlwuq0bnbb/AbFcEmL7RY0Ul3JXSEDiYQFlp oAh7HGrtYKK8p+JLTMA7mTKlhDqnn+f1na3L7M2kEaGgk1F7HFi2435mkNskOevbty6S xGww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lwEu3JBt; 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 j3-v6si21636549pld.231.2018.10.18.11.26.36; Thu, 18 Oct 2018 11:26:51 -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=lwEu3JBt; 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 S1729129AbeJSCA4 (ORCPT + 99 others); Thu, 18 Oct 2018 22:00:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:48542 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726534AbeJSCAz (ORCPT ); Thu, 18 Oct 2018 22:00:55 -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 8683421476; Thu, 18 Oct 2018 17:58:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539885530; bh=kpFJYfLVPE5dDHvF09iNlV/k+pYQ7CqXz+NWieHSas8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lwEu3JBtLjsxi4RQKSaQVb0YE8F5lxksR9evM5Mdg3dT7oKdefjuLAy8mWHAmOAG/ UMhQRf02kCsp7eQrF0fHbYwvxekfT7+qYfHT9phjnVsIcOaqFSmRvQ+7U5nWepBweq BPA6DW+fn1hYj7QSrGyy9Gucqxott8UywODivTkA= 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.18 52/53] ARC: build: Get rid of toolchain check Date: Thu, 18 Oct 2018 19:54:45 +0200 Message-Id: <20181018175425.446192719@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181018175416.561567978@linuxfoundation.org> References: <20181018175416.561567978@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.18-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 @@ -20,20 +20,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