When CONFIG_MOS6522 is not set, building ppc64-softmmu target fails: /usr/bin/ld: libqemu-ppc64-softmmu.fa.p/monitor_misc.c.o:(.data+0x1158): undefined reference to `hmp_info_via' clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
Add CONFIG_MOS6522 check for hmp_info_via in hmp-commands-info.hx to fix such linking error. Fixes: 409e9f7131e5 (mos6522: add "info via" HMP command for debugging) Signed-off-by: Murilo Opsfelder Araujo <muri...@linux.ibm.com> Cc: Mark Cave-Ayland <mark.cave-ayl...@ilande.co.uk> Cc: Fabiano Rosas <faro...@linux.ibm.com> --- hmp-commands-info.hx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index adfa085a9b..9ad784dd9f 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -881,6 +881,7 @@ SRST ERST #if defined(TARGET_M68K) || defined(TARGET_PPC) +#if defined(CONFIG_MOS6522) { .name = "via", .args_type = "", @@ -889,6 +890,7 @@ ERST .cmd = hmp_info_via, }, #endif +#endif SRST ``info via`` -- 2.35.1