From: John Paul Adrian Glaubitz Date: Thu, 22 Nov 2018 12:59:41 +0000 (+0000) Subject: Fix FTBFS on m68k X-Git-Tag: archive/raspbian/2.22.4-1+rpi1^2~8 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=901a7858fa2ebd909b188bc4fb9315bfe5974c2d;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 fcf76958b6..4f9f1f12a3 100644 --- a/Source/WTF/wtf/Platform.h +++ b/Source/WTF/wtf/Platform.h @@ -59,6 +59,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 0e6a799909..25f757bf95 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 6cfa8096d3..e4f7d87233 100644 --- a/Source/WebCore/dom/ElementRareData.cpp +++ b/Source/WebCore/dom/ElementRareData.cpp @@ -50,6 +50,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 821db174e0..bac77f081b 100644 --- a/Source/WebCore/dom/NodeRareData.cpp +++ b/Source/WebCore/dom/NodeRareData.cpp @@ -38,6 +38,10 @@ 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 } // namespace WebCore diff --git a/Source/WebCore/dom/ShadowRoot.cpp b/Source/WebCore/dom/ShadowRoot.cpp index a019f1b41f..1e733af631 100644 --- a/Source/WebCore/dom/ShadowRoot.cpp +++ b/Source/WebCore/dom/ShadowRoot.cpp @@ -50,7 +50,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/platform/graphics/FontDescription.cpp b/Source/WebCore/platform/graphics/FontDescription.cpp index 130002d0f6..4a7f9593ca 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 defined(__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 c2c4e85e94..042c298510 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 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]; @@ -81,7 +85,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())