summaryrefslogtreecommitdiffstats
path: root/mkspecs/features
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-02-27 15:01:25 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-13 18:40:26 +0100
commitc45595d64831990311f92fcebc4e34e2797f5352 (patch)
tree016f45493da71e8f1166d5f49b4cab362d0a007b /mkspecs/features
parente9837f79387c7b9cd8c1483f8f64352de07c5bda (diff)
Use tools from the SDK's toolchain instead of the ones in /usr/bin
For Mac OS X we currently specify build tools without an absolute path, which means we end up using the ones in /usr/bin. This is wrong, we should be using the tools from the toolchain of the chosen SDK. For iOS we do specify an absolute path, by resolving the toolchain path in the iOS makespecs. To solve the situation on Mac OS X, we move the logic of resolving the toolchain path to sdk.prf, and share it between OSX and iOS. For configure we need to duplicate some of the logic from sdk.prf, as configure pulls out QMAKE_CC and QMAKE_CXX for running some initial tests and building qmake. The new macSDKify function also solves the issue of missing sysroot and deployment version in the flags. Change-Id: Ib1d239c9904cf3ccee5214b313cf6205869a1462 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'mkspecs/features')
-rw-r--r--mkspecs/features/mac/sdk.prf9
1 files changed, 9 insertions, 0 deletions
diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf
index 260d8ec97a..eaa3108a8b 100644
--- a/mkspecs/features/mac/sdk.prf
+++ b/mkspecs/features/mac/sdk.prf
@@ -19,6 +19,15 @@ sysrootified =
for(val, QMAKE_INCDIR_OPENGL): sysrootified += $${QMAKE_MAC_SDK_PATH}$$val
QMAKE_INCDIR_OPENGL = $$sysrootified
+# Resolve SDK version of various tools
+for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_LINK QMAKE_LINK_SHLIB)) {
+ value = $$eval($$tool)
+ isEmpty(value): next()
+
+ sysrooted = $$system("xcrun -sdk $$QMAKE_MAC_SDK -find $$first(value)")
+ $$tool = $$sysrooted $$member(value, 1, -1)
+}
+
# We use xml as the output format instead of json since plutil on 10.6 does not have that option
QMAKE_MAC_PLATFORM_NAME = $$system("plutil -convert xml1 \"$$QMAKE_MAC_SDK_PATH/SDKSettings.plist\" -o - | " \
"sed '/^<!DOCTYPE/d' | " \ # Don't look up http://www.apple.com/DTDs/PropertyList-1.0.dtd