mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-04-02 02:49:12 +00:00
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] 719f303703
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
5eab3aebe2
commit
ad890c16e8
@ -1,34 +0,0 @@
|
||||
From cd6c5f36c0dc38e4734b74b03923489b7bfb9aba Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 10 Mar 2025 19:59:19 -0700
|
||||
Subject: [PATCH] Fix build on mips/clang
|
||||
|
||||
clang20 crashes on mips, until its fixed upstream disable tailcall on
|
||||
mips
|
||||
|
||||
https://github.com/llvm/llvm-project/issues/51709
|
||||
|
||||
Upstream-Status: Inappropriate [Clang workaround]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
Rebase to v5.29.4
|
||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
---
|
||||
src/google/protobuf/port_def.inc | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc
|
||||
index 56f995e45..428d096b3 100644
|
||||
--- a/src/google/protobuf/port_def.inc
|
||||
+++ b/src/google/protobuf/port_def.inc
|
||||
@@ -227,6 +227,7 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3),
|
||||
#error PROTOBUF_TAILCALL was previously defined
|
||||
#endif
|
||||
#if ABSL_HAVE_CPP_ATTRIBUTE(clang::musttail) && !defined(__arm__) && \
|
||||
+ !defined(__mips__) && \
|
||||
!defined(_ARCH_PPC) && !defined(__wasm__) && \
|
||||
!(defined(_MSC_VER) && defined(_M_IX86)) && !defined(__i386__)
|
||||
// Compilation fails on ARM32: b/195943306
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -30,9 +30,9 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e90cb8aa2..3ffac1307 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -14,6 +14,10 @@ endif()
|
||||
# Project
|
||||
project(protobuf C CXX)
|
||||
@@ -18,6 +18,10 @@ if(CMAKE_CXX_STANDARD AND CMAKE_CXX_STANDARD LESS 17)
|
||||
message(FATAL_ERROR "The minimum supported C++ standard is C++ 17")
|
||||
endif()
|
||||
|
||||
+set(CMAKE_CXX_STANDARD 17)
|
||||
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
@ -10,17 +10,19 @@ LIC_FILES_CHKSUM = " \
|
||||
file://third_party/utf8_range/LICENSE;md5=d4974d297231477b2ff507c35d61c13c \
|
||||
"
|
||||
|
||||
PROTOC_VERSION = "v${@d.getVar('PV').split('.', 1)[1]}"
|
||||
PROTOC_BRANCH = "${@d.getVar('PV').split('.', 2)[1]}.x"
|
||||
|
||||
DEPENDS = "zlib abseil-cpp jsoncpp"
|
||||
DEPENDS:append:class-target = " protobuf-native"
|
||||
|
||||
SRCREV = "74211c0dfc2777318ab53c2cd2c317a2ef9012de"
|
||||
SRCREV = "b6f9284da830b69be787732ffdaa35049d20a088"
|
||||
|
||||
SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=31.x;protocol=https \
|
||||
SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=${PROTOC_BRANCH};protocol=https;tag=${PROTOC_VERSION} \
|
||||
file://run-ptest \
|
||||
file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \
|
||||
file://0001-fix-protobuf-native-build-failure-with-gcc-10.patch \
|
||||
"
|
||||
SRC_URI:append:mipsarcho32:toolchain-clang = " file://0001-Fix-build-on-mips-clang.patch "
|
||||
|
||||
UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d\.\d+\.\d+)"
|
||||
|
||||
@ -70,6 +72,7 @@ do_compile_ptest() {
|
||||
# Adapt uf8_range.pc
|
||||
cp "${B}/third_party/utf8_range/utf8_range.pc" "${B}/${TEST_SRC_DIR}/utf8_range.pc"
|
||||
sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${B}/${TEST_SRC_DIR}/utf8_range.pc"
|
||||
sed -e 's|includedir=.*|includedir=${S}/third_party/utf8_range|' -i "${B}/${TEST_SRC_DIR}/utf8_range.pc"
|
||||
sed -e 's|Libs:|Libs= -L${B}/third_party/utf8_range |' -i "${B}/${TEST_SRC_DIR}/utf8_range.pc"
|
||||
# Until out-of-tree build of examples is supported, we have to use this approach
|
||||
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"
|
||||
Loading…
x
Reference in New Issue
Block a user