diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-09-03 16:02:24 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-09-09 17:57:06 +0200 |
commit | 3248c5b93cd22cb2d9f1a7368daf0902e68b58e0 (patch) | |
tree | 69f3a03020a1de26b9d2727b3c1d314c48b9e1db /Source | |
parent | ceaa9ecc67a9ebb83ce735a24c6061df3dd8c489 (diff) | |
download | qtwebkit-3248c5b93cd22cb2d9f1a7368daf0902e68b58e0.tar.gz |
Fix building QtWebKit for QNX
Fix method now available in QNX 6.6, lack of std::move even
with C++11 enabled, binary structure of stack frames on
QNX x86 and the wrongly advertised existence of MADV_FREE and
MADV_REUSE.
Change-Id: I0dacbd19ed932ec6b3b2cc1d625a347e169615a5
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Diffstat (limited to 'Source')
-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 */ |