[uClibc]Confusion about paths

Tobias Anderberg tobias.anderberg at axis.com
Fri Nov 29 00:51:14 UTC 2002


(Sorry if this arrives two times, I may have messed up the first one..)

Pedro Sanchez <psanchez at nortelnetworks.com> writes:

> 1. I succesfully generated the cross compiler using the gcc-3.2.1 tool
> chain (with some mod's). The tool chain was installed in /opt/uclibc
> (TARGET_PATH=/opt/uclibc). This means that if I cross compile my apps,
> and get them loaded into my target board, they will look for the
> libraries to be living in /opt/uclibc/lib, correct?

No. The linker doesn't include absolute path's in the binaries.
 
> 2. But, I want to compile my apps (i.e., busybox) so that they look for
> libraries in the standard directories (/lib, /usr/lib) when running in
> my target board. How do I do this?

Compile as usual using the toolchain for powerpc. It's up to the
dynamic linker (ld.so) to find the needed libraries, which it
searches for in some pre-defined directories, /lib is one of
them. You can alter that search path with LD_LIBRARY_PATH.

Depending on how the toolchain works, you may need to alter the
path for the dynamic linker which is stored as an absolute path
in the binaries. You do this by passing the -Wl,dynamic-linker=
to gcc.

Please refer to
http://www.caldera.com/developers/gabi/latest/contents.html
for more information.

-- 
Tobias Anderberg
Axis Communications AB




More information about the uClibc mailing list