Thanks TRon!
So far I managed to build FPC and Lazarus as an x86_64 binary and those work just fine on my M1 Macbook Pro.
No errors, and builds projects just fine.
As for AARCH64: for FPC, I managed to build the trunk version.
Lazarus does compile but errors on linking (ld error).
With the AARCH64 version of FPC (trunk) I was able to compile a very simple program and it works and runs. Is that what you had in mind?
The "program";
program Project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}
cthreads,
{$ENDIF}
Classes
{ you can add units after this };
begin
writeln('test');
end.
Just realized that the compiler output could be good to know:
Free Pascal Compiler version 3.3.1-17749-gbd1da8ffb7 [2025/04/04] for aarch64
Copyright (c) 1993-2025 by Florian Klaempfl and others
Target OS: Darwin for AArch64
Compiling /Users/hans/tmp/test.pas
Assembling (pipe) /Users/hans/tmp/test.s
Linking /Users/hans/tmp/test
-macosx_version_min has been renamed to -macos_version_min
15 lines compiled, 0.3 sec, 835584 bytes code, 294911 bytes dataAs you can see it uses the AARCH64 FPC (trunk).
Not sure how to compile a regular project from the commandline without "lazbuild".
And the exam[ple I used does not include resources, any examples you'd like me to try?