1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-06-05 14:30:10 +00:00

arm/gn: fix build with GCC <13

The previous commit fixed the build of GN with GCC 13, but broke it for
any other version.

Remove the patch and simply disable the fatal warning that causes the
breakage. Interestingly, this warning is already disabled for Windows
builds.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Ross Burton
2023-06-20 15:01:37 +01:00
committed by Jon Mason
parent e6301496ce
commit 533cbfd10b
2 changed files with 6 additions and 44 deletions
@@ -1,43 +0,0 @@
From 45673f4f62eb063d6d5aa0ad68a6171936ad9347 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 24 Jan 2023 00:13:57 -0800
Subject: [PATCH] desc_builder.cc: Remove redundant move in return statement
Fixes build with gcc13
../git/src/gn/desc_builder.cc: In member function 'base::Value {anonymous}::BaseDescBuilder::ToBaseValue(const Scope*)':
../git/src/gn/desc_builder.cc:179:21: error: redundant move in return statement [-Werror=redundant-move]
179 | return std::move(res);
| ~~~~~~~~~^~~~~
Upstream-Status: Submitted [https://gn-review.googlesource.com/c/gn/+/15000]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
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.1
+6 -1
View File
@@ -5,7 +5,6 @@ LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=0fca02217a5d49a14dfe2d11837bb34d"
SRC_URI = "git://gn.googlesource.com/gn;protocol=https;branch=main \
file://0001-desc_builder.cc-Remove-redundant-move-in-return-stat.patch \
file://0001-Replace-lstat64-stat64-functions-on-linux.patch"
SRCREV = "4bd1a77e67958fb7f6739bd4542641646f264e5d"
PV = "0+git${SRCPV}"
@@ -13,6 +12,12 @@ PV = "0+git${SRCPV}"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
# Work around this fatal warning:
# ../git/src/gn/desc_builder.cc: In member function 'base::Value {anonymous}::BaseDescBuilder::ToBaseValue(const Scope*)':
# ../git/src/gn/desc_builder.cc:179:21: error: redundant move in return statement [-Werror=redundant-move]
# 179 | return std::move(res);
CFLAGS:append = " -Wno-redundant-move"
# Map from our _OS strings to the GN's platform values.
def gn_platform(variable, d):
os = d.getVar(variable)