qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 5/5] Convert single line fprintf() to warn_re


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2 5/5] Convert single line fprintf() to warn_report()
Date: Thu, 17 Aug 2017 16:35:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 15/08/2017 09:30, Markus Armbruster wrote:
> The stupid fix is to repeat libraries until the link succeeds:
> 
>     test-util-obj-y = libqemuutil.a libqemustub.a libqemuutil.a
> 
> You may have seen this with -lX11 if you're old enough.
> 
> ld(1) suggests the linker can do it for us:
> 
>     -( archives -)
>     --start-group archives --end-group
>         The archives should be a list of archive files.  They may be either
>         explicit file names, or -l options.
> 
>         The specified archives are searched repeatedly until no new
>         undefined references are created.  Normally, an archive is searched
>         only once in the order that it is specified on the command line.
>         If a symbol in that archive is needed to resolve an undefined
>         symbol referred to by an object in an archive that appears later on
>         the command line, the linker would not be able to resolve that
>         reference.  By grouping the archives, they all be searched
>         repeatedly until all possible references are resolved.
> 
>         Using this option has a significant performance cost.  It is best
>         to use it only when there are unavoidable circular references
>         between two or more archives.
> 
> Sticking '-Wp,-(' and '-Wp,-)' into the command line I get from make V=1
> doesn't work for me, though.
> 
> The smart solution is not to have .a reference each other.

Nah, I think we should teach those new kids on the block about -lX11
instead. :)

> Paolo, what do you think?

Another possibility is to just merge the two static libraries into one.

Paolo



reply via email to

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