diff options
| -rw-r--r-- | Source/JavaScriptCore/jit/JITStubs.h | 2 | ||||
| -rw-r--r-- | Source/WTF/wtf/Compiler.h | 19 | ||||
| -rw-r--r-- | Source/WTF/wtf/MathExtras.h | 4 | ||||
| -rw-r--r-- | Source/WTF/wtf/Platform.h | 5 |
4 files changed, 17 insertions, 13 deletions
diff --git a/Source/JavaScriptCore/jit/JITStubs.h b/Source/JavaScriptCore/jit/JITStubs.h index 51873507e..2659d6899 100644 --- a/Source/JavaScriptCore/jit/JITStubs.h +++ b/Source/JavaScriptCore/jit/JITStubs.h @@ -140,7 +140,7 @@ struct JITStackFrame { ReturnAddressPtr* returnAddressSlot() { return reinterpret_cast<ReturnAddressPtr*>(this) - 1; } }; #elif CPU(X86) -#if COMPILER(MSVC) || (OS(WINDOWS) && COMPILER(GCC)) +#if COMPILER(MSVC) || (OS(WINDOWS) && COMPILER(GCC)) || OS(QNX) #pragma pack(push) #pragma pack(4) #endif // COMPILER(MSVC) || (OS(WINDOWS) && COMPILER(GCC)) diff --git a/Source/WTF/wtf/Compiler.h b/Source/WTF/wtf/Compiler.h index 493894c09..ead844f9e 100644 --- a/Source/WTF/wtf/Compiler.h +++ b/Source/WTF/wtf/Compiler.h @@ -62,11 +62,6 @@ #define WTF_COMPILER_SUPPORTS_CXX_STRONG_ENUMS __has_feature(cxx_strong_enums) #define WTF_COMPILER_SUPPORTS_CXX_REFERENCE_QUALIFIED_FUNCTIONS __has_feature(cxx_reference_qualified_functions) -#if defined(__APPLE__) && COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES) && defined(_GLIBCXX_VERSION) && (_GLIBCXX_VERSION <= 20070719) -/* WTF expects the standard library to have std::move when the compiler supports rvalue references, but some old versions of stdc++11 shipped by Apple does not. */ -#define WTF_COMPILER_SUPPORTS_CXX_RVALUE_REFERENCES 0 -#endif - #endif #ifndef CLANG_PRAGMA @@ -185,6 +180,20 @@ #define WTF_COMPILER_SUPPORTS_EABI 1 #endif +/* Library C++11 support */ +#if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES) +/* WTF expects the standard library to have std::move when the compiler supports rvalue references */ +#if defined(__APPLE__) && defined(_GLIBCXX_VERSION) && (_GLIBCXX_VERSION <= 20070719) +/* Some old versions of stdc++11 shipped by Apple does not have std::move. */ +#undef WTF_COMPILER_SUPPORTS_CXX_RVALUE_REFERENCES +#define WTF_COMPILER_SUPPORTS_CXX_RVALUE_REFERENCES 0 +#elif defined(__QNXNTO__) && (defined(_YVALS) || defined(_LIBCPP_VER)) +/* libcpp (Dinkumware) does not support std::move */ +#undef WTF_COMPILER_SUPPORTS_CXX_RVALUE_REFERENCES +#define WTF_COMPILER_SUPPORTS_CXX_RVALUE_REFERENCES 0 +#endif +#endif + /* ==== Compiler features ==== */ /* ALWAYS_INLINE */ diff --git a/Source/WTF/wtf/MathExtras.h b/Source/WTF/wtf/MathExtras.h index 1bdbc6108..859722386 100644 --- a/Source/WTF/wtf/MathExtras.h +++ b/Source/WTF/wtf/MathExtras.h @@ -148,8 +148,8 @@ inline double trunc(double num) { return num > 0 ? floor(num) : ceil(num); } #endif -#if COMPILER(GCC) && OS(QNX) -// The stdlib on QNX doesn't contain long abs(long). See PR #104666. +#if COMPILER(GCC) && OS(QNX) && _CPPLIB_VER < 640 +// The stdlib on QNX < 6.6 doesn't contain long abs(long). See PR #104666. inline long long abs(long num) { return labs(num); } #endif diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h index 1327ef54c..1339642b4 100644 --- a/Source/WTF/wtf/Platform.h +++ b/Source/WTF/wtf/Platform.h @@ -694,11 +694,6 @@ #define HAVE_VIRTUALALLOC 1 #endif -#if OS(QNX) -#define HAVE_MADV_FREE_REUSE 1 -#define HAVE_MADV_FREE 1 -#endif - /* ENABLE macro defaults */ /* FIXME: move out all ENABLE() defines from here to FeatureDefines.h */ |
