Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2231021imm; Thu, 18 Oct 2018 11:05:05 -0700 (PDT) X-Google-Smtp-Source: ACcGV62G8yiHlbKOBAt/VQyD+DJWdPj03nGeHFZIKgevoNMOegCuuVHtAKYZT11UQwoojoawm8RB X-Received: by 2002:a63:583:: with SMTP id 125-v6mr6899100pgf.273.1539885905790; Thu, 18 Oct 2018 11:05:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539885905; cv=none; d=google.com; s=arc-20160816; b=YYdHVMoW2++VfAy5sS7tu0cn1S4spxS2u4xEIUwQ+qR/rrYKHz5NjIbyJwz4jhFUU2 Usf63+osIaBQiGUA9QPATtO80dE2AotFezmWwc0tFhK0xHzDtXt1h7uPGfEGUxKjFED3 JODAFcB9ntzDbIt3Zz4NYfNKXNmSByCfN1E2WTJZURp3NgF/qbiMMXfVSCNNXUlmVWO5 ukPNfFXq+eI+MAw7R+8uUFdXOVnpsZHmwATo8MH43s2d3+aiQspDbdOWDY/kdkbCx1nm 4pRbYiqfBSUqRigvJ57YRdv7DkNPrp5o89Vf9FLpin1ti5lr7JrKy2X3x1HduZnAG0a2 3TWg== 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=VMQMj5KV8IYoTIQE7Xyz3Ig3Da2C2cOanRki3+XHRGQ=; b=cAvmbuPQypoYFxAUNic3hj5Ctgk9M6N4JPQ1t6AzFFIlcrqtwj1PhkgXYRCaYmYjvm MLJnFmT4bbgjXNrkbvCTvSlM5KZDPPKbGrrarExJJgEnvJy0Oor3cJ1Ud70cJUYmsJnA 8prAHuhr8uakQws1/OqBPHoKUk7sXeUgcj4DvME60PVWaLCW+B0ZrfehINMkPn87k82T bH2wHIh3fBEo8oshDk7n5PZfCMgIUCPoTIWG95c53VQeEAYYuIQpnJjUc1OowGrg0j+g vgLoi3wLFWBQAfuTXqPnSe5Jlw4go0fuc8GbTBNoYHfHN9wuIFGfkrs0YEFVTIr3uMvJ aT+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vQEiA5Sg; 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 d10-v6si24091224pln.68.2018.10.18.11.04.49; Thu, 18 Oct 2018 11:05:05 -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=vQEiA5Sg; 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 S1729957AbeJSCFq (ORCPT + 99 others); Thu, 18 Oct 2018 22:05:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:53944 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729134AbeJSCFq (ORCPT ); Thu, 18 Oct 2018 22:05:46 -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 B61AB21476; Thu, 18 Oct 2018 18:03:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539885819; bh=7DrysdQlVM/yjaFAu8DQLEh+g6TexoU/O/CPjFxSawQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vQEiA5SgsqixZ9VvvuT21hSH0YbZef0SI9ycZLNCM6iN+JN9T8JkACy04LijrF3Tb vB80ujJlYWrrIcQYFqYz2tvFAdjf1UxzXTrhEpYJ4X6JbFNY6XT82AZxajHmNJn23D /3suhBkUGNyGAH26YdywYDUhUWABaC8I74ujCiHY= 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.9 26/35] ARC: build: Get rid of toolchain check Date: Thu, 18 Oct 2018 19:54:55 +0200 Message-Id: <20181018175426.486553112@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181018175422.506152522@linuxfoundation.org> References: <20181018175422.506152522@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.9-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 @@ -22,20 +22,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