Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: boot: Define __ASSEMBLY__ for its.S build

The MIPS %.its.S compiler command did not define __ASSEMBLY__, which meant
when compiler_types.h was added to kconfig.h, unexpected things appeared
(e.g. struct declarations) which should not have been present. As done in
the general %.S compiler command, __ASSEMBLY__ is now included here too.

The failure was:

Error: arch/mips/boot/vmlinux.gz.its:201.1-2 syntax error
FATAL ERROR: Unable to parse input tree
/usr/bin/mkimage: Can't read arch/mips/boot/vmlinux.gz.itb.tmp: Invalid argument
/usr/bin/mkimage Can't add hashes to FIT blob

Reported-by: kbuild test robot <lkp@intel.com>
Fixes: 28128c61e08e ("kconfig.h: Include compiler types to avoid missed struct attributes")
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Kees Cook and committed by
Linus Torvalds
0f9da844 bae6cfe8

+1
+1
arch/mips/boot/Makefile
··· 126 126 127 127 quiet_cmd_cpp_its_S = ITS $@ 128 128 cmd_cpp_its_S = $(CPP) $(cpp_flags) -P -C -o $@ $< \ 129 + -D__ASSEMBLY__ \ 129 130 -DKERNEL_NAME="\"Linux $(KERNELRELEASE)\"" \ 130 131 -DVMLINUX_BINARY="\"$(3)\"" \ 131 132 -DVMLINUX_COMPRESSION="\"$(2)\"" \