All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	clang-built-linux <clang-built-linux@googlegroups.com>,
	Vineet Gupta <vgupta@kernel.org>,
	arcml <linux-snps-arc@lists.infradead.org>
Subject: Re: [PATCH 4/7] arc: replace cc-option-yn uses with cc-option
Date: Wed, 25 Aug 2021 13:38:05 +0900	[thread overview]
Message-ID: <CAK7LNASN2YmH5kxzx8XMxM5UfJOEc9JJ0AWdKsP8=Fr9wqSN0Q@mail.gmail.com> (raw)
In-Reply-To: <8b9bf97a-8f6f-80b9-3bab-32bb525adf9e@kernel.org>

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

WARNING: multiple messages have this Message-ID (diff)
From: Masahiro Yamada <masahiroy@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	clang-built-linux <clang-built-linux@googlegroups.com>,
	Vineet Gupta <vgupta@kernel.org>,
	arcml <linux-snps-arc@lists.infradead.org>
Subject: Re: [PATCH 4/7] arc: replace cc-option-yn uses with cc-option
Date: Wed, 25 Aug 2021 13:38:05 +0900	[thread overview]
Message-ID: <CAK7LNASN2YmH5kxzx8XMxM5UfJOEc9JJ0AWdKsP8=Fr9wqSN0Q@mail.gmail.com> (raw)
In-Reply-To: <8b9bf97a-8f6f-80b9-3bab-32bb525adf9e@kernel.org>

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

  reply	other threads:[~2021-08-25  4:39 UTC|newest]

Thread overview: 36+ 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
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  0:21   ` Nick Desaulniers
2021-08-17  1:41   ` Nathan Chancellor
2021-08-17  1:41     ` Nathan Chancellor
2021-08-17  2:31   ` Michael Ellerman
2021-08-17  2:31     ` Michael Ellerman
2021-08-19 20:04     ` Masahiro Yamada
2021-08-19 20:04       ` Masahiro Yamada
2021-08-17  0:21 ` [PATCH 4/7] arc: " Nick Desaulniers
2021-08-17  0:21   ` Nick Desaulniers
2021-08-17  2:05   ` Nathan Chancellor
2021-08-17  2:05     ` Nathan Chancellor
2021-08-17 18:07     ` Nick Desaulniers
2021-08-17 18:07       ` Nick Desaulniers
2021-08-18  1:40       ` Nathan Chancellor
2021-08-18  1:40         ` Nathan Chancellor
2021-08-25  4:38         ` Masahiro Yamada [this message]
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='CAK7LNASN2YmH5kxzx8XMxM5UfJOEc9JJ0AWdKsP8=Fr9wqSN0Q@mail.gmail.com' \
    --to=masahiroy@kernel.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=vgupta@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.