I did get the Lazarus 4.0RC3 working on my macOS 15.4 computer.
1. From the Lazarus source folder, I compiled the Lazarus myself by blessing the application:
xattr -dr com.apple.quarantine ./lazarus.app
2. At that stage, I could launch the Lazarus app which is ARM (aarch64).
3. I can use the Project/NewProject to create a new graphical application. It will compile and run IF I set the Project/ProjectOptions... Config&Target\TargetCpuFamily to x86_64 (e.g. Intel/AMD)
4. The project will not compile and run as a aarch64 (ARM) project:
Compile Project, Target: /Users/chris/dcm/proj/project1: Exit code 1, Errors: 3, Warnings: 3
Error: -macosx_version_min has been renamed to -macos_version_min
Warning: ld: warning: -multiply_defined is obsolete
Warning: ld: warning: ignoring duplicate libraries: '-lc'
Warning: ld: warning: no platform load command found in '/Users/chris/dcm/proj/lib/aarch64-darwin/project1.or', assuming: macOS
Error: /Users/chris/dcm/proj/ppaslink.sh: line 9: 14448 Segmentation fault: 11 /Library/Developer/CommandLineTools/usr/bin/ld -weak_framework AppKit -weak_framework UserNotifications -order_file /Users/chris/dcm/proj/symbol_order.fpc -multiply_defined suppress -L. -o /Users/chris/dcm/proj/project1 `cat /Users/chris/dcm/proj/link14440.res` -filelist /Users/chris/dcm/proj/linkfiles14440.res
An error occurred while linking
Error: Error while linking