xref: /OK3568_Linux_fs/buildroot/package/python3/0006-Don-t-add-multiarch-paths.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From f5933b8f973cd11698b52d535a10d0474e49f5a5 Mon Sep 17 00:00:00 2001
2From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3Date: Wed, 23 Dec 2015 11:36:27 +0100
4Subject: [PATCH] Don't add multiarch paths
5
6The add_multiarch_paths() function leads, in certain build
7environments, to the addition of host header paths to the CFLAGS,
8which is not appropriate for cross-compilation. This patch fixes that
9by simply removing the call to add_multiarch_paths() when we're
10cross-compiling.
11
12Investigation done by David <buildroot-2014@inbox.com>.
13
14Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
15---
16 setup.py | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/setup.py b/setup.py
20index ec3ba60607..e27620035c 100644
21--- a/setup.py
22+++ b/setup.py
23@@ -830,10 +830,10 @@ class PyBuildExt(build_ext):
24         if not CROSS_COMPILING:
25             add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
26             add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
27+            self.add_multiarch_paths()
28         # only change this for cross builds for 3.3, issues on Mageia
29         if CROSS_COMPILING:
30             self.add_cross_compiling_paths()
31-        self.add_multiarch_paths()
32         self.add_ldflags_cppflags()
33
34     def init_inc_lib_dirs(self):
35--
362.25.1
37
38