001-remove-host-header-path.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132
  1. setup.py: do not add invalid header locations
  2. This piece of code incorrectly adds /usr/include to
  3. self.compiler.include_dirs, and results in the following invalid
  4. compilation line:
  5. /home/thomas/projets/buildroot/output/host/usr/bin/arm-none-linux-gnueabi-gcc -fPIC \
  6. -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \
  7. -pipe -Os -DNDEBUG -g -O3 -Wall -Wstrict-prototypes \
  8. -I/usr/include -I. -IInclude -I./Include \
  9. -I/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include \
  10. -I/home/thomas/projets/buildroot/output/build/python-2.7.6/Include \
  11. -I/home/thomas/projets/buildroot/output/build/python-2.7.6 \
  12. -c /home/thomas/projets/buildroot/output/build/python-2.7.6/Modules/mathmodule.c \
  13. -o build/temp.linux2-arm-2.7/home/thomas/projets/buildroot/output/build/python-2.7.6/Modules/mathmodule.o
  14. cc1: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories]
  15. [...]
  16. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  17. Index: b/setup.py
  18. ===================================================================
  19. --- a/setup.py
  20. +++ b/setup.py
  21. @@ -480,7 +480,7 @@
  22. for directory in reversed(options.dirs):
  23. add_dir_to_list(dir_list, directory)
  24. - if os.path.normpath(sys.prefix) != '/usr' \
  25. + if False and os.path.normpath(sys.prefix) != '/usr' \
  26. and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
  27. # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
  28. # (PYTHONFRAMEWORK is set) to avoid # linking problems when