Mon May 07, 2012 8:09 am
Assuming you"re talking about Ubuntu on some desktop machine, you will need a cross-development environment. Your installed gcc/gdb/binutils and so on will be configured for your host platform, which is most likely i386 or x86_64.
What you need is a set of development tools which target the Pi. They will be installed separately to your existing devtools, and named something along the lines of arm-linux-eabi-<program>(the stuff before the program name is given by the "triplet" of hardware platform, software platform and ABI – the stuff I"m using is arm-none-eabi as I"m developing "on the metal" – my cross-compiling gcc, for example, is arm-none-eabi-gcc).
Now, there"s a few ways you can get such a toolkit. The easiest way is to use your package manager to install a cross development toolkit – this should deal with all the dependencies automagically. I believe the package you require is called gcc-arm-linux-gnueabi
That will get you a cross development toolkit, to compile a "standard" autotools package using it you would do:
cd ./package_i_want_to_compile./configure –target arm-linux-gnueabi <other configuration options>make
If you then want to test on your x86 machine, you"re going to need qemu (be aware that qemu doesn"t fully emulate the Pi, but it can be used for a lot of testing anyway). See the multitude of threads about qemu for help on that.
Okay, the hell with this bloody editor. The more you edit, the more it mangles your post. The "code" block above is 3 separate lines, I'll leave you to work out where they start.