From 93acff78831be7a6a69613306ad96a74752f13cd Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 21 Mar 2013 13:21:33 -0700 Subject: Add support for the Clang compiler bundled with XCode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since c45595d64831990311f92fcebc4e34e2797f5352, we use the toolchain based on the XCode SDK, not the one in $PATH. Turns out that the Clang that comes bundled with XCode 4.6 reports its version as Apple LLVM version 4.2 (clang-425.0.27) (based on LLVM 3.2svn) Instead of "Apple clang". So we need to match for (clang|LLVM). Extended regular expressions (with -E) were necessary because the sed that comes with Mac OS X is apparently broken and will not work with \(clang\|LLVM\). GNU sed accepts -E as an alias for -r, meaning extended regexps. Change-Id: I5a15de30721216b086c3d39a080cc6496c503985 Reviewed-by: Oswald Buddenhagen Reviewed-by: Tor Arne Vestbø --- configure | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 91f7c1a4fa..c66f1b66e3 100755 --- a/configure +++ b/configure @@ -6059,11 +6059,11 @@ if [ "$CFG_QML_DEBUG" = "no" ]; then fi case "$QMAKE_CONF_COMPILER" in -*clang++*) +*clang*) # Clang - COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -v 2>&1 | sed -n ' -/^Apple clang version /{s///; s/^\([0-9]*\)\.\([0-9]*\).*$/QT_APPLE_CLANG_MAJOR_VERSION=\1; QT_APPLE_CLANG_MINOR_VERSION=\2/;p;q;} -/^clang version /{s///; s/^\([0-9]*\)\.\([0-9]*\).*$/QT_CLANG_MAJOR_VERSION=\1; QT_CLANG_MINOR_VERSION=\2/;p;q;}'` + COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -v 2>&1 | sed -n -E ' +/^Apple (clang|LLVM) version /{s///; s/^([0-9]*)\.([0-9]*).*$/QT_APPLE_CLANG_MAJOR_VERSION=\1; QT_APPLE_CLANG_MINOR_VERSION=\2/;p;q;} +/^clang version /{s///; s/^([0-9]*)\.([0-9]*).*$/QT_CLANG_MAJOR_VERSION=\1; QT_CLANG_MINOR_VERSION=\2/;p;q;}'` eval "$COMPILER_VERSION" ;; *icpc) -- cgit v1.2.3