tpoechtrager / osxcross

Mac OS X cross toolchain for Linux, FreeBSD, OpenBSD and Android (Termux)
GNU General Public License v2.0
2.81k stars 320 forks source link

gcc and __API_AVAILABLE #364

Open philippe44 opened 1 year ago

philippe44 commented 1 year ago

First of all, thanks very much for making this toolset available.

Now, I'm facing an issue when using gcc instead of clang (I'm using gcc accross many platforms and I'd really prefer to stick with it). Unfortunately, the macro API_AVAILABLE with is key to "-mmacosx-version-min" and/or "MACOS_DEPLOYMENT_TARGET" says it is not usable for gcc. Indeed, when compiled with gcc, the target requirements are ignored and, for example, some code which uses weak_links is embedded and fails when running on older macOS version( e.g. darwin_check_fd_set_overflow).

Is there a know workaround for this?