lkml.org 
[lkml]   [2021]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/2] Makefile: drop CROSS_COMPILE for LLVM=1 LLVM_IAS=1
On Thu, Jul 8, 2021 at 12:23 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> On Thu, Jul 8, 2021 at 7:43 AM 'Nick Desaulniers' via Clang Built
>
> We must rely on this behavior of Clang because
> --target (which is contained in CLANG_FLAGS)
> must be specified before the Kconfig time.
> Then, a user can toggle CONFIG_64BIT any time
> from menuconfig etc.
>
> With this in mind, using $(ARCH) as if-else
> switches is pointless.
> $(SRCARCH) is the only meaningful input.
>
>
> else ifeq ($(ARCH),i386)
> CLANG_FLAGS += --target=i686-linux-gnu
> else ifeq ($(ARCH),x86)
> CLANG_FLAGS += --target=x86_64-linux-gnu
> else ifeq ($(ARCH),x86_64)
> CLANG_FLAGS += --target=x86_64-linux-gnu
>
> should be replaced with:
>
> else ifeq ($(SRCARCH),x86_64)
> CLANG_FLAGS += --target=x86_64-linux-gnu

I think we usually only have to provide the architecture
name, as in "--target=x86_64", though for arm I get a
warning "clang: warning: unknown platform, assuming
-mfloat-abi=soft" unless I provide the full triple.

> For example for ARCH=arm, which is better
> --target=arm-linux-gnueabi or
> --target=arm-lnux-gnueabihf or something we don't care about?

The kernel is always soft-float itself, so it does not matter either way.

Arnd

\
 
 \ /
  Last update: 2021-07-08 13:47    [W:0.084 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site