[fpc-pascal] FreePascal on ARM Linux ,SoftFloat and EABI issues

Terry Kemp tkemp at klc.net.nz
Fri May 30 12:36:35 CEST 2008


On Fri, 2008-05-30 at 12:25 +0530, Nataraj S Narayan wrote:
> Hi Florian and other friends
> 
> I am involved in porting existing C code to Arm Linux for AT91SAM9263 Ek 
> board with 340x220 display. I need to write lots of console kinda apps.
> 
> 
> I am using a "qemu-system-arm" emulated  Armel Debian machine on a 
> 
> Debian x86 Lenny distro for writing code. I installed 
> fpc-2.2.0.arm-linux.tar on the emulated linux.
> Which compiling a simple helloworld.pas , i get the classic error of 
> System.o  being EABI 0 while target is EABI 4.
> 
> 
> 
> I have got the svn download of fpc, and trying to compile it in the 
> emulated machine for ARM for the past 2 days.  I have given :-
> 
> make clean all ARCH=arm OPT="-CfSoft".
> 
> Its compiling for quite long and finally comes to rest endlessly while 
> 
> 
> compiling system.pp.
> 
> Let me remind you that i am dont use a Cross compiler, but an emulated 
> Arm machine.
> 
> My boss and colleagues are 'C only' programmers . Doing all kinda 
> harware access for embedded devices using C. They have developed pretty 
> 
> 
> good & successful apps using pure C without an OS. What i have been 
> trying is to convice them to use Freepascal for the Application part, 
> which is presently console Apps. The next stage is to develop X apps 
> 
> 
> using Lazarus. But for these I need to get FPC working.
> 
> Please help.
> 
> regards
> 
> Nataraj
> 
> 
> 
> 
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

sorry if this comes thru twice, I think I used the wrong email address
before.

this might help a little bit...
http://www.klc.net.nz/linux/?page_id=13

I am still to complete it, there are some tricks to svn for arm that I
haven't documented yet but it should give you a heads up.

Terry

also I noted afterwards you aren't crosscompiling... but its an option
anyways, and lazarus / qt crosscompiles no probs (mostly). 

trick from clean svn (from memory) is to run fpcmake -Tall (2.2.0
version only - 2.3.1 doesn't work)) and when compiling fails on ffpkg or
similar when installing to zip change into that folder and do the same.

also although it creates an EABI 4 executable correctly there is a
problem with fpc-svn/compiler/systems/t_linux.pas that sticks the wrong
dynamic linker name in the file. I fixed it with this...


{$ifdef arm}
    {$ifdef FPC_ARMEL}
         defdynlinker:='/lib/ld-linux.so.3';
    {$else}
         defdynlinker:='/lib/ld-linux.so.2';
    {$endif}
{$endif arm}

 
probably wrong but IWFM.



  




More information about the fpc-pascal mailing list