Message ID | 20230616181712.4168591-2-raj.khem@gmail.com |
---|---|
State | New |
Headers | show |
Series | [1/2] gn: update to latest | expand |
This breaks the build with gcc12.2 though: 2023-06-19 14:48:07 - INFO - | ../git/src/gn/desc_builder.cc: In member function ‘base::Value {anonymous}::BaseDescBuilder::ToBaseValue(const Scope*)’: 2023-06-19 14:48:07 - INFO - | ../git/src/gn/desc_builder.cc:180:12: error: use of deleted function ‘base::Value::Value(const base::Value&)’ 2023-06-19 14:48:07 - INFO - | 180 | return res; 2023-06-19 14:48:07 - INFO - | | ^~~ 2023-06-19 14:48:07 - INFO - | In file included from ../git/src/gn/commands.h:14, 2023-06-19 14:48:07 - INFO - | from ../git/src/gn/desc_builder.cc:10: 2023-06-19 14:48:07 - INFO - | ../git/src/base/values.h:367:3: note: declared here 2023-06-19 14:48:07 - INFO - | 367 | Value(const Value&) = delete; 2023-06-19 14:48:07 - INFO - | | ^~~~~ 2023-06-19 14:48:07 - INFO - | ../git/src/gn/desc_builder.cc: In instantiation of ‘base::Value {anonymous}::BaseDescBuilder::ToBaseValue(const std::vector<T>&) [with T = Value]’: 2023-06-19 14:48:07 - INFO - | ../git/src/gn/desc_builder.cc:194:44: required from here 2023-06-19 14:48:07 - INFO - | ../git/src/gn/desc_builder.cc:171:12: error: use of deleted function ‘base::Value::Value(const base::Value&)’ 2023-06-19 14:48:07 - INFO - | 171 | return res; 2023-06-19 14:48:07 - INFO - | | ^~~ 2023-06-19 14:48:07 - INFO - | In file included from ../git/src/gn/commands.h:14, 2023-06-19 14:48:07 - INFO - | from ../git/src/gn/desc_builder.cc:10: 2023-06-19 14:48:07 - INFO - | ../git/src/base/values.h:367:3: note: declared here 2023-06-19 14:48:07 - INFO - | 367 | Value(const Value&) = delete; 2023-06-19 14:48:07 - INFO - | | ^~~~~ Is there a solution which works for both? Ross > On 16 Jun 2023, at 19:17, Khem Raj via lists.yoctoproject.org <raj.khem=gmail.com@lists.yoctoproject.org> wrote: > > 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 4e7fa9f7..44a7f3a6 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 = "4bd1a77e67958fb7f6739bd4542641646f264e5d" > PV = "0+git${SRCPV}" > -- > 2.41.0 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#4803): https://lists.yoctoproject.org/g/meta-arm/message/4803 > Mute This Topic: https://lists.yoctoproject.org/mt/99576553/6875888 > Group Owner: meta-arm+owner@lists.yoctoproject.org > Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [ross.burton@arm.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On Mon, Jun 19, 2023 at 9:10 AM Ross Burton <Ross.Burton@arm.com> wrote: > > This breaks the build with gcc12.2 though: easiest is to use GCC_MAJOR macro to make it version specific > > 2023-06-19 14:48:07 - INFO - | ../git/src/gn/desc_builder.cc: In member function ‘base::Value {anonymous}::BaseDescBuilder::ToBaseValue(const Scope*)’: > 2023-06-19 14:48:07 - INFO - | ../git/src/gn/desc_builder.cc:180:12: error: use of deleted function ‘base::Value::Value(const base::Value&)’ > 2023-06-19 14:48:07 - INFO - | 180 | return res; > 2023-06-19 14:48:07 - INFO - | | ^~~ > 2023-06-19 14:48:07 - INFO - | In file included from ../git/src/gn/commands.h:14, > 2023-06-19 14:48:07 - INFO - | from ../git/src/gn/desc_builder.cc:10: > 2023-06-19 14:48:07 - INFO - | ../git/src/base/values.h:367:3: note: declared here > 2023-06-19 14:48:07 - INFO - | 367 | Value(const Value&) = delete; > 2023-06-19 14:48:07 - INFO - | | ^~~~~ > 2023-06-19 14:48:07 - INFO - | ../git/src/gn/desc_builder.cc: In instantiation of ‘base::Value {anonymous}::BaseDescBuilder::ToBaseValue(const std::vector<T>&) [with T = Value]’: > 2023-06-19 14:48:07 - INFO - | ../git/src/gn/desc_builder.cc:194:44: required from here > 2023-06-19 14:48:07 - INFO - | ../git/src/gn/desc_builder.cc:171:12: error: use of deleted function ‘base::Value::Value(const base::Value&)’ > 2023-06-19 14:48:07 - INFO - | 171 | return res; > 2023-06-19 14:48:07 - INFO - | | ^~~ > 2023-06-19 14:48:07 - INFO - | In file included from ../git/src/gn/commands.h:14, > 2023-06-19 14:48:07 - INFO - | from ../git/src/gn/desc_builder.cc:10: > 2023-06-19 14:48:07 - INFO - | ../git/src/base/values.h:367:3: note: declared here > 2023-06-19 14:48:07 - INFO - | 367 | Value(const Value&) = delete; > 2023-06-19 14:48:07 - INFO - | | ^~~~~ > > Is there a solution which works for both? > > Ross > > > On 16 Jun 2023, at 19:17, Khem Raj via lists.yoctoproject.org <raj.khem=gmail.com@lists.yoctoproject.org> wrote: > > > > 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 4e7fa9f7..44a7f3a6 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 = "4bd1a77e67958fb7f6739bd4542641646f264e5d" > > PV = "0+git${SRCPV}" > > -- > > 2.41.0 > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > > Links: You receive all messages sent to this group. > > View/Reply Online (#4803): https://lists.yoctoproject.org/g/meta-arm/message/4803 > > Mute This Topic: https://lists.yoctoproject.org/mt/99576553/6875888 > > Group Owner: meta-arm+owner@lists.yoctoproject.org > > Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [ross.burton@arm.com] > > -=-=-=-=-=-=-=-=-=-=-=- > > >
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 4e7fa9f7..44a7f3a6 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 = "4bd1a77e67958fb7f6739bd4542641646f264e5d" PV = "0+git${SRCPV}"
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