Skip to content

Commit 2875109

Browse files
masahir0yTero Kristo
authored andcommitted
kbuild: remove header compile test
commit fcbb846 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 <[email protected]> Signed-off-by: Vignesh Raghavendra <[email protected]>
1 parent 4d4d923 commit 2875109

File tree

8 files changed

+9
-1252
lines changed

8 files changed

+9
-1252
lines changed

Documentation/kbuild/makefiles.rst

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,23 +1115,6 @@ When kbuild executes, the following steps are followed (roughly):
11151115
In this example, extra-y is used to list object files that
11161116
shall be built, but shall not be linked as part of built-in.a.
11171117

1118-
header-test-y
1119-
1120-
header-test-y specifies headers (`*.h`) in the current directory that
1121-
should be compile tested to ensure they are self-contained,
1122-
i.e. compilable as standalone units. If CONFIG_HEADER_TEST is enabled,
1123-
this builds them as part of extra-y.
1124-
1125-
header-test-pattern-y
1126-
1127-
This works as a weaker version of header-test-y, and accepts wildcard
1128-
patterns. The typical usage is::
1129-
1130-
header-test-pattern-y += *.h
1131-
1132-
This specifies all the files that matches to `*.h` in the current
1133-
directory, but the files in 'header-test-' are excluded.
1134-
11351118
6.7 Commands useful for building a boot image
11361119
---------------------------------------------
11371120

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,6 @@ ifeq ($(KBUILD_EXTMOD),)
618618
init-y := init/
619619
drivers-y := drivers/ sound/
620620
drivers-$(CONFIG_SAMPLES) += samples/
621-
drivers-$(CONFIG_KERNEL_HEADER_TEST) += include/
622621
net-y := net/
623622
libs-y := lib/
624623
core-y := usr/

drivers/gpu/drm/i915/Kconfig.debug

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ config DRM_I915_WERROR
77
# We use the dependency on !COMPILE_TEST to not be enabled in
88
# allmodconfig or allyesconfig configurations
99
depends on !COMPILE_TEST
10-
select HEADER_TEST
1110
default n
1211
help
1312
Add -Werror to the build flags for (and only for) i915.ko.

0 commit comments

Comments
 (0)