Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1869962imm; Thu, 18 Oct 2018 05:44:48 -0700 (PDT) X-Google-Smtp-Source: ACcGV61Q51uGUwTATatyf3eSnfLVVxq0c+FgWAQZx1hkIQFiZrW9G24J0d8ArNq25BJdkH7NoowT X-Received: by 2002:a62:8145:: with SMTP id t66-v6mr29566155pfd.192.1539866688187; Thu, 18 Oct 2018 05:44:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539866688; cv=none; d=google.com; s=arc-20160816; b=qMawhfh20wBAIcnY8Ee/fKj0j6N7FN9GASqnQ+ZW/tXDRvvmdvtmzmA/3WzITQ/ere 4kIAtt1xCsYij8Jj2SkX3B/jmxodXLTEtXE2ulm6y3/CZEPyNr7i06hOuGVFikAdECMR R92RNUO5AOqd1l72vUCIaEL+fSI3VYNfebDd8MsiFX8jr+R1WoR094eXDmOiIGMguTbo jm5HFh05WepAAc1o1s1QWmynCqtFAUv4HXHgMzYkroOAqjWcCaFMwagHrwAl3TYuiriL YbEKbxqbzflzHEXq8cqkUwsaLjQyFz4HUrw8U2qnKN1T4XZrgF9CKpKk3OLupCmR2O8t jmXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=AjsQx2ndTimW8QjgDjpda7SVG6QklmSsvc4Qz57kX8k=; b=h5dFd2drTdLcxROED1ZLEryZaxtgE6YUEocrffkxKCr62XOzfzl2GAxY14CHpp71Hd TOE5x6C3gRQkpl2HZGkpL/7bV4RHv5LAQbWjz3RTNZ+oJViGiTdUyAj9XmYpSjhGcc+r SnycFQZo9a5u0nxsVHIxoD06dBwbCZcPBICMlRGTJCYFa8YV3pooRuom2taeYIdlj53W GmXOEyfS/3joB3owKV5WWmvJO3LQhQ63J5rr771BJCXdex4ubfVvyWW+WJSLrocbWdTQ xbHjgp/x6VLBNnd0ClPTjSoG/NkwU6Z1WPkzw9D5hDxdV4k69+UgCKlb8uWajKBzq1KG hllw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=POeOzG9W; 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 q2-v6si21036067plh.63.2018.10.18.05.44.32; Thu, 18 Oct 2018 05:44:48 -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=POeOzG9W; 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 S1727199AbeJRUoz (ORCPT + 99 others); Thu, 18 Oct 2018 16:44:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:48832 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726417AbeJRUoz (ORCPT ); Thu, 18 Oct 2018 16:44: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 711BE2098A; Thu, 18 Oct 2018 12:44:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539866643; bh=fQpH7q3E6CLCD1y5i/lPDVBjRnF7SlSVk3qJxeCnCn4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=POeOzG9WMGrbmwIVT6zzrt9y+tnQlho4fdPoyHXH63BD3o9ARdWwE1KgFDMh0K03i dvgiEJfDP11C69q/7ULJNBSWjt0x5jkUUgV9guat/Z41uF480FYvUiDpnolg1wUxLq cLOHxirLmxmRrJWtxxB8/Y3i1Jb4eLiDxCH8TUvI= Date: Thu, 18 Oct 2018 14:44:01 +0200 From: "gregkh@linuxfoundation.org" To: Alexey Brodkin Cc: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Vineet Gupta , Masahiro Yamada , Rob Herring , "linux-snps-arc@lists.infradead.org" Subject: Re: [PATCH] ARC: Don't set CROSS_COMPILE in arch's Makefile Message-ID: <20181018124401.GB1451@kroah.com> References: <20180916204757.31131-1-abrodkin@synopsys.com> <4881796E12491D4BB15146FE0209CE6468174FFF@DE02WEMBXB.internal.synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4881796E12491D4BB15146FE0209CE6468174FFF@DE02WEMBXB.internal.synopsys.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 17, 2018 at 02:33:02PM +0000, Alexey Brodkin wrote: > Hello, > > > -----Original Message----- > > From: Alexey Brodkin [mailto:abrodkin@synopsys.com] > > Sent: Sunday, September 16, 2018 11:48 PM > > To: linux-snps-arc@lists.infradead.org > > Cc: linux-kernel@vger.kernel.org; Vineet Gupta ; Alexey Brodkin ; Masahiro > > Yamada ; Rob Herring > > Subject: [PATCH] ARC: Don't set CROSS_COMPILE in arch's Makefile > > > > There's not much sense in doing that because if user or > > his build-system didn't set CROSS_COMPILE we still may > > very well make incorrect guess. > > > > But as it turned out setting CROSS_COMPILE is not as harmless > > as one may think: with recent changes that implemented automatic > > discovery of __host__ gcc features unconditional setup of > > CROSS_COMPILE leads to failures on execution of "make xxx_defconfig" > > with absent cross-compiler, for more info see [1]. > > > > Set CROSS_COMPILE as well gets in the way if we want only to build > > .dtb's (again with absent cross-compiler which is not really needed > > for building .dtb's), see [2]. > > > > Note, we had to change LIBGCC assignment type from ":=" to "=" > > so that is is resolved on its usage, otherwise if it is resolved > > at declaration time with missing CROSS_COMPILE we're getting this > > error message from host GCC: > > ------------------------->8------------------------- > > gcc: error: unrecognized command line option ‘-mmedium-calls’ > > gcc: error: unrecognized command line option ‘-mno-sdata’; did you mean ‘-fno-stats’? > > ------------------------->8------------------------- > > > > [1] http://lists.infradead.org/pipermail/linux-snps-arc/2018-September/004308.html > > [2] http://lists.infradead.org/pipermail/linux-snps-arc/2018-September/004320.html > > > > Signed-off-by: Alexey Brodkin > > Cc: Masahiro Yamada > > Cc: Rob Herring > > --- > > arch/arc/Makefile | 10 +--------- > > 1 file changed, 1 insertion(+), 9 deletions(-) > > > > diff --git a/arch/arc/Makefile b/arch/arc/Makefile > > index 99cce77ab98f..5f6b67917dc2 100644 > > --- a/arch/arc/Makefile > > +++ b/arch/arc/Makefile > > @@ -6,14 +6,6 @@ > > # published by the Free Software Foundation. > > # > > > > -ifeq ($(CROSS_COMPILE),) > > -ifndef CONFIG_CPU_BIG_ENDIAN > > -CROSS_COMPILE := arc-linux- > > -else > > -CROSS_COMPILE := arceb-linux- > > -endif > > -endif > > - > > KBUILD_DEFCONFIG := nsim_700_defconfig > > > > cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__ > > @@ -79,7 +71,7 @@ cflags-$(disable_small_data) += -mno-sdata -fcall-used-gp > > cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mbig-endian > > ldflags-$(CONFIG_CPU_BIG_ENDIAN) += -EB > > > > -LIBGCC := $(shell $(CC) $(cflags-y) --print-libgcc-file-name) > > +LIBGCC = $(shell $(CC) $(cflags-y) --print-libgcc-file-name) > > > > # Modules with short calls might break for calls into builtin-kernel > > KBUILD_CFLAGS_MODULE += -mlong-calls -mno-millicode > > -- > > 2.17.1 > > May we have this one back-ported to stable branches? > > Upstream commit in Linus' tree is: > 40660f1fcee8 ("ARC: build: Don't set CROSS_COMPILE in arch's Makefile"). Applied to 4.9.y, 4.14.y, and 4.18.y, thanks. greg k-h