Group :: Networking/WWW
RPM: chromium-gost
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: 0008-ALT-Hack-to-avoid-build-error-with-clang7.patch
Download
Download
From c917f1e3d8ab7f52845377e740e916c858ab3b11 Mon Sep 17 00:00:00 2001
From: Alexey Gladkov <legion@altlinux.org>
Date: Sat, 16 Feb 2019 20:57:47 +0300
Subject: [PATCH] ALT: Hack to avoid build error with clang7
Signed-off-by: Alexey Gladkov <legion@altlinux.org>
---
third_party/blink/renderer/build/scripts/gperf.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/third_party/blink/renderer/build/scripts/gperf.py b/third_party/blink/renderer/build/scripts/gperf.py
index 34b18c9f9d0..22d6ae5c139 100644
--- a/third_party/blink/renderer/build/scripts/gperf.py
+++ b/third_party/blink/renderer/build/scripts/gperf.py
@@ -28,20 +28,22 @@ def generate_gperf(gperf_path, gperf_input, gperf_args):
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
universal_newlines=True)
gperf_output = gperf.communicate(gperf_input)[0]
# Massage gperf output to be more palatable for modern compilers.
# TODO(thakis): Upstream these to gperf so we don't need massaging.
# `register` is deprecated in C++11 and removed in C++17, so remove
# it from gperf's output.
# https://savannah.gnu.org/bugs/index.php?53028
gperf_output = re.sub(r'\bregister ', '', gperf_output)
+ # Hack to avoid build error with clang7
+ gperf_output = re.sub(r'\[\[fallthrough\]\];', '', 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]];')
# -Wpointer-to-int-cast warns about casting pointers to smaller ints
# Replace {(int)(long)&(foo), bar} with
# {static_cast<int>(reinterpret_cast<uintptr_t>(&(foo)), bar}
gperf_output = re.sub(
r'\(int\)\(long\)(.*?),',
--
2.25.4