diff options
Diffstat (limited to 'patches/Python-2.7.16/0005-add-cross-compilation-support.patch')
-rw-r--r-- | patches/Python-2.7.16/0005-add-cross-compilation-support.patch | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/patches/Python-2.7.16/0005-add-cross-compilation-support.patch b/patches/Python-2.7.16/0005-add-cross-compilation-support.patch new file mode 100644 index 000000000..79efeba4e --- /dev/null +++ b/patches/Python-2.7.16/0005-add-cross-compilation-support.patch @@ -0,0 +1,61 @@ +From: Marc Kleine-Budde <mkl@pengutronix.de> +Date: Mon, 4 May 2009 14:39:18 +0200 +Subject: [PATCH] add cross compilation support + +This patch adds preliminary cross compilation support to python. + +Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> +--- + Makefile.pre.in | 12 ++++++++---- + configure.ac | 7 +++++++ + 2 files changed, 15 insertions(+), 4 deletions(-) + +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 9297e7fc89c4..1400c8ca6f97 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -88,6 +88,10 @@ CFLAGSFORSHARED=@CFLAGSFORSHARED@ + # C flags used for building the interpreter object files + PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE + ++# cross compiler options ++ifndef DESTDIR ++sysroot= @SYSROOT@ ++endif + + # Machine-dependent subdirectories + MACHDEP= @MACHDEP@ +@@ -106,11 +110,11 @@ datarootdir= @datarootdir@ + + # Expanded directories + BINDIR= @bindir@ +-LIBDIR= @libdir@ ++LIBDIR= $(sysroot)@libdir@ + MANDIR= @mandir@ +-INCLUDEDIR= @includedir@ +-CONFINCLUDEDIR= $(exec_prefix)/include +-SCRIPTDIR= $(prefix)/lib ++INCLUDEDIR= $(sysroot)@includedir@ ++CONFINCLUDEDIR= $(sysroot)$(exec_prefix)/include ++SCRIPTDIR= $(sysroot)$(prefix)/lib + + # Detailed destination directories + BINLIBDEST= $(LIBDIR)/python$(VERSION) +diff --git a/configure.ac b/configure.ac +index c89e4a601cf1..863d7929507b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -980,6 +980,13 @@ if test "$cross_compiling" = yes; then + RUNSHARED= + fi + ++# sysroot ++AC_SUBST(SYSROOT) ++if test "$cross_compiling" = yes; then ++ AC_MSG_CHECKING([for SYSROOT]) ++ AC_MSG_RESULT([$SYSROOT]) ++fi ++ + AC_MSG_RESULT($LDLIBRARY) + + AC_PROG_RANLIB |