[Lazarus] Mac OS X : Porting Job Offer...

dominique at savagesoftwaresolutions.com dominique at savagesoftwaresolutions.com
Sat Dec 5 22:36:46 CET 2009


2009/12/4  <antispammoni at gmail.com>:
> Hi all,
>
> I'm a newbie about cross compiling, but I need to develop some
> applications for arm-linux architecture. There are many days that I
> search on web tutorials, guide and simple sparse bit of knowledge
> about how to to... but no success at now.
> All references to tutorials I found are very old and partially not working.
>
> So I hope that you can help me to write a generic step by step
> tutorial, starting from "generic" sources; I mean what to download,
> what to write in terminal, etc...
>
> What I believe to know is that:
> 1) cross compiling for arm-linux is simplest from Linux X86
> 2) I need binutils ( I downloaded latest one:
> http://ftp.gnu.org/gnu/binutils/binutils-2.20.tar.gz )
> 3) I need sources of fpc and lazarus. I downloaded:
>  - latest official fpc: fpcbuild-2.2.4.zip
>  - Lazarus snapshots: e.g. today's lazarus-0.9.29-22952-20091204-src.tar.bz2
>
> Now knowledge is even more darkness... I tried to install binutils:
>
> cd ~/temp/buinutils
> ./configure
> make
> sudo make install

This will give you the binutils for your architecture and that's
probably not what you want.  You need to cross compile the binutils
first, so you need to make distclean in your binutils directory, then
./configure --target=arm-linux.  You probably also want to use
--prefix to control where the files get installed (I think /usr/local
is the default).

That's just the beginning, though, and if you need to use libc (like
with lazarus), you need to cross build that, too.

So, it's a lot easier to get the cross tools for the specific
distribution your arm board is using.  Some distributions have a
"master makefile" that auto automatically build the cross compilers
and binutils.  If you've bought an arm development kit, the vendor
usually supplies this for you.  See if you can find this before you
attempt to build fpc.  Also note what c library your arm system is
using (e.g. glibc, uclibc).

>
> My experience with linux is not very deep, so I don't know if it is
> installed right.
>
> After this, do I need to compile fpc and than lazarus? How?

I've used fpc on arm-linux, but never lazarus, since I've never seen
an embedded board with gtk libs on.  Some of them have qt, though, but
ymmv.  As far as graphics go, I've managed to use fpgui, since it
talks to the x libraries directly and is very light weight.

Henry




More information about the Lazarus mailing list