summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQi.Chen@windriver.com <Qi.Chen@windriver.com>2019-10-17 20:45:24 +0000
committerArmin Kuster <akuster808@gmail.com>2019-10-19 08:18:29 -0700
commit7f011d0ba2e0dd31f3f07d03730974ea862e926b (patch)
treed7e6ec32383458ce47c4640143d5547f700e6667
parentb0478316a19814a79c030640e7d45eca6971d0a8 (diff)
downloadmeta-openembedded-7f011d0ba2e0dd31f3f07d03730974ea862e926b.tar.gz
protobuf-c: fix race condition
Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Sinan Kaya <okaya@kernel.org> (cherry picked from commit 489d3b4b932ee8016d792341f8ea5836a9522cd4) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Armin Kuster <akuster808@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.1.bb3
2 files changed, 38 insertions, 1 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 000000000..4fc7703d8
--- /dev/null
+++ b/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-avoid-race-condition.patch
@@ -0,0 +1,36 @@
1From 216e31260b618ec73862f9f5336597f391444dac Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Sun, 29 Sep 2019 17:20:42 +0800
4Subject: [PATCH] avoid race condition
5
6It's possible that the cxx-generate-packed-data.cc is compiled
7while the t/test-full.pb.h is being generated. This will result
8the following error.
9
10 DEBUG: ./t/test-full.pb.h:4:0: error: unterminated #ifndef
11 ./t/test-full.pb.h:4:0: error: unterminated #ifndef
12
13Add a dependency to avoid such problem.
14
15Upstream-Status: Pending
16
17Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
18---
19 Makefile.am | 1 +
20 1 file changed, 1 insertion(+)
21
22diff --git a/Makefile.am b/Makefile.am
23index b0cb065..1608ae0 100644
24--- a/Makefile.am
25+++ b/Makefile.am
26@@ -156,6 +156,7 @@ noinst_PROGRAMS += \
27 t_generated_code2_cxx_generate_packed_data_SOURCES = \
28 t/generated-code2/cxx-generate-packed-data.cc \
29 t/test-full.pb.cc
30+t/generated-code2/cxx-generate-packed-data.cc: t/test-full.pb.h
31 $(t_generated_code2_cxx_generate_packed_data_OBJECTS): t/test-full.pb.h
32 t_generated_code2_cxx_generate_packed_data_CXXFLAGS = \
33 $(AM_CXXFLAGS) \
34--
352.17.1
36
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.1.bb b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.1.bb
index 7ef030092..17f92f04b 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.1.bb
+++ b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.3.1.bb
@@ -15,7 +15,8 @@ DEPENDS = "protobuf-native protobuf"
15PV .= "+git${SRCPV}" 15PV .= "+git${SRCPV}"
16SRCREV = "269771b4b45d3aba04e59569f53600003db8d9ff" 16SRCREV = "269771b4b45d3aba04e59569f53600003db8d9ff"
17 17
18SRC_URI = "git://github.com/protobuf-c/protobuf-c.git" 18SRC_URI = "git://github.com/protobuf-c/protobuf-c.git \
19 file://0001-avoid-race-condition.patch"
19 20
20S = "${WORKDIR}/git" 21S = "${WORKDIR}/git"
21 22