Cross Compiler – How to

For those who want to test your program on different architectures. For example, you are having i386 but want to compile and execute on alpha, arm, i686, mips and so on. Most of the crosstool available on the internet are out of dated. Here is easy setup for cross compiler.

I am running Fedora on my virtual machine and I am using the tool from

[1] Download and unpackwget -xzvf crosstool-0.43.tar.gzcd crosstool-0.43

[2] No TLS: edit the unrem eval ‘cat alpha.dat gcc-4.1.0-glibc-2.3.5.dat’ sh –notest

[3] Static Link : edit like this

[4] As root:mkdir /opt/crosstoolchown $USER /opt/crosstool

[5] sh [6]Running GCC: edit you $PATH or compile from /opt/croostool/….