* [PATCH 4/7] arc: replace cc-option-yn uses with cc-option
[not found] <20210817002109.2736222-1-ndesaulniers@google.com>
@ 2021-08-17 0:21 ` Nick Desaulniers
2021-08-17 2:05 ` Nathan Chancellor
0 siblings, 1 reply; 5+ messages in thread
From: Nick Desaulniers @ 2021-08-17 0:21 UTC (permalink / raw)
To: Masahiro Yamada
Cc: linux-kbuild, clang-built-linux, Nick Desaulniers, Vineet Gupta,
linux-snps-arc
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: Vineet Gupta <vgupta@kernel.org>
Cc: linux-snps-arc@lists.infradead.org
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
arch/arc/Makefile | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index c0d87ac2e221..8782a03f24a8 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -18,8 +18,7 @@ ifeq ($(CONFIG_ARC_TUNE_MCPU),"")
cflags-y += $(tune-mcpu-def-y)
else
tune-mcpu := $(shell echo $(CONFIG_ARC_TUNE_MCPU))
-tune-mcpu-ok := $(call cc-option-yn, $(tune-mcpu))
-ifeq ($(tune-mcpu-ok),y)
+ifneq ($(call cc-option,$(tune-mcpu)),)
cflags-y += $(tune-mcpu)
else
# The flag provided by 'CONFIG_ARC_TUNE_MCPU' option isn't known by this compiler
--
2.33.0.rc1.237.g0d66db33f3-goog
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 4/7] arc: replace cc-option-yn uses with cc-option
2021-08-17 0:21 ` [PATCH 4/7] arc: replace cc-option-yn uses with cc-option Nick Desaulniers
@ 2021-08-17 2:05 ` Nathan Chancellor
2021-08-17 18:07 ` Nick Desaulniers
0 siblings, 1 reply; 5+ messages in thread
From: Nathan Chancellor @ 2021-08-17 2:05 UTC (permalink / raw)
To: Nick Desaulniers, Masahiro Yamada
Cc: linux-kbuild, clang-built-linux, Vineet Gupta, linux-snps-arc
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: Vineet Gupta <vgupta@kernel.org>
> Cc: linux-snps-arc@lists.infradead.org
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
> ---
> arch/arc/Makefile | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/arc/Makefile b/arch/arc/Makefile
> index c0d87ac2e221..8782a03f24a8 100644
> --- a/arch/arc/Makefile
> +++ b/arch/arc/Makefile
> @@ -18,8 +18,7 @@ ifeq ($(CONFIG_ARC_TUNE_MCPU),"")
> cflags-y += $(tune-mcpu-def-y)
> else
> tune-mcpu := $(shell echo $(CONFIG_ARC_TUNE_MCPU))
> -tune-mcpu-ok := $(call cc-option-yn, $(tune-mcpu))
> -ifeq ($(tune-mcpu-ok),y)
> +ifneq ($(call cc-option,$(tune-mcpu)),)
> cflags-y += $(tune-mcpu)
Any reason not to just turn this into
cflags-y += $(call cc-option,$(tune-mcpu))
?
If $(tune-mcpu) is empty or invalid, nothing will be added to cflags-y.
> else
> # The flag provided by 'CONFIG_ARC_TUNE_MCPU' option isn't known by this compiler
>
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 4/7] arc: replace cc-option-yn uses with cc-option
2021-08-17 2:05 ` Nathan Chancellor
@ 2021-08-17 18:07 ` Nick Desaulniers
2021-08-18 1:40 ` Nathan Chancellor
0 siblings, 1 reply; 5+ messages in thread
From: Nick Desaulniers @ 2021-08-17 18:07 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Masahiro Yamada, linux-kbuild, clang-built-linux, Vineet Gupta,
linux-snps-arc
On Mon, Aug 16, 2021 at 7:05 PM Nathan Chancellor <nathan@kernel.org> wrote:
>
> 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: Vineet Gupta <vgupta@kernel.org>
> > Cc: linux-snps-arc@lists.infradead.org
> > Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
> > ---
> > arch/arc/Makefile | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/arch/arc/Makefile b/arch/arc/Makefile
> > index c0d87ac2e221..8782a03f24a8 100644
> > --- a/arch/arc/Makefile
> > +++ b/arch/arc/Makefile
> > @@ -18,8 +18,7 @@ ifeq ($(CONFIG_ARC_TUNE_MCPU),"")
> > cflags-y += $(tune-mcpu-def-y)
> > else
> > tune-mcpu := $(shell echo $(CONFIG_ARC_TUNE_MCPU))
> > -tune-mcpu-ok := $(call cc-option-yn, $(tune-mcpu))
> > -ifeq ($(tune-mcpu-ok),y)
> > +ifneq ($(call cc-option,$(tune-mcpu)),)
> > cflags-y += $(tune-mcpu)
>
> Any reason not to just turn this into
>
> cflags-y += $(call cc-option,$(tune-mcpu))
>
> ?
Yes, you'll need to pull up the source; the diff doesn't provide
enough context. tune-mcpu is used in the body of the else branch
hinted at by the diff. PTAL
>
> If $(tune-mcpu) is empty or invalid, nothing will be added to cflags-y.
>
> > else
> > # The flag provided by 'CONFIG_ARC_TUNE_MCPU' option isn't known by this compiler
> >
--
Thanks,
~Nick Desaulniers
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 4/7] arc: replace cc-option-yn uses with cc-option
2021-08-17 18:07 ` Nick Desaulniers
@ 2021-08-18 1:40 ` Nathan Chancellor
2021-08-25 4:38 ` Masahiro Yamada
0 siblings, 1 reply; 5+ messages in thread
From: Nathan Chancellor @ 2021-08-18 1:40 UTC (permalink / raw)
To: Nick Desaulniers
Cc: Masahiro Yamada, linux-kbuild, clang-built-linux, Vineet Gupta,
linux-snps-arc
On 8/17/2021 11:07 AM, 'Nick Desaulniers' via Clang Built Linux wrote:
> On Mon, Aug 16, 2021 at 7:05 PM Nathan Chancellor <nathan@kernel.org> wrote:
>>
>> 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: Vineet Gupta <vgupta@kernel.org>
>>> Cc: linux-snps-arc@lists.infradead.org
>>> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
>>> ---
>>> arch/arc/Makefile | 3 +--
>>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>>
>>> diff --git a/arch/arc/Makefile b/arch/arc/Makefile
>>> index c0d87ac2e221..8782a03f24a8 100644
>>> --- a/arch/arc/Makefile
>>> +++ b/arch/arc/Makefile
>>> @@ -18,8 +18,7 @@ ifeq ($(CONFIG_ARC_TUNE_MCPU),"")
>>> cflags-y += $(tune-mcpu-def-y)
>>> else
>>> tune-mcpu := $(shell echo $(CONFIG_ARC_TUNE_MCPU))
>>> -tune-mcpu-ok := $(call cc-option-yn, $(tune-mcpu))
>>> -ifeq ($(tune-mcpu-ok),y)
>>> +ifneq ($(call cc-option,$(tune-mcpu)),)
>>> cflags-y += $(tune-mcpu)
>>
>> Any reason not to just turn this into
>>
>> cflags-y += $(call cc-option,$(tune-mcpu))
>>
>> ?
>
> Yes, you'll need to pull up the source; the diff doesn't provide
> enough context. tune-mcpu is used in the body of the else branch
> hinted at by the diff. PTAL
Ah, fair enough. The warning is a little unconventional but oh well :)
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
>>
>> If $(tune-mcpu) is empty or invalid, nothing will be added to cflags-y.
>>
>>> else
>>> # The flag provided by 'CONFIG_ARC_TUNE_MCPU' option isn't known by this compiler
>>>
>
>
>
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 4/7] arc: replace cc-option-yn uses with cc-option
2021-08-18 1:40 ` Nathan Chancellor
@ 2021-08-25 4:38 ` Masahiro Yamada
0 siblings, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2021-08-25 4:38 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Nick Desaulniers, Linux Kbuild mailing list, clang-built-linux,
Vineet Gupta, arcml
On Wed, Aug 18, 2021 at 10:40 AM Nathan Chancellor <nathan@kernel.org> wrote:
>
>
>
> On 8/17/2021 11:07 AM, 'Nick Desaulniers' via Clang Built Linux wrote:
> > On Mon, Aug 16, 2021 at 7:05 PM Nathan Chancellor <nathan@kernel.org> wrote:
> >>
> >> 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: Vineet Gupta <vgupta@kernel.org>
> >>> Cc: linux-snps-arc@lists.infradead.org
> >>> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
> >>> ---
> >>> arch/arc/Makefile | 3 +--
> >>> 1 file changed, 1 insertion(+), 2 deletions(-)
> >>>
> >>> diff --git a/arch/arc/Makefile b/arch/arc/Makefile
> >>> index c0d87ac2e221..8782a03f24a8 100644
> >>> --- a/arch/arc/Makefile
> >>> +++ b/arch/arc/Makefile
> >>> @@ -18,8 +18,7 @@ ifeq ($(CONFIG_ARC_TUNE_MCPU),"")
> >>> cflags-y += $(tune-mcpu-def-y)
> >>> else
> >>> tune-mcpu := $(shell echo $(CONFIG_ARC_TUNE_MCPU))
> >>> -tune-mcpu-ok := $(call cc-option-yn, $(tune-mcpu))
> >>> -ifeq ($(tune-mcpu-ok),y)
> >>> +ifneq ($(call cc-option,$(tune-mcpu)),)
> >>> cflags-y += $(tune-mcpu)
> >>
> >> Any reason not to just turn this into
> >>
> >> cflags-y += $(call cc-option,$(tune-mcpu))
> >>
> >> ?
> >
> > Yes, you'll need to pull up the source; the diff doesn't provide
> > enough context. tune-mcpu is used in the body of the else branch
> > hinted at by the diff. PTAL
>
> Ah, fair enough. The warning is a little unconventional but oh well :)
>
> Reviewed-by: Nathan Chancellor <nathan@kernel.org>
>
> >>
> >> If $(tune-mcpu) is empty or invalid, nothing will be added to cflags-y.
> >>
> >>> else
> >>> # The flag provided by 'CONFIG_ARC_TUNE_MCPU' option isn't known by this compiler
> >>>
> >
> >
> >
Applied to linux-kbuild.
--
Best Regards
Masahiro Yamada
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-08-25 4:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20210817002109.2736222-1-ndesaulniers@google.com>
2021-08-17 0:21 ` [PATCH 4/7] arc: replace cc-option-yn uses with cc-option 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).