]> git.baikalelectronics.ru Git - kernel.git/commit
kbuild: get <linux/compiler_types.h> out of <linux/kconfig.h>
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 27 Mar 2018 12:52:50 +0000 (21:52 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sat, 31 Mar 2018 03:22:38 +0000 (12:22 +0900)
commit82fced579c64869c2a1873b0476ebf645065eed4
tree5477ef9dfb131b68d5bff74783447c824f165af6
parent0e892c162a84b7d485ec6f9ba74314c859a32059
kbuild: get <linux/compiler_types.h> out of <linux/kconfig.h>

Since commit 9bc09c376caa ("kconfig.h: Include compiler types to avoid
missed struct attributes"), <linux/kconfig.h> pulls in kernel-space
headers to unrelated places.

Commit 479b47ebd343 ("MIPS: boot: Define __ASSEMBLY__ for its.S build")
suppress the build error by defining __ASSEMBLY__, but ITS (i.e. DTS)
is not assembly, and should not include <linux/compiler_types.h> in the
first place.

Looking at arch/s390/tools/Makefile, host programs gen_facilities and
gen_opcode_table now pull in <linux/compiler_types.h> as well.

The motivation for that commit was to define necessary attributes
before any struct is defined.  Obviously, this happens only in C.

It is enough to include <linux/compiler_types.h> only when compiling
C files, and only when compiling kernel space.  Move the include to
c_flags.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
include/linux/kconfig.h
scripts/Makefile.lib