From: John Paul Adrian Glaubitz Date: Tue, 2 Jul 2019 10:03:13 +0000 (+0100) Subject: Fix FTBFS on m68k X-Git-Tag: archive/raspbian/2.24.3-1+rpi1^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f7d00dbe36d2f26880b6baa0f9870392be8c9808;p=webkit2gtk.git Fix FTBFS on m68k =================================================================== Gbp-Pq: Name fix-ftbfs-m68k.patch --- diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h index 52ab1be28b..1c7df6bfd4 100644 --- a/Source/WTF/wtf/Platform.h +++ b/Source/WTF/wtf/Platform.h @@ -58,6 +58,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) diff --git a/Source/WebCore/css/CSSProperty.cpp b/Source/WebCore/css/CSSProperty.cpp index c460595014..6d71344634 100644 --- a/Source/WebCore/css/CSSProperty.cpp +++ b/Source/WebCore/css/CSSProperty.cpp @@ -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 { diff --git a/Source/WebCore/css/RuleSet.h b/Source/WebCore/css/RuleSet.h index ba5dc60fe3..7442a7e45a 100644 --- a/Source/WebCore/css/RuleSet.h +++ b/Source/WebCore/css/RuleSet.h @@ -98,7 +98,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 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 4dd60eb84f..03dbb2558d 100644 --- a/Source/WebCore/dom/ElementRareData.cpp +++ b/Source/WebCore/dom/ElementRareData.cpp @@ -53,6 +53,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 diff --git a/Source/WebCore/dom/NodeRareData.cpp b/Source/WebCore/dom/NodeRareData.cpp index f6a19a3e2a..374198be27 100644 --- a/Source/WebCore/dom/NodeRareData.cpp +++ b/Source/WebCore/dom/NodeRareData.cpp @@ -38,7 +38,11 @@ struct SameSizeAsNodeRareData { void* m_pointer[3]; }; +#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"); diff --git a/Source/WebCore/dom/ShadowRoot.cpp b/Source/WebCore/dom/ShadowRoot.cpp index 6e8851e5b8..a97ea55833 100644 --- a/Source/WebCore/dom/ShadowRoot.cpp +++ b/Source/WebCore/dom/ShadowRoot.cpp @@ -52,7 +52,11 @@ struct SameSizeAsShadowRoot : public DocumentFragment, public TreeScope { void* slotAssignment; }; +#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) : DocumentFragment(document, CreateShadowRoot) diff --git a/Source/WebCore/rendering/style/RenderStyle.cpp b/Source/WebCore/rendering/style/RenderStyle.cpp index bc3d534a9b..3a527cafcb 100644 --- a/Source/WebCore/rendering/style/RenderStyle.cpp +++ b/Source/WebCore/rendering/style/RenderStyle.cpp @@ -66,7 +66,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]; @@ -84,7 +88,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 RenderStyle& RenderStyle::defaultStyle() { diff --git a/Source/WebCore/rendering/style/StyleBoxData.cpp b/Source/WebCore/rendering/style/StyleBoxData.cpp index a8b35e136f..259fd78be3 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 defined(__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())