Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2022-06

Cross-compiler for ARM64 on Windows available?

20 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Wolfgang Hubert

Hi,

I have developed a DLL for x64 Windows and compiled with fpc 3.2.2. I would like to compile the same code for ARM64 running Windows. I need this to support the MS Surface devices.

Even though the platform list of the Lazarus Wiki

https://wiki.freepascal.org/Platform_list

lists "Windows for ARM64" under "Supported targets for AArch64" I did neither find a suitable cross-compiler for download, nor did I find any hints on how to compile for this platform in the documentation.

Is there a release plan for an fpc version for ARM64 on Windows? When can I expect a suitable compiler to come?

Best regards,

Wolfgang

Reply by email

Sven Barth
to Wolfgang Hubert
Wolfgang Hubert wrote 22 lines
Hi, I have developed a DLL for x64 Windows and compiled with fpc 3.2.2. I would like to compile the same code for ARM64 running Windows. I need this to support the MS Surface devices. Even though the platform list of the Lazarus Wiki https://wiki.freepascal.org/Platform_list lists "Windows for ARM64" under "Supported targets for AArch64" I did neither find a suitable cross-compiler for download, nor did I find any hints on how to compile for this platform in the documentation. Is there a release plan for an fpc version for ARM64 on Windows? When can I expect a suitable compiler to come?

Windows on AArch64 is currently only supported in main thus you need to compile it yourself (see also
https://lists.freepascal.org/pipermail/fpc-announce/2020-April/000614.html ). Also there are still some errors for which the origins haven't been found yet, so your mileage may vary...

Regards,
Sven

Reply by email

Pierre Muller
to Sven Barth

Le 20/06/2022 à 23:53, Sven Barth via fpc-pascal a écrit :

Show quoted text 29 lines
Am 20.06.2022 um 12:34 schrieb Wolfgang Hubert via fpc-pascal: > Hi, > > > > I have developed a DLL for x64 Windows and compiled with fpc 3.2.2. I > would like to compile the same code for ARM64 running Windows. I need > this to support the MS Surface devices. > > > > Even though the platform list of the Lazarus Wiki > > https://wiki.freepascal.org/Platform_list > > lists "Windows for ARM64" under "Supported targets for AArch64" I did > neither find a suitable cross-compiler for download, nor did I find > any hints on how to compile for this platform in the documentation. > > > > Is there a release plan for an fpc version for ARM64 on Windows? When > can I expect a suitable compiler to come? Windows on AArch64 is currently only supported in main thus you need to compile it yourself (see also https://lists.freepascal.org/pipermail/fpc-announce/2020-April/000614.html ). Also there are still some errors for which the origins haven't been found yet, so your mileage may vary...

You might also try this "completely untested" cross-installer: ftp://ftp.freepascal.org/pub/fpc/snapshot/trunk/aarch64-win64/fpc-3.3.1.aarch64-win64.built.on.x86_64-linux.tar.gz See:
ftp://ftp.freepascal.org/pub/fpc/snapshot/trunk/aarch64-win64/README-fpc-3.3.1.aarch64-win64.built.on.x86_64-linux

Pierre

Reply by email

Wolfgang Hubert
to Pierre Muller

Hi all,

Pierre Muler wrote
You might also try this "completely untested" cross-installer: ftp://ftp.freepascal.org/pub/fpc/snapshot/trunk/aarch64-win64/fpc-3.3.1.aarch64-win64.built.on.x86_64-linux.tar.gz

Thank you for pointing me to this installer. Since I am a Windows XP user and also blind, it would be too much effort for me to install a Linux machine or compile the compiler myself. I would rather wait until a compiler for the Windows host is available.

If anyone has one, please let me know.

Regards,

Wolfgang

Reply by email

Pierre Muller
to Wolfgang Hubert

Hello,

this is normally a native aarch64-win64 compiler,
not a cross-compiler package to be installed on linux.

Note however that, as stated below, this was never tested. It will also not run on a Windows XP, unless
you have an aarch64-windows_XP, but I am not aware of the existence of such machines.

Regards,

Pierre

Le 21/06/2022 à 11:14, Wolfgang Hubert a écrit :

Show quoted text 28 lines
Hi all, Pierre Muler via fpc-pascal wrote: > You might also try this "completely untested" cross-installer: > ftp://ftp.freepascal.org/pub/fpc/snapshot/trunk/aarch64-win64/fpc-3.3.1.aarch64-win64.built.on.x86_64-linux.tar.gz Thank you for pointing me to this installer. Since I am a Windows XP user and also blind, it would be too much effort for me to install a Linux machine or compile the compiler myself. I would rather wait until a compiler for the Windows host is available. If anyone has one, please let me know. Regards, Wolfgang

Reply by email

Tomas Hajny
to Pierre Muller: Le 20/06/2022 à 23:53, Sven Barth via fpc-pascal a écrit : You might also try this…
Pierre Muller wrote
Le 20/06/2022 à 23:53, Sven Barth via fpc-pascal a écrit : > Am 20.06.2022 um 12:34 schrieb Wolfgang Hubert via fpc-pascal:

Hi Pierre (and others ;-) ),

.
.

Show quoted text 11 lines
> Windows on AArch64 is currently only supported in main thus you need > to > compile it yourself (see also > https://lists.freepascal.org/pipermail/fpc-announce/2020-April/000614.html > ). Also there are still some errors for which the origins haven't been > found yet, so your mileage may vary... You might also try this "completely untested" cross-installer: ftp://ftp.freepascal.org/pub/fpc/snapshot/trunk/aarch64-win64/fpc-3.3.1.aarch64-win64.built.on.x86_64-linux.tar.gz See: ftp://ftp.freepascal.org/pub/fpc/snapshot/trunk/aarch64-win64/README-fpc-3.3.1.aarch64-win64.built.on.x86_64-linux

I just tried to follow the advice above. Compiling the cross-compiler (Win32 hosted) is no problem using the fullcycle target (obviously, I could build just the particular compiler for AArch64 instead of all of them, but that isn't important) - so far so good. However, it already fails when trying to build the aarch64-win64 rtl using this cross-compiler, because the compiler complains about missing assembler aarch64-win64-clang.exe. Do we provide (compiled) win32 or win64 hosted binutils providing support for aarch64-win64 target? FWIW, I checked the contrib directory on our FTP, but didn't find anything useful in this regard there either.

In order to check that, I downloaded your "cross-installer" mentioned above, but it contains win32 hosted builds of binutils named x86_64-win64-*.exe, i.e. supposedly aimed at targetting Win64 on x86_64, but not usable together with the included ppca64.exe binary (because the included ppca64.exe binary is a native compiler for aarch64-win64, whereas the binutils only run under win32/win64; moreover, they do not fit the subdirectory bin/aarch64-win64/ included in the .tar.gz file). And just as a funny fact, the included x86_64-win64-objdump.exe does not even recognize the AArch64 architecture ;-) (tried with the ppca64.exe binary) - not surprisingly, because it's version 2.26 compiled in January 2016.

Conclusion:

1) Packaging of the "cross-installer" mentioned above should be revised (specifically, the binutils should be replaced with something more appropriate).

2) We should provide the appropriate cross-binutils, otherwise even suggesting people to compile the ppca64.exe compiler from trunk/main FPC themselves doesn't help much.

3) It might be time for updating the provided Win32 binutils as well - version 2.28 of objdump included with the latest release of FPC (and also included in the fpcbuild repository in both the win32 and win64 subdirectories under install/) doesn't support/recognize the AArch64 architecture yet.

Tomas

Reply by email

Sven Barth
to Tomas Hajny

Tomas Hajny via fpc-pascal schrieb am
Di., 21. Juni 2022, 18:08:

Show quoted text 35 lines
On 2022-06-21 00:14, Pierre Muller via fpc-pascal wrote: > Le 20/06/2022 à 23:53, Sven Barth via fpc-pascal a écrit : >> Am 20.06.2022 um 12:34 schrieb Wolfgang Hubert via fpc-pascal: Hi Pierre (and others ;-) ), . . >> Windows on AArch64 is currently only supported in main thus you need >> to >> compile it yourself (see also >> https://lists.freepascal.org/pipermail/fpc-announce/2020-April/000614.html >> ). Also there are still some errors for which the origins haven't been >> found yet, so your mileage may vary... > > You might also try this "completely untested" cross-installer: > ftp://ftp.freepascal.org/pub/fpc/snapshot/trunk/aarch64-win64/fpc-3.3.1.aarch64-win64.built.on.x86_64-linux.tar.gz > See: > ftp://ftp.freepascal.org/pub/fpc/snapshot/trunk/aarch64-win64/README-fpc-3.3.1.aarch64-win64.built.on.x86_64-linux I just tried to follow the advice above. Compiling the cross-compiler (Win32 hosted) is no problem using the fullcycle target (obviously, I could build just the particular compiler for AArch64 instead of all of them, but that isn't important) - so far so good. However, it already fails when trying to build the aarch64-win64 rtl using this cross-compiler, because the compiler complains about missing assembler aarch64-win64-clang.exe. Do we provide (compiled) win32 or win64 hosted binutils providing support for aarch64-win64 target? FWIW, I checked the contrib directory on our FTP, but didn't find anything useful in this regard there either.

As is mentioned in my announcement mail for the target it requires clang as assembler, not GNU binutils. And we don't *want* to ship that as clang provides nice installers themselves.

Regards,
Sven

Reply by email

Jonas Maebe
Dennis Lee Bieber wrote 9 lines
On Tue, 21 Jun 2022 18:08:31 +0200, Tomas Hajny via fpc-pascal declaimed the following: > but not usable together with the included ppca64.exe binary (because the > included ppca64.exe binary is a native compiler for aarch64-win64, Is it? With "ppca" I'd think that was Power PC Architecture (Apple/IBM/Motorola => "AIM")https://en.wikipedia.org/wiki/PowerPC -- and is NOT related to ARM architecture.

ppc ~= .pp compiler. All of our compiler binaries start with ppc. The PowerPC compiler is ppcppc.

Jonas

Reply by email

Tomas Hajny
to Sven Barth: Tomas Hajny via fpc-pascal schrieb am Di., 21. Juni 2022, 18:08: As is mentioned in my…
Sven Barth wrote
Tomas Hajny via fpc-pascal schrieb am Di., 21. Juni 2022, 18:08:

Hi Sven,

.
.

Show quoted text 22 lines
> I just tried to follow the advice above. Compiling the > cross-compiler > (Win32 hosted) is no problem using the fullcycle target (obviously, > I > could build just the particular compiler for AArch64 instead of all > of > them, but that isn't important) - so far so good. However, it > already > fails when trying to build the aarch64-win64 rtl using this > cross-compiler, because the compiler complains about missing > assembler > aarch64-win64-clang.exe. Do we provide (compiled) win32 or win64 > hosted > binutils providing support for aarch64-win64 target? FWIW, I checked > the > contrib directory on our FTP, but didn't find anything useful in > this > regard there either. As is mentioned in my announcement mail for the target it requires clang as assembler, not GNU binutils. And we don't *want* to ship that as clang provides nice installers themselves.

I can't find any clang installers. Do you mean the 263 MB installer of the whole LLVM
(https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.5/LLVM-14.0.5-win32.exe or
https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.5/LLVM-14.0.5-win64.exe)? Moreover, that wouldn't provide the executable aarch64-win64-clang.exe expected by FPC, would it (unlike the contributed cross binutils provided by Pierre and some others for other architectures)? I believe that we should either reconsider the idea of not providing such binaries ourselves, or change the compiler so that it can invoke the tools as installed by the installer (or to provide detailed steps necessary for making this to work as the very least, but my personal opinion is that this last option wouldn't be the right thing to do in this case).

Tomas

Reply by email

Sven Barth
to Tomas Hajny

Tomas Hajny schrieb am Mi., 22. Juni 2022, 10:57:

Show quoted text 40 lines
On 2022-06-21 20:01, Sven Barth wrote: > Tomas Hajny via fpc-pascal schrieb > am Di., 21. Juni 2022, 18:08: Hi Sven, . . >> I just tried to follow the advice above. Compiling the >> cross-compiler >> (Win32 hosted) is no problem using the fullcycle target (obviously, >> I >> could build just the particular compiler for AArch64 instead of all >> of >> them, but that isn't important) - so far so good. However, it >> already >> fails when trying to build the aarch64-win64 rtl using this >> cross-compiler, because the compiler complains about missing >> assembler >> aarch64-win64-clang.exe. Do we provide (compiled) win32 or win64 >> hosted >> binutils providing support for aarch64-win64 target? FWIW, I checked >> the >> contrib directory on our FTP, but didn't find anything useful in >> this >> regard there either. > > As is mentioned in my announcement mail for the target it requires > clang as assembler, not GNU binutils. And we don't *want* to ship that > as clang provides nice installers themselves. I can't find any clang installers. Do you mean the 263 MB installer of the whole LLVM ( https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.5/LLVM-14.0.5-win32.exe or https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.5/LLVM-14.0.5-win64.exe )?

Yes, exactly those and that's the reason why I don't want to distribute them.

Moreover, that wouldn't provide the executable aarch64-win64-clang.exe expected by FPC, would it (unlike the contributed cross binutils provided by Pierre and some others for other architectures)?

As I have also written in my announcement mail one is supposed to use -XP to set the binutils prefix to empty.

I believe

Show quoted text 6 lines
that we should either reconsider the idea of not providing such binaries ourselves, or change the compiler so that it can invoke the tools as installed by the installer (or to provide detailed steps necessary for making this to work as the very least, but my personal opinion is that this last option wouldn't be the right thing to do in this case).

The compiler already can invoke clang.exe as is if one configures it correctly. One needs to ensure anyway that clang.exe is either in %PATH% or that the path is provided to FPC with -FD. Both options can be added to fpc.cfg.

Regards,
Sven

Reply by email

Travis Siegel
to Pierre Muller: this is normally a native aarch64-win64 compiler, not a cross-compiler package to be…

There actually is a 64-bit version of xp, but it's not compatible with very much.  Apparently, it didn't have an emulator in it, so running 32-bit software wasn't something it did by default.  I never did figure out if it could be made to run 32-bit software or not, I just gave up on it, (more precisely, the person I installed it for gave up on it), because everything they tried to install wouldn't work, because it wasn't 64-bit.

Even so, I have no idea if the FPC cross compiler would work on such a machine anyway, and I no longer have a machine on which I can test said version of windows anyhow, (come to think of it, I don't think I have the install disk for it anymore either), so that will have to remain a mystery.

Pierre Muller wrote 50 lines
Hello,   this is normally a native aarch64-win64 compiler, not a cross-compiler package to be installed on linux.   Note however that, as stated below, this was never tested. It will also not run on a Windows XP, unless you have an aarch64-windows_XP, but I am not aware of the existence of such machines. Regards, Pierre Le 21/06/2022 à 11:14, Wolfgang Hubert a écrit : > Hi all, > > > > Pierre Muler via fpc-pascal wrote: > >> You might also try this "completely untested" cross-installer: > >> ftp://ftp.freepascal.org/pub/fpc/snapshot/trunk/aarch64-win64/fpc-3.3.1.aarch64-win64.built.on.x86_64-linux.tar.gz >> > > > > Thank you for pointing me to this installer. Since I am a Windows XP > user > and also blind, it would be too much effort for me to install a Linux > machine or compile the compiler myself. I would rather wait until a > compiler > for the Windows host is available. > > > > If anyone has one, please let me know. > > > > Regards, > > > > Wolfgang _______________________________________________ fpc-pascal maillist  -  https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email

Tomas Hajny
to Travis Siegel
Travis Siegel wrote 13 lines
There actually is a 64-bit version of xp, but it's not compatible with very much.  Apparently, it didn't have an emulator in it, so running 32-bit software wasn't something it did by default.  I never did figure out if it could be made to run 32-bit software or not, I just gave up on it, (more precisely, the person I installed it for gave up on it), because everything they tried to install wouldn't work, because it wasn't 64-bit. Even so, I have no idea if the FPC cross compiler would work on such a machine anyway, and I no longer have a machine on which I can test said version of windows anyhow, (come to think of it, I don't think I have the install disk for it anymore either), so that will have to remain a mystery.

I may be wrong, but I believe that the original poster meant that he was using a "regular" (32-bit) version of WinXP on x86 and wanted to cross-compile from there to aarch64-win64.

Tomas

Show quoted text 38 lines
On 6/21/2022 10:36 AM, Pierre Muller via fpc-pascal wrote: > Hello, > >   this is normally a native aarch64-win64 compiler, > not a cross-compiler package to be installed on linux. > >   Note however that, as stated below, this was never tested. > It will also not run on a Windows XP, unless > you have an aarch64-windows_XP, but I am not aware > of the existence of such machines. > > Regards, > > Pierre > > > Le 21/06/2022 à 11:14, Wolfgang Hubert a écrit : >> Hi all, >> >> Pierre Muler via fpc-pascal wrote: >> >>> You might also try this "completely untested" cross-installer: >> >>> ftp://ftp.freepascal.org/pub/fpc/snapshot/trunk/aarch64-win64/fpc-3.3.1.aarch64-win64.built.on.x86_64-linux.tar.gz >> >> Thank you for pointing me to this installer. Since I am a Windows XP >> user >> and also blind, it would be too much effort for me to install a Linux >> machine or compile the compiler myself. I would rather wait until a >> compiler >> for the Windows host is available. >> >> If anyone has one, please let me know. >> >> Regards, >> >> Wolfgang

Reply by email

Wolfgang Hubert
to Tomas Hajny

Hi all,

thank you for your thoughts and suggestions on this topic.

Tomas Hajny wrote
I may be wrong, but I believe that the original poster meant that he was using a "regular" (32-bit) version of WinXP on x86 and wanted to cross-compile from there to aarch64-win64.

Yes, you are right. I have a XP machine as well as Windows 10, both 32-bit and 64-bit. So one of these should be the host. But it must be a cross-compiler for the ARM64 target, since I cannot operate a ARM64 machine running Windows. It is not accessible to me. It is a bit like the hen/egg-problem.

I am using fpc 3.2.2 on my XP machine (32-bit) successfully for building 32-bit and 64-bit DLLs for Windows x86/x64. My goal is to do the same for the ARM64 target.

Now I think of porting my pascal code to C++, installing MS Visual Studio and compiling it there.
I am not a compiler compiler and will not be able to finalize or test a cross-compiler before using it.

Best regards,

Wolfgang

Reply by email

Sven Barth
to Travis Siegel: There actually is a 64-bit version of xp, but it's not compatible with very much. …

Travis Siegel via fpc-pascal schrieb am
Do., 23. Juni 2022, 20:08:

Show quoted text 8 lines
There actually is a 64-bit version of xp, but it's not compatible with very much. Apparently, it didn't have an emulator in it, so running 32-bit software wasn't something it did by default. I never did figure out if it could be made to run 32-bit software or not, I just gave up on it, (more precisely, the person I installed it for gave up on it), because everything they tried to install wouldn't work, because it wasn't 64-bit.

Pierre's remark was about an XP running on Aarch64 (which definitely does not exist), not an x86_64 XP.

Also assuming you mean the x86_64 version of XP and not the IA64 (Itanium) one then it could run 32-bit software without problems. In contrast to the 32-bit version it was essentially a Windows Server 2003.

Regards,
Sven

Reply by email

Tomas Hajny
to Wolfgang Hubert: thank you for your thoughts and suggestions on this topic. Yes, you are right. I have a…

On 2022-06-24 09:02, Wolfgang Hubert via fpc-pascal wrote:

Hi Wolfgang,

Show quoted text 20 lines
thank you for your thoughts and suggestions on this topic. Tomas Hajny wrote: > I may be wrong, but I believe that the original poster meant that he > was using a "regular" (32-bit) version of WinXP on x86 and wanted to > cross-compile from there to aarch64-win64. Yes, you are right. I have a XP machine as well as Windows 10, both 32-bit and 64-bit. So one of these should be the host. But it must be a cross-compiler for the ARM64 target, since I cannot operate a ARM64 machine running Windows. It is not accessible to me. It is a bit like the hen/egg-problem. I am using fpc 3.2.2 on my XP machine (32-bit) successfully for building 32-bit and 64-bit DLLs for Windows x86/x64. My goal is to do the same for the ARM64 target. Now I think of porting my pascal code to C++, installing MS Visual Studio and compiling it there. I am not a compiler compiler and will not be able to finalize or test a cross-compiler before using it.

I believe that we can help you with resolution with FPC if you're interested, it isn't that difficult after all. Building a trunk (main) compiler, rtl and packages is matter of several rather simple commands 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 directions.

Tomas

Reply by email

Wolfgang Hubert
to Tomas Hajny

Hi Tomas,

Tomas Hajny wrote 6 lines
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 directions.

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 installed? And which LLVM package shall I install?
...

My source code only uses RTL, System, SysUtils and Windows units. Windows is only needed for registry access.

Best regards,

Wolfgang

Reply by email

Tomas Hajny
to Wolfgang Hubert

On 2022-06-25 10:58, Wolfgang Hubert via fpc-pascal wrote:

Hi Wolfgang,

Show quoted text 11 lines
> 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 > directions. 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 installed?

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
https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.5/LLVM-14.0.5-win32.exe. If you go for the Win64 machine, I'd choose the 64-bit installer (https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.5/LLVM-14.0.5-win64.exe), 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 if needed).

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).

Tomas

Reply by email

Tomas Hajny
to Tomas Hajny

Sorry, one additional thought - it's better to choose a directory without spaces when installing the LLVM package (i.e. not to accept the default proposal "C:\Program Files\..."), or at least let the installer change the PATH variable for you (which is not checked by default).

Tomas

Earlier message 68 lines
-------- Original Message -------- Subject: Re: [fpc-pascal] Cross-compiler for ARM64 on Windows available? Date: 2022-06-25 14:07 From: Tomas Hajny To: FPC-Pascal users discussions On 2022-06-25 10:58, Wolfgang Hubert via fpc-pascal wrote: Hi Wolfgang, >> 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 >> directions. > > 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 > installed? 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 https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.5/LLVM-14.0.5-win32.exe. If you go for the Win64 machine, I'd choose the 64-bit installer (https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.5/LLVM-14.0.5-win64.exe), 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 if needed). > 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). Tomas

Reply by email

Sven Barth
to Wolfgang Hubert: OK. What would be a good starting point? my Windows XP/32 machine with fpc 3.2.2…

Wolfgang Hubert via fpc-pascal schrieb am
Sa., 25. Juni 2022, 11:03:

Show quoted text 16 lines
Hi Tomas, Tomas Hajny 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 directions. 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 installed? And which LLVM package shall I install?

Best go with the Windows 10 one, cause I think that LLVM no longer works on XP.

Regards,
Sven

Reply by email

Sven Barth
to Tomas Hajny: Sorry, one additional thought - it's better to choose a directory without spaces when…

Tomas Hajny via fpc-pascal schrieb am
Sa., 25. Juni 2022, 15:07:

Show quoted text 5 lines
Sorry, one additional thought - it's better to choose a directory without spaces when installing the LLVM package (i.e. not to accept the default proposal "C:\Program Files\..."), or at least let the installer change the PATH variable for you (which is not checked by default).

As long as one passes the path as "-FDC:\Program Files\LLVM\bin" there is no problem with spaces. Putting it into PATH simplifies that nevertheless of course.

Regards,
Sven

Reply by email