[LLVMdev] compile linux kernel
Andrew Lenharth
andrewl at lenharth.org
Sat Sep 27 16:03:28 PDT 2008
On Fri, Sep 26, 2008 at 9:19 PM, Ashish Bijlani
<ashish.bijlani at gmail.com> wrote:
> Hi,
>
> I'm trying to compile linux-2.6.23.16 with llvm-2.3. Is it at all
> possible?
Yes, but it requires significant hacking, and the result for 2.6 is a
mostly bitcode kernel with a few userspace shared libraries linked in
as objcode (yes, the kernel builds .so files and includes them in the
binary). There are a few changes here and there you can make to the
kernel code to produce significantly nicer bitcodes too (e.g. rather
than having module level asm that makes symbols weak, you can just
have gcc do it).
The modification to the make system is not difficult, but it requires
some work and an understanding of the kernel build system.
Andrew
More information about the llvm-dev
mailing list