diff mbox series

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

Message ID 20230328214351.3666478-1-raj.khem@gmail.com
State New
Headers show
Series webkitgtk: Fix build on 32bit platforms without 64bit atomics | expand

Commit Message

Khem Raj March 28, 2023, 9:43 p.m. UTC
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.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...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

Comments

Alexander Kanavin March 29, 2023, 8:37 a.m. UTC | #1
On Tue, 28 Mar 2023 at 23:43, Khem Raj <raj.khem@gmail.com> wrote:
> +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
Khem Raj March 29, 2023, 3:07 p.m. UTC | #2
On Wed, Mar 29, 2023 at 1:38 AM Alexander Kanavin
<alex.kanavin@gmail.com> wrote:
>
> On Tue, 28 Mar 2023 at 23:43, Khem Raj <raj.khem@gmail.com> wrote:
> > +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 ?

>
> Alex
Alexander Kanavin March 29, 2023, 7:04 p.m. UTC | #3
On Wed, 29 Mar 2023 at 17:07, Khem Raj <raj.khem@gmail.com> wrote:
> > 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
Khem Raj March 29, 2023, 7:11 p.m. UTC | #4
On 3/29/23 12:04 PM, Alexander Kanavin wrote:
> On Wed, 29 Mar 2023 at 17:07, Khem Raj <raj.khem@gmail.com> wrote:
>>> 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.
> 

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

> Alex
Alexander Kanavin March 30, 2023, 10:13 a.m. UTC | #5
On Wed, 29 Mar 2023 at 21:11, Khem Raj <raj.khem@gmail.com> wrote:
> > 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
diff mbox series

Patch

diff --git a/meta/recipes-sato/webkit/files/0001-ANGLE-Remove-static_assert-for-64bit-atomics.patch b/meta/recipes-sato/webkit/files/0001-ANGLE-Remove-static_assert-for-64bit-atomics.patch
new file mode 100644
index 0000000000..d39eee6c58
--- /dev/null
+++ b/meta/recipes-sato/webkit/files/0001-ANGLE-Remove-static_assert-for-64bit-atomics.patch
@@ -0,0 +1,33 @@ 
+From 03d5f84e7bb292f5cf7120af91e979fc87b36e04 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+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 <raj.khem@gmail.com>
+---
+ 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
+
diff --git a/meta/recipes-sato/webkit/webkitgtk-3_2.40.0.bb b/meta/recipes-sato/webkit/webkitgtk-3_2.40.0.bb
index a9d6af2626..23378d7d16 100644
--- a/meta/recipes-sato/webkit/webkitgtk-3_2.40.0.bb
+++ b/meta/recipes-sato/webkit/webkitgtk-3_2.40.0.bb
@@ -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"
 
diff --git a/meta/recipes-sato/webkit/webkitgtk_2.40.0.bb b/meta/recipes-sato/webkit/webkitgtk_2.40.0.bb
index e219cbf6d4..5c64dab23b 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.40.0.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.40.0.bb
@@ -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"