Changeset 194518 in webkit


Ignore:
Timestamp:
Jan 3, 2016 12:26:04 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

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

Patch by Khem Raj <raj.khem@gmail.com> on 2016-01-03
Source/JavaScriptCore:

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.

Location:
trunk/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r194517 r194518  
     12016-01-03  Khem Raj  <raj.khem@gmail.com>
     2
     3        WebKit fails to build with musl libc library
     4        https://bugs.webkit.org/show_bug.cgi?id=152625
     5
     6        Reviewed by Daniel Bates.
     7
     8        Qualify isnan() calls with std namespace.
     9
     10        * runtime/Options.cpp:
     11        (Option::operator==): Add std namespace qualifier.
     12
    1132016-01-03  Andreas Kling  <akling@apple.com>
    214
  • trunk/Source/JavaScriptCore/runtime/Options.cpp

    r194376 r194518  
    654654        return m_entry.unsignedVal == other.m_entry.unsignedVal;
    655655    case Options::Type::doubleType:
    656         return (m_entry.doubleVal == other.m_entry.doubleVal) || (isnan(m_entry.doubleVal) && isnan(other.m_entry.doubleVal));
     656        return (m_entry.doubleVal == other.m_entry.doubleVal) || (std::isnan(m_entry.doubleVal) && std::isnan(other.m_entry.doubleVal));
    657657    case Options::Type::int32Type:
    658658        return m_entry.int32Val == other.m_entry.int32Val;
  • trunk/Source/WTF/ChangeLog

    r194510 r194518  
     12016-01-03  Khem Raj  <raj.khem@gmail.com>
     2
     3        WebKit fails to build with musl libc library
     4        https://bugs.webkit.org/show_bug.cgi?id=152625
     5
     6        Reviewed by Daniel Bates.
     7
     8        Disable ctype.h check for musl C library on Linux.
     9        Enable backtrace on Linux when using glibc.
     10        We don't have backtrace() implemented on non-glibc system
     11        C libraries on Linux e.g. musl.
     12
     13        * wtf/DisallowCType.h: Check for __GLIBC__.
     14        * wtf/Assertions.cpp:
     15        (WTFGetBacktrace): Check if libc is glibc.
     16
    1172016-01-03  Andreas Kling  <akling@apple.com>
    218
  • trunk/Source/WTF/wtf/Assertions.cpp

    r187819 r194518  
    6969#endif
    7070
    71 #if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
     71#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
    7272#include <cxxabi.h>
    7373#include <dlfcn.h>
     
    226226void WTFGetBacktrace(void** stack, int* size)
    227227{
    228 #if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
     228#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
    229229    *size = backtrace(stack, *size);
    230230#elif OS(WINDOWS)
  • trunk/Source/WTF/wtf/DisallowCType.h

    r165676 r194518  
    4141// or <glib/gi18n-lib.h>, which in turn include <xlocale/_ctype.h> which uses
    4242// isacii().
    43 #if !(OS(DARWIN) && PLATFORM(GTK)) && !PLATFORM(EFL) && !defined(_LIBCPP_VERSION)
     43#if !(OS(DARWIN) && PLATFORM(GTK)) && !PLATFORM(EFL) && !defined(_LIBCPP_VERSION) && defined(__GLIBC__)
    4444
    4545#include <ctype.h>
  • trunk/Source/WebCore/ChangeLog

    r194516 r194518  
     12016-01-03  Khem Raj  <raj.khem@gmail.com>
     2
     3        WebKit fails to build with musl libc library
     4        https://bugs.webkit.org/show_bug.cgi?id=152625
     5
     6        Reviewed by Daniel Bates and Alexey Proskuryakov.
     7
     8        malloc_trim is glibc specific API so guard it with __GLIBC__.
     9
     10        * platform/linux/MemoryPressureHandlerLinux.cpp:
     11        (MemoryPressureHandler::platformReleaseMemory): Guard malloc_trim()
     12        call with __GLIBC_.
     13
    1142016-01-03  Simon Fraser  <simon.fraser@apple.com>
    215
  • trunk/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp

    r185206 r194518  
    202202void MemoryPressureHandler::platformReleaseMemory(Critical)
    203203{
     204#ifdef __GLIBC__
    204205    ReliefLogger log("Run malloc_trim");
    205206    malloc_trim(0);
     207#endif
    206208}
    207209
Note: See TracChangeset for help on using the changeset viewer.