手機 - Google Pixel 3a XL - LineageOS - 解決-fstack-protector-strong not supported by compiler問題



參考資訊:
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 -j4
    scripts/kconfig/conf  --silentoldconfig Kconfig
      CHK     include/config/kernel.release
    Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
    make: *** [Makefile:1223: prepare-compiler-check] Error 1
    make: *** Waiting for unfinished jobs....
      UPD     include/config/kernel.release

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

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