summaryrefslogtreecommitdiff
path: root/dev-qt/qtwebengine/files/qtwebengine-6.8.3-gperf3.2.patch
blob: b44934ab59d3297bffd1298f9125a846706c1654 (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
Patch status: fixed in >=chromium-137.0.7126.0

A old workaround for a gperf-3.1 issue[1] breaks building with the
now fixed gperf-3.2, backport the conditional check[2] which should
work with either.

[1] https://savannah.gnu.org/bugs/index.php?53029
[2] https://crrev.com/f8f21fb4aa01f75acbb12abf5ea8c263c6817141
--- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py
+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py
@@ -36,8 +36,11 @@
         gperf_output = re.sub(r'\bregister ', '', gperf_output)
         # -Wimplicit-fallthrough needs an explicit fallthrough statement,
-        # so replace gperf's /*FALLTHROUGH*/ comment with the statement.
-        # https://savannah.gnu.org/bugs/index.php?53029
-        gperf_output = gperf_output.replace('/*FALLTHROUGH*/',
-                                            '  [[fallthrough]];')
+        # so replace gperf 3.1's /*FALLTHROUGH*/ comment with the statement.
+        # https://savannah.gnu.org/bugs/index.php?53029 (fixed in 3.2)
+        if re.search(
+                r'/\* C\+\+ code produced by gperf version 3\.[01](\.\d+)? \*/',
+                gperf_output):
+            gperf_output = gperf_output.replace('/*FALLTHROUGH*/',
+                                                '  [[fallthrough]];')
         # -Wpointer-to-int-cast warns about casting pointers to smaller ints
         # Replace {(int)(long)&(foo), bar} with