1From 3e953e494570ddb78823d12f66dae1759f4780a3 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 b283ea3aeed..585dd43828d 100644
21--- a/setup.py
22+++ b/setup.py
23@@ -853,10 +853,10 @@ def configure_compiler(self):
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.44.0
37
38