summaryrefslogtreecommitdiffstats
path: root/patches/Python-3.5.4/0001-python3-don-t-leak-host-path-into-cross-compilation.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/Python-3.5.4/0001-python3-don-t-leak-host-path-into-cross-compilation.patch')
-rw-r--r--patches/Python-3.5.4/0001-python3-don-t-leak-host-path-into-cross-compilation.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/patches/Python-3.5.4/0001-python3-don-t-leak-host-path-into-cross-compilation.patch b/patches/Python-3.5.4/0001-python3-don-t-leak-host-path-into-cross-compilation.patch
new file mode 100644
index 000000000..fbe2c312f
--- /dev/null
+++ b/patches/Python-3.5.4/0001-python3-don-t-leak-host-path-into-cross-compilation.patch
@@ -0,0 +1,43 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Tue, 15 Sep 2015 15:33:58 +0200
+Subject: [PATCH] python3: don't leak host path into cross compilation
+
+Based on a patch by Han Sirkstra <han@protonic.nl>
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ setup.py | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 40f8bf20ee74..ee04dba88fa8 100644
+--- a/setup.py
++++ b/setup.py
+@@ -533,7 +533,8 @@ class PyBuildExt(build_ext):
+ add_dir_to_list(dir_list, directory)
+
+ if os.path.normpath(sys.base_prefix) != '/usr' \
+- and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
++ and not sysconfig.get_config_var('PYTHONFRAMEWORK') \
++ and not cross_compiling:
+ # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
+ # (PYTHONFRAMEWORK is set) to avoid # linking problems when
+ # building a framework with different architectures than
+@@ -1274,7 +1275,6 @@ class PyBuildExt(build_ext):
+ if dbm_setup_debug: print("building dbm using bdb")
+ dbmext = Extension('_dbm', ['_dbmmodule.c'],
+ library_dirs=dblib_dir,
+- runtime_library_dirs=dblib_dir,
+ include_dirs=db_incs,
+ define_macros=[
+ ('HAVE_BERKDB_H', None),
+@@ -1323,7 +1323,8 @@ class PyBuildExt(build_ext):
+ panel_library = 'panel'
+ if curses_library == 'ncursesw':
+ curses_defines.append(('HAVE_NCURSESW', '1'))
+- curses_includes.append('/usr/include/ncursesw')
++ if not cross_compiling:
++ curses_includes.append('/usr/include/ncursesw')
+ # Bug 1464056: If _curses.so links with ncursesw,
+ # _curses_panel.so must link with panelw.
+ panel_library = 'panelw'