Difference between revisions of "HIP:TS-7000:cross-compiling"

From Earlham CS Department
Jump to navigation Jump to search
(download, setup, and prepare the toolchain)
(download, setup, and prepare the toolchain)
Line 30: Line 30:
  
 
Next, set your path to the gcc that's included in the toolchain, this can be done in either your bash profile or .bashrc.
 
Next, set your path to the gcc that's included in the toolchain, this can be done in either your bash profile or .bashrc.
 +
 +
=download, setup, and prepare the toolchain=

Revision as of 15:50, 20 May 2008

about

This page describes the creation and usage of a toolchain for cross-compiling from a native linux environment to an ARM environment.

Building rdate to run in Technologic System's TS-Linux for ARM is used as an example, but the steps should be applicable to any application.

download, setup, and prepare the toolchain

You can download the cross-compilation toolchain from:

http://www.embeddedarm.com/software/software-arm-linux.php

The various toolchains are near the bottom of the page. Make sure to download the toolchain with the glibc that matches the glibc of whatever environment you want to compile to.

You can find out what verison of glibc is on your computer by running either:

"rpm -q glibc" for Redhat RPM based systems, or:

"ls -al /lib/libc*" for other systems.

Then use tar to unpack the toolchain. Depending on the type of file, you may need to use different commands to unpack it:

"tar -xvvf foo.tar"

"tar -xvzf foo.tar.gz"

"tar --use-compress-program bzip2 -xvf foo.tar.bz2"

The toolchain will come ready to use. Make sure you haven't unpacked it into your home directory, as the configure scripts expect files to be in a specific location, and if the tools are in locations above or below that due to being in a local directory, it will cause errors.

Next, set your path to the gcc that's included in the toolchain, this can be done in either your bash profile or .bashrc.

download, setup, and prepare the toolchain