Skip to content

Commit

Permalink
[PATCH] Add CONFIG_HEADERS_CHECK option to automatically run 'make he…
Browse files Browse the repository at this point in the history
…aders_check'

In order to encourage people to notice when they break the exported
headers, add a config option which automatically runs the sanity checks
when building vmlinux.  That way, those who use allyesconfig will notice
failures.

Signed-off-by: David Woodhouse <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
dwmw2 authored and Linus Torvalds committed Oct 11, 2006
1 parent c21be1c commit 0f836e5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,9 @@ endif # ifdef CONFIG_KALLSYMS

# vmlinux image - including updated kernel symbols
vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE
ifdef CONFIG_HEADERS_CHECK
$(Q)$(MAKE) headers_check
endif
$(call if_changed_rule,vmlinux__)
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $@
$(Q)rm -f .old_version
Expand Down
13 changes: 13 additions & 0 deletions lib/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,19 @@ config FORCED_INLINING
become the default in the future, until then this option is there to
test gcc for this.

config HEADERS_CHECK
bool "Run 'make headers_check' when building vmlinux"
help
This option will extract the user-visible kernel headers whenever
building the kernel, and will run basic sanity checks on them to
ensure that exported files do not attempt to include files which
were not exported, etc.

If you're making modifications to header files which are
relevant for userspace, say 'Y', and check the headers
exported to $(INSTALL_HDR_PATH) (usually 'usr/include' in
your build tree), to make sure they're suitable.

config RCU_TORTURE_TEST
tristate "torture tests for RCU"
depends on DEBUG_KERNEL
Expand Down

0 comments on commit 0f836e5

Please sign in to comment.