From 1126278e469f4691f786a8bdcf6ae13d8957434b Mon Sep 17 00:00:00 2001 From: Raphael Kubo da Costa Date: Sat, 7 Sep 2013 21:19:20 +0000 Subject: [PATCH] Bring in a few more libc++ patches I got upstream a few months ago. While here, rename the patch added in r326562 to reflect the right location it changes. --- ...re__JavaScriptCore__runtime__Collector.cpp | 38 ++++++++++++++++++ ...riptcore__JavaScriptCore__wtf__HashTable.h | 40 +++++++++++++++++++ ...iptcore__JavaScriptCore__wtf__Threading.h} | 0 3 files changed, 78 insertions(+) create mode 100644 devel/qt4-script/files/patch-src__3rdparty__javascriptcore__JavaScriptCore__runtime__Collector.cpp create mode 100644 devel/qt4-script/files/patch-src__3rdparty__javascriptcore__JavaScriptCore__wtf__HashTable.h rename devel/qt4-script/files/{patch-src__3rdparty__javascriptcore__wtf__Threading.h => patch-src__3rdparty__javascriptcore__JavaScriptCore__wtf__Threading.h} (100%) diff --git a/devel/qt4-script/files/patch-src__3rdparty__javascriptcore__JavaScriptCore__runtime__Collector.cpp b/devel/qt4-script/files/patch-src__3rdparty__javascriptcore__JavaScriptCore__runtime__Collector.cpp new file mode 100644 index 000000000000..95e112ac20eb --- /dev/null +++ b/devel/qt4-script/files/patch-src__3rdparty__javascriptcore__JavaScriptCore__runtime__Collector.cpp @@ -0,0 +1,38 @@ +From 952b046ba5bc99986f747729681914e21f8fb8b0 Mon Sep 17 00:00:00 2001 +From: "Bradley T. Hughes" +Date: Wed, 30 May 2012 11:49:40 +0200 +Subject: [PATCH] Compile with clang's libc++ + +An overload for std::swap() what works with std::pair is included +in libc++ (but not libstdc++). Avoid ambiguity in HashTable.h by +omitting the version there and using the std::swap() version. + +Collector.cpp needs to include pthread.h directly, as it is not +automatically included by libc++'s headers (libstdc++ does pull in +pthread.h though). + +Cherry-picked from qtscript/48baeef0766ba145d26d374561e152b40245f3b8. + +Change-Id: I4dc88638ce8553bb97037b841fc6cc5e8c9911e2 +Reviewed-by: Thiago Macieira +--- + src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp | 2 ++ + src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h | 4 ++-- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp +index 6af1784..711949b 100644 +--- src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp ++++ src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp +@@ -52,6 +52,8 @@ + #include + #include + #include ++// clang's libc++ headers does not pull in pthread.h (but libstdc++ does) ++#include + + #elif OS(WINDOWS) + +-- +1.8.4 + diff --git a/devel/qt4-script/files/patch-src__3rdparty__javascriptcore__JavaScriptCore__wtf__HashTable.h b/devel/qt4-script/files/patch-src__3rdparty__javascriptcore__JavaScriptCore__wtf__HashTable.h new file mode 100644 index 000000000000..20f5b8c74a99 --- /dev/null +++ b/devel/qt4-script/files/patch-src__3rdparty__javascriptcore__JavaScriptCore__wtf__HashTable.h @@ -0,0 +1,40 @@ +From 952b046ba5bc99986f747729681914e21f8fb8b0 Mon Sep 17 00:00:00 2001 +From: "Bradley T. Hughes" +Date: Wed, 30 May 2012 11:49:40 +0200 +Subject: [PATCH] Compile with clang's libc++ + +An overload for std::swap() what works with std::pair is included +in libc++ (but not libstdc++). Avoid ambiguity in HashTable.h by +omitting the version there and using the std::swap() version. + +Collector.cpp needs to include pthread.h directly, as it is not +automatically included by libc++'s headers (libstdc++ does pull in +pthread.h though). + +Cherry-picked from qtscript/48baeef0766ba145d26d374561e152b40245f3b8. + +Change-Id: I4dc88638ce8553bb97037b841fc6cc5e8c9911e2 +Reviewed-by: Thiago Macieira +--- + src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp | 2 ++ + src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h | 4 ++-- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h +index bea9daa..42a9233 100644 +--- src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h ++++ src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h +@@ -257,8 +257,8 @@ namespace WTF { + + using std::swap; + +-#if !COMPILER(MSVC) && !OS(QNX) +- // The Dinkumware C++ library (used by MSVC and QNX) has a swap for pairs defined. ++#if !COMPILER(MSVC) && !OS(QNX) && !defined(_LIBCPP_VERSION) ++ // The Dinkumware C++ library (used by MSVC and QNX) and clang's libc++ have a swap for pairs defined. + + // swap pairs by component, in case of pair members that specialize swap + template inline void swap(pair& a, pair& b) +-- +1.8.4 + diff --git a/devel/qt4-script/files/patch-src__3rdparty__javascriptcore__wtf__Threading.h b/devel/qt4-script/files/patch-src__3rdparty__javascriptcore__JavaScriptCore__wtf__Threading.h similarity index 100% rename from devel/qt4-script/files/patch-src__3rdparty__javascriptcore__wtf__Threading.h rename to devel/qt4-script/files/patch-src__3rdparty__javascriptcore__JavaScriptCore__wtf__Threading.h