diff options
3 files changed, 467 insertions, 1 deletions
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-Makefile.am-do-not-compile-the-code-which-was-genera.patch b/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-Makefile.am-do-not-compile-the-code-which-was-genera.patch new file mode 100644 index 0000000000..4450a2f626 --- /dev/null +++ b/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-Makefile.am-do-not-compile-the-code-which-was-genera.patch | |||
| @@ -0,0 +1,147 @@ | |||
| 1 | From c263360d4f40beb2badd04e5bd084f46fd25595b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Xiangyu Chen <xiangyu.chen@windriver.com> | ||
| 3 | Date: Fri, 31 Mar 2023 16:02:50 +0800 | ||
| 4 | Subject: [PATCH] Makefile.am: do not compile the code which was generated from | ||
| 5 | test-full.proto in protobuf-c-native | ||
| 6 | |||
| 7 | Those code was auto generated by protoc command with test-full.proto, those code are not compatible | ||
| 8 | with protobuf 4.22.x, so temporarily disable compile those code until protobuf-c upstream adapt | ||
| 9 | the test-full.proto with latest version protobuf. | ||
| 10 | |||
| 11 | Upstream-Status: Inappropriate [oe specific] | ||
| 12 | |||
| 13 | Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> | ||
| 14 | --- | ||
| 15 | Makefile.am | 116 ++++++++++++++++++++++++++-------------------------- | ||
| 16 | 1 file changed, 58 insertions(+), 58 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/Makefile.am b/Makefile.am | ||
| 19 | index 3b0d1d6..ff4c196 100644 | ||
| 20 | --- a/Makefile.am | ||
| 21 | +++ b/Makefile.am | ||
| 22 | @@ -136,64 +136,64 @@ else | ||
| 23 | |||
| 24 | LOG_COMPILER = $(VALGRIND) | ||
| 25 | |||
| 26 | -check_PROGRAMS += \ | ||
| 27 | - t/generated-code/test-generated-code \ | ||
| 28 | - t/generated-code2/test-generated-code2 \ | ||
| 29 | - t/version/version | ||
| 30 | - | ||
| 31 | -TESTS += \ | ||
| 32 | - t/generated-code/test-generated-code \ | ||
| 33 | - t/generated-code2/test-generated-code2 \ | ||
| 34 | - t/version/version | ||
| 35 | - | ||
| 36 | -t_generated_code_test_generated_code_SOURCES = \ | ||
| 37 | - t/generated-code/test-generated-code.c \ | ||
| 38 | - t/test.pb-c.c | ||
| 39 | -t_generated_code_test_generated_code_LDADD = \ | ||
| 40 | - protobuf-c/libprotobuf-c.la | ||
| 41 | - | ||
| 42 | -t_generated_code2_test_generated_code2_SOURCES = \ | ||
| 43 | - t/generated-code2/test-generated-code2.c \ | ||
| 44 | - t/test-full.pb-c.c \ | ||
| 45 | - t/test-optimized.pb-c.c | ||
| 46 | -t_generated_code2_test_generated_code2_LDADD = \ | ||
| 47 | - protobuf-c/libprotobuf-c.la | ||
| 48 | - | ||
| 49 | -noinst_PROGRAMS += \ | ||
| 50 | - t/generated-code2/cxx-generate-packed-data | ||
| 51 | - | ||
| 52 | -t_generated_code2_cxx_generate_packed_data_SOURCES = \ | ||
| 53 | - t/generated-code2/cxx-generate-packed-data.cc \ | ||
| 54 | - t/test-full.pb.cc \ | ||
| 55 | - protobuf-c/protobuf-c.pb.cc | ||
| 56 | -$(t_generated_code2_cxx_generate_packed_data_OBJECTS): t/test-full.pb.h | ||
| 57 | -t_generated_code2_cxx_generate_packed_data_CXXFLAGS = \ | ||
| 58 | - $(AM_CXXFLAGS) \ | ||
| 59 | - $(protobuf_CFLAGS) | ||
| 60 | -t_generated_code2_cxx_generate_packed_data_LDADD = \ | ||
| 61 | - $(protobuf_LIBS) | ||
| 62 | - | ||
| 63 | -t/test.pb-c.c t/test.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test.proto | ||
| 64 | - $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test.proto | ||
| 65 | - | ||
| 66 | -t/test-optimized.pb-c.c t/test-optimized.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test-optimized.proto | ||
| 67 | - $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test-optimized.proto | ||
| 68 | - | ||
| 69 | -t/test-full.pb-c.c t/test-full.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test-full.proto | ||
| 70 | - $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test-full.proto | ||
| 71 | - | ||
| 72 | -t/test-full.pb.cc t/test-full.pb.h: @PROTOC@ $(top_srcdir)/t/test-full.proto | ||
| 73 | - $(AM_V_GEN)@PROTOC@ -I$(top_srcdir) --cpp_out=$(top_builddir) $(top_srcdir)/t/test-full.proto | ||
| 74 | - | ||
| 75 | -t/generated-code2/test-full-cxx-output.inc: t/generated-code2/cxx-generate-packed-data$(EXEEXT) | ||
| 76 | - $(AM_V_GEN)$(top_builddir)/t/generated-code2/cxx-generate-packed-data$(EXEEXT) > $(top_builddir)/t/generated-code2/test-full-cxx-output.inc | ||
| 77 | - | ||
| 78 | -BUILT_SOURCES += \ | ||
| 79 | - t/test.pb-c.c t/test.pb-c.h \ | ||
| 80 | - t/test-full.pb-c.c t/test-full.pb-c.h \ | ||
| 81 | - t/test-optimized.pb-c.c t/test-optimized.pb-c.h \ | ||
| 82 | - t/test-full.pb.cc t/test-full.pb.h \ | ||
| 83 | - t/generated-code2/test-full-cxx-output.inc | ||
| 84 | +# check_PROGRAMS += \ | ||
| 85 | +# t/generated-code/test-generated-code \ | ||
| 86 | +# t/generated-code2/test-generated-code2 \ | ||
| 87 | +# t/version/version | ||
| 88 | + | ||
| 89 | +# TESTS += \ | ||
| 90 | +# t/generated-code/test-generated-code \ | ||
| 91 | +# t/generated-code2/test-generated-code2 \ | ||
| 92 | +# t/version/version | ||
| 93 | + | ||
| 94 | +# t_generated_code_test_generated_code_SOURCES = \ | ||
| 95 | +# t/generated-code/test-generated-code.c \ | ||
| 96 | +# t/test.pb-c.c | ||
| 97 | +# t_generated_code_test_generated_code_LDADD = \ | ||
| 98 | +# protobuf-c/libprotobuf-c.la | ||
| 99 | + | ||
| 100 | +# t_generated_code2_test_generated_code2_SOURCES = \ | ||
| 101 | +# t/generated-code2/test-generated-code2.c \ | ||
| 102 | +# t/test-full.pb-c.c \ | ||
| 103 | +# t/test-optimized.pb-c.c | ||
| 104 | +# t_generated_code2_test_generated_code2_LDADD = \ | ||
| 105 | +# protobuf-c/libprotobuf-c.la | ||
| 106 | + | ||
| 107 | +# noinst_PROGRAMS += \ | ||
| 108 | +# t/generated-code2/cxx-generate-packed-data | ||
| 109 | + | ||
| 110 | +# t_generated_code2_cxx_generate_packed_data_SOURCES = \ | ||
| 111 | +# t/generated-code2/cxx-generate-packed-data.cc \ | ||
| 112 | +# t/test-full.pb.cc \ | ||
| 113 | +# protobuf-c/protobuf-c.pb.cc | ||
| 114 | +# $(t_generated_code2_cxx_generate_packed_data_OBJECTS): t/test-full.pb.h | ||
| 115 | +# t_generated_code2_cxx_generate_packed_data_CXXFLAGS = \ | ||
| 116 | +# $(AM_CXXFLAGS) \ | ||
| 117 | +# $(protobuf_CFLAGS) | ||
| 118 | +# t_generated_code2_cxx_generate_packed_data_LDADD = \ | ||
| 119 | +# $(protobuf_LIBS) | ||
| 120 | + | ||
| 121 | +# t/test.pb-c.c t/test.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test.proto | ||
| 122 | +# $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test.proto | ||
| 123 | + | ||
| 124 | +# t/test-optimized.pb-c.c t/test-optimized.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test-optimized.proto | ||
| 125 | +# $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test-optimized.proto | ||
| 126 | + | ||
| 127 | +# t/test-full.pb-c.c t/test-full.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test-full.proto | ||
| 128 | +# $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test-full.proto | ||
| 129 | + | ||
| 130 | +# t/test-full.pb.cc t/test-full.pb.h: @PROTOC@ $(top_srcdir)/t/test-full.proto | ||
| 131 | +# $(AM_V_GEN)@PROTOC@ -I$(top_srcdir) --cpp_out=$(top_builddir) $(top_srcdir)/t/test-full.proto | ||
| 132 | + | ||
| 133 | +# t/generated-code2/test-full-cxx-output.inc: t/generated-code2/cxx-generate-packed-data$(EXEEXT) | ||
| 134 | +# $(AM_V_GEN)$(top_builddir)/t/generated-code2/cxx-generate-packed-data$(EXEEXT) > $(top_builddir)/t/generated-code2/test-full-cxx-output.inc | ||
| 135 | + | ||
| 136 | +# BUILT_SOURCES += \ | ||
| 137 | +# t/test.pb-c.c t/test.pb-c.h \ | ||
| 138 | +# t/test-full.pb-c.c t/test-full.pb-c.h \ | ||
| 139 | +# t/test-optimized.pb-c.c t/test-optimized.pb-c.h \ | ||
| 140 | +# t/test-full.pb.cc t/test-full.pb.h \ | ||
| 141 | +# t/generated-code2/test-full-cxx-output.inc | ||
| 142 | |||
| 143 | if BUILD_PROTO3 | ||
| 144 | |||
| 145 | -- | ||
| 146 | 2.34.1 | ||
| 147 | |||
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-add-support-of-protobuf-4.22.x.patch b/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-add-support-of-protobuf-4.22.x.patch new file mode 100644 index 0000000000..075b7044c7 --- /dev/null +++ b/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-add-support-of-protobuf-4.22.x.patch | |||
| @@ -0,0 +1,315 @@ | |||
| 1 | From 66a0b0d205224f63f19dd8f96abf9dcdc2112331 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Xiangyu Chen <xiangyu.chen@windriver.com> | ||
| 3 | Date: Wed, 29 Mar 2023 14:25:17 +0800 | ||
| 4 | Subject: [PATCH] add support of protobuf 4.22.x | ||
| 5 | |||
| 6 | after upgrade the protobuf to 4.22.x, the protobuf-c cannot compile anymore (#544) due to following changes: | ||
| 7 | 1.protobuf using c++14, that cause the command_line_interface.h report error | ||
| 8 | 2.protobuf using abseil-cpp library instead the trace API with GOOGLE_ header | ||
| 9 | 3. removed GOOGLE_DISALLOW_EVIL_CONSTRUCTORS | ||
| 10 | |||
| 11 | Upstream-Status: Pending [https://github.com/protobuf-c/protobuf-c/pull/548] | ||
| 12 | |||
| 13 | Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> | ||
| 14 | --- | ||
| 15 | Makefile.am | 2 +- | ||
| 16 | configure.ac | 8 ++++++++ | ||
| 17 | protoc-c/c_bytes_field.h | 1 - | ||
| 18 | protoc-c/c_enum.h | 1 - | ||
| 19 | protoc-c/c_enum_field.h | 1 - | ||
| 20 | protoc-c/c_extension.h | 1 - | ||
| 21 | protoc-c/c_field.cc | 2 +- | ||
| 22 | protoc-c/c_field.h | 3 --- | ||
| 23 | protoc-c/c_file.h | 1 - | ||
| 24 | protoc-c/c_generator.h | 2 -- | ||
| 25 | protoc-c/c_helpers.cc | 4 ++-- | ||
| 26 | protoc-c/c_message.cc | 4 ++-- | ||
| 27 | protoc-c/c_message.h | 1 - | ||
| 28 | protoc-c/c_message_field.h | 3 --- | ||
| 29 | protoc-c/c_primitive_field.cc | 6 +++--- | ||
| 30 | protoc-c/c_primitive_field.h | 3 --- | ||
| 31 | protoc-c/c_service.h | 1 - | ||
| 32 | protoc-c/c_string_field.h | 1 - | ||
| 33 | 18 files changed, 17 insertions(+), 28 deletions(-) | ||
| 34 | |||
| 35 | diff --git a/Makefile.am b/Makefile.am | ||
| 36 | index c7339ef..3b0d1d6 100644 | ||
| 37 | --- a/Makefile.am | ||
| 38 | +++ b/Makefile.am | ||
| 39 | @@ -20,7 +20,7 @@ AM_CPPFLAGS = \ | ||
| 40 | -I${top_builddir} \ | ||
| 41 | -I${top_srcdir} | ||
| 42 | AM_CFLAGS = ${my_CFLAGS} | ||
| 43 | -AM_LDFLAGS = | ||
| 44 | +AM_LDFLAGS = ${ABSL_LOG_INTERNAL_CHECK_OP_LIBS} ${ABSL_LOG_RAW_HASH_SET_LIBS} | ||
| 45 | |||
| 46 | # code coverage | ||
| 47 | |||
| 48 | diff --git a/configure.ac b/configure.ac | ||
| 49 | index f5a0261..8ed549a 100644 | ||
| 50 | --- a/configure.ac | ||
| 51 | +++ b/configure.ac | ||
| 52 | @@ -78,6 +78,14 @@ if test "x$enable_protoc" != "xno"; then | ||
| 53 | |||
| 54 | AX_CXX_COMPILE_STDCXX(11, noext, mandatory) | ||
| 55 | |||
| 56 | +# now checking 4.22.x protobuf, if so, set cxx as 14 | ||
| 57 | + AS_IF([pkg-config --atleast-version 4.22.0 protobuf],[AX_CXX_COMPILE_STDCXX(14, noext, mandatory)]) | ||
| 58 | + | ||
| 59 | + AS_IF([pkg-config --atleast-version 4.22.0 protobuf], | ||
| 60 | + [PKG_CHECK_MODULES([ABSL_LOG_INTERNAL_CHECK_OP], [absl_log_internal_check_op], | ||
| 61 | + [PKG_CHECK_MODULES([ABSL_LOG_RAW_HASH_SET], [absl_raw_hash_set], [], [AC_MSG_ERROR([Missing absl_raw_hash_set library.])])], | ||
| 62 | + [AC_MSG_ERROR([Missing absl_log_internal_check_op library.])])]) | ||
| 63 | + | ||
| 64 | PKG_CHECK_MODULES([protobuf], [protobuf >= 3.0.0], | ||
| 65 | [proto3_supported=yes], | ||
| 66 | [PKG_CHECK_MODULES([protobuf], [protobuf >= 2.6.0])] | ||
| 67 | diff --git a/protoc-c/c_bytes_field.h b/protoc-c/c_bytes_field.h | ||
| 68 | index bf873f0..8fc63d3 100644 | ||
| 69 | --- a/protoc-c/c_bytes_field.h | ||
| 70 | +++ b/protoc-c/c_bytes_field.h | ||
| 71 | @@ -88,7 +88,6 @@ class BytesFieldGenerator : public FieldGenerator { | ||
| 72 | private: | ||
| 73 | std::map<std::string, std::string> variables_; | ||
| 74 | |||
| 75 | - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(BytesFieldGenerator); | ||
| 76 | }; | ||
| 77 | |||
| 78 | |||
| 79 | diff --git a/protoc-c/c_enum.h b/protoc-c/c_enum.h | ||
| 80 | index 9c34b69..d5e58f0 100644 | ||
| 81 | --- a/protoc-c/c_enum.h | ||
| 82 | +++ b/protoc-c/c_enum.h | ||
| 83 | @@ -107,7 +107,6 @@ class EnumGenerator { | ||
| 84 | const EnumDescriptor* descriptor_; | ||
| 85 | std::string dllexport_decl_; | ||
| 86 | |||
| 87 | - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumGenerator); | ||
| 88 | }; | ||
| 89 | |||
| 90 | } // namespace c | ||
| 91 | diff --git a/protoc-c/c_enum_field.h b/protoc-c/c_enum_field.h | ||
| 92 | index 3f8c005..03eb402 100644 | ||
| 93 | --- a/protoc-c/c_enum_field.h | ||
| 94 | +++ b/protoc-c/c_enum_field.h | ||
| 95 | @@ -86,7 +86,6 @@ class EnumFieldGenerator : public FieldGenerator { | ||
| 96 | private: | ||
| 97 | std::map<std::string, std::string> variables_; | ||
| 98 | |||
| 99 | - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumFieldGenerator); | ||
| 100 | }; | ||
| 101 | |||
| 102 | |||
| 103 | diff --git a/protoc-c/c_extension.h b/protoc-c/c_extension.h | ||
| 104 | index 9541388..9c5797d 100644 | ||
| 105 | --- a/protoc-c/c_extension.h | ||
| 106 | +++ b/protoc-c/c_extension.h | ||
| 107 | @@ -99,7 +99,6 @@ class ExtensionGenerator { | ||
| 108 | std::string type_traits_; | ||
| 109 | std::string dllexport_decl_; | ||
| 110 | |||
| 111 | - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ExtensionGenerator); | ||
| 112 | }; | ||
| 113 | |||
| 114 | } // namespace c | ||
| 115 | diff --git a/protoc-c/c_field.cc b/protoc-c/c_field.cc | ||
| 116 | index 0716744..4abdc6d 100644 | ||
| 117 | --- a/protoc-c/c_field.cc | ||
| 118 | +++ b/protoc-c/c_field.cc | ||
| 119 | @@ -231,7 +231,7 @@ FieldGeneratorMap::~FieldGeneratorMap() {} | ||
| 120 | |||
| 121 | const FieldGenerator& FieldGeneratorMap::get( | ||
| 122 | const FieldDescriptor* field) const { | ||
| 123 | - GOOGLE_CHECK_EQ(field->containing_type(), descriptor_); | ||
| 124 | + ABSL_CHECK_EQ(field->containing_type(), descriptor_); | ||
| 125 | return *field_generators_[field->index()]; | ||
| 126 | } | ||
| 127 | |||
| 128 | diff --git a/protoc-c/c_field.h b/protoc-c/c_field.h | ||
| 129 | index 3cad35d..76d3b0b 100644 | ||
| 130 | --- a/protoc-c/c_field.h | ||
| 131 | +++ b/protoc-c/c_field.h | ||
| 132 | @@ -104,8 +104,6 @@ class FieldGenerator { | ||
| 133 | const std::string &descriptor_addr) const; | ||
| 134 | const FieldDescriptor *descriptor_; | ||
| 135 | |||
| 136 | - private: | ||
| 137 | - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGenerator); | ||
| 138 | }; | ||
| 139 | |||
| 140 | // Convenience class which constructs FieldGenerators for a Descriptor. | ||
| 141 | @@ -122,7 +120,6 @@ class FieldGeneratorMap { | ||
| 142 | |||
| 143 | static FieldGenerator* MakeGenerator(const FieldDescriptor* field); | ||
| 144 | |||
| 145 | - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGeneratorMap); | ||
| 146 | }; | ||
| 147 | |||
| 148 | } // namespace c | ||
| 149 | diff --git a/protoc-c/c_file.h b/protoc-c/c_file.h | ||
| 150 | index 8dfd8ba..ec55906 100644 | ||
| 151 | --- a/protoc-c/c_file.h | ||
| 152 | +++ b/protoc-c/c_file.h | ||
| 153 | @@ -104,7 +104,6 @@ class FileGenerator { | ||
| 154 | std::unique_ptr<std::unique_ptr<ServiceGenerator>[]> service_generators_; | ||
| 155 | std::unique_ptr<std::unique_ptr<ExtensionGenerator>[]> extension_generators_; | ||
| 156 | |||
| 157 | - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileGenerator); | ||
| 158 | }; | ||
| 159 | |||
| 160 | } // namespace c | ||
| 161 | diff --git a/protoc-c/c_generator.h b/protoc-c/c_generator.h | ||
| 162 | index ac1ffaf..9260116 100644 | ||
| 163 | --- a/protoc-c/c_generator.h | ||
| 164 | +++ b/protoc-c/c_generator.h | ||
| 165 | @@ -94,8 +94,6 @@ class PROTOC_C_EXPORT CGenerator : public CodeGenerator { | ||
| 166 | OutputDirectory* output_directory, | ||
| 167 | std::string* error) const; | ||
| 168 | |||
| 169 | - private: | ||
| 170 | - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CGenerator); | ||
| 171 | }; | ||
| 172 | |||
| 173 | } // namespace c | ||
| 174 | diff --git a/protoc-c/c_helpers.cc b/protoc-c/c_helpers.cc | ||
| 175 | index 6fd0cd3..1eaeeb4 100644 | ||
| 176 | --- a/protoc-c/c_helpers.cc | ||
| 177 | +++ b/protoc-c/c_helpers.cc | ||
| 178 | @@ -286,7 +286,7 @@ const char* const kKeywordList[] = { | ||
| 179 | |||
| 180 | std::set<std::string> MakeKeywordsMap() { | ||
| 181 | std::set<std::string> result; | ||
| 182 | - for (int i = 0; i < GOOGLE_ARRAYSIZE(kKeywordList); i++) { | ||
| 183 | + for (int i = 0; i < ABSL_ARRAYSIZE(kKeywordList); i++) { | ||
| 184 | result.insert(kKeywordList[i]); | ||
| 185 | } | ||
| 186 | return result; | ||
| 187 | @@ -548,7 +548,7 @@ std::string CEscape(const std::string& src) { | ||
| 188 | std::unique_ptr<char[]> dest(new char[dest_length]); | ||
| 189 | const int len = CEscapeInternal(src.data(), src.size(), | ||
| 190 | dest.get(), dest_length, false); | ||
| 191 | - GOOGLE_DCHECK_GE(len, 0); | ||
| 192 | + ABSL_DCHECK_GE(len, 0); | ||
| 193 | return std::string(dest.get(), len); | ||
| 194 | } | ||
| 195 | |||
| 196 | diff --git a/protoc-c/c_message.cc b/protoc-c/c_message.cc | ||
| 197 | index 37e8bf8..c7e8515 100755 | ||
| 198 | --- a/protoc-c/c_message.cc | ||
| 199 | +++ b/protoc-c/c_message.cc | ||
| 200 | @@ -499,7 +499,7 @@ GenerateMessageDescriptor(io::Printer* printer, bool gen_init) { | ||
| 201 | // NOTE: not supported by protobuf | ||
| 202 | vars["maybe_static"] = ""; | ||
| 203 | vars["field_dv_ctype"] = "{ ... }"; | ||
| 204 | - GOOGLE_LOG(DFATAL) << "Messages can't have default values!"; | ||
| 205 | + ABSL_LOG(FATAL) << "Messages can't have default values!"; | ||
| 206 | break; | ||
| 207 | case FieldDescriptor::CPPTYPE_STRING: | ||
| 208 | if (fd->type() == FieldDescriptor::TYPE_BYTES || opt.string_as_bytes()) | ||
| 209 | @@ -521,7 +521,7 @@ GenerateMessageDescriptor(io::Printer* printer, bool gen_init) { | ||
| 210 | break; | ||
| 211 | } | ||
| 212 | default: | ||
| 213 | - GOOGLE_LOG(DFATAL) << "Unknown CPPTYPE"; | ||
| 214 | + ABSL_LOG(FATAL) << "Unknown CPPTYPE"; | ||
| 215 | break; | ||
| 216 | } | ||
| 217 | if (!already_defined) | ||
| 218 | diff --git a/protoc-c/c_message.h b/protoc-c/c_message.h | ||
| 219 | index ea1c3ab..e90782b 100644 | ||
| 220 | --- a/protoc-c/c_message.h | ||
| 221 | +++ b/protoc-c/c_message.h | ||
| 222 | @@ -137,7 +137,6 @@ class MessageGenerator { | ||
| 223 | std::unique_ptr<std::unique_ptr<EnumGenerator>[]> enum_generators_; | ||
| 224 | std::unique_ptr<std::unique_ptr<ExtensionGenerator>[]> extension_generators_; | ||
| 225 | |||
| 226 | - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator); | ||
| 227 | }; | ||
| 228 | |||
| 229 | } // namespace c | ||
| 230 | diff --git a/protoc-c/c_message_field.h b/protoc-c/c_message_field.h | ||
| 231 | index 39b8d99..42efe36 100644 | ||
| 232 | --- a/protoc-c/c_message_field.h | ||
| 233 | +++ b/protoc-c/c_message_field.h | ||
| 234 | @@ -83,9 +83,6 @@ class MessageFieldGenerator : public FieldGenerator { | ||
| 235 | std::string GetDefaultValue(void) const; | ||
| 236 | void GenerateStaticInit(io::Printer* printer) const; | ||
| 237 | |||
| 238 | - private: | ||
| 239 | - | ||
| 240 | - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageFieldGenerator); | ||
| 241 | }; | ||
| 242 | |||
| 243 | |||
| 244 | diff --git a/protoc-c/c_primitive_field.cc b/protoc-c/c_primitive_field.cc | ||
| 245 | index 6990893..d5a7b60 100644 | ||
| 246 | --- a/protoc-c/c_primitive_field.cc | ||
| 247 | +++ b/protoc-c/c_primitive_field.cc | ||
| 248 | @@ -99,7 +99,7 @@ void PrimitiveFieldGenerator::GenerateStructMembers(io::Printer* printer) const | ||
| 249 | case FieldDescriptor::TYPE_STRING : | ||
| 250 | case FieldDescriptor::TYPE_BYTES : | ||
| 251 | case FieldDescriptor::TYPE_GROUP : | ||
| 252 | - case FieldDescriptor::TYPE_MESSAGE : GOOGLE_LOG(FATAL) << "not a primitive type"; break; | ||
| 253 | + case FieldDescriptor::TYPE_MESSAGE : ABSL_LOG(FATAL) << "not a primitive type"; break; | ||
| 254 | |||
| 255 | // No default because we want the compiler to complain if any new | ||
| 256 | // types are added. | ||
| 257 | @@ -143,7 +143,7 @@ std::string PrimitiveFieldGenerator::GetDefaultValue() const | ||
| 258 | case FieldDescriptor::CPPTYPE_BOOL: | ||
| 259 | return descriptor_->default_value_bool() ? "1" : "0"; | ||
| 260 | default: | ||
| 261 | - GOOGLE_LOG(DFATAL) << "unexpected CPPTYPE in c_primitive_field"; | ||
| 262 | + ABSL_LOG(FATAL) << "unexpected CPPTYPE in c_primitive_field"; | ||
| 263 | return "UNEXPECTED_CPPTYPE"; | ||
| 264 | } | ||
| 265 | } | ||
| 266 | @@ -197,7 +197,7 @@ void PrimitiveFieldGenerator::GenerateDescriptorInitializer(io::Printer* printer | ||
| 267 | case FieldDescriptor::TYPE_STRING : | ||
| 268 | case FieldDescriptor::TYPE_BYTES : | ||
| 269 | case FieldDescriptor::TYPE_GROUP : | ||
| 270 | - case FieldDescriptor::TYPE_MESSAGE : GOOGLE_LOG(FATAL) << "not a primitive type"; break; | ||
| 271 | + case FieldDescriptor::TYPE_MESSAGE : ABSL_LOG(FATAL) << "not a primitive type"; break; | ||
| 272 | |||
| 273 | // No default because we want the compiler to complain if any new | ||
| 274 | // types are added. | ||
| 275 | diff --git a/protoc-c/c_primitive_field.h b/protoc-c/c_primitive_field.h | ||
| 276 | index a9eb893..d2bb724 100644 | ||
| 277 | --- a/protoc-c/c_primitive_field.h | ||
| 278 | +++ b/protoc-c/c_primitive_field.h | ||
| 279 | @@ -83,9 +83,6 @@ class PrimitiveFieldGenerator : public FieldGenerator { | ||
| 280 | std::string GetDefaultValue(void) const; | ||
| 281 | void GenerateStaticInit(io::Printer* printer) const; | ||
| 282 | |||
| 283 | - private: | ||
| 284 | - | ||
| 285 | - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(PrimitiveFieldGenerator); | ||
| 286 | }; | ||
| 287 | |||
| 288 | } // namespace c | ||
| 289 | diff --git a/protoc-c/c_service.h b/protoc-c/c_service.h | ||
| 290 | index 27125a6..4737ff3 100644 | ||
| 291 | --- a/protoc-c/c_service.h | ||
| 292 | +++ b/protoc-c/c_service.h | ||
| 293 | @@ -101,7 +101,6 @@ class ServiceGenerator { | ||
| 294 | const ServiceDescriptor* descriptor_; | ||
| 295 | std::map<std::string, std::string> vars_; | ||
| 296 | |||
| 297 | - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ServiceGenerator); | ||
| 298 | }; | ||
| 299 | |||
| 300 | } // namespace c | ||
| 301 | diff --git a/protoc-c/c_string_field.h b/protoc-c/c_string_field.h | ||
| 302 | index 513cea7..ba258e4 100644 | ||
| 303 | --- a/protoc-c/c_string_field.h | ||
| 304 | +++ b/protoc-c/c_string_field.h | ||
| 305 | @@ -88,7 +88,6 @@ class StringFieldGenerator : public FieldGenerator { | ||
| 306 | private: | ||
| 307 | std::map<std::string, std::string> variables_; | ||
| 308 | |||
| 309 | - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(StringFieldGenerator); | ||
| 310 | }; | ||
| 311 | |||
| 312 | |||
| 313 | -- | ||
| 314 | 2.34.1 | ||
| 315 | |||
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb index d724287d66..86d83e9cc6 100644 --- a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb +++ b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb | |||
| @@ -12,7 +12,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=9f725889e0d77383e26cb42b0b62cea2" | |||
| 12 | 12 | ||
| 13 | DEPENDS = "protobuf-native protobuf" | 13 | DEPENDS = "protobuf-native protobuf" |
| 14 | 14 | ||
| 15 | SRC_URI = "git://github.com/protobuf-c/protobuf-c.git;branch=master;protocol=https" | 15 | SRC_URI = "git://github.com/protobuf-c/protobuf-c.git;branch=master;protocol=https \ |
| 16 | file://0001-add-support-of-protobuf-4.22.x.patch \ | ||
| 17 | " | ||
| 18 | SRC_URI:append:class-native = " file://0001-Makefile.am-do-not-compile-the-code-which-was-genera.patch" | ||
| 19 | |||
| 16 | SRCREV = "abc67a11c6db271bedbb9f58be85d6f4e2ea8389" | 20 | SRCREV = "abc67a11c6db271bedbb9f58be85d6f4e2ea8389" |
| 17 | 21 | ||
| 18 | S = "${WORKDIR}/git" | 22 | S = "${WORKDIR}/git" |
