]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/loongarch: Avoid target-specific migration headers in machine.c
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 25 Mar 2026 19:18:27 +0000 (20:18 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 6 May 2026 10:58:07 +0000 (12:58 +0200)
machine.c doesn't use any target-specific macro defined by
the "migration/cpu.h" header. Use the minimum header required:
"migration/qemu-file-types.h" which is not target-specific.
This allows to build this file as common object.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20260325211728.89204-3-philmd@linaro.org>

target/loongarch/machine.c
target/loongarch/meson.build

index 28b9079d04e67095de6bc29b3fd29c898c292f00..4db53fec267c102eede231b3302f8b98d32e1a69 100644 (file)
@@ -7,7 +7,7 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "migration/cpu.h"
+#include "migration/vmstate.h"
 #include "system/tcg.h"
 #include "vec.h"
 
index 2ae96d68695d1463c45e3cf70b2868515aa809c5..c5a2953b29cd9a95b10a14830db789573783a102 100644 (file)
@@ -10,6 +10,7 @@ loongarch_user_ss.add(files('gdbstub.c'))
 
 loongarch_common_system_ss = ss.source_set()
 loongarch_common_system_ss.add(files('gdbstub.c'))
+loongarch_common_system_ss.add(files('machine.c'))
 
 loongarch_system_ss = ss.source_set()
 loongarch_system_ss.add(files(
@@ -17,7 +18,6 @@ loongarch_system_ss.add(files(
   'cpu_helper.c',
   'csr.c',
   'loongarch-qmp-cmds.c',
-  'machine.c',
 ))
 
 common_ss.add(when: 'CONFIG_LOONGARCH_DIS', if_true: [files('disas.c'), gen])