From patchwork Sun Sep 16 20:47:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexey Brodkin X-Patchwork-Id: 970366 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=synopsys.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="an2XPpgP"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.b="QxuPzYuF"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42D1Yc1zdcz9sBv for ; Mon, 17 Sep 2018 06:48:20 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=qPl3StcmB0PiijfP3VcjfDZQjEjX8qUZ0g7peLAZZjg=; b=an2XPpgPnKc4wP AXDI/PZ0OKsN1+7yDsxaik4RtdcBYOG5DONOGZND1ycoMxC0J+uZD1nifzioDq9jlD3QiUaThagI4 wz3V2waOzZ56i99tpNTow/a9l/EDVdrwvMcoTdbIXSJfmSxO6Qsk575XT9/KBdMkSD3nRBFVy/ytc DjZHTeDGQO5JJrjBm0TmoSOhRtoTpylc2EE5nRmwlrNCLDKiz71zxy57RBofkLzBdZEuIssaCWfY8 xnPugaTSPsixAsx/sqercIXuTb7UOf4F+Hla+0nqhXO1ihi3U2ppfAEHlPuheGixqxoMGUwA6l6oc bbfsunn52zwToGwDOTBw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g1dxq-0004Jz-AN; Sun, 16 Sep 2018 20:48:18 +0000 Received: from smtprelay2.synopsys.com ([198.182.60.111] helo=smtprelay.synopsys.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g1dxn-0004Ix-CG for linux-snps-arc@lists.infradead.org; Sun, 16 Sep 2018 20:48:16 +0000 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id E4CBA10C122B; Sun, 16 Sep 2018 13:48:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1537130883; bh=XjmeVeyG9wV6D3nGOQldhWLe9nny5Pcrq273tbDxsyk=; h=From:To:Cc:Subject:Date:From; b=QxuPzYuF4NFIpeuRJcErJuqG/t6l09vroZ6jgaEort2nhUQLhGVNrGQNzeMW6+8xn snIsXTw0RUQmTVYuu7uFZJu1fiPfICp8PLCt3enXp8Y8ERWDFqKDRw12Uo7/k/i70C 1lm+q0wqDWjwBXqtDC9iPA73D6IpTrCkiKe8ZPFsS1/wULRbuRdRhcZTTlGwqdZU8V dugIPto92WDA5qhkq6FC+6HXsUdTLrkmXSX4jHv3yD02iT4/dnhFLjLR8zxZeItSg/ Xigfe1irDZ/lgN12hLFTCDkYZ/QgpxN7IGMsploRio9jFjt5Hh+CuP/XVDWmh576tT 5Ezmo8Kgv24nw== Received: from abrodkin-7480l.internal.synopsys.com (unknown [10.225.15.87]) by mailhost.synopsys.com (Postfix) with ESMTP id B80EB5ACD; Sun, 16 Sep 2018 13:48:00 -0700 (PDT) From: Alexey Brodkin To: linux-snps-arc@lists.infradead.org Subject: [PATCH] ARC: Don't set CROSS_COMPILE in arch's Makefile Date: Sun, 16 Sep 2018 23:47:57 +0300 Message-Id: <20180916204757.31131-1-abrodkin@synopsys.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180916_134815_421867_2EFDD50C X-CRM114-Status: GOOD ( 10.32 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [198.182.60.111 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Masahiro Yamada , Vineet Gupta , Alexey Brodkin , linux-kernel@vger.kernel.org, Rob Herring Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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