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
11 ${SYMROOTINC}/${MACHINE_ARCH}/libc-features.h:
13 ${ECHO} creating ${.TARGET}
14 @echo '#ifndef _LIBC_FEATURES_H_' > ${.TARGET}
15 @echo '#define _LIBC_FEATURES_H_' >> ${.TARGET}
17 .ifdef FEATURE_LEGACY_RUNE_APIS
18 @echo '#define LEGACY_RUNE_APIS 1' >> ${.TARGET}
20 @echo '/* #undef LEGACY_RUNE_APIS */' >> ${.TARGET}
22 .ifdef FEATURE_LEGACY_UTMP_APIS
23 @echo '#define LEGACY_UTMP_APIS 1' >> ${.TARGET}
25 @echo '/* #undef LEGACY_UTMP_APIS */' >> ${.TARGET}
27 .ifdef FEATURE_MOVE_LOCALTIME
28 @echo '#define UNIFDEF_MOVE_LOCALTIME 1' >> ${.TARGET}
30 @echo '/* #undef UNIFDEF_MOVE_LOCALTIME */' >> ${.TARGET}
32 .ifdef FEATURE_ONLY_LONG_DOUBLE_IS_DOUBLE
33 @echo '#if !__DARWIN_LONG_DOUBLE_IS_DOUBLE' >> ${.TARGET}
34 @echo '# error Feature mismatch: __DARWIN_LONG_DOUBLE_IS_DOUBLE == 0' >> ${.TARGET}
35 @echo '#endif /* !__DARWIN_LONG_DOUBLE_IS_DOUBLE */' >> ${.TARGET}
36 @echo '#define LDBL_COMPAT 1' >> ${.TARGET}
38 @echo '#if __DARWIN_LONG_DOUBLE_IS_DOUBLE' >> ${.TARGET}
39 @echo '# if !defined(LDBL_COMPAT)' >> ${.TARGET}
40 @echo '# error Feature mismatch: __DARWIN_LONG_DOUBLE_IS_DOUBLE == 1' >> ${.TARGET}
41 @echo '# endif /* !LDBL_COMPAT */' >> ${.TARGET}
42 @echo '#elif defined(LDBL_COMPAT)' >> ${.TARGET}
43 @echo '# error Feature mismatch: __DARWIN_LONG_DOUBLE_IS_DOUBLE == 0' >> ${.TARGET}
44 @echo '#endif /* LDBL_COMPAT */' >> ${.TARGET}
46 .ifdef FEATURE_ONLY_1050_VARIANTS
47 @echo '#if !__DARWIN_ONLY_VERS_1050' >> ${.TARGET}
48 @echo '# error Feature mismatch: __DARWIN_ONLY_VERS_1050 == 0' >> ${.TARGET}
49 @echo '#endif /* !__DARWIN_ONLY_VERS_1050 */' >> ${.TARGET}
51 @echo '#if __DARWIN_ONLY_VERS_1050' >> ${.TARGET}
52 @echo '# error Feature mismatch: __DARWIN_ONLY_VERS_1050 == 1' >> ${.TARGET}
53 @echo '#endif /* __DARWIN_ONLY_VERS_1050 */' >> ${.TARGET}
55 .ifdef FEATURE_ONLY_UNIX_CONFORMANCE
56 @echo '#if !__DARWIN_ONLY_UNIX_CONFORMANCE' >> ${.TARGET}
57 @echo '# error Feature mismatch: __DARWIN_ONLY_UNIX_CONFORMANCE == 0' >> ${.TARGET}
58 @echo '#endif /* !__DARWIN_ONLY_UNIX_CONFORMANCE */' >> ${.TARGET}
60 @echo '#if __DARWIN_ONLY_UNIX_CONFORMANCE' >> ${.TARGET}
61 @echo '# error Feature mismatch: __DARWIN_ONLY_UNIX_CONFORMANCE == 1' >> ${.TARGET}
62 @echo '#endif /* __DARWIN_ONLY_UNIX_CONFORMANCE */' >> ${.TARGET}
64 .ifdef FEATURE_ONLY_64_BIT_INO_T
65 @echo '#if !__DARWIN_ONLY_64_BIT_INO_T' >> ${.TARGET}
66 @echo '# error Feature mismatch: __DARWIN_ONLY_64_BIT_INO_T == 0' >> ${.TARGET}
67 @echo '#endif /* !__DARWIN_ONLY_64_BIT_INO_T */' >> ${.TARGET}
69 @echo '#if __DARWIN_ONLY_64_BIT_INO_T' >> ${.TARGET}
70 @echo '# error Feature mismatch: __DARWIN_ONLY_64_BIT_INO_T == 1' >> ${.TARGET}
71 @echo '#endif /* __DARWIN_ONLY_64_BIT_INO_T */' >> ${.TARGET}
73 .ifdef FEATURE_PATCH_3375657
74 @echo '#define __APPLE_PR3375657_HACK__ 1' >> ${.TARGET}
76 @echo '/* #undef __APPLE_PR3375657_HACK__ */' >> ${.TARGET}
78 .ifdef FEATURE_PATCH_3417676
79 @echo '#define __APPLE_PR3417676_HACK__ 1' >> ${.TARGET}
81 @echo '/* #undef __APPLE_PR3417676_HACK__ */' >> ${.TARGET}
83 .ifdef FEATURE_PATCH_5243343
84 @echo '#define PR_5243343 1' >> ${.TARGET}
86 @echo '/* #undef PR_5243343 */' >> ${.TARGET}
88 .ifdef FEATURE_PLOCKSTAT
89 @echo '#define PLOCKSTAT 1' >> ${.TARGET}
91 @echo '/* #undef PLOCKSTAT */' >> ${.TARGET}
93 .ifdef FEATURE_TIMEZONE_CHANGE_NOTIFICATION
94 @echo '#define NOTIFY_TZ 1' >> ${.TARGET}
96 @echo '/* #undef NOTIFY_TZ */' >> ${.TARGET}
99 @echo '#endif /* _LIBC_FEATURES_H_ */' >> ${.TARGET}
101 .ifdef FEATURE_BLOCKS
102 UNIFDEFARGS += -DUNIFDEF_BLOCKS
104 UNIFDEFARGS += -UUNIFDEF_BLOCKS
106 .ifdef FEATURE_LEGACY_64_APIS
107 UNIFDEFARGS += -DUNIFDEF_LEGACY_64_APIS
109 UNIFDEFARGS += -UUNIFDEF_LEGACY_64_APIS
111 .ifdef FEATURE_LEGACY_RUNE_APIS
112 UNIFDEFARGS += -DUNIFDEF_LEGACY_RUNE_APIS
114 UNIFDEFARGS += -UUNIFDEF_LEGACY_RUNE_APIS
116 .ifdef FEATURE_LEGACY_UTMP_APIS
117 UNIFDEFARGS += -DUNIFDEF_LEGACY_UTMP_APIS
119 UNIFDEFARGS += -UUNIFDEF_LEGACY_UTMP_APIS
121 .ifdef FEATURE_MOVE_LOCALTIME
122 UNIFDEFARGS += -DUNIFDEF_MOVE_LOCALTIME
124 UNIFDEFARGS += -UUNIFDEF_MOVE_LOCALTIME