Fix FTBFS on m68k
authorJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Wed, 15 Feb 2023 21:52:14 +0000 (22:52 +0100)
committerAlberto Garcia <berto@igalia.com>
Wed, 15 Feb 2023 21:52:14 +0000 (22:52 +0100)
Bug-Debian: https://bugs.debian.org/868126
Last-Update: 2020-01-23

===================================================================

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

12 files changed:
Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
Source/WTF/wtf/PlatformCPU.h
Source/WebCore/css/CSSProperty.cpp
Source/WebCore/css/CSSValue.cpp
Source/WebCore/dom/ElementRareData.cpp
Source/WebCore/dom/NodeRareData.cpp
Source/WebCore/dom/ShadowRoot.cpp
Source/WebCore/platform/graphics/FontCascadeDescription.cpp
Source/WebCore/rendering/LegacyInlineFlowBox.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/StyleBoxData.cpp
Source/WebCore/style/RuleData.cpp

index a895c1770db51816877aff19bbd3abeb4824a693..e308c5912ce8dba5d9a84ce43beae71df1b9b0d3 100644 (file)
 #include <wtf/StdLibExtras.h>
 #include <wtf/text/WTFString.h>
 
+#if defined(__m68k__) || defined(__SH4__)
+#pragma GCC push_options
+#pragma GCC optimize ("-O0")
+#endif
+
 namespace JSC {
 
 template<typename CallOp, typename = std::true_type>
@@ -5468,3 +5473,6 @@ void printInternal(PrintStream& out, JSC::Variable::VariableKind kind)
 
 } // namespace WTF
 
+#if defined(__m68k__) || defined(__SH4__)
+#pragma GCC pop_options
+#endif
index 8937b3662cbdfc85a71a0c999a74435f23bb9631..df130b525ac8c9cea404ae7b3db83129c310e053 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 4d3dca5914179ba0a776e60b2e64ad4eb2a955ad..7b10671b26f0c244ae040b788de4d261f9971fc9 100644 (file)
@@ -32,7 +32,9 @@ struct SameSizeAsCSSProperty {
     void* value;
 };
 
+#if !defined(__m68k__)
 static_assert(sizeof(CSSProperty) == sizeof(SameSizeAsCSSProperty), "CSSProperty should stay small");
+#endif
 
 CSSPropertyID StylePropertyMetadata::shorthandID() const
 {
index e1b993315f40d7d4309b25e96cc9118c9dd73ef2..f57d41f6831e5e36bd5b21200ae3a08773def429 100644 (file)
@@ -82,7 +82,9 @@ struct SameSizeAsCSSValue {
     uint32_t bitfields;
 };
 
+#if !defined(__m68k__)
 static_assert(sizeof(CSSValue) == sizeof(SameSizeAsCSSValue), "CSS value should stay small");
+#endif
 
 DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(CSSValue);
 
index 00cf65f33736c48bae84e7fbe14cd93409a45227..cedb35c5614df1c49ed4705bdf115a8f36e3701a 100644 (file)
@@ -45,6 +45,8 @@ struct SameSizeAsElementRareData : NodeRareData {
     ExplicitlySetAttrElementsMap explicitlySetAttrElementsMap;
 };
 
+#if !defined(__m68k__)
 static_assert(sizeof(ElementRareData) == sizeof(SameSizeAsElementRareData), "ElementRareData should stay small");
+#endif
 
 } // namespace WebCore
index 732500d74f504608bf6c6195d02796677ec4a497..8a7c56f7e71044bf92180fde9f052c1d65ac0bdf 100644 (file)
@@ -41,7 +41,9 @@ struct SameSizeAsNodeRareData {
     void* m_pointer[2];
 };
 
+#if !defined(__m68k__)
 static_assert(sizeof(NodeRareData) == sizeof(SameSizeAsNodeRareData), "NodeRareData should stay small");
+#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 6293bc2ae3730f94feefc1c0411a1ab26eb4fa03..97ab2668e0fe3cd20713eea30904a8fa6c9001d5 100644 (file)
@@ -60,10 +60,12 @@ struct SameSizeAsShadowRoot : public DocumentFragment, public TreeScope {
     std::optional<HashMap<AtomString, AtomString>> partMappings;
 };
 
+#if !defined(__m68k__)
 static_assert(sizeof(ShadowRoot) == sizeof(SameSizeAsShadowRoot), "shadowroot should stay small");
 #if !ASSERT_ENABLED
 static_assert(sizeof(WeakPtr<Element>) == sizeof(void*), "WeakPtr should be same size as raw pointer");
 #endif
+#endif
 
 ShadowRoot::ShadowRoot(Document& document, ShadowRootMode type, DelegatesFocus delegatesFocus)
     : DocumentFragment(document, CreateShadowRoot)
index aec01006289ee168a10ac52a827ab21b1e711d9f..5c20a911913274565e2d1e3c5d0b484d51f7190e 100644 (file)
@@ -49,7 +49,9 @@ struct SameSizeAsFontCascadeDescription {
     unsigned bitfields3 : 10;
 };
 
+#if !defined(__m68k__)
 static_assert(sizeof(FontCascadeDescription) == sizeof(SameSizeAsFontCascadeDescription), "FontCascadeDescription should stay small");
+#endif
 
 FontCascadeDescription::FontCascadeDescription()
     : m_families(RefCountedFixedVector<AtomString>::create(1))
index d1095932bdfca4d13b1087118b7859ba1179042b..1a41e54c88d9801f0a96d86afdd9f13eacafe6f0 100644 (file)
@@ -55,7 +55,9 @@ struct SameSizeAsLegacyInlineFlowBox : public LegacyInlineBox {
     void* pointers[5];
 };
 
+#if !defined(__m68k__)
 static_assert(sizeof(LegacyInlineFlowBox) == sizeof(SameSizeAsLegacyInlineFlowBox), "LegacyInlineFlowBox should stay small");
+#endif
 
 #if !ASSERT_WITH_SECURITY_IMPLICATION_DISABLED
 
index 5ed042be120eecd06ce79dad39b550b684862812..3e1e8abad726492662c899c721b6fff99b4fb1ab 100644 (file)
@@ -68,7 +68,9 @@ struct SameSizeAsBorderValue {
     int m_restBits;
 };
 
+#if !defined(__m68k__)
 static_assert(sizeof(BorderValue) == sizeof(SameSizeAsBorderValue), "BorderValue should not grow");
+#endif
 
 struct SameSizeAsRenderStyle {
     void* dataRefs[7];
@@ -86,7 +88,9 @@ struct SameSizeAsRenderStyle {
 #endif
 };
 
+#if !defined(__m68k__)
 static_assert(sizeof(RenderStyle) == sizeof(SameSizeAsRenderStyle), "RenderStyle should stay small");
+#endif
 
 DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(RenderStyle);
 
index 038834a5e7c4be4ec0297100f35989164bce05ac..a475ddf890fa294d1063f96a6c3fad2452104dfb 100644 (file)
@@ -33,7 +33,9 @@ struct SameSizeAsStyleBoxData : public RefCounted<SameSizeAsStyleBoxData> {
     uint32_t bitfields;
 };
 
+#if !defined(__m68k__)
 static_assert(sizeof(StyleBoxData) == sizeof(SameSizeAsStyleBoxData), "StyleBoxData should not grow");
+#endif
 
 DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(StyleBoxData);
 
index 3a0efc7aae34c131ddcfc5cdadcc053d98bea009..264a2fc3340b5f8fcb7a107f4473f5043d60327f 100644 (file)
@@ -57,7 +57,9 @@ struct SameSizeAsRuleData {
     unsigned d[4];
 };
 
+#if !defined(__m68k__)
 static_assert(sizeof(RuleData) == sizeof(SameSizeAsRuleData), "RuleData should stay small");
+#endif
 
 static inline MatchBasedOnRuleHash computeMatchBasedOnRuleHash(const CSSSelector& selector)
 {