This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: MIPS cross compile libstdc++ issue?


>        Hey folks, I'm trying to do a cross toolchain for mips-linux
>from a i686-linux box.  I've been able to get gcc and g++ to compile
>successfully, but whenever I try to compile C++ programs, I get a bunch
>of errors thrown at me:

I suppose this is a host-x-host cross? You might include your configuration.

>magamo@trianna:~/CStuff/src$ mips-linux-g++ helloworld.cpp -o
>helloworld
>/usr/lib/gcc-lib/mips-linux/3.2/../../../../mips-linux/lib/libstdc++.so:
>undefined reference to `__ctype_b'
>/usr/lib/gcc-lib/mips-linux/3.2/../../../../mips-linux/lib/libstdc++.so:
>undefined reference to `__ctype_toupper'
>/usr/lib/gcc-lib/mips-linux/3.2/../../../../mips-linux/lib/libstdc++.so:
>undefined reference to `__ctype_tolower'
>collect2: ld returned 1 exit status

This indicates that your mips-linux-g++ cross compiler is using the
gnu-linux configuration files, which should be correct.

For the symbols you are missing, I'd look in libc, not libstdc++. They
should be resolved by libc.so.

That being said, I do not see these unresolved symbols in x86/linux's
shared binary.

%nm libstdc++.so.5.0.1 | grep __ctype_b
         U __ctype_b_loc@@GLIBC_2.3

%nm libstdc++.so.5.0.1 | grep tolower
0003d9a0 T _ZNKSt5ctypeIcE10do_tolowerEc
0003d9c0 T _ZNKSt5ctypeIcE10do_tolowerEPcPKc
00088b40 T _ZNKSt5ctypeIwE10do_tolowerEPwPKw
00088b10 T _ZNKSt5ctypeIwE10do_tolowerEw

So, I don't know where these references are coming from. You may want to
start there.

-benjamin


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