@samitouri / QOSamiQemu / commits / 9c6bed12f4

target/loongarch: Build 'gdbstub.c' once for system single binary

There is a single qemu-system-loongarch64 binary, but by moving 'gdbstub.c' in the target_common_system_arch[] source set the resulting object can be linked into a single qemu-sytem binary. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20260219191955.83815-46-philmd@linaro.org>

Philippe Mathieu-Daudé committed Feb 18, 2026 at 09:46 UTC 9c6bed12f4f2273713c68da614fd32cb03b8f75a
1 file changed +8 -1
target/loongarch/meson.build
+8 -1
@@ -3,9 +3,14 @@ gen = decodetree.process('insns.decode')
3 loongarch_ss = ss.source_set()
4 loongarch_ss.add(files(
5 'cpu.c',
6 - 'gdbstub.c',
6 ))
7
8 +loongarch_user_ss = ss.source_set()
9 +loongarch_user_ss.add(files('gdbstub.c'))
10 +
11 +loongarch_common_system_ss = ss.source_set()
12 +loongarch_common_system_ss.add(files('gdbstub.c'))
13 +
14 loongarch_system_ss = ss.source_set()
15 loongarch_system_ss.add(files(
16 'arch_dump.c',
@@ -20,5 +25,7 @@ common_ss.add(when: 'CONFIG_LOONGARCH_DIS', if_true: [files('disas.c'), gen])
25 subdir('tcg')
26
27 target_arch += {'loongarch': loongarch_ss}
28 +target_user_arch += {'loongarch': loongarch_user_ss}
29 target_system_arch += {'loongarch': loongarch_system_ss}
30 +target_common_system_arch += {'loongarch': loongarch_common_system_ss}
31 subdir('kvm')