[LLVMdev] compile linux kernel

Andrew Lenharth andrewl at lenharth.org
Sat Sep 27 19:43:18 PDT 2008


On Sat, Sep 27, 2008 at 8:08 PM, Ashish Bijlani
<ashish.bijlani at gmail.com> wrote:
> If I use GCC to generate asm-offsets.s file, then the build system go
> ahead but fails when it generates .so files as Andrew pointed out.

You have to generate this with gcc.  .c -> .s and .s -> .o need gcc,
.c -> .o can use llvm-gcc.  The combination has to be fixed up in
final linking.

> Now, If the build systems generates .so files, then it will be
> difficult o actually generate fully arch-independent kernel code,
> isn't it?

A llvm compiled kernel is in no way arch-independent.  It is very very
arch dependent.

Andrew



More information about the llvm-dev mailing list