Skip to content

Commit

Permalink
kbuild: remove header compile test
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
masahir0y committed Nov 14, 2019
1 parent eba1903 commit fcbb846
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 1,252 deletions.
17 changes: 0 additions & 17 deletions Documentation/kbuild/makefiles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1115,23 +1115,6 @@ When kbuild executes, the following steps are followed (roughly):
In this example, extra-y is used to list object files that
shall be built, but shall not be linked as part of built-in.a.

header-test-y

header-test-y specifies headers (`*.h`) in the current directory that
should be compile tested to ensure they are self-contained,
i.e. compilable as standalone units. If CONFIG_HEADER_TEST is enabled,
this builds them as part of extra-y.

header-test-pattern-y

This works as a weaker version of header-test-y, and accepts wildcard
patterns. The typical usage is::

header-test-pattern-y += *.h

This specifies all the files that matches to `*.h` in the current
directory, but the files in 'header-test-' are excluded.

6.7 Commands useful for building a boot image
---------------------------------------------

Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,6 @@ ifeq ($(KBUILD_EXTMOD),)
init-y := init/
drivers-y := drivers/ sound/
drivers-$(CONFIG_SAMPLES) += samples/
drivers-$(CONFIG_KERNEL_HEADER_TEST) += include/
net-y := net/
libs-y := lib/
core-y := usr/
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ config DRM_I915_WERROR
# We use the dependency on !COMPILE_TEST to not be enabled in
# allmodconfig or allyesconfig configurations
depends on !COMPILE_TEST
select HEADER_TEST
default n
help
Add -Werror to the build flags for (and only for) i915.ko.
Expand Down
Loading

0 comments on commit fcbb846

Please sign in to comment.