------- Comment #2 from simon at pushface dot org  2010-01-06 22:35 -------
This is a duplicate of bootstrap/41180, see comment #8. It's an Xcode 3.2
linker bug, (radar 6320843) "duplicate symbols from static libraries not
properly ignored".

Fixes in 41180 were like my fix suggestion, which works OK on 4.4 but
completely breaks ada/4.5.0. 

The problem as I see it is that the build ends up with
* a full set of rts objects in gcc/ada/rts
* gcc/ada/rts/libgnat.a
* a random subset of rts objects in gcc/ada
* a random subset of rts objects in gcc/ada/tools
so when we try to build eg gnatcmd, running in gcc/ada/tools, gnatbind calls up
(as well as local objects)
* the required rts objects in gcc/ada/tools
* the remaining rts objects in gcc/ada/rts
* -lgnat
and the gnatlink invocation adds ../rts/libgnat.a for no particular reason I
can see.

The Apple bug is triggered when ld sees more than one copy of the same object
file; typically one of the rts objects listed above, but even from seeing two
copies of libgnat.a. We could avoid this by eliminating all the rts objects (.o
files) and by not adding ../rts/libgnat.a in the gnatlink commands

As Jack said in 41180, this is an Apple bug and needs to be fixed by Apple.


-- 

simon at pushface dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |build


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42554

Reply via email to