How can I compile GCC on mac, so compiled executables will work on earlier versions of OS X?

I am trying to create a program (Dwarf Fortress) that uses C ++ 0x features that are poorly supported in the latest version of XCode Leopard. Since there is also a significant speed increase from using GCC 4.5, we decided to create our own.

However, this leads to the fact that the resulting executable files do not work on Tiger, referring to the missing characters in libc. Presumably, the GCC is being built against the Leopard SDK and not the installed Tiger SDK, which is reasonable but annoying. How can I do it against Tiger's?

+5
source share
1 answer

You need to pass -mmacosx-version-min = 10.5 to ld, which will refer to the corresponding characters in libc.

+2
source

All Articles