[haiku-bugs] Re: [Haiku] #8031: new gcc indirect linking policy changes cause build failures / missing symbols.

  • From: "mmlr" <trac@xxxxxxxxxxxx>
  • Date: Tue, 18 Oct 2011 18:17:26 -0000

#8031: new gcc indirect linking policy changes cause build failures / missing
symbols.
----------------------------+----------------------------
   Reporter:  kallisti5     |      Owner:  bonefish
       Type:  bug           |     Status:  new
   Priority:  high          |  Milestone:  R1/beta1
  Component:  Build System  |    Version:  R1/Development
 Resolution:                |   Keywords:
 Blocked By:                |   Blocking:
Has a Patch:  0             |   Platform:  All
----------------------------+----------------------------

Comment (by mmlr):

 Replying to [comment:10 bonefish]:
 > What apparently seems to be the problem is that the linker (...) even
 requires the libraries to be listed in dependency order. That I would
 consider a bug or at least a seriously missing feature.

 It's by design. The second link has it in there:
 {{{
 Also in Natty, ld runs with the --as-needed option enabled by default.
 ...
 The --as-needed option also makes the linker sensitive to the
 ordering of libraries on the command-line. You may need to
 move some libraries later in the command-line, so they come
 after other libraries or files that require symbols from them.
 }}}

 Basically --as-needed links in only actually required libraries. Since
 that lookup obviously only goes in one direction it's pretty much the same
 as for static libraries now.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/8031#comment:12>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: