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

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

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

13 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/Node.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 e44b931f00285f646a963b1f17a56472cfaa76da..7cf9c724bbe9826102535ae7fddbb5a9e523ef2a 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>
@@ -5584,3 +5589,6 @@ void printInternal(PrintStream& out, JSC::Variable::VariableKind kind)
 
 } // namespace WTF
 
+#if defined(__m68k__) || defined(__SH4__)
+#pragma GCC pop_options
+#endif
index 105013ce55a60a508587be155900afa80302b57b..50d3f6a4ec292c56259654fbfa5ca604e57fdd40 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 a8cfaafdc6a3639c0ad94b20dec6732c3eb2c679..2f84aab85f61423af131af57425c71b7853777eb 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 0a16f39d9ee241e5ad2edb78f422211b069b6e68..43cd7e80fcf3feee131bba3671db802ae8b66454 100644 (file)
@@ -88,7 +88,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 28d186054b1adc7467022a1dab92619c8804cec8..178e2e01b7705e72bdf04ec2aa499792e7d0328e 100644 (file)
@@ -47,6 +47,8 @@ struct SameSizeAsElementRareData : NodeRareData {
     ExplicitlySetAttrElementsMap explicitlySetAttrElementsMap;
 };
 
+#if !defined(__m68k__)
 static_assert(sizeof(ElementRareData) == sizeof(SameSizeAsElementRareData), "ElementRareData should stay small");
+#endif
 
 } // namespace WebCore
index 062a1ce6bf44672ce17e330a0b8f78bdb9bb4aed..1b1690a886e27dccd1a629636373c165adf4e725 100644 (file)
@@ -122,7 +122,9 @@ struct SameSizeAsNode : public EventTarget {
     uint8_t rareDataWithBitfields[8];
 };
 
+#if !defined(__m68k__)
 static_assert(sizeof(Node) == sizeof(SameSizeAsNode), "Node should stay small");
+#endif
 
 #if DUMP_NODE_STATISTICS
 static WeakHashSet<Node, WeakPtrImplWithEventTargetData>& liveNodeSet()
index 60671f960595d3ebfd454ed4dff71aa87cd97bd4..c7cd287dbe1c641d54e404443f0c041e4f83d45f 100644 (file)
@@ -41,7 +41,9 @@ struct SameSizeAsNodeRareData {
     bool m_isElementRareData;
 };
 
+#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 a171c568a3c4567b82706d8a9582783cd54bacb5..b202ed6eee475244f553f1b61ce7b39c32fbc5ce 100644 (file)
@@ -58,10 +58,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, WeakPtrImplWithEventTargetData>) == sizeof(void*), "WeakPtr should be same size as raw pointer");
 #endif
+#endif
 
 ShadowRoot::ShadowRoot(Document& document, ShadowRootMode mode, SlotAssignmentMode assignmentMode, DelegatesFocus delegatesFocus, Cloneable cloneable, AvailableToElementInternals availableToElementInternals)
     : DocumentFragment(document, CreateShadowRoot)
index c123aa458a0f8f72d98166acf16a3c1aec1c23ef..6b206b3396cfc71495ed5095c53f8a94233a04f8 100644 (file)
@@ -54,7 +54,9 @@ struct SameSizeAsFontCascadeDescription {
     float size2;
     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 cf3139d8172d9dedd4d13660fa8124f2d9a3cfd3..8fdd11203553c9d1eea9a38032ca92f3dbf66f33 100644 (file)
@@ -60,7 +60,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 5e344cd926410fc8a964fecd11395a03e701b5f9..2e920dcbf1bc6b1ee1da6021d48cffd014679145 100644 (file)
@@ -81,7 +81,9 @@ struct SameSizeAsBorderValue {
     int m_restBits;
 };
 
+#if !defined(__m68k__)
 static_assert(sizeof(BorderValue) == sizeof(SameSizeAsBorderValue), "BorderValue should not grow");
+#endif
 
 struct SameSizeAsRenderStyle {
     void* nonInheritedDataRefs[1];
@@ -100,7 +102,9 @@ struct SameSizeAsRenderStyle {
 #endif
 };
 
+#if !defined(__m68k__)
 static_assert(sizeof(RenderStyle) == sizeof(SameSizeAsRenderStyle), "RenderStyle should stay small");
+#endif
 
 static_assert(PublicPseudoIDBits == static_cast<int>(PseudoId::FirstInternalPseudoId) - static_cast<int>(PseudoId::FirstPublicPseudoId));
 
index 2a55665e8cbd88b1baa055e3ca86d1890825d0cd..496755845bf0053cedc6823b4b75aace01d82416 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 596144dd17e53d299a1d6a505567e4a7c0a7ee1c..ae9390c3377365ecc78759ddd25b83ba2d5a15f8 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)
 {