QNX: fix compiler detection.
Short version: fix build on QNX 6.5.0. C++11 has been included on QNX 6.6.0's libcpp (Dinkum C++11 libs), while continuing to be unsupported by the older QNX 6.5.0 toolchain. This patch updates the mechanism for detecting the QNX's libcpp that is being used during compile time, and also updates the list of C++11 features to be disabled when QNX C++11 support is not present by adding Q_COMPILER_UNICODE_STRINGS and Q_COMPILER_NOEXCEPT to it. Change-Id: Iddb3626206a0d97d7103c1ff17ba0ae953e9a4b9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
317c341a66
commit
86c6804a41
@ -891,15 +891,17 @@
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
# include <utility>
|
# include <utility>
|
||||||
# if defined(Q_OS_QNX)
|
# if defined(Q_OS_QNX)
|
||||||
# if defined(_YVALS) || defined(_LIBCPP_VER)
|
// QNX: test if we are using libcpp (Dinkumware-based).
|
||||||
// QNX: libcpp (Dinkumware-based) doesn't have the <initializer_list>
|
// Older versions (QNX 650) do not support C++11 features
|
||||||
// header, so the feature is useless, even if the compiler supports
|
// _HAS_CPP0X is defined by toolchains that actually include
|
||||||
// it. Disable.
|
// Dinkum C++11 libcpp.
|
||||||
|
# if defined(_HAS_DINKUM_CLIB) && !defined(_HAS_CPP0X)
|
||||||
|
// Disable C++11 features that depend on library support
|
||||||
# undef Q_COMPILER_INITIALIZER_LISTS
|
# undef Q_COMPILER_INITIALIZER_LISTS
|
||||||
// That libcpp doesn't have std::move either, so disable everything
|
|
||||||
// related to rvalue refs.
|
|
||||||
# undef Q_COMPILER_RVALUE_REFS
|
# undef Q_COMPILER_RVALUE_REFS
|
||||||
# undef Q_COMPILER_REF_QUALIFIERS
|
# undef Q_COMPILER_REF_QUALIFIERS
|
||||||
|
# undef Q_COMPILER_UNICODE_STRINGS
|
||||||
|
# undef Q_COMPILER_NOEXCEPT
|
||||||
# endif
|
# endif
|
||||||
# endif // Q_OS_QNX
|
# endif // Q_OS_QNX
|
||||||
# if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) && defined(__GNUC_LIBSTD__) \
|
# if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) && defined(__GNUC_LIBSTD__) \
|
||||||
|
Loading…
Reference in New Issue
Block a user