public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Nick Desaulniers <ndesaulniers@google.com>,
	Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild@vger.kernel.org, clang-built-linux@googlegroups.com,
	Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	linux-s390@vger.kernel.org
Subject: Re: [PATCH 2/7] s390: replace cc-option-yn uses with cc-option
Date: Mon, 16 Aug 2021 19:03:01 -0700	[thread overview]
Message-ID: <5cb6d40b-1c45-415e-47fb-a844265e7f34@kernel.org> (raw)
In-Reply-To: <20210817002109.2736222-3-ndesaulniers@google.com>



On 8/16/2021 5:21 PM, 'Nick Desaulniers' via Clang Built Linux wrote:
> cc-option-yn can be replaced with cc-option. ie.
> Checking for support:
> ifeq ($(call cc-option-yn,$(FLAG)),y)
> becomes:
> ifneq ($(call cc-option,$(FLAG)),)
> 
> Checking for lack of support:
> ifeq ($(call cc-option-yn,$(FLAG)),n)
> becomes:
> ifeq ($(call cc-option,$(FLAG)),)
> 
> This allows us to pursue removing cc-option-yn.
> 
> Cc: Heiko Carstens <hca@linux.ibm.com>
> Cc: Vasily Gorbik <gor@linux.ibm.com>
> Cc: Christian Borntraeger <borntraeger@de.ibm.com>
> Cc: linux-s390@vger.kernel.org
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
>   arch/s390/Makefile | 14 +++++++-------
>   1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/s390/Makefile b/arch/s390/Makefile
> index 17dc4f1ac4fa..a3cf33ad009f 100644
> --- a/arch/s390/Makefile
> +++ b/arch/s390/Makefile
> @@ -70,7 +70,7 @@ cflags-y += -Wa,-I$(srctree)/arch/$(ARCH)/include
>   #
>   cflags-$(CONFIG_FRAME_POINTER) += -fno-optimize-sibling-calls
>   
> -ifeq ($(call cc-option-yn,-mpacked-stack -mbackchain -msoft-float),y)
> +ifneq ($(call cc-option,-mpacked-stack -mbackchain -msoft-float),)
>   cflags-$(CONFIG_PACK_STACK)  += -mpacked-stack -D__PACK_STACK
>   aflags-$(CONFIG_PACK_STACK)  += -D__PACK_STACK
>   endif
> @@ -78,22 +78,22 @@ endif
>   KBUILD_AFLAGS_DECOMPRESSOR += $(aflags-y)
>   KBUILD_CFLAGS_DECOMPRESSOR += $(cflags-y)
>   
> -ifeq ($(call cc-option-yn,-mstack-size=8192 -mstack-guard=128),y)
> +ifneq ($(call cc-option,-mstack-size=8192 -mstack-guard=128),)
>   cflags-$(CONFIG_CHECK_STACK) += -mstack-size=$(STACK_SIZE)
> -ifneq ($(call cc-option-yn,-mstack-size=8192),y)
> +ifeq ($(call cc-option,-mstack-size=8192),)
>   cflags-$(CONFIG_CHECK_STACK) += -mstack-guard=$(CONFIG_STACK_GUARD)
>   endif
>   endif
>   
>   ifdef CONFIG_WARN_DYNAMIC_STACK
> -  ifeq ($(call cc-option-yn,-mwarn-dynamicstack),y)
> +  ifneq ($(call cc-option,-mwarn-dynamicstack),)
>       KBUILD_CFLAGS += -mwarn-dynamicstack
>       KBUILD_CFLAGS_DECOMPRESSOR += -mwarn-dynamicstack
>     endif
>   endif
>   
>   ifdef CONFIG_EXPOLINE
> -  ifeq ($(call cc-option-yn,$(CC_FLAGS_MARCH) -mindirect-branch=thunk),y)
> +  ifneq ($(call cc-option,$(CC_FLAGS_MARCH) -mindirect-branch=thunk),)
>       CC_FLAGS_EXPOLINE := -mindirect-branch=thunk
>       CC_FLAGS_EXPOLINE += -mfunction-return=thunk
>       CC_FLAGS_EXPOLINE += -mindirect-branch-table
> @@ -104,10 +104,10 @@ ifdef CONFIG_EXPOLINE
>   endif
>   
>   ifdef CONFIG_FUNCTION_TRACER
> -  ifeq ($(call cc-option-yn,-mfentry -mnop-mcount),n)
> +  ifeq ($(call cc-option,-mfentry -mnop-mcount),)
>       # make use of hotpatch feature if the compiler supports it
>       cc_hotpatch	:= -mhotpatch=0,3
> -    ifeq ($(call cc-option-yn,$(cc_hotpatch)),y)
> +    ifneq ($(call cc-option,$(cc_hotpatch)),)
>         CC_FLAGS_FTRACE := $(cc_hotpatch)
>         KBUILD_AFLAGS	+= -DCC_USING_HOTPATCH
>         KBUILD_CFLAGS	+= -DCC_USING_HOTPATCH
> 

  reply	other threads:[~2021-08-17  2:03 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17  0:21 [PATCH 0/7] kbuild: remove cc-option-yn Nick Desaulniers
2021-08-17  0:21 ` [PATCH 1/7] MIPS: replace cc-option-yn uses with cc-option Nick Desaulniers
2021-08-17  1:59   ` Nathan Chancellor
2021-08-17  0:21 ` [PATCH 2/7] s390: " Nick Desaulniers
2021-08-17  2:03   ` Nathan Chancellor [this message]
2021-08-23 17:43   ` Heiko Carstens
2021-08-25  4:37     ` Masahiro Yamada
2021-08-17  0:21 ` [PATCH 3/7] powerpc: " Nick Desaulniers
2021-08-17  1:41   ` Nathan Chancellor
2021-08-17  2:31   ` Michael Ellerman
2021-08-19 20:04     ` Masahiro Yamada
2021-08-17  0:21 ` [PATCH 4/7] arc: " Nick Desaulniers
2021-08-17  2:05   ` Nathan Chancellor
2021-08-17 18:07     ` Nick Desaulniers
2021-08-18  1:40       ` Nathan Chancellor
2021-08-25  4:38         ` Masahiro Yamada
2021-08-17  0:21 ` [PATCH 5/7] x86: remove cc-option-yn test for -mtune= Nick Desaulniers
2021-08-17  2:08   ` Nathan Chancellor
2021-08-19 19:54   ` Masahiro Yamada
2021-08-19 22:19   ` Miguel Ojeda
2021-08-25  4:39     ` Masahiro Yamada
2021-08-17  0:21 ` [PATCH 6/7] Makefile: replace cc-option-yn uses with cc-option Nick Desaulniers
2021-08-17  2:09   ` Nathan Chancellor
2021-08-25  4:43   ` Masahiro Yamada
2021-08-25  4:49     ` Masahiro Yamada
2021-08-17  0:21 ` [PATCH 7/7] kbuild: remove cc-option-yn, update Docs Nick Desaulniers
2021-08-17  2:10   ` Nathan Chancellor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5cb6d40b-1c45-415e-47fb-a844265e7f34@kernel.org \
    --to=nathan@kernel.org \
    --cc=borntraeger@de.ibm.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=ndesaulniers@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox