* [PATCH] build-sys: fix -static linking of libvhost-user
@ 2020-12-15 8:03 marcandre.lureau
2020-12-15 10:08 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: marcandre.lureau @ 2020-12-15 8:03 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell, pbonzini, Marc-André Lureau, mst
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Fix linking vhost-user binaries with with ./configure -static, by
overriding glib-2.0 dependency with configure results.
Fixes: 0df750e9d3a5fea5e1 ("libvhost-user: make it a meson subproject")
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
meson.build | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 9ea05ab49f..7ecd307952 100644
--- a/meson.build
+++ b/meson.build
@@ -268,7 +268,11 @@ endif
# grandfathered in from the QEMU Makefiles.
add_project_arguments(config_host['GLIB_CFLAGS'].split(),
native: false, language: ['c', 'cpp', 'objc'])
-glib = declare_dependency(link_args: config_host['GLIB_LIBS'].split())
+glib = declare_dependency(compile_args: config_host['GLIB_CFLAGS'].split(),
+ link_args: config_host['GLIB_LIBS'].split())
+# override glib dep with the configure results (for subprojects)
+meson.override_dependency('glib-2.0', glib)
+
gio = not_found
if 'CONFIG_GIO' in config_host
gio = declare_dependency(compile_args: config_host['GIO_CFLAGS'].split(),
--
2.29.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] build-sys: fix -static linking of libvhost-user
2020-12-15 8:03 [PATCH] build-sys: fix -static linking of libvhost-user marcandre.lureau
@ 2020-12-15 10:08 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2020-12-15 10:08 UTC (permalink / raw)
To: marcandre.lureau, qemu-devel; +Cc: peter.maydell, mst
On 15/12/20 09:03, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Fix linking vhost-user binaries with with ./configure -static, by
> overriding glib-2.0 dependency with configure results.
>
> Fixes: 0df750e9d3a5fea5e1 ("libvhost-user: make it a meson subproject")
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> meson.build | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/meson.build b/meson.build
> index 9ea05ab49f..7ecd307952 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -268,7 +268,11 @@ endif
> # grandfathered in from the QEMU Makefiles.
> add_project_arguments(config_host['GLIB_CFLAGS'].split(),
> native: false, language: ['c', 'cpp', 'objc'])
> -glib = declare_dependency(link_args: config_host['GLIB_LIBS'].split())
> +glib = declare_dependency(compile_args: config_host['GLIB_CFLAGS'].split(),
> + link_args: config_host['GLIB_LIBS'].split())
> +# override glib dep with the configure results (for subprojects)
> +meson.override_dependency('glib-2.0', glib)
> +
> gio = not_found
> if 'CONFIG_GIO' in config_host
> gio = declare_dependency(compile_args: config_host['GIO_CFLAGS'].split(),
>
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-15 10:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-15 8:03 [PATCH] build-sys: fix -static linking of libvhost-user marcandre.lureau
2020-12-15 10:08 ` Paolo Bonzini
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).