From: Sunil Dora <[email protected]> clang 23 added -Wunused-but-set-global to the -Wunused-but-set-variable group, which pango promotes to an error:
pango/pango-fontset.c:36:1: error: variable 'pango_fontset_parent_class' set but not used [-Werror,-Wunused-but-set-global] It fires on the parent_class variables emitted by GLib's G_DEFINE_TYPE macros. Keep the warning visible but not fatal. gcc builds are unaffected as meson only passes flags the compiler supports. Reported upstream with patches attached: the meson change as pango issue #900 and the underlying GLib macro fix as glib issue #4038. Signed-off-by: Sunil Dora <[email protected]> --- ...ror-on-clang-s-unused-but-set-global.patch | 28 +++++++++++++++++++ meta/recipes-graphics/pango/pango_1.58.0.bb | 1 + 2 files changed, 29 insertions(+) create mode 100644 meta/recipes-graphics/pango/pango/0001-meson-don-t-error-on-clang-s-unused-but-set-global.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 new file mode 100644 index 0000000000..2c3788abdf --- /dev/null +++ b/meta/recipes-graphics/pango/pango/0001-meson-don-t-error-on-clang-s-unused-but-set-global.patch @@ -0,0 +1,28 @@ +From: Sunil Dora <[email protected]> +Date: Wed, 20 Aug 2026 10:45:00 +0530 +Subject: [PATCH] meson: don't error on clang's -Wunused-but-set-global + +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. + +Keep the warning visible but not fatal. gcc does not know this warning +group, so cc.get_supported_arguments() drops the flag there. + +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/pango/-/issues/900] +Signed-off-by: Sunil Dora <[email protected]> +--- +--- a/meson.build ++++ b/meson.build +@@ -148,6 +148,9 @@ + '-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 + ] + diff --git a/meta/recipes-graphics/pango/pango_1.58.0.bb b/meta/recipes-graphics/pango/pango_1.58.0.bb index 6e1aebad1d..0c9e26f39c 100644 --- a/meta/recipes-graphics/pango/pango_1.58.0.bb +++ b/meta/recipes-graphics/pango/pango_1.58.0.bb @@ -18,6 +18,7 @@ UPSTREAM_CHECK_REGEX = "pango-(?P<pver>\d+\.(?!9\d+)\d+\.\d+)" GIR_MESON_ENABLE_FLAG = "enabled" GIR_MESON_DISABLE_FLAG = "disabled" +SRC_URI += "file://0001-meson-don-t-error-on-clang-s-unused-but-set-global.patch" SRC_URI[archive.sha256sum] = "bc5bad6213ad4886a47d1e80292fd850b64159b50db67917a43d9ea80ee2298a" DEPENDS = "glib-2.0 glib-2.0-native fontconfig freetype virtual/libiconv cairo harfbuzz fribidi" -- 2.43.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#244649): https://lists.openembedded.org/g/openembedded-core/message/244649 Mute This Topic: https://lists.openembedded.org/mt/120998129/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
