Cross compilation: Difference between revisions

m
syntax highlighting fixup automation
No edit summary
m (syntax highlighting fixup automation)
 
(2 intermediate revisions by 2 users not shown)
Line 28:
To keep the official FB release packages small, they only include the necessary libraries and tools for native development, but not cross-compiling.
 
{{omit from|J}}
 
{{omit from|Julia}}
=={{header|Pascal}}==
 
==={{header|Free Pascal}}===
many examples for crosscompiling to different targets.
[https://wiki.freepascal.org/Cross_compiling Cross_compiling Free Pascal]
=={{header|Phix}}==
===baked in===
Line 36 ⟶ 39:
instance the Linux binaries of Phix are always compiled on Windows by throwing the following at "p -c -norun p32.exu"
(with a similar p64.exu for 64bit, and formats PE32 and PE64 for the reverse trick):
<!--<langsyntaxhighlight Phixlang="phix">(phixonline)-->
<span style="color: #000000;">format</span> <span style="color: #000000;">ELF32</span>
<span style="color: #008080;">include</span> <span style="color: #000000;">p</span><span style="color: #0000FF;">.</span><span style="color: #000000;">exw</span>
<!--</langsyntaxhighlight>-->
The platform() and machine_bits() builtins can be explictly used as runtime tests to vary code by platform.
The compiler tries hard to avoid emitting unnecessary binary, which is likely to be more successful when those routines are used as plainly as possible, without any and/or parts to the conditional. Likewise #ilASM{} aka inline assembly can contain guards
10,327

edits