summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2013-03-19 08:57:30 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-21 15:27:38 +0100
commitf8c9f960ad6595060fef7075f5e0ef7346af44f8 (patch)
tree49c79f9be26642d2111eb85eabdcb3967889f435 /configure
parent53b32a0b3f589fe118d38dcf2c55d95e3854e6d8 (diff)
Fix crosscompiling for Android on Mac
There is no logic in configure to detect compiler capabilities in the host- and cross-compilers separately, so if the cross-compiler has more capabilities than the host compiler, the compilation will break. This was the case for c++11 on Mac, which is supported by the Android cross-compiler but not by default on the host. There is a fix planned to enable c++11 on Mac, so this is a temporary patch to work around the problem by disabling c++11 explicitly until it has been fixed. Change-Id: I2048dc7f63991c97b11b3980ac91292d2c9b7ce4 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure b/configure
index be0fe72845..91f7c1a4fa 100755
--- a/configure
+++ b/configure
@@ -4162,7 +4162,12 @@ fi
# Detect C++11 support
if [ "$CFG_CXX11" != "no" ]; then
- if compileTest common/c++11 "C++11"; then
+ # Configure detects compiler features based on cross compiler, so we need
+ # to explicitly disable C++11 on Mac to avoid breaking builds where the
+ # host compiler does not support it.
+ if [ "$PLATFORM_MAC" = "yes" ] && [ "$XPLATFORM_ANDROID" = "yes" ]; then
+ CFG_CXX11="no"
+ elif compileTest common/c++11 "C++11"; then
CFG_CXX11="yes"
elif [ "$CFG_CXX11" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "C++11 support cannot be enabled due to functionality tests!"