Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2228598imm; Thu, 18 Oct 2018 11:02:58 -0700 (PDT) X-Google-Smtp-Source: ACcGV62uLUi4yFRaIm1KEikue3I3VJl35gNJUzhCwG3UCisxuDU38UtDoqZakx5s6duvpzFofao1 X-Received: by 2002:a63:3ec3:: with SMTP id l186-v6mr2251091pga.96.1539885778650; Thu, 18 Oct 2018 11:02:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539885778; cv=none; d=google.com; s=arc-20160816; b=N4PDiPnni71rTqR0n6zqlqT6w0/Wi7mdd7k0/4Hi/FvmhsdDUYYHwXlY8ujElME7r+ xsXW7AHhW8B63PA0C/rQ44jJIpO9uB/G0ch5pZG/Yhhl8JfVYUWV9ABwmYRfOQI63Nds +FaBUqcz8FyLEGtpAr2pGCfxgOonvEm5sVaMNl9Amj5QX98CeEv2lKwmvMxD5X7DAKqS Mw1vFIP2ZdKIi3bS3wcb9Lgsv0VHv2Np3HJfwsNEnJC72DT3Ix0ed5jnS7yFkq7XppL+ oY0Adlj/BVI/gIMHEmlSX9trikwzfcynBWWw5Ub6vHCuzokR1bnkeLhyYiW7EQqrGu3c 7EjQ== 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=IwkND10PYoBnpo79wpxMHOlJfSr1feYhoh3bYWTxNjY=; b=dV7ptt+PyJmCw5+mF2yweETX73RoGutlDkxH6m3SbAt/LOi/JSWYgYJTUxdxkAsP5i qqHH7/53gPsmyjlabBcEHCpeRklVMr+nbb7/agBp5rCEhoSzrb2NoKFONJ0WmVXd5/hF ae6PwxS4hemldgNbiyOERq1dHQxOlVb2yAVV5Y/6igB2ypAGmAcmmAysrfi95lBIG4Qm 1tabZY5pzw0F712i4HEFFjUAVxfLMii3q7sSSRmjZgbl4WSBUBAGPLu3zBP3tZF70jcY i19XYKTsh7pW9RvV9u+VYiCmeMiuFjzyzuoTtaL0Wi63/INl5EhINjA6ZMuC0TNVo/Cp JedA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=spf+NtgJ; 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 y21-v6si5801889pga.361.2018.10.18.11.02.43; Thu, 18 Oct 2018 11:02:58 -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=spf+NtgJ; 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 S1729548AbeJSCDc (ORCPT + 99 others); Thu, 18 Oct 2018 22:03:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:51556 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728478AbeJSCDc (ORCPT ); Thu, 18 Oct 2018 22:03:32 -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 C240021476; Thu, 18 Oct 2018 18:01:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539885686; bh=7kDwb+kNyxvN1MuIZ0jr+kJ0XM0/RSW5gbMZQtE2jX4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=spf+NtgJKBqDkUWlOxdq0TaNIUXro/fuTTc+HCFNtuOANbtmso1bGkPOvRchwjp7a sfOXYSr6wUeLypP9GsirdYqY5oKnFYr3o93fsypPQ9Oek+JndXb6xRNNYdmoJ4I9FC wpdgufha0OpOxs7sT6m3zMNmzDyKdx+8B1zvEjF0= 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.14 33/41] ARC: build: Get rid of toolchain check Date: Thu, 18 Oct 2018 19:54:48 +0200 Message-Id: <20181018175422.552484279@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181018175416.718399607@linuxfoundation.org> References: <20181018175416.718399607@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.14-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