if -D__KERNEL__ is not passed via KBUILD_CFLAGS the compiler can have options passed by default that will unset other options such as -ffreestanding or -fno-toplevel-reorder if the compiler is passing -fPIE. refer to fix-fpie-from-being-used.diff Another option that was suggested from another user was to pass -D__KERNEL__ via Kbuild.include, patch is also attached. either patch would work, There is no risk of breakage, benefit is for those who use a hardened toolchain. fix-cc-options-check.patch I believe we should pass the option via KBUILD_CFLAGS as to not confuse the fact that we are not building CPP code, but rather C code. Also correct me if I am wrong but last I knew only part of kernel that was cpp was qconfig. -Jory