qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
To: qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org,
	"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
	"Cédric Le Goater" <clg@kaod.org>,
	"Daniel Henrique Barboza" <danielhb413@gmail.com>,
	mopsfelder@gmail.com,
	"Murilo Opsfelder Araujo" <muriloo@linux.ibm.com>,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Fabiano Rosas" <farosas@linux.ibm.com>
Subject: [PATCH v2] mos6522: fix linking error when CONFIG_MOS6522 is not set
Date: Thu,  5 May 2022 22:16:32 -0300	[thread overview]
Message-ID: <20220506011632.183257-1-muriloo@linux.ibm.com> (raw)

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: 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>
---
v2:
- Included devices configuration in monitor/misc.c

v1:
- https://lore.kernel.org/qemu-devel/20220429233146.29662-1-muriloo@linux.ibm.com/

 hmp-commands-info.hx | 2 ++
 monitor/misc.c       | 3 +++
 2 files changed, 5 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``
diff --git a/monitor/misc.c b/monitor/misc.c
index 6c5bb82d3b..3d2312ba8d 100644
--- a/monitor/misc.c
+++ b/monitor/misc.c
@@ -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 {
-- 
2.35.1



             reply	other threads:[~2022-05-06  1:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-06  1:16 Murilo Opsfelder Araujo [this message]
2022-05-10  7:24 ` [PATCH v2] mos6522: fix linking error when CONFIG_MOS6522 is not set Thomas Huth
2022-05-11  0:01   ` Murilo Opsfelder Araújo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220506011632.183257-1-muriloo@linux.ibm.com \
    --to=muriloo@linux.ibm.com \
    --cc=clg@kaod.org \
    --cc=danielhb413@gmail.com \
    --cc=dgilbert@redhat.com \
    --cc=farosas@linux.ibm.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=mopsfelder@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).