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

[1] Download and unpackwget http://kegel.com/crosstool/crosstool-0.43.tar.gztar -xzvf crosstool-0.43.tar.gzcd crosstool-0.43

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

[3] Static Link : edit crosstool.sh like this http://sources.redhat.com/ml/crossgcc/2005-07/msg00153.html

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

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

Leave a Reply

Your email address will not be published. Required fields are marked *