From: Peter Maydell <peter.maydell@linaro.org>
To: Wei Liu <wei.liu2@citrix.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
QEMU Developers <qemu-devel@nongnu.org>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [Qemu-devel] [PATCH RFC] Makefile.target: prepend $libs_softmmu to $LIBS
Date: Tue, 10 Mar 2015 00:11:44 +0900 [thread overview]
Message-ID: <CAFEAcA8smAuY8m5b+CnJoFDBx352FLHnVT+NbUkbCkSPLuYW1w@mail.gmail.com> (raw)
In-Reply-To: <1425912873-21215-1-git-send-email-wei.liu2@citrix.com>
On 9 March 2015 at 23:54, Wei Liu <wei.liu2@citrix.com> wrote:
> I discovered a problem when trying to build QEMU statically with gcc.
> libm is an element of LIBS while libpixman-1 is an element in
> libs_softmmu. Libpixman references functions in libm, so the original
> ordering makes linking fail.
>
> This fix is to reorder $libs_softmmu and $LIBS to make -lm appear after
> -lpixman-1. However I'm not quite sure if this is the right fix, hence
> the RFC tag.
>
> Normally QEMU is built with c++ compiler which happens to link in libm
> (at least this is the case with g++), so building QEMU statically
> normally just works and nobody notices this issue.
Actually I think nobody notices it because they don't statically
link the softmmu executables. Static linking is really intended
for the linux-user executables.
Maybe we should actively stop configure allowing a static build
of the softmmu and tools binaries, rather than having configs which
nobody really tests? Or is there a genuine use case for them?
thanks
-- PMM
next prev parent reply other threads:[~2015-03-09 15:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-09 14:54 [Qemu-devel] [PATCH RFC] Makefile.target: prepend $libs_softmmu to $LIBS Wei Liu
2015-03-09 15:11 ` Peter Maydell [this message]
2015-03-09 15:23 ` Wei Liu
2015-03-09 16:01 ` Stefano Stabellini
2015-03-09 16:36 ` Peter Maydell
2015-03-09 16:49 ` Wei Liu
2015-03-09 16:13 ` Paolo Bonzini
2015-03-10 10:16 ` Paolo Bonzini
2015-03-10 11:57 ` Wei Liu
2015-03-10 12:00 ` Paolo Bonzini
2015-03-10 12:02 ` Wei Liu
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=CAFEAcA8smAuY8m5b+CnJoFDBx352FLHnVT+NbUkbCkSPLuYW1w@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
/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).