How do I set up GCC for cross compiling for the ARM processor? The host would be on x86_64 ( AMD64 – Ubuntu 12.04 ) and the target would be ARM (Raspberry Pi as well as Pandaboard – will do separate compilations for each)?
Ubuntu – How to cross compile for ARM
armcompilinggccraspberrypi
Best Answer
Install
gcc-arm-linux-gnueabi
andbinutils-arm-linux-gnueabi
packages, and then just usearm-linux-gnueabi-gcc
instead ofgcc
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:
This brings in the complete cross-compile environment, including binutils.
For using this GCC in the build process write: