Fix FTBFS on m68k
authorJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Sat, 24 Jul 2021 22:25:47 +0000 (23:25 +0100)
committerAlberto Garcia <berto@igalia.com>
Sat, 24 Jul 2021 22:25:47 +0000 (23:25 +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/InlineFlowBox.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/StyleBoxData.cpp
Source/WebCore/style/RuleData.cpp

index 87c8010cbea87d2111111d05a66f703822a4d661..ede6ad577bf123d1c0aa930015bc6f6d9350178d 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>
@@ -5503,3 +5508,6 @@ void printInternal(PrintStream& out, JSC::Variable::VariableKind kind)
 
 } // namespace WTF
 
+#if defined(__m68k__) || defined(__SH4__)
+#pragma GCC pop_options
+#endif
index f6e9339797be3c5c31043f658acda283b6d477da..db4b0550222683400344b6ec237a76618cca3233 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 ba1008a34462e45b0f86d6c967006b69424f3b7d..0820f2d5bb7dac541a41bac49d91e4c235d21663 100644 (file)
@@ -33,7 +33,11 @@ struct SameSizeAsCSSProperty {
     void* value;
 };
 
+#if defined(__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 1aa3536780dda01b049dcbdaf0fa91f0c2ad7c33..aee3bed3ca7d0faf59ea6685f275416342562b0a 100644 (file)
@@ -79,7 +79,11 @@ struct SameSizeAsCSSValue {
     uint32_t bitfields;
 };
 
+#if defined(__m68k__)
+COMPILE_ASSERT(sizeof(CSSValue) <= sizeof(SameSizeAsCSSValue), CSS_value_should_stay_small);
+#else
 COMPILE_ASSERT(sizeof(CSSValue) == sizeof(SameSizeAsCSSValue), CSS_value_should_stay_small);
+#endif
 
 bool CSSValue::isImplicitInitialValue() const
 {
index ec85a4999d5e89ed433291cc55a3fa1f471ec55d..d38360f5c9846ce4bf3f4cc4a01d5e8df26aab5f 100644 (file)
@@ -50,6 +50,10 @@ struct SameSizeAsElementRareData : NodeRareData {
 
 };
 
+#if defined(__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 928da436e7f02eb6e36610ae22759c16a3eb0d98..d10fb597e5acf3f46d44fcdf297f3063320f6d78 100644 (file)
@@ -41,7 +41,11 @@ struct SameSizeAsNodeRareData {
     void* m_pointer[2];
 };
 
+#if defined(__m68k__)
+COMPILE_ASSERT(sizeof(NodeRareData) <= sizeof(SameSizeAsNodeRareData), NodeRareDataShouldStaySmall);
+#else
 COMPILE_ASSERT(sizeof(NodeRareData) == sizeof(SameSizeAsNodeRareData), NodeRareDataShouldStaySmall);
+#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 7af079a3aa68ceebe3bc1972c5e669af305f3524..a8cc44a19d0b8180f6a7b040ad4a08d82d2385b7 100644 (file)
@@ -59,7 +59,11 @@ struct SameSizeAsShadowRoot : public DocumentFragment, public TreeScope {
     Optional<HashMap<AtomString, AtomString>> partMappings;
 };
 
+#if defined(__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, DelegatesFocus delegatesFocus)
     : DocumentFragment(document, CreateShadowRoot)
index 1d293d7f158cd5c29aa02c319248043fa7464adc..8206e976f401da60fdf0526db15d42ed7a5bbcad 100644 (file)
@@ -48,7 +48,11 @@ struct SameSizeAsFontCascadeDescription {
     unsigned bitfields3 : 10;
 };
 
+#if defined(__m68k__)
+COMPILE_ASSERT(sizeof(FontCascadeDescription) >= sizeof(SameSizeAsFontCascadeDescription), FontCascadeDescription_should_stay_small);
+#else
 COMPILE_ASSERT(sizeof(FontCascadeDescription) == sizeof(SameSizeAsFontCascadeDescription), FontCascadeDescription_should_stay_small);
+#endif
 
 FontCascadeDescription::FontCascadeDescription()
     : m_isAbsoluteSize(false)
index 267e927cddf5e4f932e77021c0702357bacf303b..724487687fe440031be757a6b2dff9a233230d2a 100644 (file)
@@ -53,7 +53,11 @@ struct SameSizeAsInlineFlowBox : public InlineBox {
     void* pointers[5];
 };
 
+#if defined(__m68k__)
+COMPILE_ASSERT(sizeof(InlineFlowBox) >= sizeof(SameSizeAsInlineFlowBox), InlineFlowBox_should_stay_small);
+#else
 COMPILE_ASSERT(sizeof(InlineFlowBox) == sizeof(SameSizeAsInlineFlowBox), InlineFlowBox_should_stay_small);
+#endif
 
 #if !ASSERT_WITH_SECURITY_IMPLICATION_DISABLED
 
index 2aa7cea6baa5c7f50c5e1dc693c18a32b7b9dbfc..68122399500f1031a41c4ce2897532bef7c2c148 100644 (file)
@@ -65,7 +65,11 @@ struct SameSizeAsBorderValue {
     int m_restBits;
 };
 
+#if defined(__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];
@@ -83,7 +87,11 @@ struct SameSizeAsRenderStyle {
 #endif
 };
 
+#if defined(__m68k__)
+static_assert(sizeof(RenderStyle) <= sizeof(SameSizeAsRenderStyle), "RenderStyle should stay small");
+#else
 static_assert(sizeof(RenderStyle) == sizeof(SameSizeAsRenderStyle), "RenderStyle should stay small");
+#endif
 
 DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(RenderStyle);
 
index db977a8333c058493389233a5343388a593d8b83..77ae85c7fd3cdb75df4b05ec88d99208c9ee8473 100644 (file)
@@ -33,7 +33,11 @@ struct SameSizeAsStyleBoxData : public RefCounted<SameSizeAsStyleBoxData> {
     uint32_t bitfields;
 };
 
+#if defined(__m68k__)
+COMPILE_ASSERT(sizeof(StyleBoxData) <= sizeof(SameSizeAsStyleBoxData), StyleBoxData_should_not_grow);
+#else
 COMPILE_ASSERT(sizeof(StyleBoxData) == sizeof(SameSizeAsStyleBoxData), StyleBoxData_should_not_grow);
+#endif
 
 DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(StyleBoxData);
 
index 2129a677b71d0ed4e50cefacf3e823e1ed376068..26d415d6b42c086d674e44ebc69c375c4cf85119 100644 (file)
@@ -59,7 +59,11 @@ struct SameSizeAsRuleData {
     unsigned d[4];
 };
 
+#if defined(__m68k__)
+COMPILE_ASSERT(sizeof(RuleData) <= sizeof(SameSizeAsRuleData), RuleData_should_stay_small);
+#else
 COMPILE_ASSERT(sizeof(RuleData) == sizeof(SameSizeAsRuleData), RuleData_should_stay_small);
+#endif
 
 static inline MatchBasedOnRuleHash computeMatchBasedOnRuleHash(const CSSSelector& selector)
 {