Fix FTBFS on m68k
authorJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Wed, 4 Sep 2019 08:41:19 +0000 (09:41 +0100)
committerAlberto Garcia <berto@igalia.com>
Wed, 4 Sep 2019 08:41:19 +0000 (09:41 +0100)
===================================================================

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/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/StyleBoxData.cpp

index 52ab1be28bf60def6f79129e5f71a630142505b7..1c7df6bfd47e4c23b2dbc790d213fc344ea30101 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 ba5dc60fe34c6b7678246734d322ac2f7a02f57f..7442a7e45a82d02c32aa5350d0bb8ea21643b61b 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 4dd60eb84f63d12fe814e36c35cc501224cc9711..03dbb2558d2995905713875a10b87d7d4fdc7fc4 100644 (file)
@@ -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
index f6a19a3e2a8a3a67b707248191b82ed7f7344553..374198be27b6cd8e6c1b386f66316ca0142ce6d1 100644 (file)
@@ -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");
index 6e8851e5b80fccb9a1c05c2a9cb1b82d76010739..a97ea558335bd4e2bf65e4784e1e7e64319f1770 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 bc3d534a9bbabfb6f390b0d727eec58239356285..3a527cafcb99ed76d56cfea7fb55111835d6b399 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())