Fix FTBFS on m68k
authorJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Mon, 13 Aug 2018 07:52:34 +0000 (08:52 +0100)
committerAlberto Garcia <berto@igalia.com>
Mon, 13 Aug 2018 07:52:34 +0000 (08:52 +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/platform/graphics/FontDescription.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/StyleBoxData.cpp

index 6fb8767d4c4de6aed1d97404a048f06db8477903..fe0fe97e0b0cbd087dd587d410f6b5c473d414ea 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 181ba5ddb48c552094dba6022e7acf03425a232e..284daf69d6d5f6f002c073846e93556aad770736 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 478a8887e0051acabb620e375ab6022528195bce..c098633527464a24760bbbda82b1125da07ff66b 100644 (file)
@@ -46,6 +46,10 @@ struct SameSizeAsElementRareData : NodeRareData {
     void* pointers[8];
 };
 
+#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 821db174e01188f25bd368081aa2b77132a885e4..bac77f081b924c7d7370c47e53ba8f9279f5eb6c 100644 (file)
@@ -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
index dec798811a5bbb6c5bec71e2c4495b2f095a01e1..97476c2d67f084d9868e5c5d82a26bbe52d6d67d 100644 (file)
@@ -47,7 +47,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 3d5dd357146077b28ae523e3a33e27bfd24569ac..ae3af36cf0554a21ea7f7c51e56b1a527932cbc7 100644 (file)
@@ -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() }
index 7fba88cd8976bc6a24c98c663cc2b045b3666c15..e77abe6da42ad522eb70795519c96f136b07af45 100644 (file)
@@ -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()
 {
index 392708aae58e987108d842678694c62a52fabf01..e91da0de49f430c7a9b0e2efb28b3d7ba2072727 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())