[fpc-pascal] Cross-compiler for ARM64 on Windows available?
XHajT03 at hajny.biz
Sat Jun 25 14:07:06 CEST 2022
On 2022-06-25 10:58, Wolfgang Hubert via fpc-pascal wrote:
>> if you already have your FPC 3.2.2 installation, plus installation of
>> an external package (LLVM). All of it rather feasible. Yes, you may
>> possibly encounter some issues with the current port to this target
>> (aarch64-win64), but I'm sure there are others willing to help with
>> that part as well if you report such issues. Just let me/us know if
>> you want to continue that way, I'm willing to provide more specific
> OK. What would be a good starting point? my Windows XP/32 machine with
> fpc 3.2.2 installed or my Windows 10/64 machine with fpc 3.2.2
Actually, this shouldn't matter. Assuming that your Win64 machine is
newer and thus probably faster, I'd use that one.
> And which LLVM package shall I install?
If you decide for the WinXP machine, you need
If you go for the Win64 machine, I'd choose the 64-bit installer
but the 32-bit one should work equally well, in fact. A new LLVM release
(14.0.6) has been officially announced yesterday, but the Win32/Win64
installers aren't available for it yet and I don't think that it should
matter (eventually, you can upgrade to the newer version of LLVM later
> My source code only uses RTL, System, SysUtils and Windows units.
> Windows is only needed for registry access.
OK. Nevertheless, I'll show you how to build packages as well - just in
case you find a need to use some of them too.
In addition to LLVM installation, you'll also need to get source files
for the development version of FPC. Considering the fact that you may
need to update it later in case you discover some issues with this
version, it's the best to get up to date source using the Git tool.
Installer for this tool may be downloaded from
https://git-scm.com/download/win/. Depending on the chosen machine,
you'd use either 32-bit Git for Windows Setup or 64-bit Git for Windows
Setup. The installer might ask you some questions and I don't remember
them - if you come across a question you can't answer yourself, just ask
here. Once you're ready with this part, we'll continue from there by
getting the latest FPC sources as described on
https://www.freepascal.org/develop.html#git. One important point (not
really mentioned on that page clearly) is that you run the "git clone"
command described there in a directory, where you want to place the FPC
source tree. You don't need the fixes_3.2 sources, just the main
development version (i.e. you don't care of anything following the
"Fixes to 3.2.x" subtitle).
Let me know once you get to the end of that point (or if you come across
some issue on the way there).
More information about the fpc-pascal