My kernel code is based on 5.4 version. And I was using arm/arm-linux-androideabi-4.9 and aarch64/aarch64-linux-android-4.9 folder from https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/ on Android-P to compile kernel.
To use clang compiler, I updated this macro LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN in my build.config to use llvm compiler as prebuilts-master/clang/host/linux-x86/clang-r416183b1/bin but I hit below error.
What is the right way to use llvm as a cross compiler?
Do I need to do additional configurations?
scripts/Kconfig.include:36: linker 'arm-linux-androidkernel-ld' not found
make[2]: *** [/local/mnt/workspace/ckiran/kernel-5.4-AndroidT/private/msm-qcom-cw/scripts/kconfig/Makefile:90: vendor/monaco_defconfig] Error 1
make[1]: *** [/local/mnt/workspace/ckiran/kernel-5.4-AndroidT/private/msm-qcom-cw/Makefile:608: vendor/monaco_defconfig] Error 2
make[1]: Leaving directory '/local/mnt/workspace/ckiran/kernel-5.4-AndroidT/out/android-msm-monaco-5.4/private/msm-qcom-cw'
make: *** [Makefile:183: sub-make] Error 2