FROMLIST: kbuild: disable Android-specific compiler features

The Android compilers enable some non-standard features by default. While
most Android build systems inject the needed "-mno-android" option via
KCFLAGS, it happens too late (at least on x86_64), since KBUILD_CFLAGS
gains KCFLAGS after running (and failing) many cc-option tests. (For
example, the stack-protector tests happen after arch-specific
KBUILD_CFLAGS are added but before the external KCFLAGS are added.) As
such, we should notice this option and immediately turn it on as the
first cc-option test we run.

Signed-off-by: Kees Cook <keescook@chromium.org>

Bug: 27039414
Patchset: android compiler

(git am from https://patchwork.kernel.org/patch/8240831/)
Signed-off-by: Kees Cook <keescook@chromium.org>
Change-Id: Idc0c80ddef90bb02ce6255055f30b05864ff4cfd
1 file changed