Add two patches for GCC 13

This commit is contained in:
Benjamin A. Beasley 2023-01-19 09:42:20 -05:00
parent 3d37155cde
commit 12a043d8eb
3 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,38 @@
From 66e78f979c8826bb193c00a4ba744e3ce8774a8e Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Thu, 19 Jan 2023 09:24:27 -0500
Subject: [PATCH] =?UTF-8?q?Remove=20std::move=E2=80=99s=20reported=20as=20?=
=?UTF-8?q?redundant=20by=20GCC=2013?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/gn/desc_builder.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gn/desc_builder.cc b/src/gn/desc_builder.cc
index 444a5e02..3ef170c3 100644
--- a/src/gn/desc_builder.cc
+++ b/src/gn/desc_builder.cc
@@ -167,7 +167,7 @@ class BaseDescBuilder {
base::ListValue res;
for (const auto& v : vector)
res.GetList().emplace_back(ToBaseValue(v));
- return std::move(res);
+ return res;
}
base::Value ToBaseValue(const Scope* scope) {
@@ -176,7 +176,7 @@ class BaseDescBuilder {
scope->GetCurrentScopeValues(&map);
for (const auto& v : map)
res.SetKey(v.first, ToBaseValue(v.second));
- return std::move(res);
+ return res;
}
base::Value ToBaseValue(const Value& val) {
--
2.39.0

View File

@ -0,0 +1,24 @@
From 36e55bde4e6def641d7ecbdc483c3bc0b4d5047d Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Thu, 19 Jan 2023 09:16:51 -0500
Subject: [PATCH] Add missing #include <stdint.h> for uint8_t
---
src/base/containers/span.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/base/containers/span.h b/src/base/containers/span.h
index 4af83b44..19b9503e 100644
--- a/src/base/containers/span.h
+++ b/src/base/containers/span.h
@@ -6,6 +6,7 @@
#define BASE_CONTAINERS_SPAN_H_
#include <stddef.h>
+#include <stdint.h>
#include <algorithm>
#include <array>
--
2.39.0

View File

@ -54,6 +54,12 @@ Source2: update-version
# Stop overriding optimization flags; not sent upstream because this is
# intentional on their part
Patch: gn-0153d369-no-O3.patch
# Error: redundant move in return statement (GCC 13)
# https://bugs.chromium.org/p/gn/issues/detail?id=318
Patch: gn-5e19d2fb166f-redundant-move.patch
# Missing #include <stdint.h> for uint8_t (GCC 13)
# https://bugs.chromium.org/p/gn/issues/detail?id=319
Patch: gn-5e19d2fb166f-stdint.patch
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}