This is the mail archive of the 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: libgcc_s : What links to it and why?

Well, here's all I can figure out from the last few hours.

I moved my special 'specs' file aside and removed any
static trickery from LDFLAGS.

-- If I build my app (Subversion, although there are others)



LDFLAGS="-L/usr/rcf/lib -R/usr/rcf/lib"

   /usr/rcf/lib/ gets linked (somewhere) even
   though I am using /afs/rcf/lang/gcc/current/bin/gcc which
   is built with --disable-shared and has only a libgcc.a of
   its own.

This is true no matter what arguments I pass to the linker.

   I say "linked" above because I have confirmed that no other
   shared library being used by my Subversion build has its
   own reference to  The build jams it in there

-- If I build my app using --with-prefix=/blah,
   does not get linked.  This, unfortunately, isn't what we
   need.  I don't recall if this was with the special specs
   file (or linker flags) in place or not.

-- The only solution I came to late tonight after toying with
   this crazyness for 3 days now is to unrelease the "bad"
   GCC from /usr/rcf on our "beta" class machines, do the new
   builds on a beta class machine, then release the new build
   (Subversion in this case) to both beta and production class

   Essentially removing /usr/rcf/lib/ from existence
   while building.

That's about all I've got.

Jeff Blaine wrote:
Ian Lance Taylor wrote:
Jeff Blaine <> writes:

I have no explanation for this behaviour.  If you run the link
using the -v option, does it pass -lgcc_s to the linker?  Is there any
chance that you somewhere have a file named  (You should
normally have libgcc.a and

subversion-1.2.0:cairo> ldd subversion/clients/cmdline/.libs/svn |
grep libgcc =>         /usr/rcf/lib/

This in itself doesn't prove that your program was linked with It may be the case that your program was linked with something which uses uses

To see whether your program was linked with, you need to
do something like "objdump -p FILE | grep NEEDED".  If you see on that list, then your program was linked with

Gotcha. It's not.

ldd, on the other hand, does the transitive closure.  That is, ldd
will print any shared library which was used by your program or by any
shared library which your program linked against, recursively.

Yes, there is a /usr/rcf/lib/ that MUST remain where it is.
I simply don't want to link to it with my *other* (production) GCC.

Actually, I was asking whether you had a file somewhere.


That would be another way to get a dependency on if -lgcc
causes the linker to find, and that file has a DT_SONAME of

I am poking around some more to see if I can make any sense out of my situation.

Thanks again for the help so far, Ian.

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