summaryrefslogtreecommitdiffstats
path: root/patches/Python-3.1.2/0021-fix-parallel-building.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/Python-3.1.2/0021-fix-parallel-building.patch')
-rw-r--r--patches/Python-3.1.2/0021-fix-parallel-building.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/patches/Python-3.1.2/0021-fix-parallel-building.patch b/patches/Python-3.1.2/0021-fix-parallel-building.patch
new file mode 100644
index 000000000..924352785
--- /dev/null
+++ b/patches/Python-3.1.2/0021-fix-parallel-building.patch
@@ -0,0 +1,34 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Wed, 11 Aug 2010 10:44:06 +0200
+Subject: [PATCH] fix parallel building
+
+Producing two target with on command results in a race condition:
+Both targets are requested, the command is executed twice, and the target
+are overwritten randomly.
+Solution: Run the command for on target and let the second depend on it.
+Then touch the second to make sure it's newer.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ Makefile.pre.in | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 8e49d84..aced68e 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -546,7 +546,10 @@ Modules/python.o: $(srcdir)/Modules/python.c
+
+ $(IO_OBJS): $(IO_H)
+
+-$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN_FOR_BUILD) $(GRAMMAR_INPUT)
++$(GRAMMAR_H): $(GRAMMAR_C)
++ @touch $@
++
++$(GRAMMAR_C): $(PGEN_FOR_BUILD) $(GRAMMAR_INPUT)
+ -@$(INSTALL) -d Include
+ -$(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+
+--
+1.7.1
+