linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* building csky with CC=clang
@ 2020-12-22 20:29 Nick Desaulniers
  2020-12-22 21:43 ` Fangrui Song
  0 siblings, 1 reply; 2+ messages in thread
From: Nick Desaulniers @ 2020-12-22 20:29 UTC (permalink / raw)
  To: Guo Ren; +Cc: linux-csky, clang-built-linux, Arnd Bergmann, LKML

Hello!
I was playing with some of LLVM's experimental backends (m68k) and saw
there was a CSKY backend. I rebuilt LLVM to support CSKY, but I ran
into trouble building the kernel before even getting to the compiler
invocation:

$ ARCH=csky CROSS_COMPILE=csky-linux-gnu- make CC=clang -j71 defconfig
...
scripts/Kconfig.include:40: linker 'csky-linux-gnu-ld' not found

My distro doesn't package binutils-csky-linux-gnu, is there
documentation on how to build the kernel targeting CSKY, starting with
building GNU binutils configured with CSKY emulation?
-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: building csky with CC=clang
  2020-12-22 20:29 building csky with CC=clang Nick Desaulniers
@ 2020-12-22 21:43 ` Fangrui Song
  0 siblings, 0 replies; 2+ messages in thread
From: Fangrui Song @ 2020-12-22 21:43 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: Guo Ren, linux-csky, clang-built-linux, Arnd Bergmann, LKML

On 2020-12-22, 'Nick Desaulniers' via Clang Built Linux wrote:
>Hello!
>I was playing with some of LLVM's experimental backends (m68k) and saw
>there was a CSKY backend. I rebuilt LLVM to support CSKY, but I ran
>into trouble building the kernel before even getting to the compiler
>invocation:
>
>$ ARCH=csky CROSS_COMPILE=csky-linux-gnu- make CC=clang -j71 defconfig
>...
>scripts/Kconfig.include:40: linker 'csky-linux-gnu-ld' not found
>
>My distro doesn't package binutils-csky-linux-gnu, is there
>documentation on how to build the kernel targeting CSKY, starting with
>building GNU binutils configured with CSKY emulation?

Note also that the llvm/lib/Target/CSKY has not been fully upstreamed
yet. It is a WIP https://lists.llvm.org/pipermail/llvm-dev/2020-August/144481.html
I will not expect clang csky to work currently.
(The latest committed LLVM patch is https://reviews.llvm.org/D93372
Normally committing an important piece of a large patch series like this should take
a bit longer time longer after someone in the community accepted it
https://llvm.org/docs/CodeReview.html#can-code-be-reviewed-after-it-is-committed )

I do want to raise the recent LLVM M68k target. Its patches ([M67k] (Patch */8))
are very organized and the main proposer shares updates to llvm-dev regularly.
There is a lot from the process where the C-SKY target can learn from.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-22 21:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-22 20:29 building csky with CC=clang Nick Desaulniers
2020-12-22 21:43 ` Fangrui Song

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).