On Tue, 27 Oct 2020 at 21:56, Keith Packard <kei...@keithp.com> wrote: > > Peter Maydell <peter.mayd...@linaro.org> writes: > > >> +specific_ss.add(when: 'CONFIG_TCG', if_true: files ('common-semi.c')) > > > > I think this adds this file to the compilation for all TCG targets; > > you only want it for targets which have Arm-semihosting-ABI compatible > > semihosting. (Various other targets either don't have semihosting > > or have their own ABI.) > > Right. These should have been target-specific source sets so that the > file was only added to those targets: > > arm_ss.add(when: 'CONFIG_TCG', if_true: files ('common-semi.c')) > riscv_ss.add(files('common-semi.c')) > > This appears to work in my testing (building arm, risc-v and x86_64 > configs).
I'm not a kconfig expert but it might be preferable to have a new CONFIG_ for arm-semihosting-ABI which the relevant targets enable. Somebody else may be able to advise. thanks -- PMM