diff options
-rw-r--r-- | recipes/python/python-2.6.5/00-fix-parallel-make.patch | 40 | ||||
-rw-r--r-- | recipes/python/python-2.6.5/01-use-proper-tools-for-cross-build.patch | 14 | ||||
-rw-r--r-- | recipes/python/python-native_2.6.5.bb | 3 | ||||
-rw-r--r-- | recipes/python/python_2.6.5.bb | 3 |
4 files changed, 51 insertions, 9 deletions
diff --git a/recipes/python/python-2.6.5/00-fix-parallel-make.patch b/recipes/python/python-2.6.5/00-fix-parallel-make.patch new file mode 100644 index 0000000000..c80ca19229 --- /dev/null +++ b/recipes/python/python-2.6.5/00-fix-parallel-make.patch @@ -0,0 +1,40 @@ +upstream: <http://bugs.python.org/issue10013> +comment: As in the comment in the issue tracker this is fixed for py3k a little differently <http://svn.python.org/view?view=rev&revision=84068>. This patch is taken from Fedora. + +diff -up Python-2.7/Makefile.pre.in.fix-parallel-make Python-2.7/Makefile.pre.in +--- Python-2.7/Makefile.pre.in.fix-parallel-make 2010-07-22 15:01:39.567996932 -0400 ++++ Python-2.7/Makefile.pre.in 2010-07-22 15:47:02.437998509 -0400 +@@ -197,6 +197,7 @@ SIGNAL_OBJS= @SIGNAL_OBJS@ + + ########################################################################## + # Grammar ++GRAMMAR_STAMP= $(srcdir)/grammar-stamp + GRAMMAR_H= $(srcdir)/Include/graminit.h + GRAMMAR_C= $(srcdir)/Python/graminit.c + GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar +@@ -514,10 +515,24 @@ Modules/getpath.o: $(srcdir)/Modules/get + Modules/python.o: $(srcdir)/Modules/python.c + $(MAINCC) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/python.c + ++# GNU "make" interprets rules with two dependents as two copies of the rule. ++# ++# In a parallel build this can lead to pgen being run twice, once for each of ++# GRAMMAR_H and GRAMMAR_C, leading to race conditions in which the compiler ++# reads a partially-overwritten copy of one of these files, leading to syntax ++# errors (or linker errors if the fragment happens to be syntactically valid C) ++# ++# See http://www.gnu.org/software/hello/manual/automake/Multiple-Outputs.html ++# for more information. ++# ++# Introduce ".grammar-stamp" as a contrived single output from PGEN to avoid ++# this: ++$(GRAMMAR_H) $(GRAMMAR_C): $(GRAMMAR_STAMP) + +-$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT) ++$(GRAMMAR_STAMP): $(PGEN) $(GRAMMAR_INPUT) + -@$(INSTALL) -d Include + -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) ++ touch $(GRAMMAR_STAMP) + + $(PGEN): $(PGENOBJS) + $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN) diff --git a/recipes/python/python-2.6.5/01-use-proper-tools-for-cross-build.patch b/recipes/python/python-2.6.5/01-use-proper-tools-for-cross-build.patch index e89faa4fb0..4b485ec3a6 100644 --- a/recipes/python/python-2.6.5/01-use-proper-tools-for-cross-build.patch +++ b/recipes/python/python-2.6.5/01-use-proper-tools-for-cross-build.patch @@ -14,7 +14,7 @@ Index: Python-2.6.1/Makefile.pre.in # The task to run while instrument when building the profile-opt target PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck -@@ -205,7 +206,7 @@ GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar +@@ -206,7 +207,7 @@ GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar ########################################################################## # Parser PGEN= Parser/pgen$(EXE) @@ -23,7 +23,7 @@ Index: Python-2.6.1/Makefile.pre.in POBJS= \ Parser/acceler.o \ Parser/grammar1.o \ -@@ -394,8 +395,8 @@ platform: $(BUILDPYTHON) +@@ -395,8 +396,8 @@ platform: $(BUILDPYTHON) # Build the shared modules sharedmods: $(BUILDPYTHON) @case $$MAKEFLAGS in \ @@ -34,16 +34,16 @@ Index: Python-2.6.1/Makefile.pre.in esac # Build static library -@@ -513,7 +514,7 @@ Modules/python.o: $(srcdir)/Modules/pyth +@@ -531,7 +532,7 @@ $(GRAMMAR_H) $(GRAMMAR_C): $(GRAMMAR_STAMP) - $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT) + $(GRAMMAR_STAMP): $(PGEN) $(GRAMMAR_INPUT) -@$(INSTALL) -d Include - -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) + -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) + touch $(GRAMMAR_STAMP) $(PGEN): $(PGENOBJS) - $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN) -@@ -879,23 +880,23 @@ libinstall: build_all $(srcdir)/Lib/$(PL +@@ -902,23 +903,23 @@ libinstall: build_all $(srcdir)/Lib/$(PL done $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ @@ -72,7 +72,7 @@ Index: Python-2.6.1/Makefile.pre.in # Create the PLATDIR source directory, if one wasn't distributed.. $(srcdir)/Lib/$(PLATDIR): -@@ -993,7 +994,7 @@ libainstall: all +@@ -1016,7 +1017,7 @@ libainstall: all # Install the dynamically loadable modules # This goes into $(exec_prefix) sharedinstall: diff --git a/recipes/python/python-native_2.6.5.bb b/recipes/python/python-native_2.6.5.bb index 999335cd65..95577c3186 100644 --- a/recipes/python/python-native_2.6.5.bb +++ b/recipes/python/python-native_2.6.5.bb @@ -1,9 +1,10 @@ require python.inc DEPENDS = "openssl-native bzip2-full-native zlib-native readline-native sqlite3-native" -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" FILESPATHPKG .= ":python-${PV}:python" SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \ + file://00-fix-parallel-make.patch \ file://00-fix-bindir-libdir-for-cross.patch \ file://04-default-is-optimized.patch \ file://05-enable-ctypes-cross-build.patch \ diff --git a/recipes/python/python_2.6.5.bb b/recipes/python/python_2.6.5.bb index ecd9f78417..c8393c1149 100644 --- a/recipes/python/python_2.6.5.bb +++ b/recipes/python/python_2.6.5.bb @@ -3,10 +3,11 @@ DEPENDS = "python-native db gdbm openssl readline sqlite3 tcl zlib\ ${@base_contains('DISTRO_FEATURES', 'tk', 'tk', '', d)}" DEPENDS_sharprom = "python-native db readline zlib gdbm openssl" # set to .0 on every increase of INC_PR -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" SRC_URI = "\ http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \ + file://00-fix-parallel-make.patch \ file://00-fix-bindir-libdir-for-cross.patch \ file://01-use-proper-tools-for-cross-build.patch \ file://02-remove-test-for-cross.patch \ |