apply patches

This commit is contained in:
openKylinBot 2022-05-14 03:18:03 +08:00
commit 4257995859
16 changed files with 70 additions and 11 deletions

View File

@ -93,6 +93,12 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^mips64")
set(WTF_CPU_MIPS64 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
set(WTF_CPU_MIPS 1)
elseif (CMAKE_CXX_LIBRARY_ARCHITECTURE STREQUAL "x86_64-linux-gnux32")
set(WTF_CPU_UNKNOWN 1)
elseif (CMAKE_CXX_LIBRARY_ARCHITECTURE MATCHES "(x64|x86_64|amd64)")
set(WTF_CPU_X86_64 1)
elseif (CMAKE_CXX_LIBRARY_ARCHITECTURE MATCHES "(i[3-6]86|x86)")
set(WTF_CPU_X86 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(x64|x86_64|amd64)")
# FORCE_32BIT is set in the build script when --32-bit is passed
# on a Linux/intel 64bit host. This allows us to produce 32bit

View File

@ -35,6 +35,11 @@
/* ==== CPU() - the target CPU architecture ==== */
/* CPU(KNOWN) becomes true if we explicitly support a target CPU. */
/* CPU(M68K) - m68k */
#if defined(__m68k__)
#define WTF_CPU_BIG_ENDIAN 1
#endif
/* CPU(MIPS) - MIPS 32-bit and 64-bit */
#if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_) || defined(__mips64))
#if defined(_ABI64) && (_MIPS_SIM == _ABI64)
@ -89,6 +94,11 @@
#define WTF_CPU_KNOWN 1
#endif
/* CPU(SPARC64) - sparc64 */
#if defined(__sparc__) && defined(__sparc_v9__)
#define WTF_CPU_BIG_ENDIAN 1
#endif
/* CPU(X86) - i386 / x86 32-bit */
#if defined(__i386__) \
|| defined(i386) \
@ -107,10 +117,12 @@
/* CPU(X86_64) - AMD64 / Intel64 / x86_64 64-bit */
#if defined(__x86_64__) \
|| defined(_M_X64)
#if !defined(__ILP32__)
#define WTF_CPU_X86_64 1
#define WTF_CPU_X86_SSE2 1
#define WTF_CPU_KNOWN 1
#endif
#endif
/* CPU(ARM64) - Apple */
#if (defined(__arm64__) && defined(__APPLE__)) || defined(__aarch64__)

View File

@ -33,7 +33,11 @@ struct SameSizeAsCSSProperty {
void* value;
};
#if defined(__m68k__)
COMPILE_ASSERT(sizeof(CSSProperty) <= sizeof(SameSizeAsCSSProperty), CSSProperty_should_stay_small);
#else
COMPILE_ASSERT(sizeof(CSSProperty) == sizeof(SameSizeAsCSSProperty), CSSProperty_should_stay_small);
#endif
CSSPropertyID StylePropertyMetadata::shorthandID() const
{

View File

@ -56,6 +56,10 @@ struct SameSizeAsElementRareData : NodeRareData {
};
#if defined(__m68k__)
static_assert(sizeof(ElementRareData) <= sizeof(SameSizeAsElementRareData), "ElementRareData should stay small");
#else
static_assert(sizeof(ElementRareData) == sizeof(SameSizeAsElementRareData), "ElementRareData should stay small");
#endif
} // namespace WebCore

View File

@ -40,7 +40,11 @@ struct SameSizeAsNodeRareData {
void* m_pointer[2];
};
#if defined(__m68k__)
COMPILE_ASSERT(sizeof(NodeRareData) <= sizeof(SameSizeAsNodeRareData), NodeRareDataShouldStaySmall);
#else
COMPILE_ASSERT(sizeof(NodeRareData) == sizeof(SameSizeAsNodeRareData), NodeRareDataShouldStaySmall);
#endif
// Ensure the 10 bits reserved for the m_connectedFrameCount cannot overflow
static_assert(Page::maxNumberOfFrames < 1024, "Frame limit should fit in rare data count");

View File

@ -58,7 +58,11 @@ struct SameSizeAsShadowRoot : public DocumentFragment, public TreeScope {
Optional<HashMap<AtomString, AtomString>> partMappings;
};
#if defined(__m68k__)
COMPILE_ASSERT(sizeof(ShadowRoot) <= sizeof(SameSizeAsShadowRoot), shadowroot_should_stay_small);
#else
COMPILE_ASSERT(sizeof(ShadowRoot) == sizeof(SameSizeAsShadowRoot), shadowroot_should_stay_small);
#endif
ShadowRoot::ShadowRoot(Document& document, ShadowRootMode type, DelegatesFocus delegatesFocus)
: DocumentFragment(document, CreateShadowRoot)

View File

@ -89,6 +89,9 @@ static String buildUserAgentString(const UserAgentQuirks& quirks)
else {
uaString.append(platformForUAString());
uaString.appendLiteral("; ");
#if defined(USER_AGENT_GTK_DISTRIBUTOR_NAME)
uaString.appendLiteral(USER_AGENT_GTK_DISTRIBUTOR_NAME "; ");
#endif
uaString.append(platformVersionForUAString());
}

View File

@ -51,7 +51,11 @@ struct SameSizeAsFontCascadeDescription {
unsigned bitfields3 : 10;
};
#if defined(__m68k__)
COMPILE_ASSERT(sizeof(FontCascadeDescription) >= sizeof(SameSizeAsFontCascadeDescription), FontCascadeDescription_should_stay_small);
#else
COMPILE_ASSERT(sizeof(FontCascadeDescription) == sizeof(SameSizeAsFontCascadeDescription), FontCascadeDescription_should_stay_small);
#endif
FontCascadeDescription::FontCascadeDescription()
: m_isAbsoluteSize(false)

View File

@ -65,7 +65,11 @@ struct SameSizeAsBorderValue {
int m_restBits;
};
#if defined(__m68k__)
COMPILE_ASSERT(sizeof(BorderValue) <= sizeof(SameSizeAsBorderValue), BorderValue_should_not_grow);
#else
COMPILE_ASSERT(sizeof(BorderValue) == sizeof(SameSizeAsBorderValue), BorderValue_should_not_grow);
#endif
struct SameSizeAsRenderStyle {
void* dataRefs[7];
@ -83,7 +87,11 @@ struct SameSizeAsRenderStyle {
#endif
};
#if defined(__m68k__)
static_assert(sizeof(RenderStyle) <= sizeof(SameSizeAsRenderStyle), "RenderStyle should stay small");
#else
static_assert(sizeof(RenderStyle) == sizeof(SameSizeAsRenderStyle), "RenderStyle should stay small");
#endif
DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(RenderStyle);

View File

@ -33,7 +33,11 @@ struct SameSizeAsStyleBoxData : public RefCounted<SameSizeAsStyleBoxData> {
uint32_t bitfields;
};
#if defined(__m68k__)
COMPILE_ASSERT(sizeof(StyleBoxData) <= sizeof(SameSizeAsStyleBoxData), StyleBoxData_should_not_grow);
#else
COMPILE_ASSERT(sizeof(StyleBoxData) == sizeof(SameSizeAsStyleBoxData), StyleBoxData_should_not_grow);
#endif
DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(StyleBoxData);

View File

@ -60,7 +60,11 @@ struct SameSizeAsRuleData {
unsigned d[4];
};
#if defined(__m68k__)
COMPILE_ASSERT(sizeof(RuleData) <= sizeof(SameSizeAsRuleData), RuleData_should_stay_small);
#else
COMPILE_ASSERT(sizeof(RuleData) == sizeof(SameSizeAsRuleData), RuleData_should_stay_small);
#endif
static inline MatchBasedOnRuleHash computeMatchBasedOnRuleHash(const CSSSelector& selector)
{

View File

@ -31,7 +31,8 @@ if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
endif ()
if (USE_GSTREAMER_GL AND NOT PC_GSTREAMER_GL_FOUND)
message(FATAL_ERROR "GStreamerGL is needed for USE_GSTREAMER_GL.")
set(USE_GSTREAMER_GL OFF)
message(STATUS "GStreamerGL is needed for USE_GSTREAMER_GL.")
endif ()
SET_AND_EXPOSE_TO_BUILD(USE_GSTREAMER TRUE)

View File

@ -112,6 +112,12 @@ if (DEBUG_FISSION)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gdb-index")
endif ()
# Pass --reduce-memory-overheads to the bfd linker in order to save memory
if (NOT USE_LD_GOLD)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--reduce-memory-overheads")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--reduce-memory-overheads")
endif ()
# Enable the usage of OpenMP.
# - At this moment, OpenMP is only used as an alternative implementation
# to native threads for the parallelization of the SVG filters.

View File

@ -17,6 +17,8 @@ set(WEBKITGTK_HEADER_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/webkitgtk-${WEBKIT
set(INTROSPECTION_INSTALL_GIRDIR "${CMAKE_INSTALL_FULL_DATADIR}/gir-1.0")
set(INTROSPECTION_INSTALL_TYPELIBDIR "${LIB_INSTALL_DIR}/girepository-1.0")
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Cairo 1.14.0 REQUIRED)
find_package(Fontconfig 2.8.0 REQUIRED)
find_package(Freetype 2.4.2 REQUIRED)
@ -382,7 +384,8 @@ endif ()
if (USE_WOFF2)
find_package(WOFF2Dec 1.0.2)
if (NOT WOFF2DEC_FOUND)
message(FATAL_ERROR "libwoff2dec is needed for USE_WOFF2.")
set(USE_WOFF2 OFF)
message(STATUS "libwoff2dec is needed for USE_WOFF2.")
endif ()
endif ()

View File

@ -1,3 +1,4 @@
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
if (MSVC)

View File

@ -138,15 +138,6 @@ if (COMPILER_IS_GCC_OR_CLANG)
if (CMAKE_COMPILER_IS_GNUCXX)
WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wno-expansion-to-defined)
endif ()
# Force SSE2 fp on x86 builds.
if (WTF_CPU_X86 AND NOT CMAKE_CROSSCOMPILING)
WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-msse2 -mfpmath=sse)
include(DetectSSE2)
if (NOT SSE2_SUPPORT_FOUND)
message(FATAL_ERROR "SSE2 support is required to compile WebKit")
endif ()
endif ()
endif ()
if (COMPILER_IS_GCC_OR_CLANG AND NOT MSVC)