Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp4717790imd; Tue, 30 Oct 2018 06:29:20 -0700 (PDT) X-Google-Smtp-Source: AJdET5dMNHESTCAwDgclPL2ArxbviRbd1d1jaGvTgQxxsBIl7uN4qTemXwxCaH7QnYGybaVQ61i5 X-Received: by 2002:a62:25c2:: with SMTP id l185-v6mr3021826pfl.8.1540906160444; Tue, 30 Oct 2018 06:29:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540906160; cv=none; d=google.com; s=arc-20160816; b=ISUv3OIM6n2WjGdtCXkelrfVLDu2SSM99JHHWqkAKhTfmck5xvC29sUbQGJUCoSqn1 FkUPkKZ/BqLAtTkullNwhmAGGxOB8B1S35DHTY3UmDNPLt9j1xho39LiWOzEMJc7vf3Y vhh0lZVgioDY6zhWU5IiVOQ5Ebv+Yy07GdmyuFQHCgTM7y+yw2z1H+7erhr1KWBwewZf 5ihvWqba7iIWkNgFecFaTZ1mwMMW0is7JUzPDYHAKPeFyFCDtWRfls6+p7zcLm8K3ETi NbjZCZA2fCItKfn+/zuK7TV43rIVr8MidsvZ01a5SIRX3axQptBypAeksZ0wMc+ZVNfj zbiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=LNpy0b2pnDbhrESvdThnUfN4u4lmwWr9TyRdmOYtwMk=; b=i2OjTA32CzJTavQFosGSFgCAF8Rnh0DuMVPafiHDuSLkNZpMgQHMjHrWgqDHFWleu6 HWXWF3q/f252qUffiuisdf7Bc26/iAadELhNvzTIgn1Aq2J+dgcLzPRoTBHbeaZUCw4i mZjLvdGYTyb0ACad2KFQ5BoGu0b6O0Guo5/Go/tZjJyVWTHIAnRf2TWvHM148g+pORMB rywY0XXKWkYZqfPCDpgOhbrSo7y0R8Y2FMzhHBrOb7nR4dhHWYorPGatKiTaXeTSRRt4 98T3hc4yhI6UMOYzO2nMrqUAjwr4asp5+q5jdy3pLgARs3ggaryBk9IQhpTJSxm8cY7p lGHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=OAWy3IiX; 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 69-v6si14911542pft.177.2018.10.30.06.29.03; Tue, 30 Oct 2018 06:29:20 -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=@nifty.com header.s=dec2015msa header.b=OAWy3IiX; 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 S1727883AbeJ3WUW (ORCPT + 99 others); Tue, 30 Oct 2018 18:20:22 -0400 Received: from conuserg-11.nifty.com ([210.131.2.78]:36013 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727650AbeJ3WUW (ORCPT ); Tue, 30 Oct 2018 18:20:22 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id w9UDQcm1022568; Tue, 30 Oct 2018 22:26:39 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com w9UDQcm1022568 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1540906000; bh=LNpy0b2pnDbhrESvdThnUfN4u4lmwWr9TyRdmOYtwMk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OAWy3IiXdtLNCurQ6U54FR32CAYLwHQT0bLizVWRszrWlSRKs49QEAl0Ns7zGVGZ3 BcFA20NH8AT8dPeBhdTLUlwzVFf0VgI77ekIus0nbxFabZtYHyVStn/gnL9pZtTYT9 rlY2og1GzDfWZmas1NFG4lt6C4uQPnlwSIwLj4KGHZdpYmJfTGyDo5avlm1irqK42P 2jQhZSeBV3+nZCKqcJrLOrEC4cEmrPpB9WZYgOUol7MVjT4IVsfYvOJPKjC9DadwP+ lr9M5ytiuT4GDeMQ41059kEX2JAaGOJO7DJCs7aPTq9XQG0RFBByxkHY6pXijVYAg/ MRlmmwgSJNBpA== 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 v2 2/2] kbuild: remove cc-name variable Date: Tue, 30 Oct 2018 22:26:34 +0900 Message-Id: <1540905994-6073-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1540905994-6073-1-git-send-email-yamada.masahiro@socionext.com> References: <1540905994-6073-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 --- Changes in v2: None Makefile | 2 +- scripts/Kbuild.include | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 1c0696d..25b1518 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