[fpc-pascal] FPC_ARMEL system calls

Luca Olivetti luca at ventoso.org
Tue Jun 3 19:17:33 CEST 2008


En/na Henry Vermaak ha escrit:
> 2008/6/3 Henry Vermaak <henry.vermaak at gmail.com>:
>> 2008/6/3 Henry Vermaak <henry.vermaak at gmail.com>:
>>> 2008/6/3 Henry Vermaak <henry.vermaak at gmail.com>:
>>>> more info (everything compiled with -dFPC_ARMEL -O- -gl):
>>>>
>>>> hcv at technical02:~/source/armtest$ qemu-arm armtest
>>>> Error: Bad syscall: 90004c
>>>> qemu: unhandled CPU exception 0x2 - aborting
>>>> R00=ffffffda R01=4007f750 R02=4007f758 R03=00000000
>>>> R04=00018ed0 R05=00000000 R06=00000000 R07=0090004c
>> ah, it shouldn't add the base number.  this might fix it:
>>
>> Index: sysnr.inc
>> ===================================================================
>> --- sysnr.inc   (revision 11178)
>> +++ sysnr.inc   (working copy)
>> @@ -21,7 +21,11 @@
>>  }
>>
>>  Const
>> +{$ifdef FPC_ABI_EABI}
>> +  syscall_nr_base = $0;
>> +{$else FPC_ABI_EABI}
>>   syscall_nr_base = $900000;
>> +{$endif FPC_ABI_EABI}
>>
>> but i'll confirm in a while.
>>
> 
> yes, this works for me.  luca, can you try?

The following program:

program hello;

begin
writeln('hello');
end.


runs but it doesn't print anything, neither under scratchbox nor on the 
tablet.

I'm trying to cross-compile the gtk2 example but it seems the compiler 
is ignoring -Xd and -Xr:

[luca at localhost fpc-svn]$ compiler/ppcrossarm 
-Fupackages/gtk2/units/arm-linux/ -Xd 
-Xr/scratchbox/users/luca/targets/CHINOOK_ARMEL/usr/lib/ 
packages/gtk2/examples/helloworld/helloworld.pas
Free Pascal Compiler version 2.3.1 [2008/06/03] for arm
Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Linux for ARMEL
Compiling packages/gtk2/examples/helloworld/helloworld.pas
Assembling helloworld
Linking packages/gtk2/examples/helloworld/helloworld
/home/luca/crossbinutils/bin/armel-linux-ld: skipping incompatible 
/usr/lib/libgobject-2.0.so when searching for -lgobject-2.0
/home/luca/crossbinutils/bin/armel-linux-ld: skipping incompatible 
/usr/lib/libgobject-2.0.a when searching for -lgobject-2.0
/home/luca/crossbinutils/bin/armel-linux-ld: cannot find -lgobject-2.0
helloworld.pas(73,49) Error: Error while linking
helloworld.pas(73,49) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
[luca at localhost fpc-svn]$ ls 
/scratchbox/users/luca/targets/CHINOOK_ARMEL/usr/lib/libgobject*
/scratchbox/users/luca/targets/CHINOOK_ARMEL/usr/lib/libgobject-2.0.a
/scratchbox/users/luca/targets/CHINOOK_ARMEL/usr/lib/libgobject-2.0.la
/scratchbox/users/luca/targets/CHINOOK_ARMEL/usr/lib/libgobject-2.0.so@
/scratchbox/users/luca/targets/CHINOOK_ARMEL/usr/lib/libgobject-2.0.so.0@
/scratchbox/users/luca/targets/CHINOOK_ARMEL/usr/lib/libgobject-2.0.so.0.1200.12

Bye
-- 
Luca



More information about the fpc-pascal mailing list