|author||Eskil Abrahamsen Blomfeldt <email@example.com>||2013-03-19 08:57:30 +0100|
|committer||The Qt Project <firstname.lastname@example.org>||2013-03-21 15:27:38 +0100|
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 <email@example.com>
1 files changed, 6 insertions, 1 deletions
@@ -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
+ 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!"