Re: [PATCH v2] scripts/tags.sh: Prevent binary files appearing in cscope.files
From: Nicolas Schier
Date: Tue Jul 14 2026 - 10:04:32 EST
On Tue, Jul 14, 2026 at 10:33:31AM +0200, Sergei Litvin wrote:
> When executing the command `make COMPILED_SOURCE=1 cscope`, the resulting
> `cscope.files` file contains filenames with the extensions *.rlib, *.rmeta,
> and *.so.
>
> To fix this, modify the regular expression in the `all_compiled_sources()`
> function so that only files with the extensions *.h, *.c, *.S, and *.rs are
> accepted.
>
> The issue has been introduced by commit 4f491bb6ea2a ("scripts/tags.sh: collect
> compiled source precisely") which implemented the parsing of compiled sources
> from *.cmd files instead of using the "find" command.
>
> Cc: ojeda@xxxxxxxxxx
> Cc: nsc@xxxxxxxxxx
> Cc: nathan@xxxxxxxxxx
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: 4f491bb6ea2a ("scripts/tags.sh: collect compiled source precisely")
> Signed-off-by: Sergei Litvin <litvindev@xxxxxxxxx>
>
> ---
Thanks, looks good to me. W/o this patch 'make COMPILED_SOURCE=1
cscope' is actually not usable on my system, as soon as some rust libs
are in my build tree, so thanks for fixing!
Tested-by: Nicolas Schier <n.schier@xxxxxxxxx>
Reviewed-by: Nicolas Schier <n.schier@xxxxxxxxx>
As this is a not really a build relevant bug, I think this should go via
some -next rather than a -fixes tree [1].
Miguel, are you with with it if I take this patch as well as the second
one [2] via kbuild-next?
(I tend to remove the Cc trailers from this patch here, as they are
incomplete.)
Kind regards,
Nicolas
[1]: https://lore.kernel.org/r/CAHk-=wjt1NiKOdyAMz_DT7NmZ++SizPOhRSi492ukdTnpDzHQw@xxxxxxxxxxxxxx/
[2]: [PATCH v4] scripts/tags.sh: Add support for rust source files
https://lore.kernel.org/linux-kbuild/20260714125259.78824-1-litvindev@xxxxxxxxx/T/#u