Skip to contentSkip to conversation

python: Fix PGEN linking errors

PATCH Superseded Alejandro Hernandez 1 participant 1 message Mar 23, 2015

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python: Fix PGEN linking errors

Parallel make races when linking PGEN affects target's python compilation as well, adds patch from python-native to modify the Makefile and avoid parallel make races, also updates upstream status

---
 .../avoid_parallel_make_races_on_pgen.patch        |  2 +-
 .../python/avoid_parallel_make_races_on_pgen.patch | 27 ++++++++++++++++++++++
 meta/recipes-devtools/python/python_2.7.9.bb       |  1 +
 3 files changed, 29 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/python/python/avoid_parallel_make_races_on_pgen.patch
meta/recipes-devtools/python/python-native/avoid_parallel_make_races_on_pgen.patch +1 -1
index 1a8f68e..5279e7c 100644
@@ -1,4 +1,4 @@
-Upstream-Status: Inappropriate [embedded specific]
+Upstream-Status: Pending
 
 Avoids parallel make races linking errors when making Parser/PGEN
 
meta/recipes-devtools/python/python/avoid_parallel_make_races_on_pgen.patch new file +27 -0
new file mode 100644
index 0000000..5279e7c
@@ -0,0 +1,27 @@
+Upstream-Status: Pending
+
+Avoids parallel make races linking errors when making Parser/PGEN
+
+- Implements Richard Purdie's idea
+
+Signed-Off-By: Richard Purdie <[email protected]>
+Signed-Off-By: Alejandro Hernandez <[email protected]>
+
+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)
meta/recipes-devtools/python/python_2.7.9.bb +1 -0
index 4087c2c..6d5b42a 100644
@@ -25,6 +25,7 @@ SRC_URI += "\
   file://run-ptest \
   file://parallel-makeinst-create-bindir.patch \
   file://use_sysroot_ncurses_instead_of_host.patch \
+  file://avoid_parallel_make_races_on_pgen.patch \
 "
 
 S = "${WORKDIR}/Python-${PV}"
Signature · 1 line
1.9.1