Fix FTBFS on m68k
authorJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Tue, 21 Mar 2023 17:11:48 +0000 (17:11 +0000)
committerAlberto Garcia <berto@igalia.com>
Tue, 21 Mar 2023 17:11:48 +0000 (17:11 +0000)
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 46e03e7d0ef6c35f79c63d0b15b5e67bc8c051d3..b5e9117b30ebf93a78f3ec92a9dd13797c137ae0 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>
@@ -5497,3 +5502,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 568d3c7c518c57b3470f95a7eada26a201d1d00f..2ec32b9925bc9d99e7a567baaca709965b3ba192 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 9831d5cb0e0ba0318dce928d4084b23049063374..8892b6fe406710276609a894eee5695f4764c620 100644 (file)
@@ -87,7 +87,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 46bace75796b619197ab156aff031924cf64445d..7a601c3819be9117b8ad583459fd2e09826bc86c 100644 (file)
@@ -44,6 +44,8 @@ struct SameSizeAsElementRareData : NodeRareData {
     ExplicitlySetAttrElementsMap explicitlySetAttrElementsMap;
 };
 
+#if !defined(__m68k__)
 static_assert(sizeof(ElementRareData) == sizeof(SameSizeAsElementRareData), "ElementRareData should stay small");
+#endif
 
 } // namespace WebCore
index 9915fdb00fac9df16e8a368a3605500c593178c8..cc21d0d831960e79cc24a018055d587dbceacc4a 100644 (file)
@@ -42,7 +42,9 @@ struct SameSizeAsNodeRareData {
     WeakPtr<Node, WeakPtrImplWithEventTargetData> m_weakPointer;
 };
 
+#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 43ac11b03bb1b5a9f5baa30f25af6b158a0fedc4..b0d74c10a48c101578d97f971835b865b7448f92 100644 (file)
@@ -59,10 +59,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 e02d2854ed3d7d3ee520a68c2f1e1dba1de7a5af..3bb8818f55ee1c1c4b7e33f4e30a24f142dd7739 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 f1285d9aee318fea017f0a64611e62b536a3ccd4..be64cf3105d360b602b6de9bbf2d3b9024b70d0c 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 0c4281f721d6c01cc9ed7a1e30d38e0c2e5f48d8..6a29f79ecf8db063c8ed8dc4982260fef39dbb1a 100644 (file)
@@ -70,7 +70,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];
@@ -89,7 +91,9 @@ struct SameSizeAsRenderStyle {
 #endif
 };
 
+#if !defined(__m68k__)
 static_assert(sizeof(RenderStyle) == sizeof(SameSizeAsRenderStyle), "RenderStyle should stay small");
+#endif
 
 DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(PseudoStyleCache);
 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 6dfd9fff9afb6fbc6b916bbab94ac3208f0dbc8e..fb04a24fc143f1bb26bdaa924284dcb2686d0b2b 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)
 {