cross compiling for 486

This is a beginner question. I have pc-104 with a 486 cpu and a linux kernel 2.6.7 (preinstalled), no gcc compiler. How do I cross compile from another linux machine? It is not really cross compiling, because the two cpus are compatible, but for example how do I know what version of libraries should I link and how to do that? I understand that this is a general question, so if you want to redirect me to some link with documentation I would be happy with that. thank you.

Reply to
bwv539
Loading thread data ...

Try the -m option of your gcc compiler. And read the manual about it.

Reply to
wimpunk

maybe use -nodefaultlibs (I hope I got that right, might be some similar gcc option), and link with which ever libraries you want

formatting link

Reply to
anon

Nack. If your host using a Pentium X CPU and your target is i486 you also

*must* cross compile. You must avoid *any* leaking from your host into your target. This is only possible with a real cross compiler, that also uses a standard C library compiled for your *target* CPU. Otherwise parts of your host libraries find their way into your target and resulting into "illegal opcode" on your old 486 system.

Using compiler switches like "-march=i486" may help. But its a hard job to find all locations where you have to add this switch into all relevant makefiles (if you are want to compile other software packages from internet). It might be possible with your own source code. But at least using the standard C library will be a problem. You can't link them statically, as this will use your host's library. And for dynamic linking you need your target's development libraries.

Drop me a note. Maybe our toolchain builder can help you.

Juergen

Reply to
Juergen Beisert

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.