1 .include "Platforms/${RC_TARGET_CONFIG}/Makefile.inc"
3 # Have to use || to avoid warning message if && is used
5 _BLOCKS != ${MYCC} -arch ${CCARCH} -E -dD -x c /dev/null | fgrep -q __BLOCKS__ || echo NO
10 _LIBCRASHREPORTERCLIENT_A = ${SDKROOT}/usr/local/lib/libCrashReporterClient.a
11 _LIBCRASHREPORTERCLIENT != test -f ${_LIBCRASHREPORTERCLIENT_A} || echo NO
12 .if ${_LIBCRASHREPORTERCLIENT} == NO
13 FEATURE_NO_LIBCRASHREPORTERCLIENT = YES
14 .endif # !_LIBCRASHREPORTERCLIENT
16 ${SYMROOTINC}/${MACHINE_ARCH}/libc-features.h:
18 ${ECHO} creating ${.TARGET}
19 @echo '#ifndef _LIBC_FEATURES_H_' > ${.TARGET}
20 @echo '#define _LIBC_FEATURES_H_' >> ${.TARGET}
22 .ifdef FEATURE_LEGACY_RUNE_APIS
23 @echo '#define UNIFDEF_LEGACY_RUNE_APIS 1' >> ${.TARGET}
25 @echo '/* #undef UNIFDEF_LEGACY_RUNE_APIS */' >> ${.TARGET}
27 .ifdef FEATURE_LEGACY_CRT1_ENVIRON
28 @echo '#define LEGACY_CRT1_ENVIRON 1' >> ${.TARGET}
30 @echo '/* #undef LEGACY_CRT1_ENVIRON */' >> ${.TARGET}
32 .ifdef FEATURE_LEGACY_UTMP_APIS
33 @echo '#define UNIFDEF_LEGACY_UTMP_APIS 1' >> ${.TARGET}
35 @echo '/* #undef UNIFDEF_LEGACY_UTMP_APIS */' >> ${.TARGET}
37 .ifdef FEATURE_MOVE_LOCALTIME
38 @echo '#define UNIFDEF_MOVE_LOCALTIME 1' >> ${.TARGET}
40 @echo '/* #undef UNIFDEF_MOVE_LOCALTIME */' >> ${.TARGET}
42 .ifdef FEATURE_ONLY_LONG_DOUBLE_IS_DOUBLE
43 @echo '#if !__DARWIN_LONG_DOUBLE_IS_DOUBLE' >> ${.TARGET}
44 @echo '# error Feature mismatch: __DARWIN_LONG_DOUBLE_IS_DOUBLE == 0' >> ${.TARGET}
45 @echo '#endif /* !__DARWIN_LONG_DOUBLE_IS_DOUBLE */' >> ${.TARGET}
46 @echo '#define LDBL_COMPAT 1' >> ${.TARGET}
48 @echo '#if __DARWIN_LONG_DOUBLE_IS_DOUBLE' >> ${.TARGET}
49 @echo '# if !defined(LDBL_COMPAT)' >> ${.TARGET}
50 @echo '# error Feature mismatch: __DARWIN_LONG_DOUBLE_IS_DOUBLE == 1' >> ${.TARGET}
51 @echo '# endif /* !LDBL_COMPAT */' >> ${.TARGET}
52 @echo '#elif defined(LDBL_COMPAT)' >> ${.TARGET}
53 @echo '# error Feature mismatch: __DARWIN_LONG_DOUBLE_IS_DOUBLE == 0' >> ${.TARGET}
54 @echo '#endif /* LDBL_COMPAT */' >> ${.TARGET}
56 .ifdef FEATURE_ONLY_1050_VARIANTS
57 @echo '#if !__DARWIN_ONLY_VERS_1050' >> ${.TARGET}
58 @echo '# error Feature mismatch: __DARWIN_ONLY_VERS_1050 == 0' >> ${.TARGET}
59 @echo '#endif /* !__DARWIN_ONLY_VERS_1050 */' >> ${.TARGET}
61 @echo '#if __DARWIN_ONLY_VERS_1050' >> ${.TARGET}
62 @echo '# error Feature mismatch: __DARWIN_ONLY_VERS_1050 == 1' >> ${.TARGET}
63 @echo '#endif /* __DARWIN_ONLY_VERS_1050 */' >> ${.TARGET}
65 .ifdef FEATURE_ONLY_UNIX_CONFORMANCE
66 @echo '#if !__DARWIN_ONLY_UNIX_CONFORMANCE' >> ${.TARGET}
67 @echo '# error Feature mismatch: __DARWIN_ONLY_UNIX_CONFORMANCE == 0' >> ${.TARGET}
68 @echo '#endif /* !__DARWIN_ONLY_UNIX_CONFORMANCE */' >> ${.TARGET}
70 @echo '#if __DARWIN_ONLY_UNIX_CONFORMANCE' >> ${.TARGET}
71 @echo '# error Feature mismatch: __DARWIN_ONLY_UNIX_CONFORMANCE == 1' >> ${.TARGET}
72 @echo '#endif /* __DARWIN_ONLY_UNIX_CONFORMANCE */' >> ${.TARGET}
74 .ifdef FEATURE_ONLY_64_BIT_INO_T
75 @echo '#if !__DARWIN_ONLY_64_BIT_INO_T' >> ${.TARGET}
76 @echo '# error Feature mismatch: __DARWIN_ONLY_64_BIT_INO_T == 0' >> ${.TARGET}
77 @echo '#endif /* !__DARWIN_ONLY_64_BIT_INO_T */' >> ${.TARGET}
79 @echo '#if __DARWIN_ONLY_64_BIT_INO_T' >> ${.TARGET}
80 @echo '# error Feature mismatch: __DARWIN_ONLY_64_BIT_INO_T == 1' >> ${.TARGET}
81 @echo '#endif /* __DARWIN_ONLY_64_BIT_INO_T */' >> ${.TARGET}
83 .ifdef FEATURE_PATCH_3417676
84 @echo '#define __APPLE_PR3417676_HACK__ 1' >> ${.TARGET}
86 @echo '/* #undef __APPLE_PR3417676_HACK__ */' >> ${.TARGET}
88 .ifdef FEATURE_PATCH_5243343
89 @echo '#define PR_5243343 1' >> ${.TARGET}
91 @echo '/* #undef PR_5243343 */' >> ${.TARGET}
93 .ifdef FEATURE_PLOCKSTAT
94 @echo '#define PLOCKSTAT 1' >> ${.TARGET}
96 @echo '/* #undef PLOCKSTAT */' >> ${.TARGET}
98 .ifdef FEATURE_TIMEZONE_CHANGE_NOTIFICATION
99 @echo '#define NOTIFY_TZ 1' >> ${.TARGET}
101 @echo '/* #undef NOTIFY_TZ */' >> ${.TARGET}
103 .ifdef FEATURE_NO_LIBCRASHREPORTERCLIENT
104 @echo '#define LIBC_NO_LIBCRASHREPORTERCLIENT 1' >> ${.TARGET}
106 @echo '/* #undef LIBC_NO_LIBCRASHREPORTERCLIENT */' >> ${.TARGET}
109 @echo '#endif /* _LIBC_FEATURES_H_ */' >> ${.TARGET}
111 .ifdef FEATURE_BLOCKS
112 UNIFDEFARGS += -DUNIFDEF_BLOCKS
114 UNIFDEFARGS += -UUNIFDEF_BLOCKS
116 .ifdef FEATURE_LEGACY_64_APIS
117 UNIFDEFARGS += -DUNIFDEF_LEGACY_64_APIS
119 UNIFDEFARGS += -UUNIFDEF_LEGACY_64_APIS
121 .ifdef FEATURE_LEGACY_RUNE_APIS
122 UNIFDEFARGS += -DUNIFDEF_LEGACY_RUNE_APIS
124 UNIFDEFARGS += -UUNIFDEF_LEGACY_RUNE_APIS
126 .ifdef FEATURE_LEGACY_UTMP_APIS
127 UNIFDEFARGS += -DUNIFDEF_LEGACY_UTMP_APIS
129 UNIFDEFARGS += -UUNIFDEF_LEGACY_UTMP_APIS
131 .ifdef FEATURE_MOVE_LOCALTIME
132 UNIFDEFARGS += -DUNIFDEF_MOVE_LOCALTIME
134 UNIFDEFARGS += -UUNIFDEF_MOVE_LOCALTIME