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>
This commit is contained in:
Eskil Abrahamsen Blomfeldt 2013-03-19 08:57:30 +01:00 committed by The Qt Project
parent 53b32a0b3f
commit f8c9f960ad

7
configure vendored
View File

@ -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!"