meta-arm.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: meta-arm@lists.yoctoproject.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [PATCH] gn: Fix build with gcc13
Date: Sun,  5 Feb 2023 09:58:58 -0800	[thread overview]
Message-ID: <20230205175858.1485064-1-raj.khem@gmail.com> (raw)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...Remove-redundant-move-in-return-stat.patch | 43 +++++++++++++++++++
 meta-arm/recipes-devtools/gn/gn_git.bb        |  1 +
 2 files changed, 44 insertions(+)
 create mode 100644 meta-arm/recipes-devtools/gn/gn/0001-desc_builder.cc-Remove-redundant-move-in-return-stat.patch

diff --git a/meta-arm/recipes-devtools/gn/gn/0001-desc_builder.cc-Remove-redundant-move-in-return-stat.patch b/meta-arm/recipes-devtools/gn/gn/0001-desc_builder.cc-Remove-redundant-move-in-return-stat.patch
new file mode 100644
index 00000000..f712037a
--- /dev/null
+++ b/meta-arm/recipes-devtools/gn/gn/0001-desc_builder.cc-Remove-redundant-move-in-return-stat.patch
@@ -0,0 +1,43 @@
+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
+
diff --git a/meta-arm/recipes-devtools/gn/gn_git.bb b/meta-arm/recipes-devtools/gn/gn_git.bb
index 521e33e9..2e58d28b 100644
--- a/meta-arm/recipes-devtools/gn/gn_git.bb
+++ b/meta-arm/recipes-devtools/gn/gn_git.bb
@@ -5,6 +5,7 @@ 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 = "bf4e17dc67b2a2007475415e3f9e1d1cf32f6e35"
 PV = "0+git${SRCPV}"
-- 
2.39.1



             reply	other threads:[~2023-02-05 17:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-05 17:58 Khem Raj [this message]
2023-02-15 13:18 ` [PATCH] gn: Fix build with gcc13 Jon Mason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230205175858.1485064-1-raj.khem@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=meta-arm@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).