linux/Documentation/kbuild
Pengpeng Hou 645323a7f4
kconfig: add optional warnings for changed input values
When reading .config input, Kconfig stores user-provided values first
and then resolves the final value after applying dependencies, ranges,
and other constraints.

If the final value differs from the user input, Kconfig already tracks
that state internally, but it does not provide a focused diagnostic to
show which explicit inputs were adjusted. This is particularly confusing
for requested values that get forced down by unmet dependencies or
clamped by ranges.

Add an opt-in diagnostic controlled by KCONFIG_WARN_CHANGED_INPUT. Emit
the warnings from conf_write() and conf_write_defconfig() after value
resolution. Print the diagnostic to stderr directly, not through the
normal message callback, so it remains visible when conf is run with -s,
such as from make -s.

Keep the diagnostic out of the conf_message() formatting buffer so long
warning lists are not truncated, and mark processed symbols as written
before the SYMBOL_WRITE check so duplicate menu nodes cannot emit
duplicate warnings.

Document the new environment variable and add tests for olddefconfig,
savedefconfig, and the silent-conf path.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Tested-by: Julian Braha <julianbraha@gmail.com>
Link: https://patch.msgid.link/20260611060000.23858-1-pengpeng@iscas.ac.cn
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
2026-06-18 11:46:32 -07:00
..
bash-completion.rst kbuild: add Kbuild bash completion 2025-03-15 21:22:52 +09:00
gcc-plugins.rst docs/core-api: expand Fedora instructions for GCC plugins 2022-09-27 13:21:44 -06:00
gendwarfksyms.rst Documentation/kbuild: gendwarfksyms: Style cleanup 2026-01-21 16:58:59 -07:00
headers_install.rst
index.rst Documentation: use a source-read extension for the index link boilerplate 2026-01-23 11:59:34 -07:00
issues.rst docs: kbuild: fix build with pdf and fix some minor issues 2019-07-15 11:03:04 -03:00
kbuild.rst docs: kdoc: move kernel-doc to tools/docs 2026-01-20 15:31:06 -07:00
kconfig-language.rst Kbuild/Kconfig updates for 7.0 2026-02-11 13:40:35 -08:00
kconfig-macro-language.rst kconfig: doc: fix $(fileno) to $(filename) 2020-12-21 16:01:44 +09:00
Kconfig.recursion-issue-01 docs: kconfig: Fix grammar and formatting 2024-02-15 06:55:47 +09:00
Kconfig.recursion-issue-02 docs: use the lore redirector everywhere 2021-10-12 13:58:19 -06:00
kconfig.rst kconfig: add optional warnings for changed input values 2026-06-18 11:46:32 -07:00
Kconfig.select-break
llvm.rst Documentation/llvm: drop note about LLVM=0 2026-03-03 17:41:50 +01:00
makefiles.rst kbuild: document generation of offset header files 2026-04-29 15:22:22 -07:00
modules.rst documentation: remove references to *_gpl sections 2026-03-31 23:42:52 +00:00
reproducible-builds.rst Documentation: kbuild: Update the debug information notes in reproducible-builds.rst 2026-04-05 09:21:32 +02:00