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

usr/local/linaro/arm-linux-gnueabihf



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

/usr/local/linaro/arm-linux-gnueabihf/bin

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


4 comments:

  1. this is misleading. u cant just execute linux binary in macos. and i doubt what ure meaning by "install" that is only a binary tar

    ReplyDelete
  2. Thanks for such a great article here. I was searching for something like this for quite a long time and at last I’ve found it on your blog. It was definitely interesting for me to read about their market situation nowadays. Well written article Thank You for Sharing with Us pmp training in chennai | pmp training institute in chennai | pmp training centers in chennai| pmp training in velachery | pmp training near me | pmp training courses online

    ReplyDelete
  3. I really love the theme/design of your website. Do you ever run into any browser compatibility problems? A small number of my blog audience have complained about my site not working correctly in Explorer but looks great in Safari. Do you have any ideas to help fix this problem?

    apple iphone service center in chennai | apple ipad service center in chennai | apple iphone service center in chennai

    ReplyDelete