On Thu, 26 Feb 2026 at 23:48, Philippe Mathieu-Daudé <[email protected]> wrote:
>
> gdb_static_features[] only contains strings, nothing target-specific.
> Instead of generating one file per target, generate a single file
> with a single gdb_static_features[] array. Remove the stub.
>
> Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
> ---
>  meson.build       | 25 +++++++++++++++----------
>  stubs/gdbstub.c   |  6 ------
>  stubs/meson.build |  2 --
>  3 files changed, 15 insertions(+), 18 deletions(-)
>  delete mode 100644 stubs/gdbstub.c
>
> diff --git a/meson.build b/meson.build
> index 451cb28149f..6d73ee40ea3 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -3867,6 +3867,21 @@ subdir('linux-user')
>  subdir('tests/qtest/libqos')
>  subdir('tests/qtest/fuzz')
>
> +feature_to_c = find_program('scripts/feature_to_c.py')
> +gdbstub_xml = []
> +foreach target : target_dirs
> +  config_target = config_target_mak[target]
> +  if 'TARGET_XML_FILES' in config_target
> +    gdbstub_xml += config_target['TARGET_XML_FILES'].split()
> +  endif
> +endforeach

Hmm I need to check gdbstub_xml.length() > 0.

> +gdbstub_xml = custom_target('gdbstub-xml.c',
> +                            output: 'gdbstub-xml.c',
> +                            input: files(gdbstub_xml),
> +                            command: [feature_to_c, '@INPUT@'],
> +                            capture: true)
> +common_ss.add(gdbstub_xml)

Reply via email to