Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

How do I set up GCC for cross compiling for the ARM processor? The host would be on x68 ( AMD64 - Ubuntu 12.04 ) and the target would be ARM ( Raspberry Pi as well as Pandaboard - will do separate compilations for each )?

share|improve this question

1 Answer 1

Install gcc-arm-linux-gnueabi and binutils-arm-linux-gnueabi packages, and then just use arm-linux-gnueabi-gcc instead of gcc for compilation.

You need to be careful on what flavour of linux and binutils you have on your target system. The newest stuff is hardfloat, in this case you would do:

sudo apt-get install gcc-arm-linux-gnueabihf

This brings in the complete cross-compile environment, including binutils.

share|improve this answer
On Ubuntu 13.10 you get gcc-4.7 for 'gnueabi' and gcc-4.8 for 'gnueabihf'. – nobar Feb 23 '14 at 23:34
when I tried to compile I got openssl/ossl_typ.h not found error though I already installed libssl-dev. – neckTwi Sep 10 '14 at 18:36
If you get source code from apt-get source, after apt-get build-dep you can normally just compile with dpkg-buildpackage -b -uc -us -r Is there a way to build a .deb this easily for ARM without changing the makefile? – Jonathan Leaders Dec 28 '14 at 4:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.