From: Stefan Hajnoczi <stefanha@redhat.com>
To: Christophe de Dinechin <dinechin@redhat.com>
Cc: Laurent Vivier <laurent@vivier.eu>,
Michael Tokarev <mjt@tls.msk.ru>,
qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [PATCH v2 1/3] Makefile: Compute libraries for libqemuutil.a and libvhost-user.a
Date: Tue, 30 Jun 2020 13:23:14 +0100 [thread overview]
Message-ID: <20200630122314.GD91444@stefanha-x1.localdomain> (raw)
In-Reply-To: <20200626162706.3304357-2-dinechin@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1711 bytes --]
On Fri, Jun 26, 2020 at 06:27:04PM +0200, Christophe de Dinechin wrote:
> In util/Makefile.objs, there is a setting for dbus.o-libs.
> Trying to copy-paste that to add a library for module.o that was was
> not otherwise linked yields link errors on a number of binaries,
> e.g. qemu-ga, with unsatisfied symbols in libqemuutil.a(module.o).
> The reason is that library dependencies are not propagated to the .a
> files automatically.
>
> Adding a call to extract-libs to get the libraries for the two .a
> files that are used elsewhere.
>
> Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
> ---
> Makefile | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index a0092153af..b29b0eeefa 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -589,6 +589,8 @@ Makefile: $(version-obj-y)
> ######################################################################
> # Build libraries
>
> +libqemuutil.a-libs += $(call extract-libs, $(util-obj-y) $(trace-obj-y) $(stub-obj-y))
> +libvhost-user.a-libs += $(call extract-libs, $(libvhost-user-obj-y) $(util-obj-y) $(stub-obj-y))
> libqemuutil.a: $(util-obj-y) $(trace-obj-y) $(stub-obj-y)
> libvhost-user.a: $(libvhost-user-obj-y) $(util-obj-y) $(stub-obj-y)
Please see https://patchwork.kernel.org/patch/11608247/#23440227.
If this change causes all libraries from .a object files to be linked
then this patch is incomplete. The purpose of the .a file is to link
only the subset of .o files required by the program. Unused .o files in
the .a file are not linked into the program. The libraries must also be
linked as needed but this patch seems to extract them unconditionally.
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-06-30 12:24 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-26 16:27 [PATCH v2 0/3] trace: Add a trace backend for the recorder library Christophe de Dinechin
2020-06-26 16:27 ` [PATCH v2 1/3] Makefile: Compute libraries for libqemuutil.a and libvhost-user.a Christophe de Dinechin
2020-06-30 12:23 ` Stefan Hajnoczi [this message]
2020-06-26 16:27 ` [PATCH v2 2/3] trace: Add support for recorder back-end Christophe de Dinechin
2020-06-30 9:05 ` Dr. David Alan Gilbert
2020-06-30 13:28 ` Christophe de Dinechin
2020-06-30 17:46 ` Dr. David Alan Gilbert
2020-06-30 12:55 ` Stefan Hajnoczi
2020-06-30 13:02 ` Daniel P. Berrangé
2020-07-23 12:12 ` Christophe de Dinechin
2020-07-23 14:06 ` Markus Armbruster
2020-07-23 16:15 ` Christophe de Dinechin
2020-07-27 8:23 ` Markus Armbruster
2020-07-28 11:49 ` Christophe de Dinechin
2020-07-29 11:53 ` Markus Armbruster
2020-07-29 15:52 ` Christophe de Dinechin
2020-07-30 8:13 ` Markus Armbruster
2020-07-30 10:29 ` Christophe de Dinechin
2020-06-26 16:27 ` [PATCH v2 3/3] trace: Example of "centralized" recorder tracing Christophe de Dinechin
2020-06-30 12:41 ` Daniel P. Berrangé
2020-07-01 16:09 ` Stefan Hajnoczi
2020-07-01 16:15 ` Daniel P. Berrangé
2020-07-02 13:47 ` Stefan Hajnoczi
2020-07-03 10:12 ` Christophe de Dinechin
2020-07-03 13:08 ` Daniel P. Berrangé
2020-07-03 16:45 ` Christophe de Dinechin
2020-06-30 12:58 ` Stefan Hajnoczi
2020-06-26 16:34 ` [PATCH v2 0/3] trace: Add a trace backend for the recorder library no-reply
2020-06-30 12:59 ` Stefan Hajnoczi
2020-07-03 10:37 ` Christophe de Dinechin
2020-07-03 11:27 ` Daniel P. Berrangé
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=20200630122314.GD91444@stefanha-x1.localdomain \
--to=stefanha@redhat.com \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=dinechin@redhat.com \
--cc=laurent@vivier.eu \
--cc=mjt@tls.msk.ru \
--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).