Re: [PATCH v4] kconfig: add kconfig-sym-check static checker
Sergey Senozhatsky <[email protected]> Tue, 23 Jun 2026 16:49:13 +0900
| Newsgroups | org.kernel.vger.linux-kbuild,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Hi, Wasn't on the Cc list, hopefully I didn't mess up the headers. Just saw this on LWN: [..] > + @echo ' kconfig-sym-check - Check for dangling Kconfig symbol references' > > +kconfig-sym-check: > + $(Q)$(PERL) $(srctree)/scripts/kconfig/kconfig-sym-check.pl $(srctree) $(KCONFIG_SYM_CHECK_EXCLUDES) I wonder if you have seen KCONFIG_WARN_UNKNOWN_SYMBOLS which seem to be addressing the same (or very similar) problem (unless I'm missing something). Basically, what I have in my build script is # perform kconfig symbol lookups: handles renamed, removed, etc. symbols export KCONFIG_WARN_UNKNOWN_SYMBOLS=1 # make kconfig symbol lookup warnings fatal export KCONFIG_WERROR=1 And then make fails whenever .config has something that is not supposed to be there anymore. E.g. .config:1606:warning: unknown symbol: SENSORS_APDS990X .config:2498:warning: unknown symbol: APPLICOM make[3]: *** [scripts/kconfig/Makefile:85: syncconfig] Error 1 make[2]: *** [Makefile:760: syncconfig] Error 2