Commit e9b39c7d72 for qemu.org

commit e9b39c7d727896f61c844039fe3b4ce35be0e112
Author: Philippe Mathieu-Daudé <philmd@linaro.org>
Date:   Wed Feb 18 09:46:24 2026 +0100

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

    There is a single qemu-system-m68k 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-47-philmd@linaro.org>

diff --git a/target/m68k/meson.build b/target/m68k/meson.build
index 4d213daaf6..c36d817134 100644
--- a/target/m68k/meson.build
+++ b/target/m68k/meson.build
@@ -2,13 +2,18 @@ m68k_ss = ss.source_set()
 m68k_ss.add(files(
   'cpu.c',
   'fpu_helper.c',
-  'gdbstub.c',
   'helper.c',
   'op_helper.c',
   'softfloat.c',
   'translate.c',
 ))

+m68k_user_ss = ss.source_set()
+m68k_user_ss.add(files('gdbstub.c'))
+
+m68k_common_system_ss = ss.source_set()
+m68k_common_system_ss.add(files('gdbstub.c'))
+
 m68k_system_ss = ss.source_set()
 m68k_system_ss.add(files(
   'monitor.c'
@@ -19,4 +24,6 @@ m68k_system_ss.add(when: ['CONFIG_SEMIHOSTING'],
 )

 target_arch += {'m68k': m68k_ss}
+target_user_arch += {'m68k': m68k_user_ss}
 target_system_arch += {'m68k': m68k_system_ss}
+target_common_system_arch += {'m68k': m68k_common_system_ss}