Fix build race condition in bindings

Message ID 20181012102824.15460-1-sbabic@denx.de
State Accepted
Headers show
Series
  • Fix build race condition in bindings
Related show

Commit Message

Stefano Babic Oct. 12, 2018, 10:28 a.m.
On powerful server runing with "make -j16", a race
condition happens due to the lua_compat object
that is in shared library, too.

Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 bindings/Makefile            | 2 +-
 bindings/lua_compat_shared.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
 create mode 100644 bindings/lua_compat_shared.c

Patch

diff --git a/bindings/Makefile b/bindings/Makefile
index ba9e75c..4152340 100644
--- a/bindings/Makefile
+++ b/bindings/Makefile
@@ -1,6 +1,6 @@ 
 # Copyright (C) 2014-2018 Stefano Babic <sbabic@denx.de>
 #
 # SPDX-License-Identifier:     GPL-2.0-or-later
-obj-$(CONFIG_LUA)	+= auxiliar.o lua_swupdate.o ../corelib/lua_compat.o
+obj-$(CONFIG_LUA)	+= auxiliar.o lua_swupdate.o lua_compat_shared.o
 
 EXTRA_CFLAGS += -fPIC
diff --git a/bindings/lua_compat_shared.c b/bindings/lua_compat_shared.c
new file mode 100644
index 0000000..b8019a0
--- /dev/null
+++ b/bindings/lua_compat_shared.c
@@ -0,0 +1 @@ 
+#include <../corelib/lua_compat.c>