target/arm: define stub library
We use the mechanic introduced in previous commit to define a arm stubs library. With this, we are able to eliminate symbol conflicts when linking arm and aarch64 targets, and get one step closer to having a single-binary. Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20260424230103.1579600-3-pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Pierrick Bouvier committed
Apr 9, 2026 at 14:37 UTC
0da978cdbc61709d2a99cc1e771adee84c96eccd
2 files changed
+4
-6
target/arm/meson.build
+3
-5
@@ -2,6 +2,7 @@ arm_ss = ss.source_set()
2
arm_common_ss = ss.source_set()
3
arm_common_system_ss = ss.source_set()
4
arm_system_ss = ss.source_set()
5
+arm_stubs_ss = ss.source_set()
6
arm_user_ss = ss.source_set()
7
8
arm_common_system_ss.add(files('gdbstub.c'))
@@ -23,9 +24,7 @@ arm_system_ss.add(when: 'CONFIG_KVM', if_true: files('hyp_gdbstub.c', 'kvm.c'))
24
arm_system_ss.add(when: 'CONFIG_HVF', if_true: files('hyp_gdbstub.c'))
25
26
arm_user_ss.add(files('cpu.c'))
26
-arm_user_ss.add(when: 'TARGET_AARCH64', if_false: files(
27
- 'cpu32-stubs.c',
28
-))
27
+arm_stubs_ss.add(files('cpu32-stubs.c'))
28
arm_user_ss.add(files(
29
'cpregs-gcs.c',
30
'cpregs-pmu.c',
@@ -39,8 +38,6 @@ arm_user_ss.add(when: 'CONFIG_ARM_COMPATIBLE_SEMIHOSTING',
38
if_true: files('common-semi-target.c'))
39
40
arm_common_system_ss.add(files('cpu.c'))
42
-arm_common_system_ss.add(when: 'TARGET_AARCH64', if_false: files(
43
- 'cpu32-stubs.c'))
41
arm_common_system_ss.add(when: 'CONFIG_KVM', if_false: files('kvm-stub.c'))
42
arm_common_system_ss.add(when: 'CONFIG_ARM_COMPATIBLE_SEMIHOSTING',
43
if_true: files('common-semi-target.c'))
@@ -73,3 +70,4 @@ target_system_arch += {'arm': arm_system_ss}
70
target_user_arch += {'arm': arm_user_ss}
71
target_common_arch += {'arm': arm_common_ss}
72
target_common_system_arch += {'arm': arm_common_system_ss}
73
+target_stubs_arch += {'arm': arm_stubs_ss}
target/arm/tcg/meson.build
+1
-1
@@ -28,7 +28,7 @@ translate32_d = [
28
]
29
30
arm_ss.add(when: 'TARGET_AARCH64', if_true: gen_a64)
31
-arm_ss.add(when: 'TARGET_AARCH64', if_false: files('stubs32.c'))
31
+arm_stubs_ss.add(files('stubs32.c'))
32
33
arm_ss.add(files(
34
'cpu32.c',