The -march and -mtune compiler options do not work with Apple clang on Apple Silicon Arm machines. Instead, the -mcpu compiler option should be used. The setup.py script now distinguishes between x86 and Apple-Silicon Arm and chooses the right compiler options.
You are right, the argument should not be exclusively for the M1 chip. Since you made changes in the setup.py in your new commits, I will open a new pull request.
The -march and -mtune compiler options do not work with Apple clang on Apple Silicon Arm machines. Instead, the -mcpu compiler option should be used. The setup.py script now distinguishes between x86 and Apple-Silicon Arm and chooses the right compiler options.