0011-Don-t-add-multiarch-paths.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. From 50a243a9c90f95e9248ac720e42e802b5922ab90 Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Tue, 7 Mar 2017 22:24:28 +0100
  4. Subject: [PATCH] Don't add multiarch paths
  5. The add_multiarch_paths() function leads, in certain build
  6. environments, to the addition of host header paths to the CFLAGS,
  7. which is not appropriate for cross-compilation. This patch fixes that
  8. by simply removing the call to add_multiarch_paths() when we're
  9. cross-compiling.
  10. Investigation done by David <buildroot-2014@inbox.com>.
  11. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  12. ---
  13. setup.py | 2 +-
  14. 1 file changed, 1 insertion(+), 1 deletion(-)
  15. diff --git a/setup.py b/setup.py
  16. index fa32532..0b9ea57 100644
  17. --- a/setup.py
  18. +++ b/setup.py
  19. @@ -461,9 +461,9 @@ class PyBuildExt(build_ext):
  20. if not cross_compiling:
  21. add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
  22. add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
  23. + self.add_multiarch_paths()
  24. if cross_compiling:
  25. self.add_gcc_paths()
  26. - self.add_multiarch_paths()
  27. # Add paths specified in the environment variables LDFLAGS and
  28. # CPPFLAGS for header and library files.
  29. --
  30. 2.7.4