From: John Paul Adrian Glaubitz Date: Wed, 10 Jan 2018 12:23:33 +0000 (+0000) Subject: Fix FTBFS on m68k X-Git-Tag: archive/raspbian/2.18.5-1+rpi1^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6abb88f1c0c6e136d48b696138cd5110fc1f8b2f;p=webkit2gtk.git Fix FTBFS on m68k =================================================================== Gbp-Pq: Name fix-ftbfs-m68k.patch --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 73a0590c44..299dc773a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,6 +89,8 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64") set(WTF_CPU_ARM64 1) elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "alpha*") set(WTF_CPU_ALPHA 1) +elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "m68k") + set(WTF_CPU_M68K 1) elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^mips") set(WTF_CPU_MIPS 1) elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "sh4") diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt index 8a5d7c7dba..d684ad720e 100644 --- a/Source/JavaScriptCore/CMakeLists.txt +++ b/Source/JavaScriptCore/CMakeLists.txt @@ -1531,6 +1531,7 @@ elseif (WTF_CPU_PPC64) elseif (WTF_CPU_PPC64LE) elseif (WTF_CPU_S390) elseif (WTF_CPU_S390X) +elseif (WTF_CPU_M68K) elseif (WTF_CPU_MIPS) elseif (WTF_CPU_SH4) elseif (WTF_CPU_SPARC64) diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h index 731d720851..92c47db606 100644 --- a/Source/WTF/wtf/Platform.h +++ b/Source/WTF/wtf/Platform.h @@ -80,6 +80,12 @@ #endif #endif +/* CPU(M68K) - m68k */ +#if defined(__m68k__) +#define WTF_CPU_M68K 1 +#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) @@ -927,7 +933,7 @@ #define ENABLE_REGEXP_TRACING 0 /* Yet Another Regex Runtime - turned on by default for JIT enabled ports. */ -#if !defined(ENABLE_YARR_JIT) && ENABLE(JIT) +#if !defined(ENABLE_YARR_JIT) && ENABLE(JIT) && !CPU(M68K) #define ENABLE_YARR_JIT 1 /* Setting this flag compares JIT results with interpreter results. */ diff --git a/Source/WTF/wtf/dtoa/utils.h b/Source/WTF/wtf/dtoa/utils.h index 0cd161412e..ffdb9da978 100644 --- a/Source/WTF/wtf/dtoa/utils.h +++ b/Source/WTF/wtf/dtoa/utils.h @@ -58,6 +58,8 @@ defined(_MIPS_ARCH_MIPS32R2) #else #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS #endif // _WIN32 +#elif defined(__mc68000__) +#undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS #else #error Target architecture was not detected as supported by Double-Conversion. #endif diff --git a/Source/WebCore/css/CSSProperty.cpp b/Source/WebCore/css/CSSProperty.cpp index 8a91a39151..c39b866278 100644 --- a/Source/WebCore/css/CSSProperty.cpp +++ b/Source/WebCore/css/CSSProperty.cpp @@ -33,7 +33,11 @@ struct SameSizeAsCSSProperty { void* value; }; +#if CPU(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 { diff --git a/Source/WebCore/css/RuleSet.h b/Source/WebCore/css/RuleSet.h index 11b3302488..ab87983209 100644 --- a/Source/WebCore/css/RuleSet.h +++ b/Source/WebCore/css/RuleSet.h @@ -142,7 +142,11 @@ struct SameSizeAsRuleData { unsigned d[4]; }; +#if CPU(M68K) +COMPILE_ASSERT(sizeof(RuleData) <= sizeof(SameSizeAsRuleData), RuleData_should_stay_small); +#else COMPILE_ASSERT(sizeof(RuleData) == sizeof(SameSizeAsRuleData), RuleData_should_stay_small); +#endif class RuleSet { WTF_MAKE_NONCOPYABLE(RuleSet); WTF_MAKE_FAST_ALLOCATED; diff --git a/Source/WebCore/dom/ElementRareData.cpp b/Source/WebCore/dom/ElementRareData.cpp index aca3463a73..d1ed3dce4d 100644 --- a/Source/WebCore/dom/ElementRareData.cpp +++ b/Source/WebCore/dom/ElementRareData.cpp @@ -47,6 +47,10 @@ struct SameSizeAsElementRareData : NodeRareData { void* pointers[8]; }; +#if CPU(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 diff --git a/Source/WebCore/dom/NodeRareData.cpp b/Source/WebCore/dom/NodeRareData.cpp index 821db174e0..eccf3a3cff 100644 --- a/Source/WebCore/dom/NodeRareData.cpp +++ b/Source/WebCore/dom/NodeRareData.cpp @@ -38,6 +38,10 @@ struct SameSizeAsNodeRareData { void* m_pointer[3]; }; +#if CPU(M68K) +COMPILE_ASSERT(sizeof(NodeRareData) <= sizeof(SameSizeAsNodeRareData), NodeRareDataShouldStaySmall); +#else COMPILE_ASSERT(sizeof(NodeRareData) == sizeof(SameSizeAsNodeRareData), NodeRareDataShouldStaySmall); +#endif } // namespace WebCore diff --git a/Source/WebCore/dom/ShadowRoot.cpp b/Source/WebCore/dom/ShadowRoot.cpp index ba38c94391..264bf0de5d 100644 --- a/Source/WebCore/dom/ShadowRoot.cpp +++ b/Source/WebCore/dom/ShadowRoot.cpp @@ -47,7 +47,11 @@ struct SameSizeAsShadowRoot : public DocumentFragment, public TreeScope { void* slotAssignment; }; +#if CPU(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) : DocumentFragment(document, CreateShadowRoot) diff --git a/Source/WebCore/platform/graphics/FontDescription.cpp b/Source/WebCore/platform/graphics/FontDescription.cpp index ac3a7f6231..bde8293096 100644 --- a/Source/WebCore/platform/graphics/FontDescription.cpp +++ b/Source/WebCore/platform/graphics/FontDescription.cpp @@ -52,7 +52,11 @@ struct SameSizeAsFontCascadeDescription { unsigned bitfields3 : 10; }; +#if CPU(M68K) +COMPILE_ASSERT(sizeof(FontCascadeDescription) <= sizeof(SameSizeAsFontCascadeDescription), FontCascadeDescription_should_stay_small); +#else COMPILE_ASSERT(sizeof(FontCascadeDescription) == sizeof(SameSizeAsFontCascadeDescription), FontCascadeDescription_should_stay_small); +#endif FontDescription::FontDescription() : m_fontSelectionRequest(FontCascadeDescription::initialWeight(), FontCascadeDescription::initialStretch(), FontCascadeDescription::initialItalic()) diff --git a/Source/WebCore/rendering/style/RenderStyle.cpp b/Source/WebCore/rendering/style/RenderStyle.cpp index 34441b1c3e..75ca69c4cd 100644 --- a/Source/WebCore/rendering/style/RenderStyle.cpp +++ b/Source/WebCore/rendering/style/RenderStyle.cpp @@ -63,7 +63,11 @@ struct SameSizeAsBorderValue { int m_restBits; }; +#if CPU(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]; diff --git a/Source/WebCore/rendering/style/StyleBoxData.cpp b/Source/WebCore/rendering/style/StyleBoxData.cpp index 392708aae5..e741f10a57 100644 --- a/Source/WebCore/rendering/style/StyleBoxData.cpp +++ b/Source/WebCore/rendering/style/StyleBoxData.cpp @@ -33,7 +33,11 @@ struct SameSizeAsStyleBoxData : public RefCounted { uint32_t bitfields; }; +#if CPU(M68K) +COMPILE_ASSERT(sizeof(StyleBoxData) <= sizeof(SameSizeAsStyleBoxData), StyleBoxData_should_not_grow); +#else COMPILE_ASSERT(sizeof(StyleBoxData) == sizeof(SameSizeAsStyleBoxData), StyleBoxData_should_not_grow); +#endif StyleBoxData::StyleBoxData() : m_minWidth(RenderStyle::initialMinSize())