From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AEF5C2BC61 for ; Tue, 30 Oct 2018 04:21:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C4E8F20823 for ; Tue, 30 Oct 2018 04:21:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nifty.com header.i=@nifty.com header.b="hqzboSOg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C4E8F20823 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726108AbeJ3NNo (ORCPT ); Tue, 30 Oct 2018 09:13:44 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:33569 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725971AbeJ3NNo (ORCPT ); Tue, 30 Oct 2018 09:13:44 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id w9U4LgZL000764; Tue, 30 Oct 2018 13:21:43 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com w9U4LgZL000764 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1540873303; bh=vok3clh1+AcMHEIx5gsB0OBiQpXmww8S1/r1ejlge/g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hqzboSOgvlGLlHrDxCF879w0FQ1OFDmdzF1JKCpMFslFuQ/dh3uJOmOqiKF+clWun +NRttbUcp1ACWTaJGy82Vv+b39zhxgKi6CSk7dOjEb+RAMQmcu6uAV7X0mq8ksBCS9 3sT9s23GKdjfdLfnxorRD/RY4ZyUmw99YFRf8j9rd6Ad46dmpe+gUVd8Ru16LPNB58 HTd/zYrRQU/3KK4jF/A6JUTf4+5fjx8MxSqmcTdfPgfTccmut6a61qEnyatZm9UJvO ahvGIM3fAqnZC4Yu8OfYNLomXnBI5fjWul4QiBjHZ8nOyF9mjvYVAqBOl26PkfHWbX g0cw4ITBNK6YA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] kbuild: remove cc-name variable Date: Tue, 30 Oct 2018 13:21:33 +0900 Message-Id: <1540873293-29817-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1540873293-29817-1-git-send-email-yamada.masahiro@socionext.com> References: <1540873293-29817-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is one more user of $(cc-name) in the top Makefile. It is supposed to detect Clang before invoking Kconfig, so it should still be there in the $(shell ...) form. All the other users of $(cc-name) have been replaced with $(CONFIG_CC_IS_CLANG). Hence, scripts/Kbuild.include does not need to define cc-name any more. Signed-off-by: Masahiro Yamada --- Makefile | 2 +- scripts/Kbuild.include | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Makefile b/Makefile index bd93bc3..430f7de 100644 --- a/Makefile +++ b/Makefile @@ -485,7 +485,7 @@ ifneq ($(KBUILD_SRC),) $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree) endif -ifeq ($(cc-name),clang) +ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),) ifneq ($(CROSS_COMPILE),) CLANG_TARGET := --target=$(notdir $(CROSS_COMPILE:%-=%)) GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD))) diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index ca21a35..51703ae 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -140,10 +140,6 @@ cc-option-yn = $(call try-run,\ cc-disable-warning = $(call try-run,\ $(CC) -Werror $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) -# cc-name -# Expands to either gcc or clang -cc-name = $(shell $(CC) -v 2>&1 | grep -q "clang version" && echo clang || echo gcc) - # cc-version cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) -- 2.7.4