@samitouri / QOSamiQemu / commits / c8bea1276c

target/arm: Build cpu32-system.o as common object

cpu32.c only contains CPU types used in 32-bit system emulation: rename it as cpu32-system.c; always compile the file but only register the QOM types for the 32-bit binary. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> Acked-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20260526203722.79463-17-philmd@linaro.org>

Philippe Mathieu-Daudé committed May 15, 2026 at 12:40 UTC c8bea1276c85855b2e088b740737d043c8556d58
2 files changed +2 -13
target/arm/tcg/cpu32-system.c renamed
+1 -9
@@ -1,5 +1,5 @@
1 /*
2 - * QEMU ARM TCG-only CPUs.
2 + * QEMU ARM TCG-only CPUs (not needed for the AArch64 linux-user build)
3 *
4 * Copyright (c) 2012 SUSE LINUX Products GmbH
5 *
@@ -13,15 +13,9 @@
13 #include "cpu.h"
14 #include "accel/tcg/cpu-ops.h"
15 #include "internals.h"
16 -#if !defined(CONFIG_USER_ONLY)
16 #include "hw/core/boards.h"
18 -#endif
17 #include "cpregs.h"
18
21 -
22 -/* CPU models. These are not needed for the AArch64 linux-user build. */
23 -#if !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64)
24 -
19 static void arm926_initfn(Object *obj)
20 {
21 ARMCPU *cpu = ARM_CPU(obj);
@@ -746,5 +740,3 @@ static void arm_tcg_cpu_register_types(void)
740 }
741
742 type_init(arm_tcg_cpu_register_types)
749 -
750 -#endif /* !CONFIG_USER_ONLY || !TARGET_AARCH64 */
target/arm/tcg/meson.build
+1 -4
@@ -30,10 +30,6 @@ translate32_d = [
30 arm_ss.add(when: 'TARGET_AARCH64', if_true: gen_a64)
31 arm_stubs_ss.add(files('stubs32.c'))
32
33 -arm_ss.add(files(
34 - 'cpu32.c',
35 -))
36 -
33 arm_ss.add(when: 'TARGET_AARCH64', if_true: files(
34 'gengvec64.c',
35 'translate-a64.c',
@@ -85,6 +81,7 @@ arm_common_user_system_ss.add(when: 'TARGET_AARCH64', if_true: files(
81
82 arm_common_system_ss.add(files(
83 'cpregs-at.c',
84 + 'cpu32-system.c',
85 'gicv5-cpuif.c',
86 'psci.c',
87 'tlb_helper.c',