[uClibc]How to use uCLibc in a cross compile environement.

Thierry De Corte tdecorte at wavesat.com
Wed Apr 23 14:41:31 UTC 2003


Hi all,

    I'm working on a powerpc embeded target using a x86 host for
development. My target use nfs to mount the root filesystem from my host
/opt/mytarget directory.

I just crosscompiled/installed uClibc0.9.19 to /usr/powerpc-linux-uclibc/...
for the host part and I installed the target part to /opt/mytarget/...

My problem is: if I compile a program using my host, the dynamic link to
uclibc will point to:
    libc.so.0 -> /usr/powerpc-linux-uclibc/lib/libc.so.0
If I try to execute the program from my target (which is nfsroot mounted to
/opt/mytarget), of course /usr/powerpc-linux/uclibc/ doesn't exist so I have
a unresolved symbol for libc. I don't want to copy
/usr/powerpc-linux-uclibc/lib to my host /lib... so how can I make it work?

Another related question: How does uclibc-gcc wrapper knows the path to it's
uclibc library? Is it hard coded at compile time?

Thanks

Thierry




More information about the uClibc mailing list