[Pkg-pascal-devel] Castle Game Engine build tool
Abou Al Montacir
abou.almontacir at sfr.fr
Thu Feb 25 00:23:22 UTC 2016
Hi Michalis,
On Mon, 2016-02-22 at 19:48 +0000, Michalis Kamburelis wrote:
> On Mon, Feb 22, 2016 at 10:23 AM Abou Al Montacir <abou.almontacir at sfr.fr> wrote:
> > wrote:
>
> > > 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?
> > >
> > The cross compiler himself is not, but this can be fixed easily.
> > Normally for this you need to use fpc -P<cpu> -Xp<path>. This is undocumented feature but is very useful.
> > Please see compiler/utils/fpc.pp lines 167-240 for code selecting the compiler backend.
> > This code could also be modified to use qemu as a workaround and install the native arm compiler package for example
>
> I'm using "fpc -Pxxx" already in CGE build tool, in case of "castle-engine compile --cpu=xxx" call:) It works cool:)
OK, that's wonderrful!
>
> To avoid having to specify -Xp at command-line, one can use something like
>
> #ifdef android
> #ifdef cpuarm
> ... path options for cross-ompiling, like -Xp or -Fl, here
> #endif
> #endif
>
> 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:)
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
I need to think more about this proposal to make it easy for the users.
> 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.
Yes that is the purpose, but this means either patching fpc.pp and carry the
patch forever or make it accepted by upstream.
> > 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).
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.
> Without hard floats, performance drops (a lot --- see https://github.com/castl
> e-engine/castle-engine/wiki/Android-Internal-Information#notes-about-
> compiling-with-hard-floats--cfvfpv3 ).
I fully understand that, but if poor HW then poor games!
--
Cheers,
Abou Al Montaci
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-pascal-devel/attachments/20160225/d62057e9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-pascal-devel/attachments/20160225/d62057e9/attachment.sig>
More information about the Pkg-pascal-devel
mailing list