From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Subject: Re: Artificially target-dependend compiles
Date: Fri, 5 Nov 2021 17:15:33 +0100 [thread overview]
Message-ID: <2e4b52b0-b1fc-58c5-9631-fbf9d7f927fc@redhat.com> (raw)
In-Reply-To: <87czneyaw3.fsf@dusky.pond.sub.org>
On 11/5/21 14:45, Markus Armbruster wrote:
> Moving these definitions to machine-target.json moves the generated C
> from qapi/qapi-*-machine.[ch] to qapi/qapi-*-machine-target.[ch], where
> CONFIG_ACPI_VMGENID is okay. It also makes qmp_query_vm_generation_id()
> target-dependent: it needs qapi/qapi-commands-machine-target.h.
If I understand correctly, the problem that
qapi-commands-machine-target.h is target-dependent, because it uses
"#ifdef CONFIG_ACPI_VMGENID" around the prototype?
On one hand, the "#ifdef" is unnecessary: the prototype does not depend
on anything target-specific. Removing it will avoid the
target-dependence. On the other hand, the "#ifdef" has a defensive
purpose, in that an unnecessary definition (such as the one currently in
the stub) will fail due to the implicit definition of
qmp_query_vm_generation_id().
> Have you seen similar artificial target-dependence elsewhere?
I can't think of a specific example, but it does ring some bells.
Paolo
next prev parent reply other threads:[~2021-11-05 16:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-05 13:45 Artificially target-dependend compiles Markus Armbruster
2021-11-05 16:15 ` Paolo Bonzini [this message]
2021-11-06 7:40 ` Markus Armbruster
2021-11-08 8:09 ` Markus Armbruster
2021-11-08 10:27 ` Paolo Bonzini
2021-11-08 15:38 ` Thomas Huth
2021-11-08 16:23 ` Paolo Bonzini
2021-11-08 16:30 ` Thomas Huth
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=2e4b52b0-b1fc-58c5-9631-fbf9d7f927fc@redhat.com \
--to=pbonzini@redhat.com \
--cc=armbru@redhat.com \
--cc=qemu-devel@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).