diff mbox series

pango: refresh upstreamed patch

Message ID 20261105183104.23197-1-ross.burton@arm.com
State New
Headers show
Series pango: refresh upstreamed patch | expand

Commit Message

Ross Burton Nov. 5, 2026, 6:31 p.m. UTC
To make this disappear on the upgrade, update the patch to be a backport.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 ...ror-on-clang-s-unused-but-set-global.patch | 35 +++++++++++--------
 1 file changed, 20 insertions(+), 15 deletions(-)
diff mbox series

Patch

diff --git a/meta/recipes-graphics/pango/pango/0001-meson-don-t-error-on-clang-s-unused-but-set-global.patch b/meta/recipes-graphics/pango/pango/0001-meson-don-t-error-on-clang-s-unused-but-set-global.patch
index 2c3788abdf2..66c5b331c33 100644
--- a/meta/recipes-graphics/pango/pango/0001-meson-don-t-error-on-clang-s-unused-but-set-global.patch
+++ b/meta/recipes-graphics/pango/pango/0001-meson-don-t-error-on-clang-s-unused-but-set-global.patch
@@ -1,28 +1,33 @@ 
-From: Sunil Dora <sunilkumar.dora@windriver.com>
-Date: Wed, 20 Aug 2026 10:45:00 +0530
-Subject: [PATCH] meson: don't error on clang's -Wunused-but-set-global
+From 919d0b32c02a7d0aa9739473349c73ac5f63ec10 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Thu, 5 Nov 2026 11:40:45 -0500
+Subject: [PATCH] build: Don't promote unused globals to errors with clang
 
-clang 23 added -Wunused-but-set-global to the -Wunused-but-set-variable
-group, so the -Werror=unused-but-set-variable in test_cflags now turns
-it into an error. It fires on the <type>_parent_class variables that
-GLib's G_DEFINE_TYPE family of macros emit, which pango cannot fix, and
-on a few deliberately write-only globals in the test suite.
+Clang 23 includes -Wunused-but-set-global in -Wunused-but-set-variable.
+GLib type macros create parent-class globals that are legitimately unused
+in some types, so Pango fails when the latter warning group is promoted
+to an error. Keep the warning visible but do not make its global variant
+fatal.
 
-Keep the warning visible but not fatal. gcc does not know this warning
-group, so cc.get_supported_arguments() drops the flag there.
+Based on a patch by David Nylander (!927).
 
-Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/pango/-/issues/900]
-Signed-off-by: Sunil Dora <sunilkumar.dora@windriver.com>
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/pango/-/issues/900]
+Signed-off-by: Ross Burton <ross.burton@arm.com>
 ---
+ meson.build | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/meson.build b/meson.build
+index 9a5dc9ed1..58faa8496 100644
 --- a/meson.build
 +++ b/meson.build
-@@ -148,6 +148,9 @@
+@@ -148,6 +148,7 @@ elif cc.get_id() == 'gcc' or cc.get_id() == 'clang'
      '-Werror=empty-body',
      '-Werror=write-strings',
      '-Werror=unused-but-set-variable',
-+    # clang 23 made this part of the group above; it fires on GLib's
-+    # G_DEFINE_TYPE boilerplate, which pango cannot fix.
 +    '-Wno-error=unused-but-set-global',
      '-Wundef', # FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=792481
    ]
  
+-- 
+GitLab