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

Re: qmake, --as-needed and pokerth FTBFS



  Hello

On Dec 12, 2007 12:08 PM, Evgeni Golov <sargentd@die-welt.net> wrote:
> On Wed, 12 Dec 2007 11:20:59 +0100 Evgeni Golov wrote:
>
> > Could someone, who knows the magic behind --as-needed, have a look at
> > the source and tell me how to fix that? Upstream is interested in
> > fixing, but does not have a clue how :(
>
> It is more magic as I thought, as the attached patch fixes it.
> However, I do not understand WHY :(

  I'm not sure I fully understand the problem, but here is what I
think it might be. From ld(1), the -l option:

           The  linker  will search an archive only once, at the
location where it is specified on the com‐
           mand line.  If the archive defines a symbol which was
undefined in some  object  which  appeared
           before the archive on the command line, the linker will
include the appropriate file(s) from the
           archive.  However, an undefined symbol in an object
appearing later on the command line will not
           cause the linker to search the archive again.

The order of the -l options is important, as the addition of
--as-needed probably removes symbols which were necessary to another
library (or source ?) added after the pokerth_lib, and only found at
run-time.

  This is how I understand this.

  Cheers,

      Vincent

Reply to: