cross compiling for 486 - Embedded

This is a discussion on cross compiling for 486 - Embedded ; 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 ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: cross compiling for 486

  1. 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.


  2. Re: cross compiling for 486

    bwv539 wrote:
    > 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.
    >

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

  3. Re: cross compiling for 486

    bwv539 wrote:
    > 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?


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

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


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

  4. Re: cross compiling for 486

    bwv539 wrote:
    > 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?


    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.

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


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

    Juergen

+ Reply to Thread