Skip to contentSkip to conversation

webkitgtk: Fix build on 32bit platforms without 64bit atomics

PATCH In review Khem Raj 2 participants 6 messages Mar 28, 2023 – Mar 30, 2023

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 webkitgtk: Fix build on 32bit platforms without 64bit atomics

The fix is to remove a static_assert which is anyway diagnostics we will not hit on 64bit platforms and it will still work on 32bit platforms although a bit slow.

---
 ...move-static_assert-for-64bit-atomics.patch | 33 +++++++++++++++++++
 .../recipes-sato/webkit/webkitgtk-3_2.40.0.bb |  1 +
 meta/recipes-sato/webkit/webkitgtk_2.40.0.bb  |  1 +
 3 files changed, 35 insertions(+)
 create mode 100644 meta/recipes-sato/webkit/files/0001-ANGLE-Remove-static_assert-for-64bit-atomics.patch
meta/recipes-sato/webkit/files/0001-ANGLE-Remove-static_assert-for-64bit-atomics.patch new file +33 -0
new file mode 100644
index 0000000000..d39eee6c58
@@ -0,0 +1,33 @@
+From 03d5f84e7bb292f5cf7120af91e979fc87b36e04 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 28 Mar 2023 14:38:17 -0700
+Subject: [PATCH] ANGLE: Remove static_assert for 64bit atomics
+
+This will make sure that it can be built on 32bit platforms e.g.
+mips32/ppc32
+
+This partially reverts https://chromium-review.googlesource.com/c/angle/angle/+/4205892
+the suggestion to remove the assertion is from the author of the patch
+itself
+
+Upstream-Status: Inappropriate [32-bit specific]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ Source/ThirdParty/ANGLE/src/libANGLE/renderer/serial_utils.h | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/serial_utils.h b/Source/ThirdParty/ANGLE/src/libANGLE/renderer/serial_utils.h
+index 51ad1af9..9412c805 100644
+--- a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/serial_utils.h
++++ b/Source/ThirdParty/ANGLE/src/libANGLE/renderer/serial_utils.h
+@@ -129,7 +129,6 @@ class AtomicQueueSerial final
+   private:
+     static constexpr uint64_t kInvalid = 0;
+     std::atomic<uint64_t> mValue       = kInvalid;
+-    static_assert(decltype(mValue)::is_always_lock_free, "Must always be lock free");
+ };
+ 
+ // Used as default/initial serial
+-- 
+2.40.0
+
meta/recipes-sato/webkit/webkitgtk-3_2.40.0.bb +1 -0
index a9d6af2626..23378d7d16 100644
@@ -15,6 +15,7 @@ SRC_URI = "https://www.webkitgtk.org/releases/webkitgtk-${PV}.tar.xz \
            file://reproducibility.patch \
            file://0d3344e17d258106617b0e6d783d073b188a2548.patch \
            file://disable_wasm_riscv64.patch \
+           file://0001-ANGLE-Remove-static_assert-for-64bit-atomics.patch \
            "
 SRC_URI[sha256sum] = "a4607ea1bf89669e89b1cb2c63faaec513f93de09b6ae60cc71d6a8aab7ab393"
 
meta/recipes-sato/webkit/webkitgtk_2.40.0.bb +1 -0
index e219cbf6d4..5c64dab23b 100644
@@ -15,6 +15,7 @@ SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
            file://reproducibility.patch \
            file://0d3344e17d258106617b0e6d783d073b188a2548.patch \
            file://disable_wasm_riscv64.patch \
+           file://0001-ANGLE-Remove-static_assert-for-64bit-atomics.patch \
            "
 SRC_URI[sha256sum] = "a4607ea1bf89669e89b1cb2c63faaec513f93de09b6ae60cc71d6a8aab7ab393"
 
Signature · 1 line
2.40.0
#1 lore raw

meta/recipes-sato/webkit/files/0001-ANGLE-Remove-static_assert-for-64bit-atomics.patch line 13

Quoted 10 lines · Khem Raj
meta/recipes-sato/webkit/files/0001-ANGLE-Remove-static_assert-for-64bit-atomics.patch new file +10 -0
+Subject: [PATCH] ANGLE: Remove static_assert for 64bit atomics
+
+This will make sure that it can be built on 32bit platforms e.g.
+mips32/ppc32
+
+This partially reverts https://chromium-review.googlesource.com/c/angle/angle/+/4205892
+the suggestion to remove the assertion is from the author of the patch
+itself
+
+Upstream-Status: Inappropriate [32-bit specific]

32-bit specificity is not in itself inappropriate for upstream submission, can you please either submit upstream or open a ticket and refer to it in the patch?

Alex

author
#2 lore raw
Quoted 16 lines · Alexander Kanavin

meta/recipes-sato/webkit/files/0001-ANGLE-Remove-static_assert-for-64bit-atomics.patch line 13

Quoted 10 lines · Khem Raj
meta/recipes-sato/webkit/files/0001-ANGLE-Remove-static_assert-for-64bit-atomics.patch new file +10 -0
+Subject: [PATCH] ANGLE: Remove static_assert for 64bit atomics
+
+This will make sure that it can be built on 32bit platforms e.g.
+mips32/ppc32
+
+This partially reverts https://chromium-review.googlesource.com/c/angle/angle/+/4205892
+the suggestion to remove the assertion is from the author of the patch
+itself
+
+Upstream-Status: Inappropriate [32-bit specific]

32-bit specificity is not in itself inappropriate for upstream submission, can you please either submit upstream or open a ticket and refer to it in the patch?

did you read the message trail on the gerrit review I added to commit ?

Quoted 2 lines

Alex

#3 lore raw
Quoted 5 lines · Khem Raj
Quoted 3 lines

32-bit specificity is not in itself inappropriate for upstream submission, can you please either submit upstream or open a ticket and refer to it in the patch?

did you read the message trail on the gerrit review I added to commit ?

I did - upstream suggested a workaround that was submitted here (in an already closed merge request), but they didn't definitively say whether they would reject a ticket (or a patch) to solve the problem properly, so I think it's worth to at least open a ticket.

Alex

author
#4 lore raw
Quoted 5 lines · Alexander Kanavin
Quoted 4 lines · Khem Raj
Quoted 3 lines

32-bit specificity is not in itself inappropriate for upstream submission, can you please either submit upstream or open a ticket and refer to it in the patch?

Quoted 7 lines
Quoted 1 line

did you read the message trail on the gerrit review I added to commit ?

I did - upstream suggested a workaround that was submitted here (in an already closed merge request), but they didn't definitively say whether they would reject a ticket (or a patch) to solve the problem properly, so I think it's worth to at least open a ticket.

that is still under discussion. Hopefully they are amenable for such accommodation

Quoted 1 line

Alex

#5 lore raw
Quoted 8 lines · Khem Raj
Quoted 5 lines

I did - upstream suggested a workaround that was submitted here (in an already closed merge request), but they didn't definitively say whether they would reject a ticket (or a patch) to solve the problem properly, so I think it's worth to at least open a ticket.

that is still under discussion. Hopefully they are amenable for such accommodation

But then the patch is Pending, and not Inappropriate, and should be marked as such.

Upstream now suggested it could be submitted, so please do.

Alex