I've just run through the process documented here (
https://wiki.freepascal.org/Installing_Lazarus_on_macOS) on a brand new M1 Max. I also installed trunk FPC and Lazarus (for generics support). I eventually got it all working (yay!)
There's several issue on the page, but I couldn't get through the wiki registration and fix them myself.
1. SDK location for building FPC trunk
The page says to run
make distclean all FPC=/usr/local/lib/fpc/3.2.2/ppcx64 OS_TARGET=darwin CPU_TARGET=x86_64 OPT="-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/"
But in fact, that location is wrong for me. it would be useful for the page to mention (a) that this might differ on your machine and (b) that you find out the location using xcrun --show-sdk-path
On my system, the path is /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
2. Building Lazarus
In order to build Lazarus, I also had to provide the -XR option to the make command as well (like FPC). This is not a documented thing to do.
3. To rebuild Lazarus from within the IDE, I also had to add -XR{path} as an option in the Configure Build Lazarus dialog (the page doesn't talk about this, but it should, given the importance of rebuilding Lazarus)
This isn't an issue with the page, but it's a bit weird that you have to choose lldb during start up, even though the debugger is still configured to be GDB, and then you change the debugger setup later. But the page could usefully mention that the path for LLDB might be /usr/bin/lldb (it is for me, but who knows where Apple move things around to)
One last suggestion for the page... given how everything going M1, it would be good for the page to have the apple silicon commands explicitly shown, not just a note further up the page about to change them to suit M1.
finally, thanks to the community and particularly the maintainers for maintaining that page. There's no way you could install without it.