Cross-compiling is easier if you do it in a virtual sandbox environment which emulates the target processor. Have a look at scratchbox
, the official install instructions are here
. But there's a much nicer guide on setting up an arm cross-compiler in one the the tutorials at http://www.free-electrons.com/training
, here's the link
The scratchbox stuff starts in lab 4.
Scratchbox uses qemu for emulation, and separates you from the host system so your compile environment is pretty safe.
In fedora you need to apply this small fix
if you get an error logging in ('echo 0 > /proc/sys/vm/vdso_enabled' as root)
Be careful if you are targeting a specific device, many portable devices have no hardware floating point support, so you will need a soft-float toolchain, also beware if the target device is linked to uClibc rather glibc (mostly the former in embedded devices). Scratchbox supply a variety of ready-made toolchains, eg http://www.scratchbox.org/download/f...egacy/tarball/
(the ones with 'sf' in the name are soft-float)
You may need static compiles if you have unresolved symbol errors on the target device. If you're just experimenting locally then don't worry.