Fix FTBFS on m68k
authorJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Wed, 18 Oct 2017 11:36:55 +0000 (12:36 +0100)
committerAlberto Garcia <berto@igalia.com>
Wed, 18 Oct 2017 11:36:55 +0000 (12:36 +0100)
===================================================================

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

12 files changed:
CMakeLists.txt
Source/JavaScriptCore/CMakeLists.txt
Source/WTF/wtf/Platform.h
Source/WTF/wtf/dtoa/utils.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 b62704decf25ba5eae9ea0b3b96bc6d0551e44c5..180fa7b2d13e0d2f4a79a6efd0c1f5f4ece4b05d 100644 (file)
@@ -82,6 +82,8 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
     set(WTF_CPU_ARM64 1)
 elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "alpha*")
     set(WTF_CPU_ALPHA 1)
+elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "m68k")
+    set(WTF_CPU_M68K 1)
 elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
     set(WTF_CPU_MIPS 1)
 elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "sh4")
index 7031ba374d85404e02f9a19d3bb8acfff74291cf..925d5c4080da7be932cbe2873c87d44182c57d18 100644 (file)
@@ -1532,6 +1532,7 @@ elseif (WTF_CPU_PPC64)
 elseif (WTF_CPU_PPC64LE)
 elseif (WTF_CPU_S390)
 elseif (WTF_CPU_S390X)
+elseif (WTF_CPU_M68K)
 elseif (WTF_CPU_MIPS)
 elseif (WTF_CPU_SH4)
 elseif (WTF_CPU_SPARC64)
index 872a9c0a9dcf74a9b51c0fe952612127308854ee..1a981d948d30496a956963f7451ef6ec1b0b836d 100644 (file)
 #endif
 #endif
 
+/* CPU(M68K) - m68k */
+#if defined(__m68k__)
+#define WTF_CPU_M68K 1
+#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)
 #define ENABLE_REGEXP_TRACING 0
 
 /* Yet Another Regex Runtime - turned on by default for JIT enabled ports. */
-#if !defined(ENABLE_YARR_JIT) && ENABLE(JIT)
+#if !defined(ENABLE_YARR_JIT) && ENABLE(JIT) && !CPU(M68K)
 #define ENABLE_YARR_JIT 1
 
 /* Setting this flag compares JIT results with interpreter results. */
index 0cd161412e714430650bc487856b4ed7bf68be1b..ffdb9da97887f48915eec5f074808ba0e6dc6df8 100644 (file)
@@ -58,6 +58,8 @@ defined(_MIPS_ARCH_MIPS32R2)
 #else
 #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS
 #endif  // _WIN32
+#elif defined(__mc68000__)
+#undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS
 #else
 #error Target architecture was not detected as supported by Double-Conversion.
 #endif
index 8a91a391514eb5423c76d0048f20f4a5ce489634..c39b86627838fb5413e7da504902eaeb7ac9d932 100644 (file)
@@ -33,7 +33,11 @@ struct SameSizeAsCSSProperty {
     void* value;
 };
 
+#if CPU(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 11b3302488010aafa492f51556a154d73d2ba048..ab87983209d5b15787de61533d41a4d6ca054529 100644 (file)
@@ -142,7 +142,11 @@ struct SameSizeAsRuleData {
     unsigned d[4];
 };
 
+#if CPU(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 aca3463a73a14ac4a8dacef10069174fbe0c3575..d1ed3dce4d9b48800af76cf761a5aa15212a3538 100644 (file)
@@ -47,6 +47,10 @@ struct SameSizeAsElementRareData : NodeRareData {
     void* pointers[8];
 };
 
+#if CPU(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..eccf3a3cfff5ffcd133afae09b5ccc77255a7830 100644 (file)
@@ -38,6 +38,10 @@ struct SameSizeAsNodeRareData {
     void* m_pointer[3];
 };
 
+#if CPU(M68K)
+COMPILE_ASSERT(sizeof(NodeRareData) <= sizeof(SameSizeAsNodeRareData), NodeRareDataShouldStaySmall);
+#else
 COMPILE_ASSERT(sizeof(NodeRareData) == sizeof(SameSizeAsNodeRareData), NodeRareDataShouldStaySmall);
+#endif
 
 } // namespace WebCore
index ba38c9439184b08967c289cc73b7498e2e6b8bf0..264bf0de5d47b48d0cb7190a7adebdcbc2d7a462 100644 (file)
@@ -47,7 +47,11 @@ struct SameSizeAsShadowRoot : public DocumentFragment, public TreeScope {
     void* slotAssignment;
 };
 
+#if CPU(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 ac3a7f623194e9c315f930bc2f15babcfdb645ab..bde82930967109b695999b0415e15e803714c21d 100644 (file)
@@ -52,7 +52,11 @@ struct SameSizeAsFontCascadeDescription {
     unsigned bitfields3 : 10;
 };
 
+#if CPU(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 34441b1c3e93c1010df72d0222e4bf5c0c595d50..75ca69c4cd3678b4b9d2b1758d8cd30ec87d21cb 100644 (file)
@@ -63,7 +63,11 @@ struct SameSizeAsBorderValue {
     int m_restBits;
 };
 
+#if CPU(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];
index 392708aae58e987108d842678694c62a52fabf01..e741f10a57991894b5c347fec115a4b6ec60e1c6 100644 (file)
@@ -33,7 +33,11 @@ struct SameSizeAsStyleBoxData : public RefCounted<SameSizeAsStyleBoxData> {
     uint32_t bitfields;
 };
 
+#if CPU(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())