From: Eric Blake <eblake@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, Thomas Huth <thuth@redhat.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] configure: Add a proper check for openpty() in libutil
Date: Thu, 17 Jan 2019 12:15:17 -0600 [thread overview]
Message-ID: <01f7a34e-878c-8bc4-6fca-ac6d24519784@redhat.com> (raw)
In-Reply-To: <CAFEAcA_TSSCUGXO-ze6QBfZsiddszywBCMgrX=kYjORwJsrdbA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1530 bytes --]
On 1/17/19 12:07 PM, Peter Maydell wrote:
> On Thu, 17 Jan 2019 at 17:14, Thomas Huth <thuth@redhat.com> wrote:
>>
>> On Linux (and maybe some BSDs), we require libutil for the openpty()
>> function. However, this library is not available on some other systems, so
>> we currently use a fragile if-statement in the configure script to check
>> whether we need the library or not. Unfortunately, we also hard-coded a
>> "-lutil" in the tests/Makefile.include file, so this breaks the build on
>> Solaris, for example (see buglink below). To fix the issue, add the "-lutil"
>> to "libs_tools" in the configure script instead, then this gets properly
>> propagated to the tests, too.
>
> It also gets propagated to every tool binary we build even if
> it doesn't use openpty(), but I guess that's not a big deal.
Statically linking against libraries only pulls in symbols that the
library provides but which have not been satisfied earlier in the link
line. For programs which do not use openpty(), and where no other
unsatisfied symbols remain which -lutil would satisfy in a shadowing
effect on symbols normally provided by remaining libraries on the
command line, then yeah, it shouldn't change the compiled size of those
binaries. Dynamic linking might change the binary slightly because of
tracking that the library was linked, but again the behavior shouldn't
change.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2019-01-17 18:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-17 17:14 [Qemu-devel] [PATCH] configure: Add a proper check for openpty() in libutil Thomas Huth
2019-01-17 17:34 ` Philippe Mathieu-Daudé
2019-01-17 17:39 ` Eric Blake
2019-01-17 17:53 ` Paolo Bonzini
2019-01-17 18:07 ` Peter Maydell
2019-01-17 18:15 ` Eric Blake [this message]
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=01f7a34e-878c-8bc4-6fca-ac6d24519784@redhat.com \
--to=eblake@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.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).