From 8195c7dcda73d9ff5fda7eb89f797253bb654fde Mon Sep 17 00:00:00 2001 From: Daniel Martinez Date: Wed, 31 Jan 2024 23:27:34 -0500 Subject: [PATCH] chromium: fix build with gcc13 --- srcpkgs/chromium/patches/gcc13-wnoerror.patch | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 srcpkgs/chromium/patches/gcc13-wnoerror.patch diff --git a/srcpkgs/chromium/patches/gcc13-wnoerror.patch b/srcpkgs/chromium/patches/gcc13-wnoerror.patch new file mode 100644 index 0000000000000..c069aa41b2d09 --- /dev/null +++ b/srcpkgs/chromium/patches/gcc13-wnoerror.patch @@ -0,0 +1,21 @@ +https://gn.googlesource.com/gn/+/c7b223bfb225ce87a72a244d016ffdfcf227fa5e%5E%21/ +Ignore build warning -Werror=redundant-move + +gcc-13 complains with: +error: redundant move in return statement [-Werror=redundant-move] + +We cannot fix the code, because both old versions of gcc and the windows +toolchain fails to build. +index adb622a..232e536 100755 +--- a/tools/gn/build/gen.py ++++ b/tools/gn/build/gen.py + +@@ -472,6 +472,8 @@ + # flags not supported by gcc/g++. + if cxx == 'clang++': + cflags.extend(['-Wrange-loop-analysis', '-Wextra-semi-stmt']) ++ else: ++ cflags.append('-Wno-redundant-move') + + if platform.is_linux() or platform.is_mingw() or platform.is_msys(): + ldflags.append('-Wl,--as-needed')