Closed tcjennings closed 3 years ago
Thanks! I'll be reviewing this subject when I have access to the hardware in question, which I hope will be within the next couple of weeks. Happy to see suggestions for where to start, but I don't intend to commit anything until I've tested it myself (since I do actually expect to be able to do so soon).
-mfpmath=sse -msse -msse2
are x86/x86_64 specific and therefore not accepted on ARM-mmacosx-version-min=11.0
is the first ARM-compatible macOS version-arch arm
(or -arch x86_64
) should probably be removed, as they are not actually needed (compiler produces code for the current arch by default, which is needed in 99% of use cases)OK, thanks again - this should be working in the default branch. Just need to warn you that I've also renamed Makefile.osx
to Makefile.macos
(sorry).
There are now two Mac Makefiles. Makefile.macos
just uses the native arch, whatever that is, and drops the arch-specific flags. Makefile.macos-universal
builds both architectures in one (if supported by your SDK).
Note that I have kept the -mmacosx-version-min=10.7
flag in place because it is still valid for the Intel build, and it is simply ignored for the ARM build where this target isn't possible. I'm happy to listen to arguments why this may be a bad idea, though if possible I would prefer to ship a Makefile that targets the oldest supported OS version by default.
(reopened issue, didn't intend to close without waiting for feedback)
Makefile.osx hardcodes an architecture and cpu options that are incompatible with Apple Silicon.
This patch is a starting point for arm builds: changing the arch and removing the sse optimizations. Whether a separate Makefile or conditional patch/generation of the existing Makefile.osx depends on the needs of the project.