Here are the details of the lib of the embedded system : ls -ls /lib : -rwxr-xr-x 1 root root 94543 Apr 25 2007 ld-2.2.4.so lrwxrwxrwx 1 root root 11 Nov 9 2007 ld-linux.so.2 -> ld-2.2.4.so -rwxr-xr-x 1 root root 1384168 Apr 25 2007 libc-2.2.4.so lrwxrwxrwx 1 root root 13 Nov 9 2007 libc.so.6 -> libc-2.2.4.so -rwxr-xr-x 1 root root 22388 Apr 25 2007 libcrypt-2.2.so lrwxrwxrwx 1 root root 15 Nov 9 2007 libcrypt.so.1 -> libcrypt-2.2.so -rwxr-xr-x 1 root root 14653 Apr 25 2007 libdl.so.2 -rwxr-xr-x 1 root root 187118 Apr 25 2007 libm.so.6 lrwxrwxrwx 1 root root 28 Jan 1 00:00 libnsl.so.1 -> /mnt/AgentServer/libnsl.so.1 -rwxr-xr-x 1 root root 37248 Apr 25 2007 libnss_files-2.2.so lrwxrwxrwx 1 root root 19 Nov 9 2007 libnss_files.so.2 -> libnss_files-2.2.so -rwxr-xr-x 1 root root 106843 Apr 25 2007 libpthread.so.0 lrwxrwxrwx 1 root root 31 Jan 1 00:00 libresolv.so.2 -> /mnt/AgentServer/libresolv.so.2 -rwxr-xr-x 1 root root 36672 Apr 25 2007 librt.so.1 -rw-r--r-- 1 root root 619093 Apr 25 2007 libtcl8.3.so -rwxr-xr-x 1 root root 8476 Apr 25 2007 libutil-2.2.so lrwxrwxrwx 1 root root 14 Nov 9 2007 libutil.so.1 -> libutil-2.2.so drwxr-xr-x 2 root root 416 Nov 23 2004 modules I can copy all these libs on my computer, but then how to specify to gcc to use this directory for shared lib instead of /lib ? And will this solve my problem ? (which is: rebuild an program on a new linux so that it will run on the embedded system,where there is no compiler) On Fri, Jan 21, 2011 at 4:33 PM, Ian Lance Taylor <iant@xxxxxxxxxx> wrote: > Jacques Greindl <jgreindl@xxxxxxxxx> writes: > >> The older system is an embedded one --> no compiler on it (run on 2mb >> flash mem). >> I build this one a few years ago with an old linux desktop. And I >> don't have it anymore. But I have to make an upgrade for the embedded >> system... > > You could recreate the old GNU/Linux system. Old GNU/Linux distros are > easy to find on the web. > > >> So I have to : >> 1- find the glibc version of my embedded system >> 2- install this version on my actual system without erasing my actual one (how?) >> 3- compile my sources with gcc and a parameter to specify this version (how?) > > Building glibc is nontrivial. But the basic idea is to build and > install glibc with a specific --prefix option, and use that directory as > a --with-sysroot option when building GNU binutils and gcc. > > Ian >