From: Nathan Chancellor <natechancellor@gmail.com>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>,
Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>
Subject: Re: CONFIG_CC_IS_CLANG
Date: Thu, 7 Feb 2019 14:21:28 -0700 [thread overview]
Message-ID: <20190207212128.GA30269@archlinux-ryzen> (raw)
In-Reply-To: <CAKwvOdkkJ48d_a1K-LPRsTweDXgpGX51NH=nuWK5weNfQ_8RBw@mail.gmail.com>
On Thu, Feb 07, 2019 at 01:03:01PM -0800, Nick Desaulniers wrote:
> Masahiro,
> I was looking into sprucing up Kbuild for improved LLD support. One
> thing I was curious about was the different checks for clang in the
> top level Makefile.
>
> How come a change like:
> diff --git a/Makefile b/Makefile
> index 3142e67d03f1..525b3fef7d27 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -489,7 +489,7 @@ ifneq ($(KBUILD_SRC),)
> $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree)
> endif
>
> -ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),)
> +ifdef CONFIG_CC_IS_CLANG
> ifneq ($(CROSS_COMPILE),)
> CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE:%-=%))
> GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD)))
>
>
> doesn't work? It's odd that later on in the top level Makefile, we
> have that kind of check. I was hoping to do something similar for
> LLD, but it seems that the config options are not defined for that
> particular make target? Does this have to do with config-targets?
>
> --
> Thanks,
> ~Nick Desaulniers
According to commit 995167420797 ("kbuild: remove cc-name variable"), it
says that this section of the Makefile runs before Kconfig. Masahiro can
obviously give more context and explanation.
Nathan
next prev parent reply other threads:[~2019-02-07 21:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-07 21:03 CONFIG_CC_IS_CLANG Nick Desaulniers
2019-02-07 21:21 ` Nathan Chancellor [this message]
2019-02-11 15:05 ` CONFIG_CC_IS_CLANG Masahiro Yamada
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=20190207212128.GA30269@archlinux-ryzen \
--to=natechancellor@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=ndesaulniers@google.com \
--cc=yamada.masahiro@socionext.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 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.