You can just remove the CFLAGS= line for Darwin, there's no need to override the compiler's default behavior of selecting the native architecture.
It works OK on Apple silicon:
./pirate-loader_mac --dev=/dev/cu.usbserial-A105BMH4 --hello
+++++++++++++++++++++++++++++++++++++++++++
Pirate-Loader for BP with Bootloader v4+
Loader version: 1.0.2 OS: S
+++++++++++++++++++++++++++++++++++++++++++
Opening serial device /dev/cu.usbserial-A105BMH4...OK
Configuring serial port settings...OK
Sending Hello to the Bootloader...OK
Device ID: PIC24FJ64GA002 [d4]
Bootloader version: 1,02
You can just remove the
CFLAGS=
line for Darwin, there's no need to override the compiler's default behavior of selecting the native architecture.It works OK on Apple silicon: