All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Murilo Opsfelder Araújo" <muriloo@linux.ibm.com>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	Murilo Opsfelder Araujo <muriloo@linux.ibm.com>,
	qemu-devel@nongnu.org
Cc: "Fabiano Rosas" <farosas@linux.ibm.com>,
	"Daniel Henrique Barboza" <danielhb413@gmail.com>,
	"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
	qemu-ppc@nongnu.org, "Cédric Le Goater" <clg@kaod.org>
Subject: Re: [PATCH] mos6522: fix linking error when CONFIG_MOS6522 is not set
Date: Fri, 6 May 2022 20:44:04 -0300	[thread overview]
Message-ID: <56cae01e-7944-8775-e3a2-3071c18f2da1@linux.ibm.com> (raw)
In-Reply-To: <b31e3221-6dfd-de68-8dfc-177ded0b501e@ilande.co.uk>

On 5/2/22 06:43, Mark Cave-Ayland wrote:
> 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.

I've sent a v2 of this patch that addresses this, i.e.: the CONFIG_* options are available in hmp-commands-info.hx:

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

I hope it can resolve the build issue in the short-term.
I'd appreciate if you or anyone on this thread could review it.

Thank you, Mark, for the discussion and knowledge sharing!

Cheers!

-- 
Murilo


  parent reply	other threads:[~2022-05-06 23:47 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29 23:31 [PATCH] mos6522: fix linking error when CONFIG_MOS6522 is not set Murilo Opsfelder Araujo
2022-05-02  9:43 ` Mark Cave-Ayland
2022-05-02 13:36   ` Murilo Opsfelder Araújo
2022-05-03 14:06     ` Fabiano Rosas
2022-05-04  7:16       ` Mark Cave-Ayland
2022-05-04 14:26         ` Fabiano Rosas
2022-05-04 14:48           ` Mark Cave-Ayland
2022-05-10  8:03             ` QEMU 32-bit vs. 64-bit binaries (was: [PATCH] mos6522: fix linking error when CONFIG_MOS6522 is not set) Thomas Huth
2022-05-10  8:26               ` Alistair Francis
2022-05-10  8:54               ` QEMU 32-bit vs. 64-bit binaries Markus Armbruster
2022-05-10  9:01                 ` Thomas Huth
2022-05-10  9:14                   ` Peter Maydell
2022-05-10  9:22                     ` Dr. David Alan Gilbert
2022-05-10  9:31                       ` Thomas Huth
2022-05-10  9:47                         ` Peter Maydell
2022-05-10 10:14                         ` BALATON Zoltan
2022-05-10 12:20                         ` Gerd Hoffmann
2022-05-10 12:25                           ` Peter Maydell
2022-05-04  7:10     ` [PATCH] mos6522: fix linking error when CONFIG_MOS6522 is not set Mark Cave-Ayland
2022-05-04 13:16       ` Murilo Opsfelder Araújo
2022-05-04 14:32         ` Mark Cave-Ayland
2022-05-05  1:24           ` Murilo Opsfelder Araújo
2022-05-05  8:19             ` Mark Cave-Ayland
2022-05-10  8:40               ` QEMU with reduced amount of machines in the config (was: [PATCH] mos6522: fix linking error when CONFIG_MOS6522 is not set) Thomas Huth
2022-05-06 23:44   ` Murilo Opsfelder Araújo [this message]
2022-05-08  9:30     ` [PATCH] mos6522: fix linking error when CONFIG_MOS6522 is not set Mark Cave-Ayland

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=56cae01e-7944-8775-e3a2-3071c18f2da1@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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.