summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2013-02-26 17:52:10 +0100
committerAndoni Morales Alastruey <ylatuya@gmail.com>2013-02-26 18:16:15 +0100
commit710bb2967ae954e10a12a7eba91ebb6d5664a9b2 (patch)
tree1bbb04e14e5e60a3a95e202ccf44f8f8eb34e9c6 /config
parent64f8e411378b6584db4f98bf65a3cebb28c752d4 (diff)
ios.config: don't use full paths for the toolchain tools
Instead add the toolchain bin dir to PATH. This fixes several configure checks which expect a filename and not a full path
Diffstat (limited to 'config')
-rw-r--r--config/ios.config32
1 files changed, 14 insertions, 18 deletions
diff --git a/config/ios.config b/config/ios.config
index e0be4650..f5a65d94 100644
--- a/config/ios.config
+++ b/config/ios.config
@@ -26,13 +26,9 @@ if not ios_platform:
else:
ios_platform = 'iPhoneOS'
-# For Xcode >= 4.3, the SDK is installed in a completely different path
-# FIXME This has not been tested, we should check what is the iOS toolchain path
-# for xcode 4.3
-sysroot = '/Developer/SDKs/%s%s.sdk' % (platform, v)
-if not os.path.exists(sysroot):
- iphone_platform = '/Applications/Xcode.app/Contents/Developer/Platforms/%s.platform/Developer' % ios_platform
- sysroot = os.path.join(iphone_platform, 'SDKs', '%s%s.sdk' %(ios_platform, v))
+iphone_platform = '/Applications/Xcode.app/Contents/Developer/Platforms/%s.platform/Developer' % ios_platform
+_toolchain_root = '%s/usr/bin' % iphone_platform
+sysroot = os.path.join(iphone_platform, 'SDKs', '%s%s.sdk' %(ios_platform, v))
ccache = use_ccache and 'ccache ' or ''
extra_cflags=''
@@ -47,23 +43,23 @@ else:
raise FatalError("Arch not supported")
# Toolchain environment
-os.environ['CC']= os.path.join(iphone_platform, 'usr', 'bin', 'llvm-gcc-4.2')
+os.environ['PATH'] = '%s:%s' % (_toolchain_root, os.environ['PATH'])
+os.environ['CC']= 'llvm-gcc-4.2'
os.environ['OBJC'] = os.environ['CC']
-os.environ['LD']= os.path.join(iphone_platform, 'usr', 'bin', 'ld')
-os.environ['AR']= os.path.join(iphone_platform, 'usr', 'bin', 'ar')
-os.environ['NM']= os.path.join(iphone_platform, 'usr', 'bin', 'nm')
-os.environ['NMEDIT']= os.path.join(iphone_platform, 'usr', 'bin', 'nmedit')
-os.environ['RANLIB']= os.path.join(iphone_platform, 'usr', 'bin', 'ranlib')
-os.environ['AS']= os.path.join(iphone_platform, 'usr', 'bin', 'as')
+os.environ['CXX']= 'llvm-g++-4.2'
+os.environ['CPP']= "%s -E" % os.environ['CC']
+os.environ['CXXPP']= os.environ['CPP']
+os.environ['LD']= 'ld'
+os.environ['AR']= 'ar'
+os.environ['NM']= 'nm'
+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)
os.environ['OBJCFLAGS'] = os.environ['CFLAGS']
os.environ['LDFLAGS'] = '%s -isysroot %s -Wl,-iphoneos_version_min,%s -Wl,-undefined,error -Wl,-headerpad_max_install_names' %(arch_cflags, sysroot, min_version)
os.environ['OBJLDFLAGS'] = os.environ['LDFLAGS']
-
-os.environ['CXX']= os.path.join(iphone_platform, 'usr', 'bin', 'llvm-g++-4.2')
-os.environ['CPP']= "%s -E" % os.environ['CC']
-os.environ['CXXPP']= os.environ['CPP']
os.environ['CPPFLAGS'] = '%s -isysroot %s' % (arch_cflags, sysroot)
os.environ['CXXFLAGS'] = os.environ['CFLAGS']