libpcre2 breaks COMPILED_SOURCE=1 tags

From: Carlos Llamas
Date: Mon Feb 13 2023 - 15:07:27 EST


Newer versions of libpre2 have dropped default support for \K in
lookarounds. Unfortunately, scripts/tags.sh relies on this option to
collect all the _compiled_ sources. This is the error:

$ make COMPILED_SOURCE=1 tags
GEN tags
grep: \K is not allowed in lookarounds (but see PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK)

It seems there isn't an official maintainer for this script and I can't
quite understand the regex used for the query. Does anyone have a good
alternative for this? The regex pattern was introduced in commit
4f491bb6ea2a ("scripts/tags.sh: collect compiled source precisely").

The previous form of all_compiled_sources() seems to work for me and I'm
guessing it wasn't efficient enough? I can't find much info about the
switch to find/grep either. I believe the initial thread is this:
https://lore.kernel.org/all/20200423103801.GA3730892@xxxxxxxxx/

--
Carlos Llamas