UPSTREAM: kconfig: add warn-unknown-symbols sanity check

Introduce KCONFIG_WARN_UNKNOWN_SYMBOLS environment variable,
which makes Kconfig warn about unknown config symbols.

This is especially useful for continuous kernel uprevs when
some symbols can be either removed or renamed between kernel
releases (which can go unnoticed otherwise).

By default KCONFIG_WARN_UNKNOWN_SYMBOLS generates warnings,
which are non-terminal. There is an additional environment
variable KCONFIG_WERROR that overrides this behaviour and
turns warnings into errors.

Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
(cherry picked from commit 7cd343008b967423b06af8f6d3236749c67d12e8)

BUG=none
TEST=compile tested

Change-Id: I5bae6f6958b8b57bda5f9c9ae5b30283fd60d9ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4845917
Commit-Queue: Sergey Senozhatsky <senozhatsky@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Tested-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
2 files changed