[Bug c++/16507] gcc_s not found when linking 64-bit C++

ebotcazou at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Jul 13 06:53:00 GMT 2004


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-07-13 06:53 -------
> Linking C++ programs fails due to either the wrong (32-bit) libgcc_s.so.1being
> installed in the compiler's default directory

I don't think so, the linker would have complained about ELF class mismatch.

> or the linker search path not being specified correctly.

Neither, I see -L/usr/local/sparc64/lib/gcc/sparc64-sun-solaris2.9/3.4.1 and
libgcc_s.so should be there because of --enable-version-specific-runtime-libs.

> Note that default libgcc_s.so.1 is 32 bit, not 64-bit:
> % file /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.1/libgcc_s.so.1
> /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.1/libgcc_s.so.1:    ELF 32-bit MSB
> dynamic lib SPARC32PLUS Version 1, V8+ Required, UltraSPARC1 Extensions
> Required, dynamically linked, not stripped
> % file /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.1/sparcv9/libgcc_s.so.1 
> /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.1/sparcv9/libgcc_s.so.1:    ELF
> 64-bit MSB dynamic lib SPARCV9 Version 1, UltraSPARC1 Extensions Required,
> dynamically linked, not stripped

Note that you don't look at the right place.  According to your prefix
/usr/local/sparc64 and your target sparc64-sun-solaris2.9, the path should read:
% file /usr/local/sparc64/lib/gcc/sparc64-sun-solaris2.9/3.4.1/libgcc_s.so.1

This suggests that the compiler was not properly installed, or maybe not
installed at all.  Please try again to issue "gmake install".

[As a side note, specifying -mcpu=ultrasparc doesn't imply 32-bit mode.]


-- 


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



More information about the Gcc-bugs mailing list