aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/python/files/3.2/41_all_crosscompile.patch')
-rw-r--r--dev-lang/python/files/3.2/41_all_crosscompile.patch94
1 files changed, 94 insertions, 0 deletions
diff --git a/dev-lang/python/files/3.2/41_all_crosscompile.patch b/dev-lang/python/files/3.2/41_all_crosscompile.patch
new file mode 100644
index 0000000..c35d2ba
--- /dev/null
+++ b/dev-lang/python/files/3.2/41_all_crosscompile.patch
@@ -0,0 +1,94 @@
+Crosscompile
+
+--- Makefile.pre.in
++++ Makefile.pre.in
+@@ -202,6 +202,7 @@
+
+ PYTHON= python$(EXE)
+ BUILDPYTHON= python$(BUILDEXE)
++HOSTPYTHON= $(BUILDPYTHON)
+
+ # 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
+@@ -244,6 +245,7 @@
+ ##########################################################################
+ # Parser
+ PGEN= Parser/pgen$(EXE)
++HOSTPGEN= $(PGEN)
+
+ POBJS= \
+ Parser/acceler.o \
+@@ -455,7 +457,7 @@
+ *) quiet="";; \
+ esac; \
+ $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' CFLAGS='$(PY_CFLAGS)' \
+- ./$(BUILDPYTHON) -E $(srcdir)/setup.py $$quiet build
++ ./$(HOSTPYTHON) -E $(srcdir)/setup.py $$quiet build
+
+ # Build the platform-specific modules
+ platformspecificmods: $(BUILDPYTHON) sharedmods
+@@ -635,9 +637,9 @@
+
+ # Use a stamp file to prevent make -j invoking pgen twice
+ $(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp
+-Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT)
++Parser/pgen.stamp: $(HOSTPGEN) $(GRAMMAR_INPUT)
+ -@$(INSTALL) -d Include
+- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
++ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+ -touch Parser/pgen.stamp
+
+ $(PGEN): $(PGENOBJS)
+@@ -1065,27 +1067,27 @@
+ $(DESTDIR)$(LIBDEST)/distutils/tests ; \
+ fi
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- ./$(BUILDPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
++ ./$(HOSTPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST) -f \
+ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+ $(DESTDIR)$(LIBDEST)
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- ./$(BUILDPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
++ ./$(HOSTPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST) -f \
+ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+ $(DESTDIR)$(LIBDEST)
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- ./$(BUILDPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
++ ./$(HOSTPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST)/site-packages -f \
+ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- ./$(BUILDPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
++ ./$(HOSTPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST)/site-packages -f \
+ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- ./$(BUILDPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
++ ./$(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- ./$(BUILDPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
++ ./$(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
+
+ python-config: $(srcdir)/Misc/python-config.in
+ # Substitution happens here, as the completely-expanded BINDIR
+@@ -1157,7 +1159,7 @@
+ # Install the dynamically loadable modules
+ # This goes into $(exec_prefix)
+ sharedinstall: sharedmods
+- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
++ $(RUNSHARED) ./$(HOSTPYTHON) -E $(srcdir)/setup.py install \
+ --prefix=$(prefix) \
+ --install-scripts=$(BINDIR) \
+ --install-platlib=$(DESTSHARED) \
+--- setup.py
++++ setup.py
+@@ -345,6 +345,7 @@
+ try:
+ imp.load_dynamic(ext.name, ext_filename)
+ except ImportError as why:
++ return
+ self.failed.append(ext.name)
+ self.announce('*** WARNING: renaming "%s" since importing it'
+ ' failed: %s' % (ext.name, why), level=3)