[fpc-pascal] Cross-compiler for ARM64 on Windows available?
Tomas Hajny
XHajT03 at hajny.biz
Tue Jun 21 18:08:31 CEST 2022
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.
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
More information about the fpc-pascal
mailing list