<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-15">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi all,<br>
<br>
I'm trying to set up my Lazarus in a Linux x86_64 platform to cross
compile for an ARMV7 target (Raspberry pi 3), but I'm unable to make
it work.<br>
<br>
The environment is CentOs 6, Linux x86_64, fpc 2.6.4. Both Lazarus
1.4.4 and Lazarus 1.7 (from trunk) give identical results. The
target should be arm-linux.<br>
<br>
I believe that my custom fpc.cfg is properly set, because I can
cross-compile a simple console app:<br>
<blockquote type="cite">fpc -Tlinux -Parm -XParm-linux- TestArm.pas<br>
</blockquote>
works just fine and generates an arm object file and an arm
executable, which runs on the target.<br>
<br>
But up to now, any attempt to cross-compile on Lazarus has failed. <br>
<br>
I assume that I should set Target OS = Linux, Target CPU family =
arm, Target processor = ARMV7<br>
<br>
But with those parameters the compilation aborts immediately with
"Illegal parameter -CpARMV7"<br>
<br>
If I set Target processor = Default, I must add a lot of extra paths
to make it find the sources (why?), but finally it compiles
everything, and properly puts the generated .o and .ppu files in the
arm-linux directories. But the generated .o files are of type ELF
x86-64, and then ld aborts, telling (correctly) that it supports
only the arm formats. <br>
<br>
With this setup the compiler options are:<br>
<blockquote type="cite">
<meta name="qrichtext" content="1">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><!--StartFragment--> -Tlinux -Parm -MObjFPC -Scghi -O1 -g -gl -l -vewnhibq -Filib/arm-linux -Fi/usr/lib64/lazarus/lcl/include -Fu../fpc/2.6.4/packages/fcl-process/src -Fu/usr/lib64/lazarus/components/lazutils -Fu/usr/lib64/lazarus/lcl -Fu/usr/lib64/lazarus/lcl/widgetset -Fu/usr/lib64/lazarus/lcl/interfaces/gtk2 -Fu../lazarus/lcl/units/arm-linux/gtk2 -Fu../lazarus/lcl/units/arm-linux -Fu../lazarus/components/lazutils/lib/arm-linux -Fu../lazarus/packager/units/arm-linux -Fu. -FUlib/arm-linux -dLCL -dLCLgtk2 -XParm-linux-<!--EndFragment--></p>
</blockquote>
<blockquote type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-15">
<style type="text/css">
p, li { white-space: pre-wrap; }
</style></blockquote>
<br>
What I'm doing wrong? What I'm missing?<br>
<br>
Any help is greatly appreciated.<br>
<br>
Thanks in advance,<br>
<br>
Giuliano<br>
<br>
<br>
</body>
</html>