Source: webkit2gtk Version: 2.16.5-1 Severity: normal Tags: patch User: debian-...@lists.debian.org Usertags: m68k
Hello! 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. Please consider including the patch in the next upload. Thanks, Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@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 <glaub...@physik.fu-berlin.de> Last-Update: 2017-07-11 --- 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") --- 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) --- 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) @@ -358,6 +364,12 @@ #define WTF_CPU_NEEDS_ALIGNED_ACCESS 1 #endif +/* CPU(M68K) - m68k */ +#if defined(__mc68000__) +#define WTF_CPU_M68K 1 +#define WTF_CPU_BIG_ENDIAN 1 +#endif + /* ==== OS() - underlying operating system; only to be used for mandated low-level services like virtual memory, not to choose a GUI toolkit ==== */ @@ -872,7 +884,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. */ --- 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 --- 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 { --- 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 --- 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 --- 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) --- 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() { --- 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())