012-dont-add-multiarch-path.patch 1.1 KB

12345678910111213141516171819202122232425262728
  1. Don't add multiarch paths
  2. The add_multiarch_paths() function leads, in certain build
  3. environments, to the addition of host header paths to the CFLAGS,
  4. which is not appropriate for cross-compilation. This patch fixes that
  5. by simply removing the call to add_multiarch_paths() when we're
  6. cross-compiling.
  7. Investigation done by David <buildroot-2014@inbox.com>.
  8. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  9. Index: b/setup.py
  10. ===================================================================
  11. --- a/setup.py
  12. +++ b/setup.py
  13. @@ -456,10 +456,10 @@
  14. if not cross_compiling:
  15. add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
  16. add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
  17. + self.add_multiarch_paths()
  18. # only change this for cross builds for 3.3, issues on Mageia
  19. if cross_compiling:
  20. self.add_gcc_paths()
  21. - self.add_multiarch_paths()
  22. # Add paths specified in the environment variables LDFLAGS and
  23. # CPPFLAGS for header and library files.