From: Will Deacon <will@kernel.org>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Masahiro Yamada <masahiroy@kernel.org>,
Arnd Bergmann <arnd@kernel.org>,
Fangrui Song <maskray@google.com>,
Nathan Chancellor <nathan@kernel.org>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com
Subject: Re: [PATCH] arm64: drop CROSS_COMPILE for LLVM=1 LLVM_IAS=1
Date: Fri, 2 Jul 2021 12:22:10 +0100 [thread overview]
Message-ID: <20210702112210.GA11084@willie-the-truck> (raw)
In-Reply-To: <20210701235505.1792711-1-ndesaulniers@google.com>
On Thu, Jul 01, 2021 at 04:55:05PM -0700, Nick Desaulniers wrote:
> We get constant feedback that the command line invocation of make is too
> long. CROSS_COMPILE is helpful when a toolchain has a prefix of the
> target triple, or is an absolute path outside of $PATH, but it's mostly
> redundant for a given ARCH.
>
> If CROSS_COMPILE is not set, simply set --target=aarch64-linux for
> CLANG_FLAGS, KBUILD_CFLAGS, and KBUILD_AFLAGS.
>
> Previously, we'd cross compile via:
> $ ARCH=arm64 CROSS_COMPILE=aarch64-linxu-gnu make LLVM=1 LLVM_IAS=1
> Now:
> $ ARCH=arm64 make LLVM=1 LLVM_IAS=1
>
> We can drop gnu from the triple, but dropping linux from the triple
> produces different .config files for the above invocations for the
> defconfig target.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/1399
> Suggested-by: Arnd Bergmann <arnd@kernel.org>
> Suggested-by: Fangrui Song <maskray@google.com>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
> ---
> arch/arm64/Makefile | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index 7bc37d0a1b68..016873fddcc3 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -34,6 +34,17 @@ $(warning LSE atomics not supported by binutils)
> endif
> endif
>
> +ifneq ($(LLVM),)
> +ifneq ($(LLVM_IAS),)
> +ifeq ($(CROSS_COMPILE),)
> +CLANG_TARGET :=--target=aarch64-linux
> +CLANG_FLAGS += $(CLANG_TARGET)
> +KBUILD_CFLAGS += $(CLANG_TARGET)
> +KBUILD_AFLAGS += $(CLANG_TARGET)
Do we need to do anything extra for the linker here? I can't see how we
avoid picking up the host copy.
> +endif
> +endif
> +endif
Have you tested the compat vDSO with this change? I think we'll just end
up passing two --target options, which is hopefully ok, but thought I'd
better check.
Will
next prev parent reply other threads:[~2021-07-02 11:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-01 23:55 [PATCH] arm64: drop CROSS_COMPILE for LLVM=1 LLVM_IAS=1 Nick Desaulniers
2021-07-02 1:05 ` Tom Stellard
2021-07-02 17:37 ` Nick Desaulniers
2021-07-02 11:22 ` Will Deacon [this message]
2021-07-02 17:50 ` Nick Desaulniers
2021-07-02 11:59 ` Arnd Bergmann
2021-07-02 18:29 ` Nick Desaulniers
2021-07-04 0:47 ` Nathan Chancellor
2021-07-07 19:04 ` Nick Desaulniers
2021-07-07 19:08 ` Nathan Chancellor
2021-07-07 22:44 ` Nick Desaulniers
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=20210702112210.GA11084@willie-the-truck \
--to=will@kernel.org \
--cc=arnd@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=clang-built-linux@googlegroups.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=maskray@google.com \
--cc=nathan@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;
as well as URLs for NNTP newsgroup(s).