This is the mail archive of the
mailing list for the GCC project.
Re: cc1plus-dummy linkage
- From: Joe Buck <Joe dot Buck at synopsys dot COM>
- To: Jack Howarth <howarth at bromo dot msbb dot uc dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 17 Mar 2008 16:54:59 -0700
- Subject: Re: cc1plus-dummy linkage
- References: <20080317234756.GA14749@bromo.msbb.uc.edu>
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
But maybe Darwin's linker works differently than standard Unix-style