]>
Commit | Line | Data |
---|---|---|
ad3c9f2a A |
1 | #include "<DEVELOPER_DIR>/Makefiles/CoreOS/Xcode/BSD.xcconfig" |
2 | ||
3 | // Standard settings | |
4 | SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator | |
5 | SRCROOT_SEARCH_PATHS = $(SRCROOT)/include $(SRCROOT)/gen $(SRCROOT)/locale $(SRCROOT)/locale/FreeBSD $(SRCROOT)/pthreads $(SRCROOT)/stdtime/FreeBSD | |
6 | SYSTEM_FRAMEWORK_HEADERS = $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders | |
7 | HEADER_SEARCH_PATHS = $($(TARGET_NAME)_SEARCH_PATHS) $(DERIVED_FILES_DIR)/dtrace $(DERIVED_FILES_DIR)/$(CURRENT_ARCH) $(SRCROOT_SEARCH_PATHS) $(SYSTEM_FRAMEWORK_HEADERS) $(SDKROOT)/usr/local/include $(inherited) | |
8 | ALWAYS_SEARCH_USER_PATHS = YES | |
9 | USE_HEADERMAP = NO | |
10 | BUILD_VARIANTS = normal | |
11 | GCC_OPTIMIZATION_LEVEL = s | |
12 | GCC_C_LANGUAGE_STANDARD = gnu99 | |
13 | GCC_ENABLE_OBJC_EXCEPTIONS = YES | |
14 | GCC_SYMBOLS_PRIVATE_EXTERN = NO | |
15 | GCC_DYNAMIC_NO_PIC = NO | |
16 | GCC_THUMB_SUPPORT = YES | |
17 | COPY_PHASE_STRIP = NO | |
18 | SKIP_INSTALL = YES | |
19 | INSTALLHDRS_SCRIPT_PHASE = YES | |
20 | VERSIONING_SYSTEM = | |
21 | COPY_PHASE_STRIP = NO | |
22 | STRIP_INSTALLED_PRODUCT = NO | |
23 | LD_DYLIB_INSTALL_NAME = /usr/lib/system/$(EXECUTABLE_NAME) | |
24 | ||
25 | BUILD_VARIANTS = normal debug | |
26 | ||
065eae9f | 27 | // clang is desired over llvm-gcc for OSAtomics. However, it isn't capable of building armv6 correctly on Sundance |
ad3c9f2a A |
28 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0 |
29 | GCC_VERSION[arch=armv6] = com.apple.compilers.llvmgcc42 | |
30 | ||
31 | EXECUTABLE_PREFIX = libsystem_ | |
32 | INSTALL_PATH = /usr/lib/system | |
33 | PUBLIC_HEADERS_FOLDER_PATH = /usr/include | |
34 | PRIVATE_HEADERS_FOLDER_PATH = /usr/local/include | |
35 | ||
36 | // Simulator | |
37 | EXECUTABLE_PREFIX[sdk=iphonesimulator*] = libsystem_sim_ | |
38 | PUBLIC_HEADERS_FOLDER_PATH[sdk=iphonesimulator*] = $(SDKROOT)/usr/include | |
39 | PRIVATE_HEADERS_FOLDER_PATH[sdk=iphonesimulator*] = $(SDKROOT)/usr/local/include | |
40 | INSTALL_PATH[sdk=iphonesimulator*] = $(SDKROOT)/usr/lib/system | |
41 | ||
42 | BASE_PREPROCESSOR_MACROS = __LIBC__ __DARWIN_UNIX03=1 __DARWIN_64_BIT_INO_T=1 __DARWIN_NON_CANCELABLE=1 __DARWIN_VERS_1050=1 _FORTIFY_SOURCE=0 | |
43 | OTHER_CFLAGS = -fdollars-in-identifiers $($(TARGET_NAME)_CFLAGS) $(VARIANT_PREPROCESSOR_MACROS) | |
44 | OTHER_CFLAGS_debug = -fstack-protector -fno-inline -O0 -DDEBUG=1 | |
45 | ||
46 | GCC_PREPROCESSOR_DEFINITIONS = $(BASE_PREPROCESSOR_MACROS) | |
47 | GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*] = $(BASE_PREPROCESSOR_MACROS) LIBC_NO_LIBCRASHREPORTERCLIENT=1 | |
48 | GCC_PREPROCESSOR_DEFINITIONS[sdk=iphonesimulator*] = $(BASE_PREPROCESSOR_MACROS) LIBC_NO_LIBCRASHREPORTERCLIENT=1 | |
49 | ||
50 | // libsystem_c.dylib linking | |
51 | CR_LDFLAGS[sdk=macosx*] = -lCrashReporterClient | |
52 | LIBCOMPILER_RT_LDFLAGS = -lcompiler_rt | |
53 | LIBSYSTEM_C_LDFLAGS = -all_load -nostdlib -L/usr/lib/system -Wl,-interposable_list,$(DERIVED_FILES_DIR)/interposable.list -umbrella System $(CR_LDFLAGS) -lSystem -lsystem_kernel $(LIBCOMPILER_RT_LDFLAGS) @$(BUILT_PRODUCTS_DIR)/$(CURRENT_VARIANT).linklist | |
54 | LIBSYSTEM_C_LDFLAGS[sdk=iphonesimulator*] = | |
55 | ||
56 | // libPlatform.a architectures | |
57 | ARCH_FAMILY = $(ARCH_FAMILY_$(CURRENT_ARCH)) | |
58 | ARCH_FAMILY_x86_64 = x86_64 | |
59 | ARCH_FAMILY_i386 = i386 | |
60 | ARCH_FAMILY_armv6 = arm | |
61 | ARCH_FAMILY_armv7 = arm | |
065eae9f | 62 | ARCH_FAMILY_armv7s = arm |
ad3c9f2a A |
63 | ARCH_FAMILY_armv7f = arm |
64 | ARCH_FAMILY_armv7k = arm | |
65 | ||
66 | // FreeBSD target | |
67 | FreeBSD_CFLAGS = -include $(SRCROOT)/fbsdcompat/_fbsd_compat_.h | |
68 | FreeBSD_SEARCH_PATHS = $(SRCROOT)/fbsdcompat $(SRCROOT)/gdtoa $(SRCROOT)/gdtoa/FreeBSD | |
69 | FreeBSD_EXCLUDED_SOURCE_GDTOA = gdtoa/FreeBSD/machdep* gdtoa-strtopx.c | |
70 | // Include the correct parts of gdtoa per-arch | |
71 | FreeBSD_INCLUDED_SOURCE_FILE_NAMES_x86_64 = gdtoa-strtopx.c machdep_ldisx.c | |
72 | FreeBSD_INCLUDED_SOURCE_FILE_NAMES_i386 = $(FreeBSD_INCLUDED_SOURCE_FILE_NAMES_x86_64) | |
73 | FreeBSD_INCLUDED_SOURCE_FILE_NAMES_armv7 = machdep_ldisd.c | |
065eae9f | 74 | FreeBSD_INCLUDED_SOURCE_FILE_NAMES_armv7s = $(FreeBSD_INCLUDED_SOURCE_FILE_NAMES_armv7) |
ad3c9f2a A |
75 | FreeBSD_INCLUDED_SOURCE_FILE_NAMES_armv7k = $(FreeBSD_INCLUDED_SOURCE_FILE_NAMES_armv7) |
76 | FreeBSD_INCLUDED_SOURCE_FILE_NAMES_armv7f = $(FreeBSD_INCLUDED_SOURCE_FILE_NAMES_armv7) | |
77 | FreeBSD_INCLUDED_SOURCE_FILE_NAMES_armv6 = $(FreeBSD_INCLUDED_SOURCE_FILE_NAMES_armv7) | |
78 | ||
79 | // FreeBSD_gcc target | |
80 | FreeBSD_gcc_CFLAGS = -include $(SRCROOT)/fbsdcompat/_fbsd_compat_.h | |
81 | FreeBSD_gcc_SEARCH_PATHS = $(SRCROOT)/fbsdcompat $(SRCROOT)/gdtoa $(SRCROOT)/gdtoa/FreeBSD | |
82 | ||
83 | // NetBSD target | |
84 | NetBSD_CFLAGS = -include $(SRCROOT)/nbsdcompat/_nbsd_compat_.h | |
85 | NetBSD_SEARCH_PATHS = $(SRCROOT)/nbsdcompat | |
86 | ||
87 | // TRE target | |
88 | TRE_CFLAGS = -DHAVE_CONFIG_H | |
89 | TRE_SEARCH_PATHS = $(SRCROOT)/regex/TRE $(SRCROOT)/regex/FreeBSD | |
90 | ||
91 | // Files per architecture to exclude from the non-platform builds (because optimised versions exist in Platform) | |
92 | BASE_EXCLUDED_SOURCE_FILE_NAMES = $(BASE_EXCLUDED_SOURCE_FILE_NAMES_$(CURRENT_ARCH)) $(BASE_EXCLUDED_SOURCE_FILE_NAMES_$(PLATFORM_NAME)) | |
93 | BASE_EXCLUDED_SOURCE_FILE_NAMES_x86_64 = MKGetTimeBaseInfo.c bcmp.c context-stubs.c kvm.c memcmp.c memset.c memset_pattern.c nlist.c strcpy.c strlcat.c strlcpy.c strlen.c strncmp.c strncpy.c | |
94 | BASE_EXCLUDED_SOURCE_FILE_NAMES_i386 = bcmp.c context-stubs.c memcmp.c memset.c memset_pattern.c strcpy.c strlcat.c strlcpy.c strlen.c strncmp.c strncpy.c | |
95 | BASE_EXCLUDED_SOURCE_FILE_NAMES_armv7 = bcmp.c memcmp.c memset.c memset_pattern.c strchr.c strlen.c strncmp.c strnlen.c strstr.c | |
065eae9f | 96 | BASE_EXCLUDED_SOURCE_FILE_NAMES_armv7s = $(BASE_EXCLUDED_SOURCE_FILE_NAMES_armv7) |
ad3c9f2a A |
97 | BASE_EXCLUDED_SOURCE_FILE_NAMES_armv7k = $(BASE_EXCLUDED_SOURCE_FILE_NAMES_armv7) |
98 | BASE_EXCLUDED_SOURCE_FILE_NAMES_armv7f = $(BASE_EXCLUDED_SOURCE_FILE_NAMES_armv7) | |
99 | BASE_EXCLUDED_SOURCE_FILE_NAMES_armv6 = $(BASE_EXCLUDED_SOURCE_FILE_NAMES_armv7) | |
100 | ||
101 | // Rune support isn't included on iOS but there's no better way to exclude their complication | |
102 | BASE_EXCLUDED_SOURCE_FILE_NAMES_macosx = OSMemoryNotification.c OSThermalNotification.c | |
103 | BASE_EXCLUDED_SOURCE_FILE_NAMES_iphoneos = frune.c login.c logout.c mbrune.c runedepreciated.c setinvalidrune.c getmntinfo64.c | |
104 | BASE_EXCLUDED_SOURCE_FILE_NAMES_iphonesimulator = $(BASE_EXCLUDED_SOURCE_FILE_NAMES_iphoneos) | |
105 | ||
106 | // <rdar://problem/9513665> - collate.c crashes llvm-gcc on armv6 with -Os + -gdwarf-2 | |
107 | COLLATE_C_CFLAGS_macosx_armv6 = -O1 | |
108 | ||
109 | // ARMv6 thumb doesn't support all the instructions needed for OSAtomics | |
110 | OSATOMIC_C_CFLAGS_macosx_armv6 = -mno-thumb | |
111 | OSATOMIC_C_CFLAGS_iphoneos_armv6 = -mno-thumb |