Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2007-01

How to build Win32 FPC compiler for linux-arm devices?

9 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Paul Nicholls

Hi all,
I would like to try and rebuild FPC to create a Win32 cross-compiler to create linux-arm programs so I can see if I can develop for the GP2X handheld linux computer.

I have seen various posts around the net on cross-compiling and building cross-compilers and am totally confused :(

Does anyone have a step-by-step guide to building a cross compiler that will run under Windows to make linux-arm programs?

I know where to get the FPC source and the linux-arm cross compiler from the freepascal site, but am totally stumped as to where to go next.

Thanks in advance,

"The plastic veneer of civilization is easily melted in the heat of the moment" - Paul Nicholls.

Remove ".NOSPAM." to reply.

Reply by email

Daniël Mantione
to Paul Nicholls

Op Thu, 25 Jan 2007, schreef Paul Nicholls:

Show quoted text 7 lines
Hi all, I would like to try and rebuild FPC to create a Win32 cross-compiler to create linux-arm programs so I can see if I can develop for the GP2X handheld linux computer. I have seen various posts around the net on cross-compiling and building cross-compilers and am totally confused :(

Building cross-compiler is not a user friendly job.

Does anyone have a step-by-step guide to building a cross compiler that will run under Windows to make linux-arm programs?

No, this does not exist.

I know where to get the FPC source and the linux-arm cross compiler from the freepascal site, but am totally stumped as to where to go next.

I recommend installing Linux on your desktop computer, which costs you much less time to accomplish than building a cross-compiler. If you still need a cross-compiler, please read the buildfaq, and check out the forums, there is enough info about this topic available.

Daniël

Reply by email

Vincent Snijders
to Paul Nicholls: I would like to try and rebuild FPC to create a Win32 cross-compiler to create linux-arm…
Paul Nicholls wrote 15 lines
Hi all, I would like to try and rebuild FPC to create a Win32 cross-compiler to create linux-arm programs so I can see if I can develop for the GP2X handheld linux computer. I have seen various posts around the net on cross-compiling and building cross-compilers and am totally confused :( Does anyone have a step-by-step guide to building a cross compiler that will run under Windows to make linux-arm programs? I know where to get the FPC source and the linux-arm cross compiler from the freepascal site, but am totally stumped as to where to go next.

A couple of weeks back I create a cross compiler installer for arm-linux.

I did not announce it (yet), because I have no good solution for the linking problem. You need to supply the libraries (e.g. libc.so) for arm-linux at compile time.

If you want to try what I made, download
ftp://ftp.hu.freepascal.org/pub/lazarus/cross/Lazarus-0.9.21-fpc-2.1.1-20070104-cross-arm-linux-win32.exe

Vincent

Reply by email

Michael Schnell
to Daniël Mantione: Op Thu, 25 Jan 2007, schreef Paul Nicholls: Building cross-compiler is not a user…
I recommend installing Linux on your desktop computer, which costs you much less time to accomplish than building a cross-compiler.

For compiling for ARM a cross compiler is necessary anyway, but nonetheless I feel that when doing work for Linux it's a good idea to use Linux as an development system, too. I'm sure that I'll go that way once my investigations are far enough to suggest starting the FPC on ARM Linux project.

Happily you now can legally use VMWARE to run Linux on your system together with Windows. I do this right now and performance is really acceptable.

-Michael

Reply by email

Daniël Mantione
to Michael Schnell

Op Mon, 29 Jan 2007, schreef Michael Schnell:

For compiling for ARM a cross compiler is necessary anyway,

Yes, but, the big difference is that the ARM cross compiler for Linux is an official FPC release and therefore useable without digging into the compiler build process. Simply download 2.0.4 for ARM and ready you are.

There is one big thing I forgot totally forget about in my original e-mail: Francesco Lombardi did build and upload a Win32 -> ARM Linux crosscompiler snapshot sime time ago:

ftp://ftp.freepascal.org/pub/fpc/snapshot/v21/arm-linux

but nonetheless I feel that when doing work for Linux it's a good idea to use Linux as an development system, too.

Yes, it is less work to get everything running, and development is easier, since you can test your software on your desktop instead of having to transfer it to your ARM device every time.

Daniël

Reply by email

Vincent Snijders
to Daniël Mantione
Daniël Mantione wrote 15 lines
Op Mon, 29 Jan 2007, schreef Michael Schnell: > For compiling for ARM a cross compiler is necessary anyway, Yes, but, the big difference is that the ARM cross compiler for Linux is an official FPC release and therefore useable without digging into the compiler build process. Simply download 2.0.4 for ARM and ready you are. There is one big thing I forgot totally forget about in my original e-mail: Francesco Lombardi did build and upload a Win32 -> ARM Linux crosscompiler snapshot sime time ago: ftp://ftp.freepascal.org/pub/fpc/snapshot/v21/arm-linux

What is the best way to let the compiler find the arm-linux shared libraries that it needs for linking?

Vincent

Reply by email

Daniël Mantione
to Vincent Snijders

Op Tue, 30 Jan 2007, schreef Vincent Snijders:

Show quoted text 19 lines
Daniël Mantione schreef: > > Op Mon, 29 Jan 2007, schreef Michael Schnell: > > > For compiling for ARM a cross compiler is necessary anyway, > > Yes, but, the big difference is that the ARM cross compiler for Linux is > an official FPC release and therefore useable without digging into the > compiler build process. Simply download 2.0.4 for ARM and ready you are. > > There is one big thing I forgot totally forget about in my original > e-mail: Francesco Lombardi did build and upload a Win32 -> ARM Linux > crosscompiler snapshot sime time ago: > > ftp://ftp.freepascal.org/pub/fpc/snapshot/v21/arm-linux > What is the best way to let the compiler find the arm-linux shared libraries that it needs for linking?

Don't use shared libraries :) Seriously, I don't know, this totally depends on the exact ARM device. A Thecus like Florian uses will likely run a glibc system, but a more limited device like the GP2x will likely use an embedded libc, uclibc is very common on ARM devices. An uclibc distribution in a directory could be a good approac.

Daniël

Reply by email

Vincent Snijders
to Daniël Mantione
Daniël Mantione wrote 26 lines
Op Tue, 30 Jan 2007, schreef Vincent Snijders: > Daniël Mantione schreef: >> Op Mon, 29 Jan 2007, schreef Michael Schnell: >> >>> For compiling for ARM a cross compiler is necessary anyway, >> Yes, but, the big difference is that the ARM cross compiler for Linux is >> an official FPC release and therefore useable without digging into the >> compiler build process. Simply download 2.0.4 for ARM and ready you are. >> >> There is one big thing I forgot totally forget about in my original >> e-mail: Francesco Lombardi did build and upload a Win32 -> ARM Linux >> crosscompiler snapshot sime time ago: >> >> ftp://ftp.freepascal.org/pub/fpc/snapshot/v21/arm-linux >> > What is the best way to let the compiler find the arm-linux shared libraries > that it needs for linking? Don't use shared libraries :) Seriously, I don't know, this totally depends on the exact ARM device. A Thecus like Florian uses will likely run a glibc system, but a more limited device like the GP2x will likely use an embedded libc, uclibc is very common on ARM devices. An uclibc distribution in a directory could be a good approac.

For example in c:\fpc\2.1.1\lib\arm-linux ?

Vincent

Reply by email

Daniël Mantione
to Vincent Snijders

Op Wed, 31 Jan 2007, schreef Vincent Snijders:

Show quoted text 8 lines
> Don't use shared libraries :) Seriously, I don't know, this totally > depends on the exact ARM device. A Thecus like Florian uses will likely > run a glibc system, but a more limited device like the GP2x will likely > use an embedded libc, uclibc is very common on ARM devices. An uclibc > distribution in a directory could be a good approac. > For example in c:\fpc\2.1.1\lib\arm-linux ?

Yes, I think you can do that.

Daniël

Reply by email