This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
cross compile issue?
- From: Federic Zhang <Federic dot Zhang at Sun dot COM>
- To: libc-alpha at sources dot redhat dot com
- Date: Tue, 15 Apr 2003 11:33:20 +0800
- Subject: cross compile issue?
- Organization: CATS
Hi,
I am new to glibc and just have a question regarding glibc-2.3.2.
I tried to debug the glibc, so need to build the glibc by myself.
After build glibc-2.3.2 successfully and make install the libs into
/usr/local/cross dir, but I didn't know what's correct way to tell ld
use
the alternative library, i did as below.
#edit /etc/ld.so.conf by adding one line "/usr/local/cross/lib"
#ln -f /usr/local/cross/lib/ld-2.3.2.so /lib/ld-linux.so.2
#ldconfig -v
With ldd, i can know the shared libc.so.6 and ld-linux.so.2 in C program
are the ones in /usr/local/cross/lib as expected, and i can debug into
the libc.
But the question is the program result is totally wrong. for example,
i tried to print the code set of current locale with nl_langinfo(), it
is
the "ANSI_X3.4-1968" string returned.
Is it cross compiler issue? i tried it on redhat 8.0 and SuSE 8.2, which
are with glibc-2.2.93/gcc 3.2 and glibc-2.3.2/gcc 3.3 installed
respectively,
do i need compile one cross compile at first? i think the target is same
as host.
Appreciated for any help.
-federic