I just tried the bleeding edge tinycc for x86 mac from https://repo.or.cz/w/tinycc.git
2024-11-22 085e029f08c9b0b57632703df565efdbe2cd0c7f
It now builds x86 .so files that are usable in ctypes.CDLL.
Need to try it on an M1/M2 mac, with a check to see that it is building arm rather than x86.
Need to try it on a non-developer mac to see if non-signed self-compiled code is blocked.