This is a cache of https://discuss.96boards.org/t/compiling-hikey-kernel-with-clang/1923. It is a snapshot of the page at 2020-02-17T06:53:39.984+0000.
Compiling <strong>hikey</strong> kernel with clang - <strong>hikey</strong> - 96Boards Forum

Compiling hikey kernel with clang

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