I get Illegal Instruction: 4 errors with binaries compiled with GCC 4.7.2 on Mac OS X 10.8.2 (Mountain Lion) when these binaries run under Mac OS X 10.7.x ("Lion") and earlier version. Binary files work correctly on Mac OS X 10.8.x.
I added -mmacosx-version-min=10.5 to my compilation flags, and this seems to help solve the problem for clients 10.5.x, 10.6.x and 10.7.x, whatever that is.
Regarding my questions:
- What is
Illegal Instruction: 4 Error? - Why
-mmacosx-version-min=10.x correct this specific error on 10.x and larger clients?
I would like to apply this fix to my makefiles, but I would like to know what it does before I pull out the trigger. (Do I have large binaries? Do I still have 64-bit binaries? Are there any errors with this approach that I should be aware of? Unintended side effects, etc.)
gcc osx-lion osx-leopard osx-mountain-lion macos
Alex Reynolds Jan 10 2018-12-23T00: 00Z
source share