<html><head></head><body><div>Hi Michalis,</div><div><br></div><div>On Mon, 2016-02-22 at 19:48 +0000, Michalis Kamburelis wrote:</div><blockquote type="cite"><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 type="cite"><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><br></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></div></div></div></div></blockquote><div>OK, that's wonderrful!</div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div><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></div></div></div></div></blockquote><div>Very interesting suggestion indeed that, if combined with my patch about config dir, could help each compiler to install its own path in a dedicated file to be palaced in /etc/fpc-$fpcversion.cfg.d/$fpctarget</div><div>I need to think more about this proposal to make it easy for the users.</div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div><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></div></div></div></div></blockquote><div>Yes that is the purpose, but this means either patching fpc.pp and carry the patch forever or make it accepted by upstream.</div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div><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></div></div></div></div></blockquote><div>For me this should depend on target HW. If the target is low cost phones with core with no FPC the user shall be able to enable soft float. However I'm not sure nowadays there are any phone like that.</div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div><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></div></div></div><pre></pre></blockquote><div>I fully understand that, but if poor HW then poor games!</div><div><span style="font-family: monospace; white-space: pre;">--
Cheers,
Abou Al Montaci</span></div></body></html>