]> git.baikalelectronics.ru Git - kernel.git/commit
kbuild: use -MMD instead of -MD to exclude system headers from dependency
authorMasahiro Yamada <masahiroy@kernel.org>
Thu, 23 Apr 2020 14:23:53 +0000 (23:23 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Tue, 12 May 2020 04:28:33 +0000 (13:28 +0900)
commit20a6f7e5572b9a2e0d9ba50bff5342f5ae30afc3
tree5ecc32acc767d02fde56084c435073be35ab3486
parent789d09cdedde3787af3d922f9e58e5cb97b82b02
kbuild: use -MMD instead of -MD to exclude system headers from dependency

This omits system headers from the generated header dependency.

System headers are not updated unless you upgrade the compiler. Nor do
they contain CONFIG options, so fixdep does not need to parse them.

Having said that, the effect of this optimization will be quite small
because the kernel code generally does not include system headers
except <stdarg.h>. Host programs include a lot of system headers,
but there are not so many in the kernel tree.

At first, keeping system headers in .*.cmd files might be useful to
detect the compiler update, but there is no guarantee that <stdarg.h>
is included from every file. So, I implemented a more reliable way in
the previous commit.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/Kbuild.include
scripts/Makefile.host
scripts/Makefile.lib
usr/include/Makefile