Fix C++11 compiler detection for QNX.
1. _HAS_DINKUM_CLIB is defined whenever a C header is included, even when Dinkum is disabled. 2. _HAS_* macros are always defined, as either 0 or 1. Change-Id: I727b854a6a733e2028e6facc327e264d0c4c9e90 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
132b032a2f
commit
f7f4dde80e
@ -922,24 +922,26 @@
|
||||
# if defined(Q_OS_QNX)
|
||||
// QNX: test if we are using libcpp (Dinkumware-based).
|
||||
// Older versions (QNX 650) do not support C++11 features
|
||||
// _HAS_CPP0X is defined by toolchains that actually include
|
||||
// _HAS_* macros are set to 1 by toolchains that actually include
|
||||
// Dinkum C++11 libcpp.
|
||||
# if defined(_HAS_DINKUM_CLIB) && !defined(_HAS_CPP0X)
|
||||
# if !__GLIBCXX__
|
||||
# if !_HAS_CPP0X
|
||||
// Disable C++11 features that depend on library support
|
||||
# undef Q_COMPILER_INITIALIZER_LISTS
|
||||
# undef Q_COMPILER_RVALUE_REFS
|
||||
# undef Q_COMPILER_REF_QUALIFIERS
|
||||
# undef Q_COMPILER_UNICODE_STRINGS
|
||||
# undef Q_COMPILER_NOEXCEPT
|
||||
# endif
|
||||
# if defined(_HAS_DINKUM_CLIB) && !defined(_HAS_NULLPTR_T)
|
||||
# endif // !_HAS_CPP0X
|
||||
# if !_HAS_NULLPTR_T
|
||||
# undef Q_COMPILER_NULLPTR
|
||||
# endif
|
||||
# if defined(_HAS_DINKUM_CLIB) && !defined(_HAS_CONSTEXPR)
|
||||
# endif //!_HAS_NULLPTR_T
|
||||
# if !_HAS_CONSTEXPR
|
||||
// The libcpp is missing constexpr keywords on important functions like std::numeric_limits<>::min()
|
||||
// Disable constexpr support on QNX even if the compiler supports it
|
||||
# undef Q_COMPILER_CONSTEXPR
|
||||
# endif
|
||||
# endif // !_HAS_CONSTEXPR
|
||||
# endif // !__GLIBCXX__
|
||||
# endif // Q_OS_QNX
|
||||
# if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) && defined(__GNUC_LIBSTD__) \
|
||||
&& ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402)
|
||||
|
Loading…
x
Reference in New Issue
Block a user