15-ios.conf revision 1.1.1.6 1 1.1 christos #### iPhoneOS/iOS
2 1.1 christos #
3 1.1.1.3 christos # It takes recent enough Xcode to use following two targets. It shouldn't
4 1.1 christos # be a problem by now, but if they don't work, original targets below
5 1.1 christos # that depend on manual definition of environment variables should still
6 1.1 christos # work...
7 1.1 christos #
8 1.1 christos my %targets = (
9 1.1.1.2 christos "ios-common" => {
10 1.1.1.2 christos template => 1,
11 1.1.1.2 christos inherit_from => [ "darwin-common" ],
12 1.1.1.2 christos sys_id => "iOS",
13 1.1.1.6 christos disable => [ "async" ],
14 1.1.1.2 christos },
15 1.1 christos "ios-xcrun" => {
16 1.1.1.4 christos inherit_from => [ "ios-common" ],
17 1.1 christos # It should be possible to go below iOS 6 and even add -arch armv6,
18 1.1 christos # thus targeting iPhone pre-3GS, but it's assumed to be irrelevant
19 1.1 christos # at this point.
20 1.1 christos CC => "xcrun -sdk iphoneos cc",
21 1.1 christos cflags => add("-arch armv7 -mios-version-min=6.0.0 -fno-common"),
22 1.1.1.4 christos asm_arch => 'armv4',
23 1.1 christos perlasm_scheme => "ios32",
24 1.1 christos },
25 1.1 christos "ios64-xcrun" => {
26 1.1.1.4 christos inherit_from => [ "ios-common" ],
27 1.1 christos CC => "xcrun -sdk iphoneos cc",
28 1.1 christos cflags => add("-arch arm64 -mios-version-min=7.0.0 -fno-common"),
29 1.1 christos bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
30 1.1.1.4 christos asm_arch => 'aarch64',
31 1.1 christos perlasm_scheme => "ios64",
32 1.1 christos },
33 1.1 christos "iossimulator-xcrun" => {
34 1.1.1.2 christos inherit_from => [ "ios-common" ],
35 1.1 christos CC => "xcrun -sdk iphonesimulator cc",
36 1.1 christos },
37 1.1 christos # It takes three prior-set environment variables to make it work:
38 1.1 christos #
39 1.1 christos # CROSS_COMPILE=/where/toolchain/is/usr/bin/ [note ending slash]
40 1.1 christos # CROSS_TOP=/where/SDKs/are
41 1.1 christos # CROSS_SDK=iPhoneOSx.y.sdk
42 1.1 christos #
43 1.1 christos # Exact paths vary with Xcode releases, but for couple of last ones
44 1.1 christos # they would look like this:
45 1.1 christos #
46 1.1 christos # CROSS_COMPILE=`xcode-select --print-path`/Toolchains/XcodeDefault.xctoolchain/usr/bin/
47 1.1 christos # CROSS_TOP=`xcode-select --print-path`/Platforms/iPhoneOS.platform/Developer
48 1.1 christos # CROSS_SDK=iPhoneOS.sdk
49 1.1 christos #
50 1.1 christos "iphoneos-cross" => {
51 1.1.1.2 christos inherit_from => [ "ios-common" ],
52 1.1.1.5 christos cflags => add("-isysroot \"\$(CROSS_TOP)/SDKs/\$(CROSS_SDK)\" -fno-common"),
53 1.1 christos },
54 1.1 christos "ios-cross" => {
55 1.1 christos inherit_from => [ "ios-xcrun" ],
56 1.1 christos CC => "cc",
57 1.1.1.5 christos cflags => add("-isysroot \"\$(CROSS_TOP)/SDKs/\$(CROSS_SDK)\""),
58 1.1 christos },
59 1.1 christos "ios64-cross" => {
60 1.1 christos inherit_from => [ "ios64-xcrun" ],
61 1.1 christos CC => "cc",
62 1.1.1.5 christos cflags => add("-isysroot \"\$(CROSS_TOP)/SDKs/\$(CROSS_SDK)\""),
63 1.1 christos },
64 1.1 christos );
65