Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3264243imm; Sun, 16 Sep 2018 13:48:22 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZIV9HWIEGbqqqJMEmyGbcKQc9aapDe8JaLCPMrJKbTx7bVZ7HR3vLGVtuhsY+XOldZqLvH X-Received: by 2002:a63:dd49:: with SMTP id g9-v6mr20297156pgj.356.1537130902648; Sun, 16 Sep 2018 13:48:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537130902; cv=none; d=google.com; s=arc-20160816; b=Z580mfJZ1oF7kd3c20SHBFbCY4EVk0Czw4SBj01aQO+xghz60h3h355TxAjkVstSMa ZUUpd5WTnKWz+QW1vI2iNvXGJWKYOJko0zWuWUQizXu6rpz75WQ+K49S+G0DMQE/oLez ayOwqYR1oQMX13+ctpNI9lBiUKrBMaHVTxBsTDreGcFPYScDqxkP3OVsbMiLmlUHP3SS 4ZMc5S8QWmgS5B8WtL7lNsGiFvkgaSXF94qirtSkOFObYIow2wzM7K7nX0mzL/EP6QOP IvyCGvFXt2vqJyN6Im7K63XO1mY/O+VShTRSXMb1fFv/3D4O8hP/66uYG4B8P99tRjwg aMNA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=MG6VIA+WbMjHu4fFoAOxepqFJdVhet2eMKavGFlT8ec=; b=At9q6Z6xihxgnY3iyYWl81S1AhUyV2R93GOYjWEaPNS66ybtitlBAT8cVNu98eeWZT mjMs3oAwmDqFRZvk78oNUHrlv04TpJn2ZYsWPQ8zQkVn2taeLXaGlUn+fEam4Qzu/dzv askMqaFIasX/V7hL9lCAf/9BI05Znq8PDnCIqgmtmVNUS5EuSQKUBn6qPvljwiTOSLXu 76cmm3w0EKZfgto0NtK1OASoeXRlzDspic9UAojW+EkcPJHEssfJSGOQ1CX0v7Coo3+c DmRvPjkq50ca0Y117voAtGYhlEft1y7ixMwVNnmDeZzLm06w5/M6fGL3ydW/RrDCn7TM LXFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=QxuPzYuF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g87-v6si14821829pfg.225.2018.09.16.13.48.07; Sun, 16 Sep 2018 13:48:22 -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=@synopsys.com header.s=mail header.b=QxuPzYuF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728358AbeIQCMP (ORCPT + 99 others); Sun, 16 Sep 2018 22:12:15 -0400 Received: from us01smtprelay-2.synopsys.com ([198.182.60.111]:59582 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728175AbeIQCMP (ORCPT ); Sun, 16 Sep 2018 22:12:15 -0400 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 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 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 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 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