On Thu, Aug 20, 2026 at 11:31:16AM +0530, Jaihind Yadav wrote:
> With GCC plugins enabled, external module builds can record
> -fplugin=... paths in DWARF producer metadata via
> -grecord-gcc-switches, leaking host/build specific paths and
> triggering QA checks.
>
> Handle this in scripts/Makefile.gcc-plugins for KBUILD_EXTMOD
> builds by adding -gno-record-gcc-switches to plugin cflags.
>
> This keeps plugin behavior unchanged while avoiding absolute
> plugin path leakage in external module debug metadata.
Maybe it makes sense to add a note on how to restore the original
behaviour for those who may want to have the gcc switches recorded in
debug data for external kmods ('make KCFLAGS=-grecord-gcc-switches').
--
Nicolas