Compiling HiKey kernel with clang


#1

Hello,

I am trying to compile the hikey-kernel using clang, but I’m getting compile errors!
I have generated a toolchain using android-ndk-r14b.
I tried the kernel from this repo https://android.googlesource.com/kernel/hikey-linaro first,
I got many compile errors, then I tried
-b android-hikey-linaro-4.9-clang --depth 1 git://android-git.linaro.org/kernel/hikey-clang.git
Actually I was able to compile the kernel with the default config.
But when I change the config to turn on adding modules clang gives me fatal errors!!
I am using
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- CC=clang

What is the correct procedure?

Thanks
Saeed