From: Ian Campbell <Ian.Campbell@citrix.com>
To: Olaf Hering <olaf@aepfle.de>
Cc: Wei Liu <wei.liu2@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH] tools/xenstore: fix link error with libsystemd
Date: Fri, 5 Dec 2014 10:53:03 +0000 [thread overview]
Message-ID: <1417776783.22808.55.camel@citrix.com> (raw)
In-Reply-To: <1417776587-26018-1-git-send-email-olaf@aepfle.de>
On Fri, 2014-12-05 at 11:49 +0100, Olaf Hering wrote:
> Linking fails with undefined reference to the used systemd functions.
> Move LDFLAGS after the object files to fix the failure.
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
This should go into 4.5.
FWIW my suspicion is that this relates to toolstacks using --as-needed
by default.
> Cc: Wei Liu <wei.liu2@citrix.com>
> ---
> tools/xenstore/Makefile | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile
> index bff9b25..11b6a06 100644
> --- a/tools/xenstore/Makefile
> +++ b/tools/xenstore/Makefile
> @@ -74,10 +74,10 @@ endif
> init-xenstore-domain.o: CFLAGS += $(CFLAGS_libxenguest)
>
> init-xenstore-domain: init-xenstore-domain.o $(LIBXENSTORE)
> - $(CC) $(LDFLAGS) $^ $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) -o $@ $(APPEND_LDFLAGS)
> + $(CC) $^ $(LDFLAGS) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) -o $@ $(APPEND_LDFLAGS)
>
> xenstored: $(XENSTORED_OBJS)
> - $(CC) $(LDFLAGS) $^ $(LDLIBS_libxenctrl) $(SOCKET_LIBS) -o $@ $(APPEND_LDFLAGS)
> + $(CC) $^ $(LDFLAGS) $(LDLIBS_libxenctrl) $(SOCKET_LIBS) -o $@ $(APPEND_LDFLAGS)
>
> xenstored.a: $(XENSTORED_OBJS)
> $(AR) cr $@ $^
> @@ -86,13 +86,13 @@ $(CLIENTS): xenstore
> ln -f xenstore $@
>
> xenstore: xenstore_client.o $(LIBXENSTORE)
> - $(CC) $(LDFLAGS) $< $(LDLIBS_libxenstore) $(SOCKET_LIBS) -o $@ $(APPEND_LDFLAGS)
> + $(CC) $< $(LDFLAGS) $(LDLIBS_libxenstore) $(SOCKET_LIBS) -o $@ $(APPEND_LDFLAGS)
>
> xenstore-control: xenstore_control.o $(LIBXENSTORE)
> - $(CC) $(LDFLAGS) $< $(LDLIBS_libxenstore) $(SOCKET_LIBS) -o $@ $(APPEND_LDFLAGS)
> + $(CC) $< $(LDFLAGS) $(LDLIBS_libxenstore) $(SOCKET_LIBS) -o $@ $(APPEND_LDFLAGS)
>
> xs_tdb_dump: xs_tdb_dump.o utils.o tdb.o talloc.o
> - $(CC) $(LDFLAGS) $^ -o $@ $(APPEND_LDFLAGS)
> + $(CC) $^ $(LDFLAGS) -o $@ $(APPEND_LDFLAGS)
>
> libxenstore.so: libxenstore.so.$(MAJOR)
> ln -sf $< $@
next prev parent reply other threads:[~2014-12-05 10:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-05 10:49 [PATCH] tools/xenstore: fix link error with libsystemd Olaf Hering
2014-12-05 10:53 ` Ian Campbell [this message]
2014-12-05 17:19 ` Konrad Rzeszutek Wilk
2014-12-09 15:06 ` Ian Campbell
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=1417776783.22808.55.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=olaf@aepfle.de \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.