diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-11-07 10:14:40 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-03-05 18:43:47 +0300 |
commit | ef134d8b493c537b81e8cbd56704efff0b402d8a (patch) | |
tree | 3f51dfe456b70d00b84914eee4904d9e10197ba1 /usr | |
parent | 20e559d8f74538269a0f47df814656c150fca858 (diff) | |
download | linux-ef134d8b493c537b81e8cbd56704efff0b402d8a.tar.xz |
kbuild: remove header compile test
commit fcbb8461fd2376ba3782b5b8bd440c929b8e4980 upstream.
There are both positive and negative options about this feature.
At first, I thought it was a good idea, but actually Linus stated a
negative opinion (https://lkml.org/lkml/2019/9/29/227). I admit it
is ugly and annoying.
The baseline I'd like to keep is the compile-test of uapi headers.
(Otherwise, kernel developers have no way to ensure the correctness
of the exported headers.)
I will maintain a small build rule in usr/include/Makefile.
Remove the other header test functionality.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[ added to 5.4.y due to start of build warnings from backported patches
because of this feature - gregkh]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'usr')
-rw-r--r-- | usr/include/Makefile | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/usr/include/Makefile b/usr/include/Makefile index 57b20f7b6729..fa38ad32a6f0 100644 --- a/usr/include/Makefile +++ b/usr/include/Makefile @@ -99,9 +99,13 @@ endif # asm-generic/*.h is used by asm/*.h, and should not be included directly header-test- += asm-generic/% -# The rest are compile-tested -header-test-y += $(filter-out $(header-test-), \ - $(patsubst $(obj)/%,%, $(wildcard \ - $(addprefix $(obj)/, *.h */*.h */*/*.h */*/*/*.h)))) +extra-y := $(patsubst %.h,%.hdrtest, $(filter-out $(header-test-), \ + $(patsubst $(obj)/%,%, $(shell find $(obj) -name '*.h')))) + +quiet_cmd_hdrtest = HDRTEST $< + cmd_hdrtest = $(CC) $(c_flags) -S -o /dev/null -x c /dev/null -include $<; touch $@ + +$(obj)/%.hdrtest: $(obj)/%.h FORCE + $(call if_changed_dep,hdrtest) clean-files += $(filter-out Makefile, $(notdir $(wildcard $(obj)/*))) |