cross compiling for 486

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
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.


Re: cross compiling for 486
Quoted text here. Click to load it
Try the -m option of your gcc compiler.  And read the manual about it.

Re: cross compiling for 486
Quoted text here. Click to load it

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

Quoted text here. Click to load it

http://cross-lfs.org/view/clfs-sysroot/arm/index.html

Re: cross compiling for 486
Quoted text here. Click to load it

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.

Quoted text here. Click to load it

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

Juergen

Site Timeline