diff options
authorEskil Abrahamsen Blomfeldt <>2013-03-19 08:57:30 +0100
committerThe Qt Project <>2013-03-21 15:27:38 +0100
commitf8c9f960ad6595060fef7075f5e0ef7346af44f8 (patch)
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 <>
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
elif [ "$CFG_CXX11" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "C++11 support cannot be enabled due to functionality tests!"