]> git.baikalelectronics.ru Git - kernel.git/commit
kbuild: remove kbuild cache
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 28 May 2018 09:21:38 +0000 (18:21 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 28 May 2018 18:28:58 +0000 (03:28 +0900)
commit8077436af1048e2c903590c7ed8025bd5b013beb
treefc6a8d071e235710e604549fe9c64ef5869ce570
parent53d40b99219b6e6bb9dc3811666ec8af4c089b49
kbuild: remove kbuild cache

The kbuild cache was introduced to remember the result of shell
commands, some of which are expensive to compute, such as
$(call cc-option,...).

However, this turned out not so clever as I had first expected.
Actually, it is problematic.  For example, "$(CC) -print-file-name"
is cached.  If the compiler is updated, the stale search path causes
build error, which is difficult to figure out.  Another problem
scenario is cache files could be touched while install targets are
running under the root permission.  We can patch them if desired,
but the build infrastructure is getting uglier and uglier.

Now, we are going to move compiler flag tests to the configuration
phase.  If this is completed, the result of compiler tests will be
naturally cached in the .config file.  We will not have performance
issues of incremental building since this testing only happens at
Kconfig time.

To start this work with a cleaner code base, remove the kbuild
cache first.

Revert the following commits:
Commit 843622e8d175 ("kbuild: create directory for make cache only when necessary")
Commit 3c0305e78995 ("kbuild: shrink .cache.mk when it exceeds 1000 lines")
Commit 461683490eb6 ("kbuild: Cache a few more calls to the compiler")
Commit 6c5dfc97c7f5 ("kbuild: Add a cache for generated variables")

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Makefile
scripts/Kbuild.include