This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: question about -static-libgcc
On Tue, Sep 19, 2006 at 11:30:40AM -0400, Kate Minola wrote:
> Ok, I say to myself, I understand this. The version of g++ that I am
> using is one that I built in my home directory and so it's libgcc_s.so.1
> is only linked if I use -static-libgcc. Whereas without -static-libgcc,
> I am linking with the system libgcc_s.so.1 that is older and for some
> reason is not working.
No. With -static-libgcc, you're linking with a static libgcc; not with
any shared (.so) version of libgcc.
> % ldd foo
>
> I get
>
> libgcc_s.so.1 => /lib64/libgcc_s.so.1
This is probably pulled in indirectly, from some other system library.
Maybe check with readelf -d if it is directly DT_NEEDED from the
executable?
--
Daniel Jacobowitz
CodeSourcery