summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-08-12 09:17:58 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-08-24 10:36:27 (GMT)
commitaa442648396e1367d6236801c5e1ad36884e4a81 (patch)
tree64a2b45cb8f8d4268f7dae97a1a41bf47c1e5e15 /configure
parentae29cdf5cd319e447ef75b11ac1247375c6c8192 (diff)
downloadQt-aa442648396e1367d6236801c5e1ad36884e4a81.zip
Qt-aa442648396e1367d6236801c5e1ad36884e4a81.tar.gz
Qt-aa442648396e1367d6236801c5e1ad36884e4a81.tar.bz2
Introduce a second compatibility build key to Qt.
Some compilers are compatible with one another. In particular, the Intel CC on Unix systems is compatible with g++ on the same system. We should be saving the ABI "name" in the build key, not the compiler name, but it's too late for that. Choose "g++-{VERSION}" as the standard ABI name and make ICC support that. Reviewed-by: Bradley T. Hughes
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure32
1 files changed, 32 insertions, 0 deletions
diff --git a/configure b/configure
index 3230086..1221d62 100755
--- a/configure
+++ b/configure
@@ -7278,6 +7278,7 @@ fi
# some compilers generate binary incompatible code between different versions,
# so we need to generate a build key that is different between these compilers
+COMPAT_COMPILER=
case "$COMPILER" in
g++*)
# GNU C++
@@ -7311,6 +7312,22 @@ g++*)
esac
[ '!' -z "$COMPILER_VERSION" ] && COMPILER="g++-${COMPILER_VERSION}"
;;
+icc*)
+ # The Intel CC compiler on Unix systems matches the ABI of the g++
+ # that is found on PATH
+ COMPILER="icc"
+ COMPAT_COMPILER="g++-4"
+ case "`g++ -dumpversion` 2>/dev/null" in
+ 2.95.*)
+ COMPAT_COMPILER="g++-2.95.*"
+ ;;
+ 3.*)
+ COMPAT_COMPILER="g++-3.*"
+ ;;
+ *)
+ ;;
+ esac
+ ;;
*)
#
;;
@@ -7453,9 +7470,20 @@ if [ "$QT_CROSS_COMPILE" = "no" ]; then
QT_BUILD_KEY_COMPAT="$QT_BUILD_KEY_COMPAT $QT_NAMESPACE"
fi
fi
+
+# is this compiler compatible with some other "standard" build key
+QT_BUILD_KEY_COMPAT_COMPILER=
+if [ ! -z "$COMPAT_COMPILER" ]; then
+ QT_BUILD_KEY_COMPAT_COMPILER="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPAT_COMPILER $BUILD_OPTIONS"
+ if [ -n "$QT_NAMESPACE" ]; then
+ QT_BUILD_KEY_COMPAT_COMPILER="$QT_BUILD_KEY_COMPAT_COMPILER $QT_NAMESPACE"
+ fi
+fi
+
# strip out leading/trailing/extra whitespace
QT_BUILD_KEY=`echo $QT_BUILD_KEY | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
QT_BUILD_KEY_COMPAT=`echo $QT_BUILD_KEY_COMPAT | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
+QT_BUILD_KEY_COMPAT_COMPILER=`echo $QT_BUILD_KEY_COMPAT_COMPILER | sed -e "s, *, ,g" -e "s,^ *,," -e "s, *$,,"`
#-------------------------------------------------------------------------------
# part of configuration information goes into qconfig.h
@@ -7504,6 +7532,10 @@ if [ -n "$QT_BUILD_KEY_COMPAT" ]; then
echo "#define QT_BUILD_KEY_COMPAT \"$QT_BUILD_KEY_COMPAT\"" \
>> "$outpath/src/corelib/global/qconfig.h.new"
fi
+if [ -n "$QT_BUILD_KEY_COMPAT_COMPILER" ]; then
+ echo "#define QT_BUILD_KEY_COMPAT2 \"$QT_BUILD_KEY_COMPAT_COMPILER\"" \
+ >> "$outpath/src/corelib/global/qconfig.h.new"
+fi
echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
echo "#ifdef QT_BOOTSTRAPPED" >>"$outpath/src/corelib/global/qconfig.h.new"