aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQi.Chen@windriver.com <Qi.Chen@windriver.com>2019-09-29 17:29:56 +0800
committerKhem Raj <raj.khem@gmail.com>2019-09-30 16:54:51 -0700
commit489d3b4b932ee8016d792341f8ea5836a9522cd4 (patch)
tree31c0de67f383a1c720ee97ad39a5a240b31be685
parent7e5be41e9e916e8a76c8d62b606d7716175923f7 (diff)
downloadmeta-openembedded-contrib-489d3b4b932ee8016d792341f8ea5836a9522cd4.tar.gz
meta-openembedded-contrib-489d3b4b932ee8016d792341f8ea5836a9522cd4.tar.bz2
meta-openembedded-contrib-489d3b4b932ee8016d792341f8ea5836a9522cd4.zip
protobuf-c: fix race condition
Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf-c/0001-avoid-race-condition.patch36
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.2.bb1
2 files changed, 37 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-avoid-race-condition.patch b/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-avoid-race-condition.patch
new file mode 100644
index 0000000000..4fc7703d81
--- /dev/null
+++ b/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-avoid-race-condition.patch
@@ -0,0 +1,36 @@
+From 216e31260b618ec73862f9f5336597f391444dac Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Sun, 29 Sep 2019 17:20:42 +0800
+Subject: [PATCH] avoid race condition
+
+It's possible that the cxx-generate-packed-data.cc is compiled
+while the t/test-full.pb.h is being generated. This will result
+the following error.
+
+ DEBUG: ./t/test-full.pb.h:4:0: error: unterminated #ifndef
+ ./t/test-full.pb.h:4:0: error: unterminated #ifndef
+
+Add a dependency to avoid such problem.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index b0cb065..1608ae0 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -156,6 +156,7 @@ noinst_PROGRAMS += \
+ t_generated_code2_cxx_generate_packed_data_SOURCES = \
+ t/generated-code2/cxx-generate-packed-data.cc \
+ t/test-full.pb.cc
++t/generated-code2/cxx-generate-packed-data.cc: t/test-full.pb.h
+ $(t_generated_code2_cxx_generate_packed_data_OBJECTS): t/test-full.pb.h
+ t_generated_code2_cxx_generate_packed_data_CXXFLAGS = \
+ $(AM_CXXFLAGS) \
+--
+2.17.1
+
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.2.bb b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.2.bb
index 6d1ffc3f40..b92f82dec2 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.2.bb
+++ b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.2.bb
@@ -15,6 +15,7 @@ DEPENDS = "protobuf-native protobuf"
SRCREV = "1390409f4ee4e26d0635310995b516eb702c3f9e"
SRC_URI = "git://github.com/protobuf-c/protobuf-c.git \
+ file://0001-avoid-race-condition.patch \
"
S = "${WORKDIR}/git"