summaryrefslogtreecommitdiff
path: root/x11-libs/pango/files/pango-1.58.2-clang23-build-fix.patch
blob: ed7de2a909b973db9e95e896b31cd8291b6a801f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Bug: https://bugs.gentoo.org/981874
From https://gitlab.gnome.org/GNOME/pango/-/merge_requests/927
From: Daniel Nylander <yeager@users.noreply.gitlab.gnome.org>
Date: Fri, 11 Sep 2026 23:05:39 +0200
Subject: [PATCH 1/3] build: Do not promote unused globals to errors with Clang

--- a/meson.build
+++ b/meson.build
@@ -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',
+    '-Wno-error=unused-but-set-global',
     '-Wundef', # FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=792481
   ]
 
-- 
GitLab


From: Daniel Nylander <yeager@users.noreply.gitlab.gnome.org>
Date: Sat, 12 Sep 2026 10:37:21 +0200
Subject: [PATCH 2/3] build: Probe unused global warning override

--- a/meson.build
+++ b/meson.build
@@ -148,10 +148,13 @@ elif cc.get_id() == 'gcc' or cc.get_id() == 'clang'
     '-Werror=empty-body',
     '-Werror=write-strings',
     '-Werror=unused-but-set-variable',
-    '-Wno-error=unused-but-set-global',
     '-Wundef', # FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=792481
   ]
 
+  test_cflags += cc.get_supported_arguments([
+    '-Wno-error=unused-but-set-global',
+  ])
+
   if host_system == 'windows'
     test_cflags += [ '-mms-bitfields' ]
   else
-- 
GitLab