aboutsummaryrefslogtreecommitdiff
path: root/lang/python/python3/patches/006-do-not-add-multiarch-paths-when-cross-compiling.patch
diff options
context:
space:
mode:
authorAlexandru Ardelean <ardeleanalex@gmail.com>2019-11-04 14:05:09 +0200
committerAlexandru Ardelean <ardeleanalex@gmail.com>2019-11-04 14:10:36 +0200
commit0c8b0b0bf727a57b0138a1425d2f32786dddd146 (patch)
treeb30b1b289cbae66101684c75dfaa4096d82fb1bb /lang/python/python3/patches/006-do-not-add-multiarch-paths-when-cross-compiling.patch
parent97bada594b6aa212c9fe04e155021ec3080cd988 (diff)
python3: fix build on Ubuntu/Debian multi-arch
This issue was introduced after upgrading to 3.8. Patch `006-remove-multi-arch-and-local-paths.patch` was dropped. It was tested on x86, but when using the x86_64 compiler in OpenWrt, the issue is present. The issue seems to be about Ubuntu/Debian's multi-arch support in Python/Python3 setup [which I forgot about]. The code runs it regardless of whether it cross-compiles or not, and for OpenWrt, this causes issues, as it introduces absolute include paths from the host system. Fixes https://github.com/openwrt/packages/issues/10452 Fixes: 48277ec915815 ("python3: bump to version 3.8") Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Diffstat (limited to 'lang/python/python3/patches/006-do-not-add-multiarch-paths-when-cross-compiling.patch')
-rw-r--r--lang/python/python3/patches/006-do-not-add-multiarch-paths-when-cross-compiling.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/lang/python/python3/patches/006-do-not-add-multiarch-paths-when-cross-compiling.patch b/lang/python/python3/patches/006-do-not-add-multiarch-paths-when-cross-compiling.patch
new file mode 100644
index 000000000..16ef86ab8
--- /dev/null
+++ b/lang/python/python3/patches/006-do-not-add-multiarch-paths-when-cross-compiling.patch
@@ -0,0 +1,12 @@
+--- a/setup.py
++++ b/setup.py
+@@ -654,7 +654,8 @@ class PyBuildExt(build_ext):
+ # only change this for cross builds for 3.3, issues on Mageia
+ if CROSS_COMPILING:
+ self.add_cross_compiling_paths()
+- self.add_multiarch_paths()
++ else:
++ self.add_multiarch_paths()
+ self.add_ldflags_cppflags()
+
+ def init_inc_lib_dirs(self):