[fpc-pascal] cross compilation for armv5 processor

Евгений sem-evgen at rambler.ru
Fri Jul 24 15:51:26 CEST 2009


Hello,
 I need to compile my application for marvell processor 88F6281.(NAS 
QNAP TS-119)

Cross compiler build succesfully by command:

sudo make all install OS_TARGET=linux CPU_TARGET=arm 
BINUTILSPREFIX=/home/sem/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- 
NOGDB=1 OPT='-O- -gl' CROSSOPT='-CfSOFT -CaEABI -darm -dFPC_ARMEL -gl 
-O- -CpARMV5' CROSSINSTALL=1

But when i tried to build my application, i got next message from linker:

 library search path "/usr/local/lib/fpc/2.3.1/" is unsafe for 
cross-compilation
/usr/local/lib/fpc/2.3.1/units/arm-linux/rtl/cprt0.o: In function 
`_haltproc_eabi':
(.text+0x88): undefined reference to `_fini'
/usr/local/lib/fpc/2.3.1/units/arm-linux/rtl/cprt0.o: In function 
`_haltproc_eabi':
(.text+0x90): undefined reference to `_init'

My app. building command is:

ppcarm -MObjFPC -TLinux -Parmv5 -gl -Xs -l -Fu[my units path] 
-oDPSDaemon  
-XP/home/sem/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-  
-CfSOFT -CaEABI -darm -gl -O- -CpARMV5 ./DPSDaemon.pas -uUSE_LOCALIZE


Also i try to build fpc compiler for target platform(not cross 
compiler).Compiler succesfully builded.
When i try to build "hello world" simple application on target platform, 
compiler rise exception:

Fatal: Compilation aborted
An unhandled exception occurred at $0003C350 :
EAccessViolation : Access violation
  $0003C350  FINDGETFILEINFO,  line 695 of ../unix/sysutils.pp
  $0003C69C  FINDNEXT,  line 758 of ../unix/sysutils.pp
  $0003C8E0  FINDFIRST,  line 800 of ../unix/sysutils.pp
  $0004AA64  TCACHEDDIRECTORY__RELOAD,  line 266 of cfileutl.pas
  $0004A754  TCACHEDDIRECTORY__FORCEUSECACHE,  line 223 of cfileutl.pas
  $0004A700  TCACHEDDIRECTORY__TRYUSECACHE,  line 212 of cfileutl.pas
  $0004AFA8  TCACHEDDIRECTORY__DIRECTORYEXISTS,  line 346 of cfileutl.pas
  $0004B584  TDIRECTORYCACHE__DIRECTORYEXISTS,  line 422 of cfileutl.pas
  $0004C100  PATHEXISTS,  line 673 of cfileutl.pas
  $0004D834  TSEARCHPATHLIST__ADDPATH,  line 1117 of cfileutl.pas
  $0004D124  TSEARCHPATHLIST__ADDPATH,  line 972 of cfileutl.pas
  $000CD4A8  READ_ARGUMENTS,  line 2597 of options.pas
  $0002CDC0  INITCOMPILER,  line 181 of compiler.pas
  $0002CEAC  COMPILE,  line 228 of compiler.pas
  $00008314  main,  line 223 of pp.pas

Please help me. I must have a working application on this platform in 
any way.
Best Regards.



More information about the fpc-pascal mailing list