[ale] Cross Compiling woes

chrisf at computone.com chrisf at computone.com
Fri Dec 29 23:12:21 EST 2000


Help,

I'm have a tiny linux distribution with no development kit and I'm tryin to create on for it.  I 
figured the best way was to cross compile gcc.

Target Machine:  ld-linux.so.1 libc.so.5
Host Machine: ld-linux.so.2 libc.so.6

Here are the commands I do in order

mkdir -p /usr/target/lib
mkdir -p /usr/target/bin
mkdir -p /usr/target/include

cp -dpR /target/lib/* /usr/target/lib (this is where all files sit including  ld-linux.so.1 and libc.so.5)
cp -dpR /usr/include/* /usr/target/include/. (the disti has no includes)

cd binutils-2.7.x/
./configure --target=target
make && make install

All the correct files are in /usr/target/bin.  But they are dynamically linked to /lib/libc.so.6 and /lib/ld-linux.so.2.
Should they not be linked with /usr/target/lib/libc.so.5 and ld-linux.so.1 ?
Should they be static?  Did I miss a step?

cd gcc-2.8.1
./configure --target=target
make && make install

I needed a libgcc1.a so I built it statically.  Was that wrong?

Same problem.  gcc seems to be linked with /lib.  When I copy this whole directory including /usr/lib/gcc-lib/target
to the target machine the excutables do not run because of the lack of those libraries.
I'm assuming I missed a step.

Lets assume I have a 2.2.16 kernel that boots to a small disti with only /lib/libc.so.5 and /lib/ld-linux.so.1 and maybe a few 
more.  Hoe can I build a dev kit for these files?  

Thanks,
Chris Fowler


--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list