python-native: Fixes PGEN linking errors Changes Makefile rules to avoid parallel make races when trying to build Parser/PGEN

(From OE-Core rev: f98cd3798837f2954443ca84a199158d9f47c3e8)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alejandro Hernandez 2015-02-24 00:08:08 -06:00 committed by Richard Purdie
parent d6a2cf3cbe
commit 04819731e9
2 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,27 @@
Upstream-Status: Inappropriate [embedded specific]
Avoids parallel make races linking errors when making Parser/PGEN
- Implements Richard Purdie's idea
Signed-Off-By: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Index: Python-2.7.9/Makefile.pre.in
===================================================================
--- Python-2.7.9.orig/Makefile.pre.in
+++ Python-2.7.9/Makefile.pre.in
@@ -610,12 +610,10 @@ Modules/grpmodule.o: $(srcdir)/Modules/g
Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c $(srcdir)/Modules/posixmodule.h
-$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
+$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS) $(PGEN)
@$(MKDIR_P) Include
- $(MAKE) $(PGEN)
$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
$(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS)
- $(MAKE) $(GRAMMAR_H)
touch $(GRAMMAR_C)
$(PGEN): $(PGENOBJS)

View File

@ -17,6 +17,7 @@ SRC_URI += "\
file://builddir.patch \
file://parallel-makeinst-create-bindir.patch \
file://revert_use_of_sysconfigdata.patch \
file://avoid_parallel_make_races_on_pgen.patch \
"
S = "${WORKDIR}/Python-${PV}"