This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cc1plus-dummy linkage


On Mon, Mar 17, 2008 at 07:47:56PM -0400, Jack Howarth wrote:
> 
>    On Darwin, we have discovered that the new Xcode 3.1 in the iPhone beta SDK
> apparently exposed a linkage problem when building gcc 4.3.0. The failure we see
> with the newer darwin linker is...
> ...
> ld: duplicate symbol _init_inline_once in libbackend.a(tree-inline.o) and tree-inline.o

> If the occurance of tree-inline.o is removed from the link line above, the linakge succeeds.
> Why does gcc link in tree-inline.o a second time for cc1plus-dummy when it already exists
> in libbackend.a? Is this an error in the gcc Makefiles?

Actually, I don't understand how this error could be produced.  If
tree-inline.o is specified on the command line, and also exists in
libbackend.a, then shouldn't the occurrence in libbackend.a just be
ignored?  Static libraries are only searched to satisfy undefined
symbols, and all symbols defined in tree-inline.o should already be
satisfied.

But maybe Darwin's linker works differently than standard Unix-style
linkers?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]