tpoechtrager / osxcross

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

Problem with TARGET_OS_EMBEDDED not defined #276

Open AllinCottrell opened 3 years ago

AllinCottrell commented 3 years ago

For cross-builds targeting Intel Macs I recently updated to using the 10.13 SDK, from 10.9. When I build osxcross using the newer SDK I get x86_64-apple-darwin17-clang and friends. Now when I compile my app I'm getting a ton of warnings of the form

warning: pointer is missing a nullability type specifier

and, more seriously, fatal errors of this sort:

/opt/mac/SDK/MacOSX10.13.sdk/usr/include/stdio.h:313:5: error: 'TARGET_OS_EMBEDDED' is not defined, evaluates to 0 [-Werror,-Wundef-prefix=TARGET_OS_]

I'm building osxcross on Arch Linux using clang 11.1.0.

AllinCottrell commented 3 years ago

Sorry for the noise -- it seems this problem is due to due to some breakage in my build setup and not really an osxcross issue as such. If I can figure out exactly what's wrong I'll post again for the record.

HinTak commented 3 years ago

It is probably similar to https://github.com/darlinghq/darling/issues/856 , a recent clang issue, and see work around there.