I have a large application I have written. I can successfully compile the application in the following scenarios:
- in a native compilation for the i386 host running Ubuntu 12.04
- natively on a PandaBoard running Ubuntu 12.04 (this takes a long time)
- using Qemu and a chroot on the host PC for the armhf PandaBoard target (this takes a very long time)
I would like to cross-compile the application on the i386 host to run on a target such as the PandaBoard to complete builds in a timely fashion. So far attempts made using the arm-linux-gnueabihf tool chain in the repositories has produced binaries that do not run correctly. At this stage, I have no plans to package the software.
What is the recommended way to achieve a successful cross-compile?
https://wiki.linaro.org/Platform/DevPlatform/CrossCompile/UsingMultiArch
https://wiki.ubuntu.com/MultiarchCross
Ubuntu has a cross-toolchain,
apt-get install gcc-arm-linux-gnueabihf
but work on the next-gen toolchain is discussed here: http://gsoc.sitedethib.com/posts/apt-get_install_gcc-4.7-arm-linux-gnueabihf/There are a number of workarounds that are necessary at this point. For example, if you use indirect linking (covered in the linaro wiki page.) You also should avoid running foreign binaries right after compiling them.
Also, its really most mature with autotools.
I got my package to cross-compile fairly quick.