diff options
author | Peter Korsgaard <jacmet@sunsite.dk> | 2011-01-25 16:24:46 +0100 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2011-01-25 16:24:46 +0100 |
commit | 0eef30440e9597b2c0b9c7a0340a3986a7ea2a65 (patch) | |
tree | f8e74a929418c8085bc09dd5606a10e356923c74 /package/python/python-2.7-002-cross-compile-variable.patch | |
parent | 4c6a451ac9fab16abcda5834ed4a9b728091ab9e (diff) | |
parent | 6ea3c8bd4dabe2b11a8beecb6a641336e6e90f3c (diff) | |
download | buildroot-novena-0eef30440e9597b2c0b9c7a0340a3986a7ea2a65.tar.gz buildroot-novena-0eef30440e9597b2c0b9c7a0340a3986a7ea2a65.zip |
Merge branch 'for-2011.02/python-bump' of git://git.busybox.net/~tpetazzoni/git/buildroot
Diffstat (limited to 'package/python/python-2.7-002-cross-compile-variable.patch')
-rw-r--r-- | package/python/python-2.7-002-cross-compile-variable.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/package/python/python-2.7-002-cross-compile-variable.patch b/package/python/python-2.7-002-cross-compile-variable.patch new file mode 100644 index 000000000..04b71b075 --- /dev/null +++ b/package/python/python-2.7-002-cross-compile-variable.patch @@ -0,0 +1,55 @@ +Pass a CROSS_COMPILING variable to setup.py + +The setup.py script in the Python source code plays a significant role +in the Python build process. It is responsible for building all the +modules and extensions, and due to this, does various checks that need +to be adjusted when we are cross-compiling. + +For that reason, this patch makes sure that a CROSS_COMPILING variable +is passed in the environment of the setup.py script. Later patches in +the stack make use of this variable. + +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +--- + Makefile.pre.in | 6 +++--- + configure.in | 3 +++ + 2 files changed, 6 insertions(+), 3 deletions(-) + +Index: Python-2.7.1/Makefile.pre.in +=================================================================== +--- Python-2.7.1.orig/Makefile.pre.in ++++ Python-2.7.1/Makefile.pre.in +@@ -406,8 +406,8 @@ + # Build the shared modules + sharedmods: $(BUILDPYTHON) + @case $$MAKEFLAGS in \ +- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \ +- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \ ++ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \ ++ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \ + esac + + # Build static library +@@ -1046,7 +1046,7 @@ + # Install the dynamically loadable modules + # This goes into $(exec_prefix) + sharedinstall: sharedmods +- $(RUNSHARED) $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \ ++ $(RUNSHARED) CROSS_COMPILING=@CROSS_COMPILING@ $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \ + --prefix=$(prefix) \ + --install-scripts=$(BINDIR) \ + --install-platlib=$(DESTSHARED) \ +Index: Python-2.7.1/configure.in +=================================================================== +--- Python-2.7.1.orig/configure.in ++++ Python-2.7.1/configure.in +@@ -4308,6 +4308,9 @@ + AC_ARG_VAR(PYTHON_FOR_BUILD,[build system Python]) + AC_ARG_VAR(PGEN_FOR_BUILD,[build system Python pgen]) + ++CROSS_COMPILING=$cross_compiling ++AC_SUBST(CROSS_COMPILING) ++ + # generate output files + AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc) + AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix]) |