Skip to content

Commit

Permalink
mos6522: fix linking error when CONFIG_MOS6522 is not set
Browse files Browse the repository at this point in the history
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'

Make devices configuration available in hmp-commands*.hx and check for
CONFIG_MOS6522.

Fixes: 409e9f7 (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>
Cc: Thomas Huth <thuth@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220510235439.54775-1-muriloo@linux.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
  • Loading branch information
mopsfelder authored and danielhb committed May 26, 2022
1 parent 162eec1 commit c9f8004
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion hmp-commands-info.hx
Expand Up @@ -880,7 +880,7 @@ SRST
Show intel SGX information.
ERST

#if defined(TARGET_M68K) || defined(TARGET_PPC)
#if defined(CONFIG_MOS6522)
{
.name = "via",
.args_type = "",
Expand Down
3 changes: 3 additions & 0 deletions monitor/misc.c
Expand Up @@ -84,6 +84,9 @@
#include "hw/s390x/storage-attributes.h"
#endif

/* Make devices configuration available for use in hmp-commands*.hx templates */
#include CONFIG_DEVICES

/* file descriptors passed via SCM_RIGHTS */
typedef struct mon_fd_t mon_fd_t;
struct mon_fd_t {
Expand Down

0 comments on commit c9f8004

Please sign in to comment.