[fpc-pascal] Cross-compiler for ARM64 on Windows available?

Sven Barth pascaldragon at googlemail.com
Wed Jun 22 11:11:40 CEST 2022

Tomas Hajny <XHajT03 at hajny.biz> schrieb am Mi., 22. Juni 2022, 10:57:

> On 2022-06-21 20:01, Sven Barth wrote:
> > Tomas Hajny via fpc-pascal <fpc-pascal at lists.freepascal.org> 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

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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20220622/1da82da9/attachment-0001.htm>

More information about the fpc-pascal mailing list