qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] configure: Add a proper check for openpty() in


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] configure: Add a proper check for openpty() in libutil
Date: Thu, 17 Jan 2019 12:15:17 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

On 1/17/19 12:07 PM, Peter Maydell wrote:
> On Thu, 17 Jan 2019 at 17:14, Thomas Huth <address@hidden> 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: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]