How to cross-compile programs for the Raspberry Pi with gcc?

Posted by InkBlend on Ask Ubuntu See other posts from Ask Ubuntu or by InkBlend
Published on 2012-11-16T18:18:48Z Indexed on 2012/11/26 5:20 UTC
Read the original article Hit count: 205

I am fond of using gcc to compile small little C and C++ programs on my main computer. However, I also have a Raspberry Pi, and, being a 700-MHz single-core computer, I would prefer to not have to do my development work on it every time I want to create a binary for it. How (for I know that there's a way) do I cross-compile my program for the Raspberry Pi using my x86 laptop? And is there a way that I may compile C(++) programs on the Pi but produce an x86 binary? If it's any help, "The SoC is a Broadcom BCM2835. This contains an ARM1176JZFS, with floating point..." (according to the official Raspberry Pi FAQ).

© Ask Ubuntu or respective owner

Related posts about gcc

Related posts about cross-compilation