Title: [198320] releases/WebKitGTK/webkit-2.10/Source
Revision
198320
Author
[email protected]
Date
2016-03-17 00:44:29 -0700 (Thu, 17 Mar 2016)

Log Message

Merge r194518 - WebKit fails to build with musl libc library
https://bugs.webkit.org/show_bug.cgi?id=152625

Patch by Khem Raj <[email protected]> on 2016-01-03
Source/_javascript_Core:

Reviewed by Daniel Bates.

Qualify isnan() calls with std namespace.

* runtime/Options.cpp:
(Option::operator==): Add std namespace qualifier.

Source/WebCore:

Reviewed by Daniel Bates and Alexey Proskuryakov.

malloc_trim is glibc specific API so guard it with __GLIBC__.

* platform/linux/MemoryPressureHandlerLinux.cpp:
(MemoryPressureHandler::platformReleaseMemory): Guard malloc_trim()
call with __GLIBC_.

Source/WTF:

Reviewed by Daniel Bates.

Disable ctype.h check for musl C library on Linux.
Enable backtrace on Linux when using glibc.
We don't have backtrace() implemented on non-glibc system
C libraries on Linux e.g. musl.

* wtf/DisallowCType.h: Check for __GLIBC__.
* wtf/Assertions.cpp:
(WTFGetBacktrace): Check if libc is glibc.

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/ChangeLog (198319 => 198320)


--- releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/ChangeLog	2016-03-17 07:43:52 UTC (rev 198319)
+++ releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/ChangeLog	2016-03-17 07:44:29 UTC (rev 198320)
@@ -1,3 +1,15 @@
+2016-01-03  Khem Raj  <[email protected]>
+
+        WebKit fails to build with musl libc library
+        https://bugs.webkit.org/show_bug.cgi?id=152625
+
+        Reviewed by Daniel Bates.
+
+        Qualify isnan() calls with std namespace.
+
+        * runtime/Options.cpp:
+        (Option::operator==): Add std namespace qualifier.
+
 2016-02-15  Mark Lam  <[email protected]>
 
         [ARMv7] stress/op_rshift.js and stress/op_urshift.js are failing.

Modified: releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/runtime/Options.cpp (198319 => 198320)


--- releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/runtime/Options.cpp	2016-03-17 07:43:52 UTC (rev 198319)
+++ releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/runtime/Options.cpp	2016-03-17 07:44:29 UTC (rev 198320)
@@ -610,7 +610,7 @@
     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:

Modified: releases/WebKitGTK/webkit-2.10/Source/WTF/ChangeLog (198319 => 198320)


--- releases/WebKitGTK/webkit-2.10/Source/WTF/ChangeLog	2016-03-17 07:43:52 UTC (rev 198319)
+++ releases/WebKitGTK/webkit-2.10/Source/WTF/ChangeLog	2016-03-17 07:44:29 UTC (rev 198320)
@@ -1,3 +1,19 @@
+2016-01-03  Khem Raj  <[email protected]>
+
+        WebKit fails to build with musl libc library
+        https://bugs.webkit.org/show_bug.cgi?id=152625
+
+        Reviewed by Daniel Bates.
+
+        Disable ctype.h check for musl C library on Linux.
+        Enable backtrace on Linux when using glibc.
+        We don't have backtrace() implemented on non-glibc system
+        C libraries on Linux e.g. musl.
+
+        * wtf/DisallowCType.h: Check for __GLIBC__.
+        * wtf/Assertions.cpp:
+        (WTFGetBacktrace): Check if libc is glibc.
+
 2016-02-08  Filip Pizlo  <[email protected]>
 
         Make sure that locking code that relies on module boundaries for compiler fences uses NEVER_INLINE

Modified: releases/WebKitGTK/webkit-2.10/Source/WTF/wtf/Assertions.cpp (198319 => 198320)


--- releases/WebKitGTK/webkit-2.10/Source/WTF/wtf/Assertions.cpp	2016-03-17 07:43:52 UTC (rev 198319)
+++ releases/WebKitGTK/webkit-2.10/Source/WTF/wtf/Assertions.cpp	2016-03-17 07:44:29 UTC (rev 198320)
@@ -68,7 +68,7 @@
 #include <unistd.h>
 #endif
 
-#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
+#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
 #include <cxxabi.h>
 #include <dlfcn.h>
 #include <execinfo.h>
@@ -225,7 +225,7 @@
 
 void WTFGetBacktrace(void** stack, int* size)
 {
-#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
+#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
     *size = backtrace(stack, *size);
 #elif OS(WINDOWS)
     // The CaptureStackBackTrace function is available in XP, but it is not defined

Modified: releases/WebKitGTK/webkit-2.10/Source/WTF/wtf/DisallowCType.h (198319 => 198320)


--- releases/WebKitGTK/webkit-2.10/Source/WTF/wtf/DisallowCType.h	2016-03-17 07:43:52 UTC (rev 198319)
+++ releases/WebKitGTK/webkit-2.10/Source/WTF/wtf/DisallowCType.h	2016-03-17 07:44:29 UTC (rev 198320)
@@ -40,7 +40,7 @@
 // are used from wx headers. On GTK+ for Mac many GTK+ files include <libintl.h>
 // or <glib/gi18n-lib.h>, which in turn include <xlocale/_ctype.h> 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 <ctype.h>
 

Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog (198319 => 198320)


--- releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog	2016-03-17 07:43:52 UTC (rev 198319)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog	2016-03-17 07:44:29 UTC (rev 198320)
@@ -1,3 +1,16 @@
+2016-01-03  Khem Raj  <[email protected]>
+
+        WebKit fails to build with musl libc library
+        https://bugs.webkit.org/show_bug.cgi?id=152625
+
+        Reviewed by Daniel Bates and Alexey Proskuryakov.
+
+        malloc_trim is glibc specific API so guard it with __GLIBC__.
+
+        * platform/linux/MemoryPressureHandlerLinux.cpp:
+        (MemoryPressureHandler::platformReleaseMemory): Guard malloc_trim()
+        call with __GLIBC_.
+
 2016-03-10  Carlos Garcia Campos  <[email protected]>
 
         [GTK] Scrollbars are broken once again with current GTK+ master

Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp (198319 => 198320)


--- releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp	2016-03-17 07:43:52 UTC (rev 198319)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp	2016-03-17 07:44:29 UTC (rev 198320)
@@ -201,8 +201,10 @@
 
 void MemoryPressureHandler::platformReleaseMemory(Critical)
 {
+#ifdef __GLIBC__
     ReliefLogger log("Run malloc_trim");
     malloc_trim(0);
+#endif
 }
 
 void MemoryPressureHandler::ReliefLogger::platformLog()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to