[Lazarus] Cross Compile to Arm
Steve Gatenby
steveg at nevets.com.au
Wed Jun 7 09:59:36 CEST 2017
On 06/07/2017 03:50 PM, Alfred via Lazarus wrote:
> For a library, add:
> -FLld-linux-armhf.so.3
> into the custom options of your project compiler options.
>
Thank you Alfred - a little further now.
I have pasted the full output from lazbuild for reference.
It seems the linker is trying to use 'crtbeginS.o' for my base system
(x86_64)
I guess I need to tell it to redirect to 'crtbegin' in
'/mnt/Shared/Apps/fpcupDeluxe/cross/lib/arm-linux', but I dont know how
(as yet)
Still working at it though :)
/mnt/Shared/Apps/fpcupDeluxe/lazarus/lazbuild --os=Linux --cpu=arm
project1.lpi
using config file /mnt/Shared/Apps/fpcupDeluxe/lazarus/lazarus.cfg
SetPrimaryConfigPath
NewValue="/mnt/Shared/Apps/fpcupDeluxe/config_lazarus" ->
"/mnt/Shared/Apps/fpcupDeluxe/config_lazarus"
Hint: (lazarus) [RunTool]
/mnt/Shared/Apps/fpcupDeluxe/fpc/bin/x86_64-linux/fpc.sh "-iWTOTP"
"-Parm" "-Tlinux"
Hint: (lazarus) [RunTool]
/mnt/Shared/Apps/fpcupDeluxe/fpc/bin/x86_64-linux/fpc.sh "-va" "-Parm"
"-Tlinux" "compilertest.pas"
Info: (lazarus) Execute Title="Compile Project, CPU: arm, Target:
libproject1.so"
Info: (lazarus) Working Directory="/home/steve-gatenby/Temp1/LibTest/"
Info: (lazarus)
Executable="/mnt/Shared/Apps/fpcupDeluxe/fpc/bin/x86_64-linux/fpc.sh"
Info: (lazarus) Param[0]="-Tlinux"
Info: (lazarus) Param[1]="-Parm"
Info: (lazarus) Param[2]="-MObjFPC"
Info: (lazarus) Param[3]="-Scghi"
Info: (lazarus) Param[4]="-O1"
Info: (lazarus) Param[5]="-g"
Info: (lazarus) Param[6]="-gl"
Info: (lazarus) Param[7]="-l"
Info: (lazarus) Param[8]="-vewnhibq"
Info: (lazarus)
Param[9]="-Fi/home/steve-gatenby/Temp1/LibTest/lib/arm-linux"
Info: (lazarus) Param[10]="-Fu/home/steve-gatenby/Temp1/LibTest/"
Info: (lazarus)
Param[11]="-FU/home/steve-gatenby/Temp1/LibTest/lib/arm-linux/"
Info: (lazarus) Param[12]="-olibproject1.so"
Info: (lazarus) Param[13]="-fPIC"
Info: (lazarus) Param[14]="-FLld-linux-armhf.so.3"
Info: (lazarus) Param[15]="project1.lpr"
Hint: (11030) Start of reading config file
/mnt/Shared/Apps/fpcupDeluxe/fpc/bin/x86_64-linux/fpc.cfg
Hint: (11031) End of reading config file
/mnt/Shared/Apps/fpcupDeluxe/fpc/bin/x86_64-linux/fpc.cfg
Free Pascal Compiler version 3.1.1 [2017/06/06] for arm
Copyright (c) 1993-2017 by Florian Klaempfl and others
(1002) Target OS: Linux for ARMHF
(3104) Compiling project1.lpr
(9015) Linking libproject1.so
/usr/lib/gcc/x86_64-linux-gnu/5.4.0/crtbeginS.o: file not recognized:
File format not recognized
/home/steve-gatenby/Temp1/LibTest/project1.lpr(20,1) Error: (9013) Error
while linking
/home/steve-gatenby/Temp1/LibTest/project1.lpr(20,1) Fatal: (10026)
There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Error: /mnt/Shared/Apps/fpcupDeluxe/fpc/bin/x86_64-linux/ppcrossarm
returned an error exitcode
Error: (lazarus) Compile Project, CPU: arm, Target: libproject1.so:
stopped with exit code 256
Error: (lazbuild) failed compiling of project
/home/steve-gatenby/Temp1/LibTest/project1.lpi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170607/a7353233/attachment.html>
More information about the Lazarus
mailing list