Skip to contentSkip to conversation

package/wpewebkit: fix NEON build with gcc-12

PATCH In review Michael Nosthoff via buildroot 1 participant 2 messages May 1, 2023 – Jul 29, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/wpewebkit: fix NEON build with gcc-12

since gcc-12 gcc complains about attributes in between decl-specifiers. This code is NEON specific so it should not appear on builds for other systems.

---

@Adrian: should I submit this somewhere upstream? Or would it make more sense to include this in the other NEON specific patch?

---
 .../0002-change-position-of-alignas.patch     | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 package/wpewebkit/0002-change-position-of-alignas.patch
package/wpewebkit/0002-change-position-of-alignas.patch new file +33 -0
new file mode 100644
index 0000000000..5a1564c4c1
@@ -0,0 +1,33 @@
+From e2a3e36c8df59d83de0a48b806cad5bb5515a658 Mon Sep 17 00:00:00 2001
+From: Michael Nosthoff <[email protected]>
+Date: Tue, 18 Apr 2023 19:47:03 +0200
+Subject: [PATCH] change position of alignas
+
+fixes:
+Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.cpp:38:8: error: standard attributes in middle of decl-specifiers
+   38 | static alignas(16) short s_FELightingConstantsForNeon[] = {
+      |        ^~~~~~~
+
+on gcc-12
+
+Signed-off-by: Michael Nosthoff <[email protected]>
+---
+ .../platform/graphics/cpu/arm/filters/FELightingNEON.cpp        | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.cpp b/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.cpp
+index 64950d1732e8..cafb4ee184ba 100644
+--- a/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.cpp
++++ b/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.cpp
+@@ -35,7 +35,7 @@ namespace WebCore {
+ //   ALPHAX_Q ALPHAY_Q REMAPX_D REMAPY_D
+ 
+ 
+-static alignas(16) short s_FELightingConstantsForNeon[] = {
++static short alignas(16) s_FELightingConstantsForNeon[] = {
+     // Alpha coefficients.
+     -2, 1, 0, -1, 2, 1, 0, -1,
+     0, -1, -2, -1, 0, 1, 2, 1,
+-- 
+2.34.1
+
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello Michael,

Quoted 4 lines · On Mon, 1 May 2023 14:32:03 +0200 Michael Nosthoff via buildroot…

since gcc-12 gcc complains about attributes in between decl-specifiers. This code is NEON specific so it should not appear on builds for other systems.

Could you provide in the commit log a defconfig that exhibits the issue, since there's apparently no autobuilder failure for this issue.

Quoted 9 lines
package/wpewebkit/0002-change-position-of-alignas.patch new file +3 -0
new file mode 100644
index 0000000000..5a1564c4c1
@@ -0,0 +1,33 @@
+From e2a3e36c8df59d83de0a48b806cad5bb5515a658 Mon Sep 17 00:00:00 2001
+From: Michael Nosthoff <[email protected]>
+Date: Tue, 18 Apr 2023 19:47:03 +0200

package/wpewebkit/0002-change-position-of-alignas.patch line 13

Quoted 10 lines
package/wpewebkit/0002-change-position-of-alignas.patch new file +10 -0
+Subject: [PATCH] change position of alignas
+
+fixes:
+Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.cpp:38:8: error: standard attributes in middle of decl-specifiers
+   38 | static alignas(16) short s_FELightingConstantsForNeon[] = {
+      |        ^~~~~~~
+
+on gcc-12
+
+Signed-off-by: Michael Nosthoff <[email protected]>

We need an Upstream: tag in new patches, so it really needs to be submitted upstream.

Adrian, could you provide some guidance here?

I guess the ultimate upstream is https://github.com/WebKit/WebKit/ and then changes in WebKit at some point get propagated into WPEWebkit?

Could you submit a pull request to upstream WebKit ?

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot