I have some experience developing plugins for VCV Rack on Windows. After recently purchasing an M1 Mac, I would like to be able to develop plugins on that machine as well. For example, I would like to be able to build the Fundamental modules from source.
When I cd into the repo and run
make, I get
clang: error: the clang compiler does not support '-march=nocona'
As far as I understand, this is because the
$(CXX) commands in the makefile call
g++ --version gives
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1 Apple clang version 12.0.0 (clang-1184.108.40.206) Target: arm64-apple-darwin20.3.0 Thread model: posix
The compiler is targeting arm64, so obviously there will be problems, because Rack is an x86_64 program running through Rosetta2.
What can I change in the makefile to get clang to build x86_64 libraries rather than arm64?