From: John Paul Adrian Glaubitz Date: Tue, 15 Dec 2020 14:23:01 +0000 (+0000) Subject: Fix FTBFS on m68k X-Git-Tag: archive/raspbian/2.30.4-1_deb10u1+rpi1^2^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e25b2fd09813e5d10d14ec2c85e0df7b6cd23f8c;p=webkit2gtk.git Fix FTBFS on m68k Bug-Debian: https://bugs.debian.org/868126 Last-Update: 2020-01-23 =================================================================== Gbp-Pq: Name fix-ftbfs-m68k.patch --- diff --git a/Source/WTF/wtf/PlatformCPU.h b/Source/WTF/wtf/PlatformCPU.h index f6e9339797..db4b055022 100644 --- a/Source/WTF/wtf/PlatformCPU.h +++ b/Source/WTF/wtf/PlatformCPU.h @@ -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) diff --git a/Source/WebCore/css/CSSProperty.cpp b/Source/WebCore/css/CSSProperty.cpp index fc0075926a..09c9ff110b 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/dom/ElementRareData.cpp b/Source/WebCore/dom/ElementRareData.cpp index 8aaeaec56f..038853ab79 100644 --- a/Source/WebCore/dom/ElementRareData.cpp +++ b/Source/WebCore/dom/ElementRareData.cpp @@ -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 diff --git a/Source/WebCore/dom/NodeRareData.cpp b/Source/WebCore/dom/NodeRareData.cpp index 4eb631c3dd..cd8abcfcc3 100644 --- a/Source/WebCore/dom/NodeRareData.cpp +++ b/Source/WebCore/dom/NodeRareData.cpp @@ -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"); diff --git a/Source/WebCore/dom/ShadowRoot.cpp b/Source/WebCore/dom/ShadowRoot.cpp index 0a29de8b91..b1393cb773 100644 --- a/Source/WebCore/dom/ShadowRoot.cpp +++ b/Source/WebCore/dom/ShadowRoot.cpp @@ -59,7 +59,11 @@ struct SameSizeAsShadowRoot : public DocumentFragment, public TreeScope { Optional> 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) diff --git a/Source/WebCore/platform/graphics/FontCascadeDescription.cpp b/Source/WebCore/platform/graphics/FontCascadeDescription.cpp index 14a96f7f73..1a0c51d10b 100644 --- a/Source/WebCore/platform/graphics/FontCascadeDescription.cpp +++ b/Source/WebCore/platform/graphics/FontCascadeDescription.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 FontCascadeDescription::FontCascadeDescription() : m_isAbsoluteSize(false) diff --git a/Source/WebCore/rendering/style/RenderStyle.cpp b/Source/WebCore/rendering/style/RenderStyle.cpp index 7b75faecd2..77a44e9357 100644 --- a/Source/WebCore/rendering/style/RenderStyle.cpp +++ b/Source/WebCore/rendering/style/RenderStyle.cpp @@ -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); diff --git a/Source/WebCore/rendering/style/StyleBoxData.cpp b/Source/WebCore/rendering/style/StyleBoxData.cpp index db977a8333..77ae85c7fd 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 DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(StyleBoxData); diff --git a/Source/WebCore/style/RuleData.cpp b/Source/WebCore/style/RuleData.cpp index 2129a677b7..26d415d6b4 100644 --- a/Source/WebCore/style/RuleData.cpp +++ b/Source/WebCore/style/RuleData.cpp @@ -59,7 +59,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) {