qemu-ppc
[Top][All Lists]
Advanced

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

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


From: Mark Cave-Ayland
Subject: Re: [PATCH] mos6522: fix linking error when CONFIG_MOS6522 is not set
Date: Mon, 2 May 2022 10:43:06 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

On 30/04/2022 00:31, Murilo Opsfelder Araujo wrote:

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 <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
  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``

Hmmm. The patch in its proposed form isn't correct, since device CONFIG_* defines aren't declared when processing hmp-commands-info.hx. This was something that was discovered and discussed in the original thread for which the current workaround is to use the per-target TARGET_* defines instead.

Given that the g3beige and mac99 machines are included by default in qemu-system-ppc64 which both contain the MOS6522 device, I can't quite understand how CONFIG_MOS6522 isn't being selected.

Can you give more information about how you are building QEMU including your configure command line?


ATB,

Mark.



reply via email to

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