[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] mos6522: fix linking error when CONFIG_MOS6522 is not set

From: Murilo Opsfelder Araujo
Subject: [PATCH] mos6522: fix linking error when CONFIG_MOS6522 is not set
Date: Fri, 29 Apr 2022 20:31:46 -0300

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 

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 <muriloo@linux.ibm.com>
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: Fabiano Rosas <farosas@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
 #if defined(TARGET_M68K) || defined(TARGET_PPC)
+#if defined(CONFIG_MOS6522)
         .name         = "via",
         .args_type    = "",
@@ -889,6 +890,7 @@ ERST
         .cmd          = hmp_info_via,
   ``info via``

reply via email to

[Prev in Thread] Current Thread [Next in Thread]