summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-09-19 16:29:13 +0300
committerSebastian Dröge <sebastian@centricular.com>2014-11-07 18:55:35 +0100
commit75023ba5ae1ed4dc3fd26a2fd7f362cbd2fbc0c5 (patch)
tree4b997041c1598fe65ae01b90f38c0eb92d66e636
parentb9712428d016256ef71cf8ff529e5304b87387ef (diff)
ios: Use -miphoneos-version-min on iOS and -mios-simulator-version-min for the simulator
Fixes simulator build with XCode 6
-rw-r--r--config/ios.config10
1 files changed, 6 insertions, 4 deletions
diff --git a/config/ios.config b/config/ios.config
index f56283c1..b210fa9d 100644
--- a/config/ios.config
+++ b/config/ios.config
@@ -65,8 +65,6 @@ elif target_arch == Architecture.ARM:
elif target_arch == Architecture.X86:
arch_cflags = ' -arch i386 '
host = 'i386-apple-darwin10'
- (major, minor) = min_version.split('.')
- extra_cflags='-D__IPHONE_OS_VERSION_MIN_REQUIRED=%s0%s00' % (major, minor)
elif target_arch == Architecture.UNIVERSAL:
arch_cflags=''
else:
@@ -93,9 +91,13 @@ os.environ['NMEDIT']= 'nmedit'
os.environ['RANLIB']= 'ranlib'
os.environ['AS']= 'as'
os.environ['GAS']= '%s %s' % ('gas-preprocessor.pl', os.environ['CC'])
-os.environ['CFLAGS'] = '%s -isysroot %s -miphoneos-version-min=%s %s' %(arch_cflags, sysroot, min_version, extra_cflags)
+if ios_platform == 'iPhoneOS':
+ os.environ['CFLAGS'] = '%s -isysroot %s -miphoneos-version-min=%s %s' %(arch_cflags, sysroot, min_version, extra_cflags)
+ os.environ['LDFLAGS'] = '%s -isysroot %s -miphoneos-version-min=%s -Wl,-iphoneos_version_min,%s -Wl,-undefined,error -Wl,-headerpad_max_install_names' %(arch_cflags, sysroot, min_version, min_version)
+else:
+ os.environ['CFLAGS'] = '%s -isysroot %s -mios-simulator-version-min=%s %s' %(arch_cflags, sysroot, min_version, extra_cflags)
+ os.environ['LDFLAGS'] = '%s -isysroot %s -mios-simulator-version-min=%s -Wl,-ios_simulator_version_min,%s -Wl,-undefined,error -Wl,-headerpad_max_install_names' %(arch_cflags, sysroot, min_version, min_version)
os.environ['OBJCFLAGS'] = os.environ['CFLAGS']
-os.environ['LDFLAGS'] = '%s -isysroot %s -miphoneos-version-min=%s -Wl,-iphoneos_version_min,%s -Wl,-undefined,error -Wl,-headerpad_max_install_names' %(arch_cflags, sysroot, min_version, min_version)
os.environ['OBJLDFLAGS'] = os.environ['LDFLAGS']
os.environ['CPPFLAGS'] = '%s -isysroot %s' % (arch_cflags, sysroot)
os.environ['CXXFLAGS'] = os.environ['CFLAGS']