The defualt compiler of android kernel is clang and I'd like to compile android kernel with gcc. I tried to follow the instructions on https://source.android.com/setup/build/building-kernels and used the command “build/build.sh CC=gcc”. I got the following mistake:
Cannot use CONFIG_LTO_CLANG: requires clang 5.0 or laterIt seems like something related to LTO, so I disabled LTO according to the instructions from the above website and tried again. Then still failed:
Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compilerBy the way, I can build kernel with clang successfully.
Please help me T.T