Fix FTBFS on m68k
authorJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Thu, 16 Apr 2020 16:37:24 +0000 (17:37 +0100)
committerAlberto Garcia <berto@igalia.com>
Thu, 16 Apr 2020 16:37:24 +0000 (17:37 +0100)
Bug-Debian: https://bugs.debian.org/868126
Last-Update: 2020-01-23

===================================================================

Gbp-Pq: Name fix-ftbfs-m68k.patch

Source/WTF/wtf/Platform.h
Source/WebCore/css/CSSProperty.cpp
Source/WebCore/css/RuleSet.h
Source/WebCore/dom/ElementRareData.cpp
Source/WebCore/dom/NodeRareData.cpp
Source/WebCore/dom/ShadowRoot.cpp
Source/WebCore/platform/graphics/FontCascadeDescription.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/StyleBoxData.cpp

index 9febd7d27ad35c93273ed43edea5d59412fb11e8..48cdb3e863793af62b69e8357fe9b7ed2fea1ad5 100644 (file)
 /* ==== 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)
index c460595014efce4fe7f3deec07afdb2c423dfb6f..6d713446348c2a5f846a7e220d8d48bd86826ee4 100644 (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
 {
index 2380fe70ca8bf6ec8aa05a3231d105dc3820385c..98b9cdb665450e07d023f82a70e7cf02a330d3e2 100644 (file)
@@ -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;
index 1cb5058b521faa4d75a6ad800dc6b7fc43b7f79a..8255699b3653728474224248adf353de70aa8460 100644 (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
index ea906d62c0d27fba666e9f1cf3af340e30c580f4..dabf61fbeaa6d82b3a2a9ca84b4cc0119a7d3c07 100644 (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");
index 6786c0d21e1b2c2a57851bd085164c1a1e92c99d..85b1a619e2d58253ddae3681161f6d208c08d8c2 100644 (file)
@@ -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)
index 8eb44711c775b84601dbe65161b38f8401260887..88643949aa293d0c2e053ccce0aa861a1015e858 100644 (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)
index fb43c20e5ce99ece19f452fd9f87964d814bb7ae..7be0d0f194ce6a7d2f719e4a296b746eb17b2145 100644 (file)
@@ -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()
 {
index a8b35e136fb08b31caec094e788d7ce645102421..259fd78be362f18705145ff2230ffeb4f0eaf017 100644 (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
 
 StyleBoxData::StyleBoxData()
     : m_minWidth(RenderStyle::initialMinSize())