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=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 DF01BC2BC61 for ; Tue, 30 Oct 2018 15:06:50 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6C0D8204FD for ; Tue, 30 Oct 2018 15:06:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6C0D8204FD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42kvvD6MRVzF1QG for ; Wed, 31 Oct 2018 02:06:48 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42kvpx25jtzF1Yv for ; Wed, 31 Oct 2018 02:03:05 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 42kvpv4fCmz9s9J; Wed, 31 Oct 2018 02:03:03 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au From: Michael Ellerman To: Masahiro Yamada Subject: Re: [PATCH 1/2] kbuild: replace cc-name test with CONFIG_CC_IS_CLANG In-Reply-To: References: <1540873293-29817-1-git-send-email-yamada.masahiro@socionext.com> <877ehzk3we.fsf@concordia.ellerman.id.au> Date: Wed, 31 Oct 2018 02:03:02 +1100 Message-ID: <87tvl3iijd.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux-MIPS , Michal Marek , Linux Kbuild mailing list , James Hogan , Linux Kernel Mailing List , Ralf Baechle , Paul Burton , Paul Mackerras , linuxppc-dev Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Masahiro Yamada writes: > On Tue, Oct 30, 2018 at 9:36 PM Michael Ellerman wrote: >> >> Masahiro Yamada writes: >> > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile >> > index 17be664..338e827 100644 >> > --- a/arch/powerpc/Makefile >> > +++ b/arch/powerpc/Makefile >> > @@ -96,7 +96,7 @@ aflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mabi=elfv1) >> > aflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mabi=elfv2 >> > endif >> > >> > -ifneq ($(cc-name),clang) >> > +ifneq ($(CONFIG_CC_IS_CLANG),y) >> > cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mno-strict-align >> > endif >> > >> > @@ -175,7 +175,7 @@ endif >> > # Work around gcc code-gen bugs with -pg / -fno-omit-frame-pointer in gcc <= 4.8 >> > # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44199 >> > # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52828 >> > -ifneq ($(cc-name),clang) >> > +ifneq ($(CONFIG_CC_IS_CLANG),y) >> > CC_FLAGS_FTRACE += $(call cc-ifversion, -lt, 0409, -mno-sched-epilog) >> > endif >> > endif >> >> Does this behave like other CONFIG variables, ie. it will not be defined >> when it's false? > > Right. > >> And if so can't we use ifdef/ifndef? eg: >> >> ifndef CONFIG_CC_IS_CLANG >> CC_FLAGS_FTRACE += $(call cc-ifversion, -lt, 0409, -mno-sched-epilog) >> >> That reads cleaner to me. > > > OK, will do respin if you prefer ifdef/ifndef style. I do prefer it, but I can also fix it up later if you're in a hurry to get this merged. cheers