summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools
diff options
context:
space:
mode:
authorPeter Marko <peter.marko@siemens.com>2026-01-31 23:23:46 +0100
committerKhem Raj <raj.khem@gmail.com>2026-02-02 00:23:13 -0800
commitad890c16e891277a1837c7184270d327b9010cf8 (patch)
treef363d8683200a039458c0e5323b1025030cd118e /meta-oe/recipes-devtools
parent5eab3aebe21308fa7a5047a8e75622f735a9230b (diff)
downloadmeta-openembedded-ad890c16e891277a1837c7184270d327b9010cf8.tar.gz
protobuf: upgrade 6.31.1 -> 6.33.5
* rebase existing patches * drop mips clang patch as this was fixed upstream via [1] to build only for platforms supporting it. * add PV to SRC_URI * add variables to automatically calculate branch and tag * fix includedir for utf8_range in ptest compilation [1] https://github.com/protocolbuffers/protobuf/commit/719f3037032b2e952afe7fc49152cc4be38fa7a3 Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools')
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch34
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-protobuf-native-build-failure-with-gcc-10.patch6
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf_6.33.5.bb (renamed from meta-oe/recipes-devtools/protobuf/protobuf_6.31.1.bb)9
3 files changed, 9 insertions, 40 deletions
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch
deleted file mode 100644
index 1f5c9127de..0000000000
--- a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1From cd6c5f36c0dc38e4734b74b03923489b7bfb9aba Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 10 Mar 2025 19:59:19 -0700
4Subject: [PATCH] Fix build on mips/clang
5
6clang20 crashes on mips, until its fixed upstream disable tailcall on
7mips
8
9https://github.com/llvm/llvm-project/issues/51709
10
11Upstream-Status: Inappropriate [Clang workaround]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13
14Rebase to v5.29.4
15Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
16---
17 src/google/protobuf/port_def.inc | 1 +
18 1 file changed, 1 insertion(+)
19
20diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc
21index 56f995e45..428d096b3 100644
22--- a/src/google/protobuf/port_def.inc
23+++ b/src/google/protobuf/port_def.inc
24@@ -227,6 +227,7 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3),
25 #error PROTOBUF_TAILCALL was previously defined
26 #endif
27 #if ABSL_HAVE_CPP_ATTRIBUTE(clang::musttail) && !defined(__arm__) && \
28+ !defined(__mips__) && \
29 !defined(_ARCH_PPC) && !defined(__wasm__) && \
30 !(defined(_MSC_VER) && defined(_M_IX86)) && !defined(__i386__)
31 // Compilation fails on ARM32: b/195943306
32--
332.25.1
34
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-protobuf-native-build-failure-with-gcc-10.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-protobuf-native-build-failure-with-gcc-10.patch
index 2edba6b7eb..788db3e406 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-protobuf-native-build-failure-with-gcc-10.patch
+++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-fix-protobuf-native-build-failure-with-gcc-10.patch
@@ -30,9 +30,9 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
30index e90cb8aa2..3ffac1307 100644 30index e90cb8aa2..3ffac1307 100644
31--- a/CMakeLists.txt 31--- a/CMakeLists.txt
32+++ b/CMakeLists.txt 32+++ b/CMakeLists.txt
33@@ -14,6 +14,10 @@ endif() 33@@ -18,6 +18,10 @@ if(CMAKE_CXX_STANDARD AND CMAKE_CXX_STANDARD LESS 17)
34 # Project 34 message(FATAL_ERROR "The minimum supported C++ standard is C++ 17")
35 project(protobuf C CXX) 35 endif()
36 36
37+set(CMAKE_CXX_STANDARD 17) 37+set(CMAKE_CXX_STANDARD 17)
38+set(CMAKE_CXX_STANDARD_REQUIRED ON) 38+set(CMAKE_CXX_STANDARD_REQUIRED ON)
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_6.31.1.bb b/meta-oe/recipes-devtools/protobuf/protobuf_6.33.5.bb
index 37b26b610d..4f5f53d4e5 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf_6.31.1.bb
+++ b/meta-oe/recipes-devtools/protobuf/protobuf_6.33.5.bb
@@ -10,17 +10,19 @@ LIC_FILES_CHKSUM = " \
10 file://third_party/utf8_range/LICENSE;md5=d4974d297231477b2ff507c35d61c13c \ 10 file://third_party/utf8_range/LICENSE;md5=d4974d297231477b2ff507c35d61c13c \
11" 11"
12 12
13PROTOC_VERSION = "v${@d.getVar('PV').split('.', 1)[1]}"
14PROTOC_BRANCH = "${@d.getVar('PV').split('.', 2)[1]}.x"
15
13DEPENDS = "zlib abseil-cpp jsoncpp" 16DEPENDS = "zlib abseil-cpp jsoncpp"
14DEPENDS:append:class-target = " protobuf-native" 17DEPENDS:append:class-target = " protobuf-native"
15 18
16SRCREV = "74211c0dfc2777318ab53c2cd2c317a2ef9012de" 19SRCREV = "b6f9284da830b69be787732ffdaa35049d20a088"
17 20
18SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=31.x;protocol=https \ 21SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=${PROTOC_BRANCH};protocol=https;tag=${PROTOC_VERSION} \
19 file://run-ptest \ 22 file://run-ptest \
20 file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \ 23 file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \
21 file://0001-fix-protobuf-native-build-failure-with-gcc-10.patch \ 24 file://0001-fix-protobuf-native-build-failure-with-gcc-10.patch \
22 " 25 "
23SRC_URI:append:mipsarcho32:toolchain-clang = " file://0001-Fix-build-on-mips-clang.patch "
24 26
25UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d\.\d+\.\d+)" 27UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d\.\d+\.\d+)"
26 28
@@ -70,6 +72,7 @@ do_compile_ptest() {
70 # Adapt uf8_range.pc 72 # Adapt uf8_range.pc
71 cp "${B}/third_party/utf8_range/utf8_range.pc" "${B}/${TEST_SRC_DIR}/utf8_range.pc" 73 cp "${B}/third_party/utf8_range/utf8_range.pc" "${B}/${TEST_SRC_DIR}/utf8_range.pc"
72 sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${B}/${TEST_SRC_DIR}/utf8_range.pc" 74 sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${B}/${TEST_SRC_DIR}/utf8_range.pc"
75 sed -e 's|includedir=.*|includedir=${S}/third_party/utf8_range|' -i "${B}/${TEST_SRC_DIR}/utf8_range.pc"
73 sed -e 's|Libs:|Libs= -L${B}/third_party/utf8_range |' -i "${B}/${TEST_SRC_DIR}/utf8_range.pc" 76 sed -e 's|Libs:|Libs= -L${B}/third_party/utf8_range |' -i "${B}/${TEST_SRC_DIR}/utf8_range.pc"
74 # Until out-of-tree build of examples is supported, we have to use this approach 77 # Until out-of-tree build of examples is supported, we have to use this approach
75 sed -e 's|../src/google/protobuf/.libs/timestamp.pb.o|${B}/CMakeFiles/libprotobuf.dir/src/google/protobuf/timestamp.pb.cc.o|' -i "${B}/${TEST_SRC_DIR}/Makefile" 78 sed -e 's|../src/google/protobuf/.libs/timestamp.pb.o|${B}/CMakeFiles/libprotobuf.dir/src/google/protobuf/timestamp.pb.cc.o|' -i "${B}/${TEST_SRC_DIR}/Makefile"