summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMasahiro Yamada2019-02-22 08:40:07 +0100
committerMasahiro Yamada2019-02-27 13:43:31 +0100
commit3812b8c5c5d527239ac015f1f2c7654da7fcfbba (patch)
tree0fb2ecf0ba2bc57be1ac3f7a4ebf3b17198c93ff /arch
parentkbuild: move tools_silent to a more relevant place (diff)
downloadkernel-qcow2-linux-3812b8c5c5d527239ac015f1f2c7654da7fcfbba.tar.gz
kernel-qcow2-linux-3812b8c5c5d527239ac015f1f2c7654da7fcfbba.tar.xz
kernel-qcow2-linux-3812b8c5c5d527239ac015f1f2c7654da7fcfbba.zip
kbuild: make -r/-R effective in top Makefile for old Make versions
Adding -rR to MAKEFLAGS is important because we do not want to be bothered by built-in implicit rules or variables. One problem that used to exist in older GNU Make versions is MAKEFLAGS += -rR ... does not become effective in the current Makefile. When you are building with O= option, it becomes effective in the top Makefile since it recurses via 'sub-make' target. Otherwise, the top Makefile tries implicit rules. That is why we explicitly add empty rules for Makefiles, but we often miss to do that. In fact, adding -d option to older GNU Make versions shows it is trying a bunch of implicit pattern rules. Considering target file `scripts/Makefile.kcov'. Looking for an implicit rule for `scripts/Makefile.kcov'. Trying pattern rule with stem `Makefile.kcov'. Trying implicit prerequisite `scripts/Makefile.kcov.o'. Trying pattern rule with stem `Makefile.kcov'. Trying implicit prerequisite `scripts/Makefile.kcov.c'. Trying pattern rule with stem `Makefile.kcov'. Trying implicit prerequisite `scripts/Makefile.kcov.cc'. Trying pattern rule with stem `Makefile.kcov'. Trying implicit prerequisite `scripts/Makefile.kcov.C'. ... This issue was fixed by GNU Make commit 58dae243526b ("[Savannah #20501] Handle adding -r/-R to MAKEFLAGS in the makefile"). So, it is no longer a problem if you use GNU Make 4.0 or later. However, older versions are still widely used. So, I decided to patch the kernel Makefile to invoke sub-make regardless of O= option. This will allow further cleanups. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions