[adtools] Re: libgcc.so, libstdc++.so, and other strangeness

  • From: Sebastian Bauer <mail@xxxxxxxxxxxxxxxxxxx>
  • To: adtools@xxxxxxxxxxxxx
  • Date: Thu, 22 Jul 2010 08:07:11 +0200

Trevor Scroggins <trevor.scroggins@xxxxxxxxx> schrieb:

> Hi,
> 
> On Wed, Jul 21, 2010 at 7:46 AM, Sebastian Bauer
> <mail@xxxxxxxxxxxxxxxxxxx> wrote:
> >
> > Could you show the log file?
> >
> > Here, the libstdc++.so is not linked against libgcc or libc at all
(neither
> > static nor shared).
> 
> Back in 2008, Jens Langner posed the same question [1]: "Now the
> question is why isn't it linked against libgcc.so instead? I guess
> probably due to the name clashing of libgcc.so and libgcc.a when
> usinging '-lgcc'?" If anyone answered, it was outside the list. The
> problem, if it is one, is that ppc-amigaos-ld's -dy option is not
> enabled by default, so although we have GNU LD, we don't have default
> GNU LD behavior. Without -dy, the linker doesn't prefer shared
> libraries over static libraries. In fact (in my case), it doesn't find
> shared libraries at all without -dy.

Well, for the case of libstdc++.so the final link line (the one invoking xgcc)
for producing libstdc++.so doesn't contain -lgcc and -lc (the invoked collect2
command neither you can see that if you add the verbose option). However, it
contains -nostdlib. If I add to the xgcc line -lgcc and -lc I get the
DT_NEEDED tags in the produced .so file as desired. Apart from that the
produced binaries don't differ substantially (the .so with DT_NEEDED tags is
some bytes larger). That's why it would be interesting to see the output of
your build as well as you say that libstdc++.so is linked against libgcc.a and
this is may be due to a name clash, which is not the case here.

Bye,
Sebastian


-- 
______________________________________________________________________________
Amiga Development tools ML - //www.freelists.org/list/adtools
Homepage...................: http://www.sourceforge.net/projects/adtools
Listserver help............: mailto:adtools-request@xxxxxxxxxxxxx?Subject=HELP

Other related posts: