From 477b39a1e08452a3210a71c4f83b6f910a062566 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sun, 29 Oct 2023 09:58:31 +0100 Subject: [PATCH] package/pango: fix build with gcc >= 13 Fix the following build failure with gcc >= 13: In function 'find_best_lang_match_cached', inlined from 'find_best_lang_match_cached' at ../pango/pango-language.c:501:1, inlined from 'pango_language_get_scripts' at ../pango/pango-language.c:661:21: ../pango/pango-language.c:518:12: error: array subscript 0 is outside array bounds of 'const void *[0]' {aka 'const void *[]'} [-Werror=array-bounds=] 518 | *cache = result; | ~~~~~~~^~~~~~~~ In function 'pango_language_get_scripts': cc1: note: source object is likely at address zero cc1: some warnings being treated as errors Fixes: - http://autobuild.buildroot.org/results/e8b5a752a62621099942b29c1642747eef2930cb Signed-off-by: Fabrice Fontaine Signed-off-by: Yann E. MORIN --- .../pango/0001-Drop-Werror-array-bounds.patch | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 package/pango/0001-Drop-Werror-array-bounds.patch diff --git a/package/pango/0001-Drop-Werror-array-bounds.patch b/package/pango/0001-Drop-Werror-array-bounds.patch new file mode 100644 index 0000000000..45821e8533 --- /dev/null +++ b/package/pango/0001-Drop-Werror-array-bounds.patch @@ -0,0 +1,40 @@ +From e93dbd66973040f1e0afcba0dc7c712c27d75d59 Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Mon, 1 May 2023 23:27:52 -0400 +Subject: [PATCH] Drop -Werror=array-bounds + +gcc has strange issues with this and produces false +positives that recently started breaking the build of +pango as a subproject in gtk. + +See e.g. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523 + +Upstream: https://gitlab.gnome.org/GNOME/pango/-/commit/e93dbd66973040f1e0afcba0dc7c712c27d75d59 +Signed-off-by: Fabrice Fontaine +--- + meson.build | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/meson.build b/meson.build +index 930f41082..2d30c0141 100644 +--- a/meson.build ++++ b/meson.build +@@ -89,7 +89,6 @@ elif cc.get_id() == 'gcc' or cc.get_id() == 'clang' + '-Wuninitialized', + '-Wunused', + '-Werror=address', +- '-Werror=array-bounds', + '-Werror=empty-body', + '-Werror=implicit', + '-Werror=implicit-fallthrough', +@@ -132,7 +131,6 @@ elif cc.get_id() == 'gcc' or cc.get_id() == 'clang' + '-Werror=sequence-point', + '-Werror=return-type', + '-Werror=trigraphs', +- '-Werror=array-bounds', + '-Werror=write-strings', + '-Werror=address', + '-Werror=int-to-pointer-cast', +-- +GitLab +