From c3dc346d44c8c5485b3eb1a97f32ba2ed2e76ece Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 26 Sep 2015 16:03:23 +0000 Subject: webkitgtk: Fix build with clang/musl backtrace is glibc only feature on linux so check for glibc before using it Clangs clear_cache has different signature than gcc provided builtin make it compatible for both Signed-off-by: Khem Raj --- ...x-build-with-non-glibc-libraries-on-linux.patch | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-non-glibc-libraries-on-linux.patch (limited to 'meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-non-glibc-libraries-on-linux.patch') diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-non-glibc-libraries-on-linux.patch b/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-non-glibc-libraries-on-linux.patch new file mode 100644 index 0000000000..77ebf37efa --- /dev/null +++ b/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-non-glibc-libraries-on-linux.patch @@ -0,0 +1,61 @@ +From 30e2ef302a329850ba55c7c458c98cbf396186ec Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 31 Dec 2015 21:47:34 +0000 +Subject: [PATCH] Fix build with non-glibc libraries on linux + +qualify isnan() calls with std namespace +malloc_trim is glibc specific API so guard it with __GLIBC__ +let ctype be used on non-glibc ( musl ) C library + +Signed-off-by: Khem Raj +--- +Upstream-Status: Accepted + + Source/JavaScriptCore/runtime/Options.cpp | 2 +- + Source/WTF/wtf/DisallowCType.h | 2 +- + Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp | 2 ++ + 3 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/Source/JavaScriptCore/runtime/Options.cpp b/Source/JavaScriptCore/runtime/Options.cpp +index fe830b4..c49aade 100644 +--- a/Source/JavaScriptCore/runtime/Options.cpp ++++ b/Source/JavaScriptCore/runtime/Options.cpp +@@ -610,7 +610,7 @@ bool Option::operator==(const Option& other) const + case Options::Type::unsignedType: + return m_entry.unsignedVal == other.m_entry.unsignedVal; + case Options::Type::doubleType: +- return (m_entry.doubleVal == other.m_entry.doubleVal) || (isnan(m_entry.doubleVal) && isnan(other.m_entry.doubleVal)); ++ return (m_entry.doubleVal == other.m_entry.doubleVal) || (std::isnan(m_entry.doubleVal) && std::isnan(other.m_entry.doubleVal)); + case Options::Type::int32Type: + return m_entry.int32Val == other.m_entry.int32Val; + case Options::Type::optionRangeType: +diff --git a/Source/WTF/wtf/DisallowCType.h b/Source/WTF/wtf/DisallowCType.h +index d85e767..dc6bcab 100644 +--- a/Source/WTF/wtf/DisallowCType.h ++++ b/Source/WTF/wtf/DisallowCType.h +@@ -40,7 +40,7 @@ + // are used from wx headers. On GTK+ for Mac many GTK+ files include + // or , which in turn include which uses + // isacii(). +-#if !(OS(DARWIN) && PLATFORM(GTK)) && !PLATFORM(EFL) && !defined(_LIBCPP_VERSION) ++#if !(OS(DARWIN) && PLATFORM(GTK)) && !PLATFORM(EFL) && !defined(_LIBCPP_VERSION) && defined(__GLIBC__) + + #include + +diff --git a/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp b/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp +index ea61909..1495642 100644 +--- a/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp ++++ b/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp +@@ -202,7 +202,9 @@ void MemoryPressureHandler::respondToMemoryPressure(Critical critical, Synchrono + void MemoryPressureHandler::platformReleaseMemory(Critical) + { + ReliefLogger log("Run malloc_trim"); ++#ifdef __GLIBC__ + malloc_trim(0); ++#endif + } + + void MemoryPressureHandler::ReliefLogger::platformLog() +-- +2.6.4 + -- cgit v1.2.3