summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/protobuf
diff options
context:
space:
mode:
authorVyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com>2022-08-26 08:59:22 +0200
committerKhem Raj <raj.khem@gmail.com>2022-08-27 07:37:45 -0700
commit61e3493c5305b941cee4781707c8576b3f7bea89 (patch)
treece345f60c2c31f5a337ed7c0a9d030982efeb0e1 /meta-oe/recipes-devtools/protobuf
parent8eb19057808cb54031509f4a77fce04b82a6bd6d (diff)
downloadmeta-openembedded-61e3493c5305b941cee4781707c8576b3f7bea89.tar.gz
protobuf: 3.19.4 -> 3.21.5 upgrade
Drop the patch that was accepted upstream Forward port clang-mips patch Signed-off-by: Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/protobuf')
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch18
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-linking-error-with-ld-gold.patch6
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf/0001-Lower-init-prio-for-extension-attributes.patch79
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf/0001-Makefile.am-include-descriptor.cc-when-building-libp.patch8
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch10
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf/0001-protobuf-fix-configure-error.patch10
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf_3.21.5.bb (renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.19.4.bb)5
7 files changed, 22 insertions, 114 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
index 8a0696edf..9f6116c4c 100644
--- 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
@@ -14,19 +14,13 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
14 src/google/protobuf/port_def.inc | 2 +- 14 src/google/protobuf/port_def.inc | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-) 15 1 file changed, 1 insertion(+), 1 deletion(-)
16 16
17diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc
18index 71325c387..303475232 100644
19--- a/src/google/protobuf/port_def.inc 17--- a/src/google/protobuf/port_def.inc
20+++ b/src/google/protobuf/port_def.inc 18+++ b/src/google/protobuf/port_def.inc
21@@ -230,7 +230,7 @@ 19@@ -255,6 +255,7 @@
22 #error PROTOBUF_TAILCALL was previously defined 20 #error PROTOBUF_TAILCALL was previously defined
23 #endif 21 #endif
24 #if __has_cpp_attribute(clang::musttail) && \ 22 #if __has_cpp_attribute(clang::musttail) && !defined(__arm__) && \
25- !defined(__arm__) && !defined(_ARCH_PPC) && !defined(__wasm__) 23+ !defined(__mips__) && \
26+ !defined(__arm__) && !defined(_ARCH_PPC) && !defined(__wasm__) && !defined(__mips__) 24 !defined(_ARCH_PPC) && !defined(__wasm__) && \
27 # ifndef PROTO2_OPENSOURCE 25 !(defined(_MSC_VER) && defined(_M_IX86)) && \
28 // Compilation fails on ARM32: b/195943306 26 !(defined(__NDK_MAJOR__) && __NDK_MAJOR <= 24)
29 // Compilation fails on powerpc64le: b/187985113
30--
312.33.1
32
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-linking-error-with-ld-gold.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-linking-error-with-ld-gold.patch
index 488c1f6ff..2bcb13873 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-linking-error-with-ld-gold.patch
+++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-linking-error-with-ld-gold.patch
@@ -1,4 +1,4 @@
1From ddb9c5147883f8b27b4205450139e4a115d9961f Mon Sep 17 00:00:00 2001 1From a91130bb95528743a3f7253f8fe945b7505047d5 Mon Sep 17 00:00:00 2001
2From: Kyungjik Min <dp.min@lge.com> 2From: Kyungjik Min <dp.min@lge.com>
3Date: Mon, 28 Dec 2020 15:56:09 +0900 3Date: Mon, 28 Dec 2020 15:56:09 +0900
4Subject: [PATCH] Fix linking error with ld-gold 4Subject: [PATCH] Fix linking error with ld-gold
@@ -19,6 +19,7 @@ N/A
19:Issues Addressed: 19:Issues Addressed:
20[PLAT-130467] Fix build error for libgoogleassistant with latest 20[PLAT-130467] Fix build error for libgoogleassistant with latest
21 protobuf-3.11.4 21 protobuf-3.11.4
22
22--- 23---
23 src/libprotobuf-lite.map | 2 ++ 24 src/libprotobuf-lite.map | 2 ++
24 src/libprotobuf.map | 2 ++ 25 src/libprotobuf.map | 2 ++
@@ -64,6 +65,3 @@ index 391554669..a1853ca6c 100644
64 65
65 local: 66 local:
66 *; 67 *;
67--
682.17.1
69
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Lower-init-prio-for-extension-attributes.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Lower-init-prio-for-extension-attributes.patch
deleted file mode 100644
index a1200e01c..000000000
--- a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Lower-init-prio-for-extension-attributes.patch
+++ /dev/null
@@ -1,79 +0,0 @@
1From 8ff34dbff1eac612326b492d0b2cb93901ad7e2b Mon Sep 17 00:00:00 2001
2From: Jani Nurminen <jani.nurminen@windriver.com>
3Date: Fri, 24 Sep 2021 09:56:11 +0200
4Subject: [PATCH] Lower init prio for extension attributes
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Added PROTOBUF_EXTENSION_ATTRIBUTE_INIT_PRIORITY in
10code generation for extension attributes.
11It has lower prio than PROTOBUF_ATTRIBUTE_INIT_PRIORITY to
12ensure that extension attributes are initialized after
13other attribute.
14This is needed in some applications to avoid segmentation fault.
15
16Reported by Karl-Herman Näslund.
17
18Signed-off-by: Jani Nurminen <jani.nurminen@windriver.com>
19
20Rebase on master
21
22Signed-off-by: He Zhe <zhe.he@windriver.com>
23---
24 src/google/protobuf/compiler/cpp/cpp_extension.cc | 2 +-
25 src/google/protobuf/port_def.inc | 12 ++++++++++++
26 src/google/protobuf/port_undef.inc | 1 +
27 3 files changed, 14 insertions(+), 1 deletion(-)
28
29diff --git a/src/google/protobuf/compiler/cpp/cpp_extension.cc b/src/google/protobuf/compiler/cpp/cpp_extension.cc
30index 8604da5f2..984345ebe 100644
31--- a/src/google/protobuf/compiler/cpp/cpp_extension.cc
32+++ b/src/google/protobuf/compiler/cpp/cpp_extension.cc
33@@ -164,7 +164,7 @@ void ExtensionGenerator::GenerateDefinition(io::Printer* printer) {
34 }
35
36 format(
37- "PROTOBUF_ATTRIBUTE_INIT_PRIORITY "
38+ "PROTOBUF_EXTENSION_ATTRIBUTE_INIT_PRIORITY "
39 "::$proto_ns$::internal::ExtensionIdentifier< $extendee$,\n"
40 " ::$proto_ns$::internal::$type_traits$, $field_type$, $packed$ >\n"
41 " $scoped_name$($constant_name$, $1$);\n",
42diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc
43index 7e9119112..a5117090d 100644
44--- a/src/google/protobuf/port_def.inc
45+++ b/src/google/protobuf/port_def.inc
46@@ -614,6 +614,18 @@
47 #define PROTOBUF_ATTRIBUTE_INIT_PRIORITY
48 #endif
49
50+// Some embedded systems get a segmentation fault if extension attributes are
51+// initialized with higher or equal priority as other attributes. This gives
52+// extension attributes high priority, but lower than other attributes.
53+#ifdef PROTOBUF_EXTENSION_ATTRIBUTE_INIT_PRIORITY
54+#error PROTOBUF_EXTENSION_ATTRIBUTE_INIT_PRIORITY was previously defined
55+#endif
56+#if PROTOBUF_GNUC_MIN(3, 0) && (!defined(__APPLE__) || defined(__clang__)) && !((defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__)))
57+#define PROTOBUF_EXTENSION_ATTRIBUTE_INIT_PRIORITY __attribute__((init_priority((103))))
58+#else
59+#define PROTOBUF_EXTENSION_ATTRIBUTE_INIT_PRIORITY
60+#endif
61+
62 #ifdef PROTOBUF_PRAGMA_INIT_SEG
63 #error PROTOBUF_PRAGMA_INIT_SEG was previously defined
64 #endif
65diff --git a/src/google/protobuf/port_undef.inc b/src/google/protobuf/port_undef.inc
66index ccc5daf56..2b28f3a31 100644
67--- a/src/google/protobuf/port_undef.inc
68+++ b/src/google/protobuf/port_undef.inc
69@@ -83,6 +83,7 @@
70 #undef PROTOBUF_HAVE_ATTRIBUTE_WEAK
71 #undef PROTOBUF_ATTRIBUTE_NO_DESTROY
72 #undef PROTOBUF_ATTRIBUTE_INIT_PRIORITY
73+#undef PROTOBUF_EXTENSION_ATTRIBUTE_INIT_PRIORITY
74 #undef PROTOBUF_PRAGMA_INIT_SEG
75 #undef PROTOBUF_ASAN
76 #undef PROTOBUF_MSAN
77--
782.26.2
79
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Makefile.am-include-descriptor.cc-when-building-libp.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Makefile.am-include-descriptor.cc-when-building-libp.patch
index bd3a277a3..59d43072c 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf/0001-Makefile.am-include-descriptor.cc-when-building-libp.patch
+++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-Makefile.am-include-descriptor.cc-when-building-libp.patch
@@ -1,4 +1,4 @@
1From 8515ceec5ba3e2fcdbc819b5bf10fe742d7c9d5d Mon Sep 17 00:00:00 2001 1From 76980e1c84374e8bfa4dffcca78c5050783e83b9 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com> 2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Thu, 27 Jun 2019 13:27:18 +0000 3Date: Thu, 27 Jun 2019 13:27:18 +0000
4Subject: [PATCH] Makefile.am: include descriptor.pb.cc when building 4Subject: [PATCH] Makefile.am: include descriptor.pb.cc when building
@@ -17,14 +17,14 @@ Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
17 1 file changed, 1 insertion(+) 17 1 file changed, 1 insertion(+)
18 18
19diff --git a/src/Makefile.am b/src/Makefile.am 19diff --git a/src/Makefile.am b/src/Makefile.am
20index d4f11ce79..96d911746 100644 20index e6a7dc7fd..6b0fe6686 100644
21--- a/src/Makefile.am 21--- a/src/Makefile.am
22+++ b/src/Makefile.am 22+++ b/src/Makefile.am
23@@ -323,6 +323,7 @@ libprotoc_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotoc.map 23@@ -326,6 +326,7 @@ libprotoc_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotoc.map
24 EXTRA_libprotoc_la_DEPENDENCIES = libprotoc.map 24 EXTRA_libprotoc_la_DEPENDENCIES = libprotoc.map
25 endif 25 endif
26 libprotoc_la_SOURCES = \ 26 libprotoc_la_SOURCES = \
27+ google/protobuf/descriptor.pb.cc \ 27+ google/protobuf/descriptor.pb.cc \
28 google/protobuf/compiler/code_generator.cc \ 28 google/protobuf/compiler/code_generator.cc \
29 google/protobuf/compiler/command_line_interface.cc \ 29 google/protobuf/compiler/command_line_interface.cc \
30 google/protobuf/compiler/cpp/cpp_enum.cc \ 30 google/protobuf/compiler/cpp/enum.cc \
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch
index 934c98193..36c3c597a 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch
+++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch
@@ -1,4 +1,4 @@
1From e5340f816aa273cfda36998466739ca0748caafb Mon Sep 17 00:00:00 2001 1From e3fa241637ab5a7fa78c0d474802134cff75f91e Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com> 2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Fri, 28 Jun 2019 13:50:52 +0000 3Date: Fri, 28 Jun 2019 13:50:52 +0000
4Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables, fix build 4Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables, fix build
@@ -24,12 +24,13 @@ Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables, fix build
24Upstream-Status: Pending 24Upstream-Status: Pending
25Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> 25Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
26Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> 26Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
27
27--- 28---
28 examples/Makefile | 6 ++++-- 29 examples/Makefile | 6 ++++--
29 1 file changed, 4 insertions(+), 2 deletions(-) 30 1 file changed, 4 insertions(+), 2 deletions(-)
30 31
31diff --git a/examples/Makefile b/examples/Makefile 32diff --git a/examples/Makefile b/examples/Makefile
32index e9f9635ae..b2fbe2de1 100644 33index 1c7ec8d63..85f591231 100644
33--- a/examples/Makefile 34--- a/examples/Makefile
34+++ b/examples/Makefile 35+++ b/examples/Makefile
35@@ -2,6 +2,8 @@ 36@@ -2,6 +2,8 @@
@@ -41,7 +42,7 @@ index e9f9635ae..b2fbe2de1 100644
41 all: cpp java python 42 all: cpp java python
42 43
43 cpp: add_person_cpp list_people_cpp 44 cpp: add_person_cpp list_people_cpp
44@@ -41,11 +43,11 @@ protoc_middleman_dart: addressbook.proto 45@@ -40,11 +42,11 @@ protoc_middleman_dart: addressbook.proto
45 46
46 add_person_cpp: add_person.cc protoc_middleman 47 add_person_cpp: add_person.cc protoc_middleman
47 pkg-config --cflags protobuf # fails if protobuf is not installed 48 pkg-config --cflags protobuf # fails if protobuf is not installed
@@ -55,6 +56,3 @@ index e9f9635ae..b2fbe2de1 100644
55 56
56 add_person_dart: add_person.dart protoc_middleman_dart 57 add_person_dart: add_person.dart protoc_middleman_dart
57 58
58--
592.17.1
60
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-protobuf-fix-configure-error.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-protobuf-fix-configure-error.patch
index a2f7a4b77..7c87dbe26 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf/0001-protobuf-fix-configure-error.patch
+++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-protobuf-fix-configure-error.patch
@@ -1,4 +1,4 @@
1From 52959e8e01e39139d18f752e97283e45b4b7a426 Mon Sep 17 00:00:00 2001 1From 2649fe191ad3f086274a9bf1520212a4c715c944 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com> 2From: Changqing Li <changqing.li@windriver.com>
3Date: Wed, 18 Jul 2018 17:52:34 +0800 3Date: Wed, 18 Jul 2018 17:52:34 +0800
4Subject: [PATCH] protobuf: fix configure error 4Subject: [PATCH] protobuf: fix configure error
@@ -12,15 +12,16 @@ caused by missing submodule googletest.
12Upstream-Status: Inappropriate [oe-specific] 12Upstream-Status: Inappropriate [oe-specific]
13 13
14Signed-off-by: Changqing Li <changqing.li@windriver.com> 14Signed-off-by: Changqing Li <changqing.li@windriver.com>
15
15--- 16---
16 configure.ac | 1 - 17 configure.ac | 1 -
17 1 file changed, 1 deletion(-) 18 1 file changed, 1 deletion(-)
18 19
19diff --git a/configure.ac b/configure.ac 20diff --git a/configure.ac b/configure.ac
20index aec10cf..7fbe57d 100644 21index 375a79d93..1d73cd73f 100644
21--- a/configure.ac 22--- a/configure.ac
22+++ b/configure.ac 23+++ b/configure.ac
23@@ -214,7 +214,6 @@ AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory]) 24@@ -241,7 +241,6 @@ AC_SUBST([LIBLOG_LIBS])
24 # too. 25 # too.
25 export CFLAGS 26 export CFLAGS
26 export CXXFLAGS 27 export CXXFLAGS
@@ -28,6 +29,3 @@ index aec10cf..7fbe57d 100644
28 29
29 AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc]) 30 AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc])
30 AC_OUTPUT 31 AC_OUTPUT
31--
322.7.4
33
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_3.19.4.bb b/meta-oe/recipes-devtools/protobuf/protobuf_3.21.5.bb
index 286bf0e3c..26ac8dd1c 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf_3.19.4.bb
+++ b/meta-oe/recipes-devtools/protobuf/protobuf_3.21.5.bb
@@ -10,15 +10,14 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b"
10DEPENDS = "zlib" 10DEPENDS = "zlib"
11DEPENDS:append:class-target = " protobuf-native" 11DEPENDS:append:class-target = " protobuf-native"
12 12
13SRCREV = "22d0e265de7d2b3d2e9a00d071313502e7d4cccf" 13SRCREV = "ab840345966d0fa8e7100d771c92a73bfbadd25c"
14 14
15SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=3.19.x;protocol=https \ 15SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=21.x;protocol=https \
16 file://run-ptest \ 16 file://run-ptest \
17 file://0001-protobuf-fix-configure-error.patch \ 17 file://0001-protobuf-fix-configure-error.patch \
18 file://0001-Makefile.am-include-descriptor.cc-when-building-libp.patch \ 18 file://0001-Makefile.am-include-descriptor.cc-when-building-libp.patch \
19 file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \ 19 file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \
20 file://0001-Fix-linking-error-with-ld-gold.patch \ 20 file://0001-Fix-linking-error-with-ld-gold.patch \
21 file://0001-Lower-init-prio-for-extension-attributes.patch \
22 " 21 "
23SRC_URI:append:mips:toolchain-clang = " file://0001-Fix-build-on-mips-clang.patch " 22SRC_URI:append:mips:toolchain-clang = " file://0001-Fix-build-on-mips-clang.patch "
24SRC_URI:append:mipsel:toolchain-clang = " file://0001-Fix-build-on-mips-clang.patch " 23SRC_URI:append:mipsel:toolchain-clang = " file://0001-Fix-build-on-mips-clang.patch "