[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#868126: webkit2gtk: Please add build support for m68k



On 07/12/2017 10:52 AM, John Paul Adrian Glaubitz wrote:
> On Wed, Jul 12, 2017 at 10:41:59AM +0200, John Paul Adrian Glaubitz wrote:
>> webkit2gtk currently fails to build from source on m68k. To fix that,
>> I have forward-ported the patch fix-ftbfs-m68k.patch from the
>> webkitgtk package to webkit2gtk.
> 
> Updated patch. The previous version contained the same hunk twice. Not
> resulting in any problems, but incorrect nonetheless.

Another update. Fixes a typo and adds another missing assertion fix.

With the patch, the package builds fine for me.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
Description: Fix FTBFS on m68k
Author: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Last-Update: 2017-07-11

Index: webkit2gtk-2.16.5/CMakeLists.txt
===================================================================
--- webkit2gtk-2.16.5.orig/CMakeLists.txt
+++ webkit2gtk-2.16.5/CMakeLists.txt
@@ -65,6 +65,8 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR
     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: webkit2gtk-2.16.5/Source/JavaScriptCore/CMakeLists.txt
===================================================================
--- webkit2gtk-2.16.5.orig/Source/JavaScriptCore/CMakeLists.txt
+++ webkit2gtk-2.16.5/Source/JavaScriptCore/CMakeLists.txt
@@ -1482,6 +1482,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: webkit2gtk-2.16.5/Source/WTF/wtf/Platform.h
===================================================================
--- webkit2gtk-2.16.5.orig/Source/WTF/wtf/Platform.h
+++ webkit2gtk-2.16.5/Source/WTF/wtf/Platform.h
@@ -80,6 +80,12 @@
 #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)
@@ -872,7 +878,7 @@
 #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: webkit2gtk-2.16.5/Source/WTF/wtf/dtoa/utils.h
===================================================================
--- webkit2gtk-2.16.5.orig/Source/WTF/wtf/dtoa/utils.h
+++ webkit2gtk-2.16.5/Source/WTF/wtf/dtoa/utils.h
@@ -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: webkit2gtk-2.16.5/Source/WebCore/css/CSSProperty.cpp
===================================================================
--- webkit2gtk-2.16.5.orig/Source/WebCore/css/CSSProperty.cpp
+++ webkit2gtk-2.16.5/Source/WebCore/css/CSSProperty.cpp
@@ -34,7 +34,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: webkit2gtk-2.16.5/Source/WebCore/dom/ElementRareData.cpp
===================================================================
--- webkit2gtk-2.16.5.orig/Source/WebCore/dom/ElementRareData.cpp
+++ webkit2gtk-2.16.5/Source/WebCore/dom/ElementRareData.cpp
@@ -47,6 +47,10 @@ struct SameSizeAsElementRareData : NodeR
     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: webkit2gtk-2.16.5/Source/WebCore/dom/NodeRareData.cpp
===================================================================
--- webkit2gtk-2.16.5.orig/Source/WebCore/dom/NodeRareData.cpp
+++ webkit2gtk-2.16.5/Source/WebCore/dom/NodeRareData.cpp
@@ -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: webkit2gtk-2.16.5/Source/WebCore/dom/ShadowRoot.cpp
===================================================================
--- webkit2gtk-2.16.5.orig/Source/WebCore/dom/ShadowRoot.cpp
+++ webkit2gtk-2.16.5/Source/WebCore/dom/ShadowRoot.cpp
@@ -48,7 +48,11 @@ struct SameSizeAsShadowRoot : public Doc
     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: webkit2gtk-2.16.5/Source/WebCore/rendering/style/RenderStyle.cpp
===================================================================
--- webkit2gtk-2.16.5.orig/Source/WebCore/rendering/style/RenderStyle.cpp
+++ webkit2gtk-2.16.5/Source/WebCore/rendering/style/RenderStyle.cpp
@@ -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];
@@ -81,7 +85,11 @@ struct SameSizeAsRenderStyle {
 #endif
 };
 
+#if CPU(M68K)
+COMPILE_ASSERT(sizeof(RenderStyle) <= sizeof(SameSizeAsRenderStyle), RenderStyle_should_stay_small);
+#else
 COMPILE_ASSERT(sizeof(RenderStyle) == sizeof(SameSizeAsRenderStyle), RenderStyle_should_stay_small);
+#endif
 
 RenderStyle& RenderStyle::defaultStyle()
 {
Index: webkit2gtk-2.16.5/Source/WebCore/rendering/style/StyleBoxData.cpp
===================================================================
--- webkit2gtk-2.16.5.orig/Source/WebCore/rendering/style/StyleBoxData.cpp
+++ webkit2gtk-2.16.5/Source/WebCore/rendering/style/StyleBoxData.cpp
@@ -33,7 +33,11 @@ struct SameSizeAsStyleBoxData : public R
     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())
Index: webkit2gtk-2.16.5/Source/WebCore/css/RuleSet.h
===================================================================
--- webkit2gtk-2.16.5.orig/Source/WebCore/css/RuleSet.h
+++ webkit2gtk-2.16.5/Source/WebCore/css/RuleSet.h
@@ -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;

Reply to: