Commit 9c6bed12f4 for qemu.org
commit 9c6bed12f4f2273713c68da614fd32cb03b8f75a
Author: Philippe Mathieu-Daudé <philmd@linaro.org>
Date: Wed Feb 18 09:46:07 2026 +0100
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>
diff --git a/target/loongarch/meson.build b/target/loongarch/meson.build
index 20bd3e2f0a..2ae96d6869 100644
--- a/target/loongarch/meson.build
+++ b/target/loongarch/meson.build
@@ -3,9 +3,14 @@ gen = decodetree.process('insns.decode')
loongarch_ss = ss.source_set()
loongarch_ss.add(files(
'cpu.c',
- 'gdbstub.c',
))
+loongarch_user_ss = ss.source_set()
+loongarch_user_ss.add(files('gdbstub.c'))
+
+loongarch_common_system_ss = ss.source_set()
+loongarch_common_system_ss.add(files('gdbstub.c'))
+
loongarch_system_ss = ss.source_set()
loongarch_system_ss.add(files(
'arch_dump.c',
@@ -20,5 +25,7 @@ common_ss.add(when: 'CONFIG_LOONGARCH_DIS', if_true: [files('disas.c'), gen])
subdir('tcg')
target_arch += {'loongarch': loongarch_ss}
+target_user_arch += {'loongarch': loongarch_user_ss}
target_system_arch += {'loongarch': loongarch_system_ss}
+target_common_system_arch += {'loongarch': loongarch_common_system_ss}
subdir('kvm')