This is the mail archive of the gcc@gcc.gnu.org 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]

GCC 3.1 -- Sparc64 Solaris 8 and C++


I compiled GCC 3.1 on Solaris 8 using GCC 2.95.3
and the Solaris 8 default as and ld, not GNU binutils.

Apparently a 64bit version of libstdc++ and libgcc_s
were not created at build time, so when I have a test
program:

#include <stdio.h>
int main() { printf("hello world!\n"); return(0); }

and force the C++ compiler to compile it (yes I know
it's C code) in 64bit:

g++ -m64 -o test test.c

I get this when I run it:

# ./test
ld.so.1: ./test: fatal: /usr/local/gcc/lib/libstdc++.so.4: wrong ELF 
class: ELFCLASS32
Killed

Which makes sense because it linked against the 32bit version since
that was all that was built by a  make bootstrap

ldd shows this as well:

# ldd test
         libstdc++.so.4 =>        /usr/local/gcc/lib/libstdc++.so.4  - 
wrong ELF class: ELFCLASS32
         libm.so.1 =>     /usr/lib/64/libm.so.1
         libgcc_s.so.1 =>         /usr/local/gcc/lib/libgcc_s.so.1  - 
wrong ELF class: ELFCLASS32
         libc.so.1 =>     /usr/lib/64/libc.so.1
         libdl.so.1 =>    /usr/lib/64/libdl.so.1
         /usr/platform/SUNW,UltraAX-i2/lib/sparcv9/libc_psr.so.1


Is there a way to make sure the 64bit versions of libstdc++ and
libgcc_s are built by default ??

Thanks!

-----------------------------
Brad House
Sr. Developer
Main Street Softworks, Inc.

brad@mainstreetsoftworks.com
(352) 378-8228
-----------------------------


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