llvm-2.6: compile linux kernel

I'm using LLVM 2.6 to buid Linux 2.6.31-git. I read here and old
thread about kernel and llvm-2.3 [1] so I'd like to ask again.

# make CROSS_COMPILE=llvm- V=1
(...)
  llvm-gcc -Wp,-MD,init/.main.o.d -nostdinc -isystem
/usr/lib/llvm-gcc-4.2-2.6/lib/gcc/i686-pc-linux-gnu/4.2.1/include
-Iinclude -I/opt/linux-2.6/arch/x86/include -include
include/linux/autoconf.h -D__KERNEL__ -Wall -Wundef
-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Wno-format-security
-fno-delete-null-pointer-checks -Os -m32 -msoft-float -mregparm=3
-freg-struct-return -mpreferred-stack-boundary=2 -march=i686
-mtune=core2 -mtune=generic -Wa,-mtune=generic32 -ffreestanding
-DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe
-Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx
-mno-sse2 -mno-3dnow -fno-stack-protector -fno-omit-frame-pointer
-fno-optimize-sibling-calls -pg -Wdeclaration-after-statement
-Wno-pointer-sign -fno-strict-overflow -D"KBUILD_STR(s)=#s"
-D"KBUILD_BASENAME=KBUILD_STR(main)"
-D"KBUILD_MODNAME=KBUILD_STR(main)" -c -o init/.tmp_main.o
init/main.c
UNREACHABLE executed!
init/main.c:908: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://llvm.org/bugs/> for instructions.
make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2

I'm using objdump and objcopy from my system.

What are the modification to the make system. Just some changes in
Makefile or some changes on kernel machine specific files?

[1] http://markmail.org/message/wekbyc5ju2eh32m3

--tm

Hi Tiago, please open a bug report. Use -save-temps to get the preprocessed
compiler output (.i) and attach that to the bug-report. Also, please rerun
that failing compile line by hand, but adding -emit-llvm to the command line.
If it compiles successfully, then please attach the resulting .o to the bug
report.

UNREACHABLE executed!
init/main.c:908: internal compiler error: Aborted

Ciao,

Duncan.