qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] stubs: avoid duplicate symbols in libqemuutil.a
@ 2024-10-21 16:34 Paolo Bonzini
  2024-10-24 12:23 ` Alex Bennée
  2024-10-24 17:34 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 3+ messages in thread
From: Paolo Bonzini @ 2024-10-21 16:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-stable

qapi_event_send_device_deleted is always included (together with the
rest of QAPI) in libqemuutil.a if either system-mode emulation or tools
are being built, and in that case the stub causes a duplicate symbol
to appear in libqemuutil.a.

Add the symbol only if events are not being requested.

Supersedes: <20241018143334.949045-1-pbonzini@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
        v1 fails to build with --disable-system --disable-tools, which I
        have now noticed in CI.

 stubs/meson.build | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/stubs/meson.build b/stubs/meson.build
index 772a3e817df..e91614a874d 100644
--- a/stubs/meson.build
+++ b/stubs/meson.build
@@ -55,7 +55,12 @@ endif
 if have_user
   # Symbols that are used by hw/core.
   stub_ss.add(files('cpu-synchronize-state.c'))
-  stub_ss.add(files('qdev.c'))
+
+  # Stubs for QAPI events.  Those can always be included in the build, but
+  # they are not built at all for --disable-system --disable-tools builds.
+  if not (have_system or have_tools)
+    stub_ss.add(files('qdev.c'))
+  endif
 endif
 
 if have_system
-- 
2.46.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] stubs: avoid duplicate symbols in libqemuutil.a
  2024-10-21 16:34 [PATCH] stubs: avoid duplicate symbols in libqemuutil.a Paolo Bonzini
@ 2024-10-24 12:23 ` Alex Bennée
  2024-10-24 17:34 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 3+ messages in thread
From: Alex Bennée @ 2024-10-24 12:23 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, qemu-stable

Paolo Bonzini <pbonzini@redhat.com> writes:

> qapi_event_send_device_deleted is always included (together with the
> rest of QAPI) in libqemuutil.a if either system-mode emulation or tools
> are being built, and in that case the stub causes a duplicate symbol
> to appear in libqemuutil.a.
>
> Add the symbol only if events are not being requested.
>
> Supersedes: <20241018143334.949045-1-pbonzini@redhat.com>
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>

(with all the other binggen/rustc fixes in my tree)

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] stubs: avoid duplicate symbols in libqemuutil.a
  2024-10-21 16:34 [PATCH] stubs: avoid duplicate symbols in libqemuutil.a Paolo Bonzini
  2024-10-24 12:23 ` Alex Bennée
@ 2024-10-24 17:34 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-10-24 17:34 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: qemu-stable

On 21/10/24 13:34, Paolo Bonzini wrote:
> qapi_event_send_device_deleted is always included (together with the
> rest of QAPI) in libqemuutil.a if either system-mode emulation or tools
> are being built, and in that case the stub causes a duplicate symbol
> to appear in libqemuutil.a.
> 
> Add the symbol only if events are not being requested.
> 
> Supersedes: <20241018143334.949045-1-pbonzini@redhat.com>

strip ^

> Cc: qemu-stable@nongnu.org
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>          v1 fails to build with --disable-system --disable-tools, which I
>          have now noticed in CI.
> 
>   stubs/meson.build | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/stubs/meson.build b/stubs/meson.build
> index 772a3e817df..e91614a874d 100644
> --- a/stubs/meson.build
> +++ b/stubs/meson.build
> @@ -55,7 +55,12 @@ endif
>   if have_user
>     # Symbols that are used by hw/core.
>     stub_ss.add(files('cpu-synchronize-state.c'))
> -  stub_ss.add(files('qdev.c'))
> +
> +  # Stubs for QAPI events.  Those can always be included in the build, but
> +  # they are not built at all for --disable-system --disable-tools builds.
> +  if not (have_system or have_tools)
> +    stub_ss.add(files('qdev.c'))
> +  endif
>   endif
>   
>   if have_system



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-24 17:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-21 16:34 [PATCH] stubs: avoid duplicate symbols in libqemuutil.a Paolo Bonzini
2024-10-24 12:23 ` Alex Bennée
2024-10-24 17:34 ` Philippe Mathieu-Daudé

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).