qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Lukas Straub <lukasstraub2@web.de>
To: Markus Armbruster <armbru@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH] yank: Avoid linking into executables that don't want it
Date: Wed, 17 Mar 2021 21:50:02 +0100	[thread overview]
Message-ID: <20210317215002.283b9179@gecko.fritz.box> (raw)
In-Reply-To: <20210316135907.3646901-1-armbru@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2233 bytes --]

On Tue, 16 Mar 2021 14:59:07 +0100
Markus Armbruster <armbru@redhat.com> wrote:

> util/yank.c and stubs/yank.c are both in libqemuutil.a, even though
> their external symbols conflict.  The linker happens to pick the
> former.  This links a bunch of unneeded code into the executables that
> actually want the latter: qemu-io, qemu-img, qemu-nbd, and several
> tests.  Amazingly, none of them fails to link.
> 
> To fix this, the non-stub yank.c from sourceset util_ss to sourceset
> qmp_ss.  This requires moving it from util/ to monitor/.
> 
> Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  {util => monitor}/yank.c | 0
>  MAINTAINERS              | 2 +-
>  monitor/meson.build      | 1 +
>  util/meson.build         | 1 -
>  4 files changed, 2 insertions(+), 2 deletions(-)
>  rename {util => monitor}/yank.c (100%)
> 
> diff --git a/util/yank.c b/monitor/yank.c
> similarity index 100%
> rename from util/yank.c
> rename to monitor/yank.c
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 5ca3c9f851..d3174c0bb0 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -2799,7 +2799,7 @@ F: tests/unit/test-uuid.c
>  Yank feature
>  M: Lukas Straub <lukasstraub2@web.de>
>  S: Odd fixes
> -F: util/yank.c
> +F: monitor/yank.c
>  F: stubs/yank.c
>  F: include/qemu/yank.h
>  F: qapi/yank.json
> diff --git a/monitor/meson.build b/monitor/meson.build
> index 6d00985ace..1ce5909c88 100644
> --- a/monitor/meson.build
> +++ b/monitor/meson.build
> @@ -1,4 +1,5 @@
>  qmp_ss.add(files('monitor.c', 'qmp.c', 'qmp-cmds-control.c'))
> +qmp_ss.add(files('yank.c'))
>  
>  softmmu_ss.add(files(
>    'hmp-cmds.c',
> diff --git a/util/meson.build b/util/meson.build
> index 984fba965f..fa0298adab 100644
> --- a/util/meson.build
> +++ b/util/meson.build
> @@ -51,7 +51,6 @@ endif
>  if have_system
>    util_ss.add(files('crc-ccitt.c'))
>    util_ss.add(when: 'CONFIG_GIO', if_true: [files('dbus.c'), gio])
> -  util_ss.add(files('yank.c'))
>    util_ss.add(when: 'CONFIG_LINUX', if_true: files('userfaultfd.c'))
>  endif
>  

Looks good to me, applied and fixed commit message.

Regards,
Lukas Straub

-- 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2021-03-17 20:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 13:59 [PATCH] yank: Avoid linking into executables that don't want it Markus Armbruster
2021-03-16 14:06 ` Eric Blake
2021-03-16 15:34   ` Markus Armbruster
2021-03-16 14:07 ` Eric Blake
2021-03-16 15:36   ` Markus Armbruster
2021-03-17 20:50 ` Lukas Straub [this message]
2021-03-23  4:54 ` Thomas Huth
2021-03-23  9:43   ` Markus Armbruster

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=20210317215002.283b9179@gecko.fritz.box \
    --to=lukasstraub2@web.de \
    --cc=armbru@redhat.com \
    --cc=pbonzini@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).