Thursday, 24 March 2016

Install Linaro cross-compiler on Mac OS X

If you need a cross-compiler for Mac OS X, you have two possibilities:
  1. Install crosstool-ng and configure it
  2. Download a preconfigured cross-compiler, as Linaro.
The fastest way is to choose the second option.

First, you have to download Linaro tool from the official site, going to the section ''Linaro Toolchain'' and selecting the pre-built binary you want.

We get the linaro-toolchain-binaries(little-endian) for Linux.

After installing the toolchain, you can find all that you need in


Now, to add the installation folder to the PATH environmental variable, you have to pick


and add it as shown in our guide.

Now you can start to compile. For example, if you have a file named test.c you have to type in a shell:

arm-linux-gnueabihf-gcc -Wall -Wextra -c test.c