手機 - Google Pixel 3a XL - LineageOS - 解決Requires clang 5.0 or later問題



參考資訊:
https://github.com/JunASAKA/kernel_google_msm-4.9_KernelSU

問題如下:

$ ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- CROSS_COMPILE=aarch64-linux-gnu- CROSS_COMPILE_ARM32=arm-linux-gnueabihf- make all
    scripts/kconfig/conf  --silentoldconfig Kconfig
      CHK     include/config/kernel.release
    Cannot use CONFIG_LTO_CLANG: requires clang 5.0 or later
    make: *** [Makefile:1207: prepare-compiler-check] Error 1

解法如下(clang參數由後置帶入make即可):

$ ARCH=arm64 make CC=clang CLANG_TRIPLE=aarch64-linux-gnu- CROSS_COMPILE=aarch64-linux-gnu- CROSS_COMPILE_ARM32=arm-linux-gnueabihf- all