<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Feb 22, 2016 at 10:23 AM Abou Al Montacir <<a href="mailto:abou.almontacir@sfr.fr" target="_blank">abou.almontacir@sfr.fr</a>> wrote:
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><blockquote type="cite"><pre>That is, "ppcross386" or "ppcrossarm", running on x86_64.
I would like to install them of course using pure "apt-get install
..." calls (without the need to make cross-compiler myself from FPC
sources, like I do now). Is this within the scope of Debian
multi-arch?
</pre></blockquote></div><div><div>The cross compiler himself is not, but this can be fixed easily.</div><div>Normally for this you need to use fpc -P<cpu> -Xp<path>. This is undocumented feature but is very useful.</div><div>Please see compiler/utils/fpc.pp lines 167-240 for code selecting the compiler backend.</div><div>This code could also be modified to use qemu as a workaround and install the native arm compiler package for example</div></div></blockquote><div><br></div></div><div dir="ltr"><div class="gmail_quote"><div>I'm using "fpc -Pxxx" already in CGE build tool, in case of "castle-engine compile --cpu=xxx" call:) It works cool:)<br><br></div><div>To avoid having to specify -Xp at command-line, one can use something like<br><br>#ifdef android<br>#ifdef cpuarm<br></div><div>... path options for cross-ompiling, like -Xp or -Fl, here<br>#endif<br>#endif<br><br></div><div>inside /etc/fpc.cfg or ~/.fpc.cfg. Then in particular scripts you only use -P / -T to indicate target CPU / OS, and you don't worry where the particular tools are installed. Although this is just my preference of course:)<br><br>Being able to use qemu is interesting as an option. It would mean that there's no need to package (all) cross-compilers, just make (once) a reliable system to run fpc in qemu under the hood. Nice.<br><br></div><div>If we're talking about cross-compiling for Android, I should also mention one important thing: for Castle Game Engine, compiling to Arm should be done with "hard floats" (-CfVFPV3 option to FPC). This is important, because *all* your units, including FPC RTL, must then also be compiled with -CfVFPV3 (you cannot link together units compiled with and without -CfVFPV3).<br><br>Without hard floats, performance drops (a lot --- see <a href="https://github.com/castle-engine/castle-engine/wiki/Android-Internal-Information#notes-about-compiling-with-hard-floats--cfvfpv3">https://github.com/castle-engine/castle-engine/wiki/Android-Internal-Information#notes-about-compiling-with-hard-floats--cfvfpv3</a> ).<br><br>Regards,<br></div></div><div class="gmail_quote">Michalis<br></div></div></div>