diff options
| author | Martin Jansa <martin.jansa@gmail.com> | 2024-07-11 13:03:59 +0200 |
|---|---|---|
| committer | Armin Kuster <akuster808@gmail.com> | 2024-12-08 14:38:16 -0500 |
| commit | 7114e2fba18abd42f9ef52bee5e59546f6878d6b (patch) | |
| tree | e61d030fc8f543544eb6ca1faf5fa07629b88762 /meta-oe | |
| parent | 873d801a71705ba0ea7f984af7f910d49e962c62 (diff) | |
| download | meta-openembedded-7114e2fba18abd42f9ef52bee5e59546f6878d6b.tar.gz | |
flatbuffers: fix native build with gcc-14 on host
In C++ we cannot have both assignment operator and const member. Since
span::operator= is defined, span::count_ constness must be removed.
Fixes:
FAILED: CMakeFiles/flatc.dir/src/util.cpp.o
ccache flatbuffers/2.0.0/recipe-sysroot-native/usr/bin/aarch64-webos-linux/aarch64-webos-linux-g++ --sysroot=flatbuffers/2.0.0/recipe-sysroot -DFLATBUFFERS_LOCALE_INDEPENDENT=1 -Iflatbuffers/2.0.0/git/include -Iflatbuffers/2.0.0/git/grpc -mbranch-protection=standard -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Werror=return-type -funwind-tables --sysroot=flatbuffers/2.0.0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fcanon-prefix-map -fmacro-prefix-map=flatbuffers/2.0.0/git=/usr/src/debug/flatbuffers/2.0.0 -fdebug-prefix-map=flatbuffers/2.0.0/git=/usr/src/debug/flatbuffers/2.0.0 -fmacro-prefix-map=flatbuffers/2.0.0/build=/usr/src/debug/flatbuffers/2.0.0 -fdebug-prefix-map=flatbuffers/2.0.0/build=/usr/src/debug/flatbuffers/2.0.0 -fdebug-prefix-map=flatbuffers/2.0.0/recipe-sysroot= -fmacro-prefix-map=flatbuffers/2.0.0/recipe-sysroot= -fdebug-prefix-map=flatbuffers/2.0.0/recipe-sysroot-native= -fvisibility-inlines-hidden -fPIC -DNDEBUG -MD -MT CMakeFiles/flatc.dir/src/util.cpp.o -MF CMakeFiles/flatc.dir/src/util.cpp.o.d -o CMakeFiles/flatc.dir/src/util.cpp.o -c flatbuffers/2.0.0/git/src/util.cpp
In file included from ../git/include/flatbuffers/util.h:23,
from ../git/src/util.cpp:44:
../git/include/flatbuffers/stl_emulation.h: In member function 'constexpr flatbuffers::span<T, Extent>& flatbuffers::span<T, Extent>::operator=(const flatbuffers::span<T, Extent>&)':
../git/include/flatbuffers/stl_emulation.h:549:12: error: assignment of read-only member 'flatbuffers::span<T, Extent>::count_'
549 | count_ = other.count_;
| ~~~~~~~^~~~~~~~~~~~~~
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe')
| -rw-r--r-- | meta-oe/recipes-devtools/flatbuffers/flatbuffers/0001-C-stl_emulation-span-count_-is-not-const-anymore-722.patch | 27 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/flatbuffers/flatbuffers_2.0.0.bb | 4 |
2 files changed, 30 insertions, 1 deletions
diff --git a/meta-oe/recipes-devtools/flatbuffers/flatbuffers/0001-C-stl_emulation-span-count_-is-not-const-anymore-722.patch b/meta-oe/recipes-devtools/flatbuffers/flatbuffers/0001-C-stl_emulation-span-count_-is-not-const-anymore-722.patch new file mode 100644 index 0000000000..0a48c665b5 --- /dev/null +++ b/meta-oe/recipes-devtools/flatbuffers/flatbuffers/0001-C-stl_emulation-span-count_-is-not-const-anymore-722.patch | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | From 659def02b6432b62220ed41d7c137dcfd9dfe024 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: avaliente-bc <56400759+avaliente-bc@users.noreply.github.com> | ||
| 3 | Date: Wed, 6 Apr 2022 21:27:37 +0200 | ||
| 4 | Subject: [PATCH] [C++] stl_emulation span::count_ is not const anymore (#7226) | ||
| 5 | (#7227) | ||
| 6 | |||
| 7 | In C++ we cannot have both assignment operator and const member. Since | ||
| 8 | span::operator= is defined, span::count_ constness must be removed. | ||
| 9 | --- | ||
| 10 | Upstream-Status: Backport [https://github.com/google/flatbuffers/commit/20aad0c41e1252b04c72111c3eb221280a9c2009] | ||
| 11 | |||
| 12 | include/flatbuffers/stl_emulation.h | 2 +- | ||
| 13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 14 | |||
| 15 | diff --git a/include/flatbuffers/stl_emulation.h b/include/flatbuffers/stl_emulation.h | ||
| 16 | index 44e9ccbfa..cac87db65 100644 | ||
| 17 | --- a/include/flatbuffers/stl_emulation.h | ||
| 18 | +++ b/include/flatbuffers/stl_emulation.h | ||
| 19 | @@ -629,7 +629,7 @@ class span FLATBUFFERS_FINAL_CLASS { | ||
| 20 | private: | ||
| 21 | // This is a naive implementation with 'count_' member even if (Extent != dynamic_extent). | ||
| 22 | pointer const data_; | ||
| 23 | - const size_type count_; | ||
| 24 | + size_type count_; | ||
| 25 | }; | ||
| 26 | |||
| 27 | #if !defined(FLATBUFFERS_SPAN_MINIMAL) | ||
diff --git a/meta-oe/recipes-devtools/flatbuffers/flatbuffers_2.0.0.bb b/meta-oe/recipes-devtools/flatbuffers/flatbuffers_2.0.0.bb index 44478ea0b2..1ffb28a198 100644 --- a/meta-oe/recipes-devtools/flatbuffers/flatbuffers_2.0.0.bb +++ b/meta-oe/recipes-devtools/flatbuffers/flatbuffers_2.0.0.bb | |||
| @@ -14,7 +14,9 @@ RDEPENDS:${PN}-dev += "${PN}-compiler" | |||
| 14 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" | 14 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" |
| 15 | 15 | ||
| 16 | SRCREV = "a9a295fecf3fbd5a4f571f53b01f63202a3e2113" | 16 | SRCREV = "a9a295fecf3fbd5a4f571f53b01f63202a3e2113" |
| 17 | SRC_URI = "git://github.com/google/flatbuffers.git;branch=master;protocol=https" | 17 | SRC_URI = "git://github.com/google/flatbuffers.git;branch=master;protocol=https \ |
| 18 | file://0001-C-stl_emulation-span-count_-is-not-const-anymore-722.patch \ | ||
| 19 | " | ||
| 18 | S = "${WORKDIR}/git" | 20 | S = "${WORKDIR}/git" |
| 19 | 21 | ||
| 20 | CVE_CHECK_IGNORE += "CVE-2020-35864" | 22 | CVE_CHECK_IGNORE += "CVE-2020-35864" |
